From 5352821b5cc151131728a072adeb3f146edee9fc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 16 Nov 2023 19:12:39 +0000 Subject: [PATCH] feat: [aiplatform] add ComputeTokens API (#10053) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 582473450 Source-Link: https://togithub.com/googleapis/googleapis/commit/a9e4e72e32b550a5451030feae99d1602ee40e0d Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/56ea7e1c067eed56256ba6310f44d6b94c67748a Copy-Tag: eyJwIjoiamF2YS1haXBsYXRmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiI1NmVhN2UxYzA2N2VlZDU2MjU2YmE2MzEwZjQ0ZDZiOTRjNjc3NDhhIn0= BEGIN_NESTED_COMMIT feat: [aiplatform] add deployment_timeout to UploadModel ModelContainerSpec feat: add shared_memory_size_mb to UploadModel ModelContainerSpec feat: add startup_probe, health_probe to UploadModel ModelContainerSpec PiperOrigin-RevId: 582390619 Source-Link: https://togithub.com/googleapis/googleapis/commit/49c44ef1f0959f7d5c44a88357b18a9a057c580b Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/7a1c0d15b82e062678a516d18551c67c1b0176aa Copy-Tag: eyJwIjoiamF2YS1haXBsYXRmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiI3YTFjMGQxNWI4MmUwNjI2NzhhNTE2ZDE4NTUxYzY3YzFiMDE3NmFhIn0= END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat: [aiplatform] add deployment_timeout to UploadModel ModelContainerSpec feat: add shared_memory_size_mb to UploadModel ModelContainerSpec feat: add startup_probe, health_probe to UploadModel ModelContainerSpec PiperOrigin-RevId: 582381401 Source-Link: https://togithub.com/googleapis/googleapis/commit/92d962d3814b061a905437e05ea1e249f7a30c4d Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/c19c7a7fa3eac85508a2fe0afe177d76f510fcaf Copy-Tag: eyJwIjoiamF2YS1haXBsYXRmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiJjMTljN2E3ZmEzZWFjODU1MDhhMmZlMGFmZTE3N2Q3NmY1MTBmY2FmIn0= END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat: [aiplatform] add ComputeTokens and CountTokens API PiperOrigin-RevId: 582364082 Source-Link: https://togithub.com/googleapis/googleapis/commit/fdea53f759cb7a8e6167af8740ca9cfc850bfae9 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/295f8eab2a87743dccc65b88e73d71f480323023 Copy-Tag: eyJwIjoiamF2YS1haXBsYXRmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiIyOTVmOGVhYjJhODc3NDNkY2NjNjViODhlNzNkNzFmNDgwMzIzMDIzIn0= END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat: [aiplatform] add protected_artifact_location_id to CustomJob feat: add value_type, version_column_name to Feature feat: add FeatureGroup, FeatureOnlineStore, FeatureOnlineStoreAdminService, FeatureOnlineStoreService, FeatureRegistryService, FeatureView, FeatureViewSync feat: add NumericRestriction to Index feat: add tpu_topology to MachineSpec chore: change DeleteOperationMetadata to DeleteModelVersionOperationMetadata in ModelService feat: add CountTokensRequest to PredictionService feat: add StudyTimeConstraint to Study PiperOrigin-RevId: 581306827 Source-Link: https://togithub.com/googleapis/googleapis/commit/01af66acc8111ec1e4d6831e31952dabe530c694 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/842299dec7a7f5d7622b2a918aaa1888812d80dc Copy-Tag: eyJwIjoiamF2YS1haXBsYXRmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiI4NDIyOTlkZWM3YTdmNWQ3NjIyYjJhOTE4YWFhMTg4ODgxMmQ4MGRjIn0= END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat: [aiplatform] add protected_artifact_location_id to CustomJob chore: add comment fixes to Feature and FeaturestoreService feat!: add FeatureViewDataFormat, FeatureViewDataKey to FeatureOnlineStoreService feat: add NumericRestriction to Index feat: add tpu_topology to MachineResources feat: add BatchDeletePipelineJobs, BatchDeletePipelineJobsRequest and BatchDeletePipelineJobsResponse to PipelineService feat: add StudyTimeConstraint to Study PiperOrigin-RevId: 581306075 Source-Link: https://togithub.com/googleapis/googleapis/commit/7603960c7cf66ab44c4c3c75156f25dbceffc3f1 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/9d03dc661bc2b672029b6cc640a4d7f3561466e7 Copy-Tag: eyJwIjoiamF2YS1haXBsYXRmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiI5ZDAzZGM2NjFiYzJiNjcyMDI5YjZjYzY0MGE0ZDdmMzU2MTQ2NmU3In0= END_NESTED_COMMIT --- java-aiplatform/README.md | 4 +- .../FeatureOnlineStoreAdminServiceClient.java | 3039 ++++++++ ...eatureOnlineStoreAdminServiceSettings.java | 526 ++ .../v1/FeatureOnlineStoreServiceClient.java | 806 ++ .../v1/FeatureOnlineStoreServiceSettings.java | 258 + .../v1/FeatureRegistryServiceClient.java | 2510 +++++++ .../v1/FeatureRegistryServiceSettings.java | 445 ++ .../v1/FeaturestoreServiceClient.java | 187 +- .../v1/LlmUtilityServiceClient.java | 912 +++ .../v1/LlmUtilityServiceSettings.java | 265 + .../cloud/aiplatform/v1/gapic_metadata.json | 178 +- .../cloud/aiplatform/v1/package-info.java | 81 + .../FeatureOnlineStoreAdminServiceStub.java | 226 + ...reOnlineStoreAdminServiceStubSettings.java | 1350 ++++ .../stub/FeatureOnlineStoreServiceStub.java | 78 + ...FeatureOnlineStoreServiceStubSettings.java | 467 ++ .../v1/stub/FeatureRegistryServiceStub.java | 185 + .../FeatureRegistryServiceStubSettings.java | 1118 +++ ...nlineStoreAdminServiceCallableFactory.java | 113 + ...rpcFeatureOnlineStoreAdminServiceStub.java | 915 +++ ...tureOnlineStoreServiceCallableFactory.java | 113 + .../GrpcFeatureOnlineStoreServiceStub.java | 338 + ...FeatureRegistryServiceCallableFactory.java | 113 + .../stub/GrpcFeatureRegistryServiceStub.java | 740 ++ .../GrpcLlmUtilityServiceCallableFactory.java | 113 + .../v1/stub/GrpcLlmUtilityServiceStub.java | 362 + .../v1/stub/LlmUtilityServiceStub.java | 83 + .../stub/LlmUtilityServiceStubSettings.java | 490 ++ .../FeatureOnlineStoreServiceClient.java | 34 +- .../v1beta1/FeatureRegistryServiceClient.java | 39 +- .../v1beta1/FeaturestoreServiceClient.java | 57 +- .../v1beta1/LlmUtilityServiceClient.java | 782 ++ .../v1beta1/LlmUtilityServiceSettings.java | 255 + .../v1beta1/PipelineServiceClient.java | 168 + .../v1beta1/PipelineServiceSettings.java | 29 + .../aiplatform/v1beta1/gapic_metadata.json | 30 + .../aiplatform/v1beta1/package-info.java | 24 +- .../GrpcLlmUtilityServiceCallableFactory.java | 115 + .../stub/GrpcLlmUtilityServiceStub.java | 333 + .../v1beta1/stub/GrpcPipelineServiceStub.java | 53 + .../v1beta1/stub/LlmUtilityServiceStub.java | 79 + .../stub/LlmUtilityServiceStubSettings.java | 465 ++ .../v1beta1/stub/PipelineServiceStub.java | 14 + .../stub/PipelineServiceStubSettings.java | 84 + .../reflect-config.json | 1167 ++- .../reflect-config.json | 216 + ...tureOnlineStoreAdminServiceClientTest.java | 1547 ++++ .../FeatureOnlineStoreServiceClientTest.java | 445 ++ .../v1/FeatureRegistryServiceClientTest.java | 1383 ++++ .../v1/FeaturestoreServiceClientTest.java | 212 +- .../v1/LlmUtilityServiceClientTest.java | 533 ++ .../MockFeatureOnlineStoreAdminService.java | 59 + ...ockFeatureOnlineStoreAdminServiceImpl.java | 336 + .../v1/MockFeatureOnlineStoreService.java | 59 + .../v1/MockFeatureOnlineStoreServiceImpl.java | 82 + .../v1/MockFeatureRegistryService.java | 59 + .../v1/MockFeatureRegistryServiceImpl.java | 271 + .../aiplatform/v1/MockLlmUtilityService.java | 59 + .../v1/MockLlmUtilityServiceImpl.java | 102 + .../FeatureOnlineStoreServiceClientTest.java | 20 +- .../FeatureRegistryServiceClientTest.java | 6 + .../FeaturestoreServiceClientTest.java | 9 + .../v1beta1/LlmUtilityServiceClientTest.java | 447 ++ .../v1beta1/MockLlmUtilityService.java | 59 + .../v1beta1/MockLlmUtilityServiceImpl.java | 81 + .../v1beta1/MockPipelineServiceImpl.java | 21 + .../v1beta1/PipelineServiceClientTest.java | 102 + .../FeatureOnlineStoreAdminServiceGrpc.java | 1874 +++++ .../v1/FeatureOnlineStoreServiceGrpc.java | 355 + .../v1/FeatureRegistryServiceGrpc.java | 1431 ++++ .../aiplatform/v1/LlmUtilityServiceGrpc.java | 502 ++ .../v1beta1/LlmUtilityServiceGrpc.java | 382 + .../v1beta1/PipelineServiceGrpc.java | 131 +- .../aiplatform/v1/ComputeTokensRequest.java | 1218 +++ .../v1/ComputeTokensRequestOrBuilder.java | 122 + .../aiplatform/v1/ComputeTokensResponse.java | 983 +++ .../v1/ComputeTokensResponseOrBuilder.java | 87 + .../aiplatform/v1/CountTokensRequest.java | 1202 +++ .../v1/CountTokensRequestOrBuilder.java | 119 + .../aiplatform/v1/CountTokensResponse.java | 631 ++ .../v1/CountTokensResponseOrBuilder.java | 52 + .../CreateFeatureGroupOperationMetadata.java | 727 ++ ...eatureGroupOperationMetadataOrBuilder.java | 60 + .../v1/CreateFeatureGroupRequest.java | 1169 +++ .../CreateFeatureGroupRequestOrBuilder.java | 136 + ...teFeatureOnlineStoreOperationMetadata.java | 734 ++ ...OnlineStoreOperationMetadataOrBuilder.java | 60 + .../v1/CreateFeatureOnlineStoreRequest.java | 1184 +++ ...ateFeatureOnlineStoreRequestOrBuilder.java | 136 + .../aiplatform/v1/CreateFeatureRequest.java | 60 +- .../v1/CreateFeatureRequestOrBuilder.java | 16 +- .../CreateFeatureViewOperationMetadata.java | 724 ++ ...FeatureViewOperationMetadataOrBuilder.java | 60 + .../v1/CreateFeatureViewRequest.java | 1274 ++++ .../v1/CreateFeatureViewRequestOrBuilder.java | 152 + ...reateRegistryFeatureOperationMetadata.java | 727 ++ ...stryFeatureOperationMetadataOrBuilder.java | 60 + .../cloud/aiplatform/v1/CustomJobProto.java | 6 +- .../cloud/aiplatform/v1/CustomJobSpec.java | 256 +- .../aiplatform/v1/CustomJobSpecOrBuilder.java | 31 + .../v1/DeleteFeatureGroupRequest.java | 756 ++ .../DeleteFeatureGroupRequestOrBuilder.java | 73 + .../v1/DeleteFeatureOnlineStoreRequest.java | 763 ++ ...eteFeatureOnlineStoreRequestOrBuilder.java | 73 + .../aiplatform/v1/DeleteFeatureRequest.java | 11 + .../v1/DeleteFeatureRequestOrBuilder.java | 2 + .../v1/DeleteFeatureViewRequest.java | 653 ++ .../v1/DeleteFeatureViewRequestOrBuilder.java | 58 + .../cloud/aiplatform/v1/DeployedIndex.java | 108 +- .../aiplatform/v1/DeployedIndexOrBuilder.java | 27 +- .../google/cloud/aiplatform/v1/Feature.java | 437 +- .../cloud/aiplatform/v1/FeatureGroup.java | 3554 +++++++++ .../cloud/aiplatform/v1/FeatureGroupName.java | 227 + .../aiplatform/v1/FeatureGroupOrBuilder.java | 334 + .../aiplatform/v1/FeatureGroupProto.java | 133 + .../cloud/aiplatform/v1/FeatureName.java | 194 +- .../aiplatform/v1/FeatureOnlineStore.java | 4135 ++++++++++ .../FeatureOnlineStoreAdminServiceProto.java | 508 ++ .../aiplatform/v1/FeatureOnlineStoreName.java | 231 + .../v1/FeatureOnlineStoreOrBuilder.java | 335 + .../v1/FeatureOnlineStoreProto.java | 154 + .../v1/FeatureOnlineStoreServiceProto.java | 178 + .../cloud/aiplatform/v1/FeatureOrBuilder.java | 85 +- .../cloud/aiplatform/v1/FeatureProto.java | 72 +- .../v1/FeatureRegistryServiceProto.java | 312 + .../cloud/aiplatform/v1/FeatureView.java | 6651 +++++++++++++++++ .../aiplatform/v1/FeatureViewDataFormat.java | 181 + .../aiplatform/v1/FeatureViewDataKey.java | 755 ++ .../v1/FeatureViewDataKeyOrBuilder.java | 64 + .../cloud/aiplatform/v1/FeatureViewName.java | 269 + .../aiplatform/v1/FeatureViewOrBuilder.java | 395 + .../cloud/aiplatform/v1/FeatureViewProto.java | 178 + .../cloud/aiplatform/v1/FeatureViewSync.java | 1454 ++++ .../aiplatform/v1/FeatureViewSyncName.java | 269 + .../v1/FeatureViewSyncOrBuilder.java | 166 + .../aiplatform/v1/FeatureViewSyncProto.java | 97 + .../v1/FetchFeatureValuesRequest.java | 1123 +++ .../FetchFeatureValuesRequestOrBuilder.java | 130 + .../v1/FetchFeatureValuesResponse.java | 3467 +++++++++ .../FetchFeatureValuesResponseOrBuilder.java | 104 + .../aiplatform/v1/GetFeatureGroupRequest.java | 641 ++ .../v1/GetFeatureGroupRequestOrBuilder.java | 54 + .../v1/GetFeatureOnlineStoreRequest.java | 641 ++ ...GetFeatureOnlineStoreRequestOrBuilder.java | 54 + .../aiplatform/v1/GetFeatureRequest.java | 32 +- .../v1/GetFeatureRequestOrBuilder.java | 8 +- .../aiplatform/v1/GetFeatureViewRequest.java | 654 ++ .../v1/GetFeatureViewRequestOrBuilder.java | 58 + .../v1/GetFeatureViewSyncRequest.java | 655 ++ .../GetFeatureViewSyncRequestOrBuilder.java | 58 + .../cloud/aiplatform/v1/IndexDatapoint.java | 4047 +++++++--- .../v1/IndexDatapointOrBuilder.java | 75 + .../cloud/aiplatform/v1/IndexProto.java | 56 +- .../v1/ListFeatureGroupsRequest.java | 1495 ++++ .../v1/ListFeatureGroupsRequestOrBuilder.java | 203 + .../v1/ListFeatureGroupsResponse.java | 1147 +++ .../ListFeatureGroupsResponseOrBuilder.java | 108 + .../v1/ListFeatureOnlineStoresRequest.java | 1500 ++++ ...stFeatureOnlineStoresRequestOrBuilder.java | 203 + .../v1/ListFeatureOnlineStoresResponse.java | 1184 +++ ...tFeatureOnlineStoresResponseOrBuilder.java | 109 + .../v1/ListFeatureViewSyncsRequest.java | 1446 ++++ .../ListFeatureViewSyncsRequestOrBuilder.java | 189 + .../v1/ListFeatureViewSyncsResponse.java | 1154 +++ ...ListFeatureViewSyncsResponseOrBuilder.java | 108 + .../v1/ListFeatureViewsRequest.java | 1516 ++++ .../v1/ListFeatureViewsRequestOrBuilder.java | 209 + .../v1/ListFeatureViewsResponse.java | 1143 +++ .../v1/ListFeatureViewsResponseOrBuilder.java | 108 + .../aiplatform/v1/ListFeaturesRequest.java | 78 +- .../v1/ListFeaturesRequestOrBuilder.java | 21 +- .../aiplatform/v1/ListFeaturesResponse.java | 4 + .../aiplatform/v1/LlmUtilityServiceProto.java | 143 + .../aiplatform/v1/MachineResourcesProto.java | 60 +- .../cloud/aiplatform/v1/MachineSpec.java | 189 + .../aiplatform/v1/MachineSpecOrBuilder.java | 27 + .../aiplatform/v1/ModelContainerSpec.java | 979 +++ .../v1/ModelContainerSpecOrBuilder.java | 140 + .../cloud/aiplatform/v1/ModelProto.java | 206 +- .../aiplatform/v1/PredictionServiceProto.java | 100 +- .../com/google/cloud/aiplatform/v1/Probe.java | 1871 +++++ .../cloud/aiplatform/v1/ProbeOrBuilder.java | 94 + .../cloud/aiplatform/v1/StudyProto.java | 343 +- .../google/cloud/aiplatform/v1/StudySpec.java | 3395 ++++++++- .../aiplatform/v1/StudySpecOrBuilder.java | 45 + .../aiplatform/v1/StudyTimeConstraint.java | 1103 +++ .../v1/StudyTimeConstraintOrBuilder.java | 97 + .../aiplatform/v1/SyncFeatureViewRequest.java | 648 ++ .../v1/SyncFeatureViewRequestOrBuilder.java | 56 + .../v1/SyncFeatureViewResponse.java | 634 ++ .../v1/SyncFeatureViewResponseOrBuilder.java | 52 + .../cloud/aiplatform/v1/TokensInfo.java | 908 +++ .../aiplatform/v1/TokensInfoOrBuilder.java | 101 + .../UpdateFeatureGroupOperationMetadata.java | 727 ++ ...eatureGroupOperationMetadataOrBuilder.java | 60 + .../v1/UpdateFeatureGroupRequest.java | 1138 +++ .../UpdateFeatureGroupRequestOrBuilder.java | 137 + ...teFeatureOnlineStoreOperationMetadata.java | 734 ++ ...OnlineStoreOperationMetadataOrBuilder.java | 60 + .../v1/UpdateFeatureOnlineStoreRequest.java | 1177 +++ ...ateFeatureOnlineStoreRequestOrBuilder.java | 143 + .../v1/UpdateFeatureOperationMetadata.java | 719 ++ ...dateFeatureOperationMetadataOrBuilder.java | 60 + .../aiplatform/v1/UpdateFeatureRequest.java | 40 +- .../v1/UpdateFeatureRequestOrBuilder.java | 9 +- .../UpdateFeatureViewOperationMetadata.java | 724 ++ ...FeatureViewOperationMetadataOrBuilder.java | 60 + .../v1/UpdateFeatureViewRequest.java | 1138 +++ .../v1/UpdateFeatureViewRequestOrBuilder.java | 137 + .../cloud/aiplatform/v1/custom_job.proto | 6 + .../google/cloud/aiplatform/v1/feature.proto | 39 +- .../cloud/aiplatform/v1/feature_group.proto | 95 + .../aiplatform/v1/feature_online_store.proto | 118 + .../feature_online_store_admin_service.proto | 618 ++ .../v1/feature_online_store_service.proto | 121 + .../v1/feature_registry_service.proto | 333 + .../cloud/aiplatform/v1/feature_view.proto | 123 + .../aiplatform/v1/feature_view_sync.proto | 57 + .../aiplatform/v1/featurestore_service.proto | 39 +- .../google/cloud/aiplatform/v1/index.proto | 55 + .../cloud/aiplatform/v1/index_endpoint.proto | 9 +- .../aiplatform/v1/llm_utility_service.proto | 100 + .../aiplatform/v1/machine_resources.proto | 4 + .../google/cloud/aiplatform/v1/model.proto | 48 + .../aiplatform/v1/prediction_service.proto | 28 + .../google/cloud/aiplatform/v1/study.proto | 72 + .../BatchDeletePipelineJobsRequest.java | 1002 +++ ...tchDeletePipelineJobsRequestOrBuilder.java | 127 + .../BatchDeletePipelineJobsResponse.java | 959 +++ ...chDeletePipelineJobsResponseOrBuilder.java | 77 + .../v1beta1/ComputeTokensRequest.java | 1219 +++ .../ComputeTokensRequestOrBuilder.java | 122 + .../v1beta1/ComputeTokensResponse.java | 985 +++ .../ComputeTokensResponseOrBuilder.java | 87 + .../v1beta1/CreateFeatureRequest.java | 70 + .../CreateFeatureRequestOrBuilder.java | 20 + .../aiplatform/v1beta1/CustomJobProto.java | 6 +- .../aiplatform/v1beta1/CustomJobSpec.java | 256 +- .../v1beta1/CustomJobSpecOrBuilder.java | 31 + .../aiplatform/v1beta1/DeployedIndex.java | 108 +- .../v1beta1/DeployedIndexOrBuilder.java | 27 +- .../aiplatform/v1beta1/ExplainResponse.java | 22 +- .../v1beta1/ExplainResponseOrBuilder.java | 10 +- .../cloud/aiplatform/v1beta1/Feature.java | 596 +- .../v1beta1/FeatureOnlineStore.java | 4 +- .../FeatureOnlineStoreServiceProto.java | 180 +- .../aiplatform/v1beta1/FeatureOrBuilder.java | 124 +- .../aiplatform/v1beta1/FeatureProto.java | 58 +- .../v1beta1/FeatureViewDataFormat.java | 181 + .../v1beta1/FeatureViewDataKey.java | 756 ++ .../v1beta1/FeatureViewDataKeyOrBuilder.java | 64 + .../v1beta1/FetchFeatureValuesRequest.java | 594 +- .../FetchFeatureValuesRequestOrBuilder.java | 107 +- .../aiplatform/v1beta1/GetFeatureRequest.java | 21 +- .../v1beta1/GetFeatureRequestOrBuilder.java | 6 +- .../aiplatform/v1beta1/IndexDatapoint.java | 4069 +++++++--- .../v1beta1/IndexDatapointOrBuilder.java | 76 + .../cloud/aiplatform/v1beta1/IndexProto.java | 58 +- .../v1beta1/ListFeaturesRequest.java | 53 +- .../v1beta1/ListFeaturesRequestOrBuilder.java | 15 +- .../v1beta1/LlmUtilityServiceProto.java | 134 + .../v1beta1/MachineResourcesProto.java | 61 +- .../cloud/aiplatform/v1beta1/MachineSpec.java | 189 + .../v1beta1/MachineSpecOrBuilder.java | 27 + .../v1beta1/ModelContainerSpec.java | 981 +++ .../v1beta1/ModelContainerSpecOrBuilder.java | 140 + .../cloud/aiplatform/v1beta1/ModelProto.java | 209 +- .../v1beta1/PipelineServiceProto.java | 173 +- .../cloud/aiplatform/v1beta1/Probe.java | 1876 +++++ .../aiplatform/v1beta1/ProbeOrBuilder.java | 94 + .../cloud/aiplatform/v1beta1/StudyProto.java | 378 +- .../cloud/aiplatform/v1beta1/StudySpec.java | 3423 ++++++++- .../v1beta1/StudySpecOrBuilder.java | 49 +- .../v1beta1/StudyTimeConstraint.java | 1105 +++ .../v1beta1/StudyTimeConstraintOrBuilder.java | 97 + .../cloud/aiplatform/v1beta1/TokensInfo.java | 908 +++ .../v1beta1/TokensInfoOrBuilder.java | 101 + .../v1beta1/UpdateFeatureRequest.java | 24 +- .../UpdateFeatureRequestOrBuilder.java | 6 +- .../cloud/aiplatform/v1beta1/custom_job.proto | 6 + .../cloud/aiplatform/v1beta1/feature.proto | 42 +- .../v1beta1/feature_online_store.proto | 2 +- .../feature_online_store_service.proto | 41 +- .../v1beta1/featurestore_service.proto | 18 +- .../cloud/aiplatform/v1beta1/index.proto | 55 + .../aiplatform/v1beta1/index_endpoint.proto | 9 +- .../v1beta1/llm_utility_service.proto | 86 + .../v1beta1/machine_resources.proto | 4 + .../cloud/aiplatform/v1beta1/model.proto | 48 + .../aiplatform/v1beta1/pipeline_service.proto | 47 + .../v1beta1/prediction_service.proto | 2 +- .../cloud/aiplatform/v1beta1/study.proto | 72 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../AsyncCreateFeatureOnlineStore.java | 56 + .../AsyncCreateFeatureOnlineStoreLRO.java | 56 + .../SyncCreateFeatureOnlineStore.java | 50 + ...eLocationnameFeatureonlinestoreString.java | 49 + ...neStoreStringFeatureonlinestoreString.java | 48 + .../AsyncCreateFeatureView.java | 57 + .../AsyncCreateFeatureViewLRO.java | 59 + .../SyncCreateFeatureView.java | 53 + ...atureonlinestorenameFeatureviewString.java | 50 + ...ateFeatureViewStringFeatureviewString.java | 49 + .../AsyncDeleteFeatureOnlineStore.java | 56 + .../AsyncDeleteFeatureOnlineStoreLRO.java | 57 + .../SyncDeleteFeatureOnlineStore.java | 50 + ...ineStoreFeatureonlinestorenameBoolean.java | 45 + ...DeleteFeatureOnlineStoreStringBoolean.java | 45 + .../AsyncDeleteFeatureView.java | 54 + .../AsyncDeleteFeatureViewLRO.java | 57 + .../SyncDeleteFeatureView.java | 50 + .../SyncDeleteFeatureViewFeatureviewname.java | 44 + .../SyncDeleteFeatureViewString.java | 45 + .../AsyncGetFeatureOnlineStore.java | 53 + .../SyncGetFeatureOnlineStore.java | 50 + ...tureOnlineStoreFeatureonlinestorename.java | 45 + .../SyncGetFeatureOnlineStoreString.java | 45 + .../getfeatureview/AsyncGetFeatureView.java | 54 + .../getfeatureview/SyncGetFeatureView.java | 50 + .../SyncGetFeatureViewFeatureviewname.java | 44 + .../SyncGetFeatureViewString.java | 45 + .../AsyncGetFeatureViewSync.java | 54 + .../SyncGetFeatureViewSync.java | 50 + ...GetFeatureViewSyncFeatureviewsyncname.java | 45 + .../SyncGetFeatureViewSyncString.java | 46 + .../getiampolicy/AsyncGetIamPolicy.java | 56 + .../getiampolicy/SyncGetIamPolicy.java | 52 + .../getlocation/AsyncGetLocation.java | 47 + .../getlocation/SyncGetLocation.java | 43 + .../AsyncListFeatureOnlineStores.java | 59 + .../AsyncListFeatureOnlineStoresPaged.java | 65 + .../SyncListFeatureOnlineStores.java | 54 + ...ncListFeatureOnlineStoresLocationname.java | 46 + .../SyncListFeatureOnlineStoresString.java | 46 + .../AsyncListFeatureViews.java | 59 + .../AsyncListFeatureViewsPaged.java | 67 + .../SyncListFeatureViews.java | 56 + ...istFeatureViewsFeatureonlinestorename.java | 47 + .../SyncListFeatureViewsString.java | 47 + .../AsyncListFeatureViewSyncs.java | 62 + .../AsyncListFeatureViewSyncsPaged.java | 68 + .../SyncListFeatureViewSyncs.java | 57 + ...ncListFeatureViewSyncsFeatureviewname.java | 47 + .../SyncListFeatureViewSyncsString.java | 48 + .../listlocations/AsyncListLocations.java | 55 + .../AsyncListLocationsPaged.java | 63 + .../listlocations/SyncListLocations.java | 52 + .../setiampolicy/AsyncSetIamPolicy.java | 57 + .../setiampolicy/SyncSetIamPolicy.java | 53 + .../syncfeatureview/AsyncSyncFeatureView.java | 54 + .../syncfeatureview/SyncSyncFeatureView.java | 51 + .../SyncSyncFeatureViewFeatureviewname.java | 45 + .../SyncSyncFeatureViewString.java | 46 + .../AsyncTestIamPermissions.java | 56 + .../SyncTestIamPermissions.java | 53 + .../AsyncUpdateFeatureOnlineStore.java | 55 + .../AsyncUpdateFeatureOnlineStoreLRO.java | 55 + .../SyncUpdateFeatureOnlineStore.java | 49 + ...nlineStoreFeatureonlinestoreFieldmask.java | 47 + .../AsyncUpdateFeatureView.java | 53 + .../AsyncUpdateFeatureViewLRO.java | 55 + .../SyncUpdateFeatureView.java | 49 + ...UpdateFeatureViewFeatureviewFieldmask.java | 47 + .../SyncGetFeatureOnlineStore.java | 50 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../AsyncFetchFeatureValues.java | 58 + .../SyncFetchFeatureValues.java | 55 + ...luesFeatureviewnameFeatureviewdatakey.java | 47 + ...FeatureValuesStringFeatureviewdatakey.java | 48 + .../getiampolicy/AsyncGetIamPolicy.java | 56 + .../getiampolicy/SyncGetIamPolicy.java | 52 + .../getlocation/AsyncGetLocation.java | 47 + .../getlocation/SyncGetLocation.java | 43 + .../listlocations/AsyncListLocations.java | 55 + .../AsyncListLocationsPaged.java | 63 + .../listlocations/SyncListLocations.java | 51 + .../setiampolicy/AsyncSetIamPolicy.java | 57 + .../setiampolicy/SyncSetIamPolicy.java | 53 + .../AsyncTestIamPermissions.java | 56 + .../SyncTestIamPermissions.java | 53 + .../SyncFetchFeatureValues.java | 50 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../createfeature/AsyncCreateFeature.java | 56 + .../createfeature/AsyncCreateFeatureLRO.java | 56 + .../createfeature/SyncCreateFeature.java | 51 + ...ateFeatureEntitytypenameFeatureString.java | 47 + ...eFeatureFeaturegroupnameFeatureString.java | 46 + .../SyncCreateFeatureStringFeatureString.java | 48 + .../AsyncCreateFeatureGroup.java | 54 + .../AsyncCreateFeatureGroupLRO.java | 54 + .../SyncCreateFeatureGroup.java | 49 + ...reGroupLocationnameFeaturegroupString.java | 48 + ...eFeatureGroupStringFeaturegroupString.java | 48 + .../deletefeature/AsyncDeleteFeature.java | 54 + .../deletefeature/AsyncDeleteFeatureLRO.java | 55 + .../deletefeature/SyncDeleteFeature.java | 50 + .../SyncDeleteFeatureFeaturename.java | 45 + .../SyncDeleteFeatureString.java | 46 + .../AsyncDeleteFeatureGroup.java | 52 + .../AsyncDeleteFeatureGroupLRO.java | 53 + .../SyncDeleteFeatureGroup.java | 48 + ...teFeatureGroupFeaturegroupnameBoolean.java | 44 + .../SyncDeleteFeatureGroupStringBoolean.java | 44 + .../getfeature/AsyncGetFeature.java | 54 + .../getfeature/SyncGetFeature.java | 50 + .../getfeature/SyncGetFeatureFeaturename.java | 45 + .../getfeature/SyncGetFeatureString.java | 46 + .../getfeaturegroup/AsyncGetFeatureGroup.java | 51 + .../getfeaturegroup/SyncGetFeatureGroup.java | 47 + .../SyncGetFeatureGroupFeaturegroupname.java | 43 + .../SyncGetFeatureGroupString.java | 43 + .../getiampolicy/AsyncGetIamPolicy.java | 56 + .../getiampolicy/SyncGetIamPolicy.java | 52 + .../getlocation/AsyncGetLocation.java | 47 + .../getlocation/SyncGetLocation.java | 43 + .../AsyncListFeatureGroups.java | 57 + .../AsyncListFeatureGroupsPaged.java | 65 + .../SyncListFeatureGroups.java | 54 + .../SyncListFeatureGroupsLocationname.java | 46 + .../SyncListFeatureGroupsString.java | 46 + .../listfeatures/AsyncListFeatures.java | 62 + .../listfeatures/AsyncListFeaturesPaged.java | 70 + .../listfeatures/SyncListFeatures.java | 58 + .../SyncListFeaturesEntitytypename.java | 46 + .../SyncListFeaturesFeaturegroupname.java | 45 + .../listfeatures/SyncListFeaturesString.java | 47 + .../listlocations/AsyncListLocations.java | 55 + .../AsyncListLocationsPaged.java | 63 + .../listlocations/SyncListLocations.java | 51 + .../setiampolicy/AsyncSetIamPolicy.java | 57 + .../setiampolicy/SyncSetIamPolicy.java | 53 + .../AsyncTestIamPermissions.java | 56 + .../SyncTestIamPermissions.java | 53 + .../updatefeature/AsyncUpdateFeature.java | 53 + .../updatefeature/AsyncUpdateFeatureLRO.java | 53 + .../updatefeature/SyncUpdateFeature.java | 48 + .../SyncUpdateFeatureFeatureFieldmask.java | 44 + .../AsyncUpdateFeatureGroup.java | 53 + .../AsyncUpdateFeatureGroupLRO.java | 53 + .../SyncUpdateFeatureGroup.java | 48 + ...dateFeatureGroupFeaturegroupFieldmask.java | 45 + .../getfeaturegroup/SyncGetFeatureGroup.java | 50 + ...cCreateFeatureFeaturegroupnameFeature.java | 43 + ...eFeatureFeaturegroupnameFeatureString.java | 45 + .../deletefeature/AsyncDeleteFeature.java | 2 +- .../deletefeature/AsyncDeleteFeatureLRO.java | 2 +- .../deletefeature/SyncDeleteFeature.java | 2 +- .../SyncDeleteFeatureFeaturename.java | 3 +- .../SyncDeleteFeatureString.java | 3 +- .../getfeature/AsyncGetFeature.java | 2 +- .../getfeature/SyncGetFeature.java | 2 +- .../getfeature/SyncGetFeatureFeaturename.java | 3 +- .../getfeature/SyncGetFeatureString.java | 3 +- .../SyncListFeaturesFeaturegroupname.java | 44 + .../computetokens/AsyncComputeTokens.java | 56 + .../computetokens/SyncComputeTokens.java | 52 + ...yncComputeTokensEndpointnameListvalue.java | 47 + .../SyncComputeTokensStringListvalue.java | 48 + .../counttokens/AsyncCountTokens.java | 56 + .../counttokens/SyncCountTokens.java | 52 + .../SyncCountTokensEndpointnameListvalue.java | 47 + .../SyncCountTokensStringListvalue.java | 48 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../getiampolicy/AsyncGetIamPolicy.java | 54 + .../getiampolicy/SyncGetIamPolicy.java | 51 + .../getlocation/AsyncGetLocation.java | 46 + .../getlocation/SyncGetLocation.java | 42 + .../listlocations/AsyncListLocations.java | 54 + .../AsyncListLocationsPaged.java | 62 + .../listlocations/SyncListLocations.java | 50 + .../setiampolicy/AsyncSetIamPolicy.java | 55 + .../setiampolicy/SyncSetIamPolicy.java | 52 + .../AsyncTestIamPermissions.java | 55 + .../SyncTestIamPermissions.java | 51 + .../counttokens/SyncCountTokens.java | 49 + .../SyncGetFeatureOnlineStore.java | 51 + .../SyncFetchFeatureValues.java | 50 + .../getfeaturegroup/SyncGetFeatureGroup.java | 50 + .../counttokens/SyncCountTokens.java | 50 + .../AsyncFetchFeatureValues.java | 4 + .../SyncFetchFeatureValues.java | 4 + ...uesFeatureviewnameFeatureviewdatakey.java} | 15 +- ...eatureValuesStringFeatureviewdatakey.java} | 15 +- .../computetokens/AsyncComputeTokens.java | 56 + .../computetokens/SyncComputeTokens.java | 52 + ...yncComputeTokensEndpointnameListvalue.java | 47 + .../SyncComputeTokensStringListvalue.java | 48 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../getiampolicy/AsyncGetIamPolicy.java | 54 + .../getiampolicy/SyncGetIamPolicy.java | 51 + .../getlocation/AsyncGetLocation.java | 46 + .../getlocation/SyncGetLocation.java | 42 + .../listlocations/AsyncListLocations.java | 54 + .../AsyncListLocationsPaged.java | 62 + .../listlocations/SyncListLocations.java | 50 + .../setiampolicy/AsyncSetIamPolicy.java | 55 + .../setiampolicy/SyncSetIamPolicy.java | 52 + .../AsyncTestIamPermissions.java | 55 + .../SyncTestIamPermissions.java | 51 + .../computetokens/SyncComputeTokens.java | 49 + .../AsyncBatchDeletePipelineJobs.java | 52 + .../AsyncBatchDeletePipelineJobsLRO.java | 53 + .../SyncBatchDeletePipelineJobs.java | 49 + ...etePipelineJobsLocationnameListstring.java | 46 + ...tchDeletePipelineJobsStringListstring.java | 46 + .../computetokens/SyncComputeTokens.java | 50 + 511 files changed, 139884 insertions(+), 3475 deletions(-) create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceClient.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceSettings.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceClient.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceSettings.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureRegistryServiceClient.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureRegistryServiceSettings.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceClient.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceSettings.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureOnlineStoreAdminServiceStub.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureOnlineStoreAdminServiceStubSettings.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureOnlineStoreServiceStub.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureOnlineStoreServiceStubSettings.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureRegistryServiceStub.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureRegistryServiceStubSettings.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureOnlineStoreAdminServiceCallableFactory.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureOnlineStoreAdminServiceStub.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureOnlineStoreServiceCallableFactory.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureOnlineStoreServiceStub.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureRegistryServiceCallableFactory.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureRegistryServiceStub.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcLlmUtilityServiceCallableFactory.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcLlmUtilityServiceStub.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/LlmUtilityServiceStub.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/LlmUtilityServiceStubSettings.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/LlmUtilityServiceClient.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/LlmUtilityServiceSettings.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcLlmUtilityServiceCallableFactory.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcLlmUtilityServiceStub.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/LlmUtilityServiceStub.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/LlmUtilityServiceStubSettings.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceClientTest.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceClientTest.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/FeatureRegistryServiceClientTest.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceClientTest.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureOnlineStoreAdminService.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureOnlineStoreAdminServiceImpl.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureOnlineStoreService.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureOnlineStoreServiceImpl.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureRegistryService.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureRegistryServiceImpl.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockLlmUtilityService.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockLlmUtilityServiceImpl.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/LlmUtilityServiceClientTest.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockLlmUtilityService.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockLlmUtilityServiceImpl.java create mode 100644 java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceGrpc.java create mode 100644 java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceGrpc.java create mode 100644 java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureRegistryServiceGrpc.java create mode 100644 java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceGrpc.java create mode 100644 java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/LlmUtilityServiceGrpc.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputeTokensRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputeTokensRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputeTokensResponse.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputeTokensResponseOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CountTokensRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CountTokensRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CountTokensResponse.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CountTokensResponseOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureGroupOperationMetadata.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureGroupOperationMetadataOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureGroupRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureGroupRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureOnlineStoreOperationMetadata.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureOnlineStoreOperationMetadataOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureOnlineStoreRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureOnlineStoreRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureViewOperationMetadata.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureViewOperationMetadataOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureViewRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureViewRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateRegistryFeatureOperationMetadata.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateRegistryFeatureOperationMetadataOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureGroupRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureGroupRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureOnlineStoreRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureOnlineStoreRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureViewRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureViewRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureGroup.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureGroupName.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureGroupOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureGroupProto.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStore.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceProto.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreName.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreProto.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceProto.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureRegistryServiceProto.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureView.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewDataFormat.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewDataKey.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewDataKeyOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewName.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewProto.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewSync.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewSyncName.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewSyncOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewSyncProto.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FetchFeatureValuesRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FetchFeatureValuesRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FetchFeatureValuesResponse.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FetchFeatureValuesResponseOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureGroupRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureGroupRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureOnlineStoreRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureOnlineStoreRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureViewRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureViewRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureViewSyncRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureViewSyncRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureGroupsRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureGroupsRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureGroupsResponse.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureGroupsResponseOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureOnlineStoresRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureOnlineStoresRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureOnlineStoresResponse.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureOnlineStoresResponseOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewSyncsRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewSyncsRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewSyncsResponse.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewSyncsResponseOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewsRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewsRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewsResponse.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewsResponseOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceProto.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Probe.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ProbeOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudyTimeConstraint.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudyTimeConstraintOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SyncFeatureViewRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SyncFeatureViewRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SyncFeatureViewResponse.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SyncFeatureViewResponseOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TokensInfo.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TokensInfoOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureGroupOperationMetadata.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureGroupOperationMetadataOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureGroupRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureGroupRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOnlineStoreOperationMetadata.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOnlineStoreOperationMetadataOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOnlineStoreRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOnlineStoreRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOperationMetadata.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOperationMetadataOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureViewOperationMetadata.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureViewOperationMetadataOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureViewRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureViewRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_group.proto create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_online_store.proto create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_online_store_admin_service.proto create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_online_store_service.proto create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_registry_service.proto create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_view.proto create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_view_sync.proto create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/llm_utility_service.proto create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchDeletePipelineJobsRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchDeletePipelineJobsRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchDeletePipelineJobsResponse.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchDeletePipelineJobsResponseOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ComputeTokensRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ComputeTokensRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ComputeTokensResponse.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ComputeTokensResponseOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureViewDataFormat.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureViewDataKey.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureViewDataKeyOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/LlmUtilityServiceProto.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Probe.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ProbeOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudyTimeConstraint.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudyTimeConstraintOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TokensInfo.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TokensInfoOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/llm_utility_service.proto create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/create/SyncCreateSetEndpoint.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureonlinestore/AsyncCreateFeatureOnlineStore.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureonlinestore/AsyncCreateFeatureOnlineStoreLRO.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureonlinestore/SyncCreateFeatureOnlineStore.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureonlinestore/SyncCreateFeatureOnlineStoreLocationnameFeatureonlinestoreString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureonlinestore/SyncCreateFeatureOnlineStoreStringFeatureonlinestoreString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureview/AsyncCreateFeatureView.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureview/AsyncCreateFeatureViewLRO.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureview/SyncCreateFeatureView.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureview/SyncCreateFeatureViewFeatureonlinestorenameFeatureviewString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureview/SyncCreateFeatureViewStringFeatureviewString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureonlinestore/AsyncDeleteFeatureOnlineStore.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureonlinestore/AsyncDeleteFeatureOnlineStoreLRO.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureonlinestore/SyncDeleteFeatureOnlineStore.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureonlinestore/SyncDeleteFeatureOnlineStoreFeatureonlinestorenameBoolean.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureonlinestore/SyncDeleteFeatureOnlineStoreStringBoolean.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureview/AsyncDeleteFeatureView.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureview/AsyncDeleteFeatureViewLRO.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureview/SyncDeleteFeatureView.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureview/SyncDeleteFeatureViewFeatureviewname.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureview/SyncDeleteFeatureViewString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureonlinestore/AsyncGetFeatureOnlineStore.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureonlinestore/SyncGetFeatureOnlineStore.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureonlinestore/SyncGetFeatureOnlineStoreFeatureonlinestorename.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureonlinestore/SyncGetFeatureOnlineStoreString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureview/AsyncGetFeatureView.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureview/SyncGetFeatureView.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureview/SyncGetFeatureViewFeatureviewname.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureview/SyncGetFeatureViewString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureviewsync/AsyncGetFeatureViewSync.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureviewsync/SyncGetFeatureViewSync.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureviewsync/SyncGetFeatureViewSyncFeatureviewsyncname.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureviewsync/SyncGetFeatureViewSyncString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getlocation/AsyncGetLocation.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getlocation/SyncGetLocation.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureonlinestores/AsyncListFeatureOnlineStores.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureonlinestores/AsyncListFeatureOnlineStoresPaged.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureonlinestores/SyncListFeatureOnlineStores.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureonlinestores/SyncListFeatureOnlineStoresLocationname.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureonlinestores/SyncListFeatureOnlineStoresString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviews/AsyncListFeatureViews.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviews/AsyncListFeatureViewsPaged.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviews/SyncListFeatureViews.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviews/SyncListFeatureViewsFeatureonlinestorename.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviews/SyncListFeatureViewsString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviewsyncs/AsyncListFeatureViewSyncs.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviewsyncs/AsyncListFeatureViewSyncsPaged.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviewsyncs/SyncListFeatureViewSyncs.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviewsyncs/SyncListFeatureViewSyncsFeatureviewname.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviewsyncs/SyncListFeatureViewSyncsString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listlocations/AsyncListLocations.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listlocations/AsyncListLocationsPaged.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listlocations/SyncListLocations.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/syncfeatureview/AsyncSyncFeatureView.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/syncfeatureview/SyncSyncFeatureView.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/syncfeatureview/SyncSyncFeatureViewFeatureviewname.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/syncfeatureview/SyncSyncFeatureViewString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureonlinestore/AsyncUpdateFeatureOnlineStore.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureonlinestore/AsyncUpdateFeatureOnlineStoreLRO.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureonlinestore/SyncUpdateFeatureOnlineStore.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureonlinestore/SyncUpdateFeatureOnlineStoreFeatureonlinestoreFieldmask.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureview/AsyncUpdateFeatureView.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureview/AsyncUpdateFeatureViewLRO.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureview/SyncUpdateFeatureView.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureview/SyncUpdateFeatureViewFeatureviewFieldmask.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservicesettings/getfeatureonlinestore/SyncGetFeatureOnlineStore.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/create/SyncCreateSetEndpoint.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/fetchfeaturevalues/AsyncFetchFeatureValues.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValues.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValuesFeatureviewnameFeatureviewdatakey.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValuesStringFeatureviewdatakey.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/getlocation/AsyncGetLocation.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/getlocation/SyncGetLocation.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/listlocations/AsyncListLocations.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/listlocations/AsyncListLocationsPaged.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/listlocations/SyncListLocations.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservicesettings/fetchfeaturevalues/SyncFetchFeatureValues.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/create/SyncCreateSetEndpoint.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/AsyncCreateFeature.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/AsyncCreateFeatureLRO.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/SyncCreateFeature.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/SyncCreateFeatureEntitytypenameFeatureString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/SyncCreateFeatureFeaturegroupnameFeatureString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/SyncCreateFeatureStringFeatureString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeaturegroup/AsyncCreateFeatureGroup.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeaturegroup/AsyncCreateFeatureGroupLRO.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeaturegroup/SyncCreateFeatureGroup.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeaturegroup/SyncCreateFeatureGroupLocationnameFeaturegroupString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeaturegroup/SyncCreateFeatureGroupStringFeaturegroupString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeature/AsyncDeleteFeature.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeature/AsyncDeleteFeatureLRO.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeature/SyncDeleteFeature.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeature/SyncDeleteFeatureFeaturename.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeature/SyncDeleteFeatureString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeaturegroup/AsyncDeleteFeatureGroup.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeaturegroup/AsyncDeleteFeatureGroupLRO.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeaturegroup/SyncDeleteFeatureGroup.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeaturegroup/SyncDeleteFeatureGroupFeaturegroupnameBoolean.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeaturegroup/SyncDeleteFeatureGroupStringBoolean.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeature/AsyncGetFeature.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeature/SyncGetFeature.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeature/SyncGetFeatureFeaturename.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeature/SyncGetFeatureString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeaturegroup/AsyncGetFeatureGroup.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeaturegroup/SyncGetFeatureGroup.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeaturegroup/SyncGetFeatureGroupFeaturegroupname.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeaturegroup/SyncGetFeatureGroupString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getlocation/AsyncGetLocation.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getlocation/SyncGetLocation.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeaturegroups/AsyncListFeatureGroups.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeaturegroups/AsyncListFeatureGroupsPaged.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeaturegroups/SyncListFeatureGroups.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeaturegroups/SyncListFeatureGroupsLocationname.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeaturegroups/SyncListFeatureGroupsString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/AsyncListFeatures.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/AsyncListFeaturesPaged.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/SyncListFeatures.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/SyncListFeaturesEntitytypename.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/SyncListFeaturesFeaturegroupname.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/SyncListFeaturesString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listlocations/AsyncListLocations.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listlocations/AsyncListLocationsPaged.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listlocations/SyncListLocations.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeature/AsyncUpdateFeature.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeature/AsyncUpdateFeatureLRO.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeature/SyncUpdateFeature.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeature/SyncUpdateFeatureFeatureFieldmask.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeaturegroup/AsyncUpdateFeatureGroup.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeaturegroup/AsyncUpdateFeatureGroupLRO.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeaturegroup/SyncUpdateFeatureGroup.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeaturegroup/SyncUpdateFeatureGroupFeaturegroupFieldmask.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservicesettings/getfeaturegroup/SyncGetFeatureGroup.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/createfeature/SyncCreateFeatureFeaturegroupnameFeature.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/createfeature/SyncCreateFeatureFeaturegroupnameFeatureString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/listfeatures/SyncListFeaturesFeaturegroupname.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/computetokens/AsyncComputeTokens.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/computetokens/SyncComputeTokens.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/computetokens/SyncComputeTokensEndpointnameListvalue.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/computetokens/SyncComputeTokensStringListvalue.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/counttokens/AsyncCountTokens.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/counttokens/SyncCountTokens.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/counttokens/SyncCountTokensEndpointnameListvalue.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/counttokens/SyncCountTokensStringListvalue.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/create/SyncCreateSetEndpoint.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/getlocation/AsyncGetLocation.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/getlocation/SyncGetLocation.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/listlocations/AsyncListLocations.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/listlocations/AsyncListLocationsPaged.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/listlocations/SyncListLocations.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservicesettings/counttokens/SyncCountTokens.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/featureonlinestoreadminservicestubsettings/getfeatureonlinestore/SyncGetFeatureOnlineStore.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/featureonlinestoreservicestubsettings/fetchfeaturevalues/SyncFetchFeatureValues.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/featureregistryservicestubsettings/getfeaturegroup/SyncGetFeatureGroup.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/llmutilityservicestubsettings/counttokens/SyncCountTokens.java rename java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/{SyncFetchFeatureValuesFeatureviewnameString.java => SyncFetchFeatureValuesFeatureviewnameFeatureviewdatakey.java} (78%) rename java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/{SyncFetchFeatureValuesStringString.java => SyncFetchFeatureValuesStringFeatureviewdatakey.java} (80%) create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/computetokens/AsyncComputeTokens.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/computetokens/SyncComputeTokens.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/computetokens/SyncComputeTokensEndpointnameListvalue.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/computetokens/SyncComputeTokensStringListvalue.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/create/SyncCreateSetEndpoint.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/getlocation/AsyncGetLocation.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/getlocation/SyncGetLocation.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/listlocations/AsyncListLocations.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/listlocations/AsyncListLocationsPaged.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/listlocations/SyncListLocations.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservicesettings/computetokens/SyncComputeTokens.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/pipelineservice/batchdeletepipelinejobs/AsyncBatchDeletePipelineJobs.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/pipelineservice/batchdeletepipelinejobs/AsyncBatchDeletePipelineJobsLRO.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/pipelineservice/batchdeletepipelinejobs/SyncBatchDeletePipelineJobs.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/pipelineservice/batchdeletepipelinejobs/SyncBatchDeletePipelineJobsLocationnameListstring.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/pipelineservice/batchdeletepipelinejobs/SyncBatchDeletePipelineJobsStringListstring.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/stub/llmutilityservicestubsettings/computetokens/SyncComputeTokens.java diff --git a/java-aiplatform/README.md b/java-aiplatform/README.md index 658138e76ff4..a15a3197fd93 100644 --- a/java-aiplatform/README.md +++ b/java-aiplatform/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.26.0 + 26.27.0 pom import @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [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-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-aiplatform.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-aiplatform/3.30.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-aiplatform/3.31.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 diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceClient.java new file mode 100644 index 000000000000..9c741e5d1cdd --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceClient.java @@ -0,0 +1,3039 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +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.aiplatform.v1.stub.FeatureOnlineStoreAdminServiceStub; +import com.google.cloud.aiplatform.v1.stub.FeatureOnlineStoreAdminServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +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: The service that handles CRUD and List for resources for FeatureOnlineStore. + * + *

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 (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+ *     FeatureOnlineStoreAdminServiceClient.create()) {
+ *   FeatureOnlineStoreName name =
+ *       FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]");
+ *   FeatureOnlineStore response =
+ *       featureOnlineStoreAdminServiceClient.getFeatureOnlineStore(name);
+ * }
+ * }
+ * + *

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

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

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

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

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

This class can be customized by passing in a custom instance of + * FeatureOnlineStoreAdminServiceSettings 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
+ * FeatureOnlineStoreAdminServiceSettings featureOnlineStoreAdminServiceSettings =
+ *     FeatureOnlineStoreAdminServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+ *     FeatureOnlineStoreAdminServiceClient.create(featureOnlineStoreAdminServiceSettings);
+ * }
+ * + *

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
+ * FeatureOnlineStoreAdminServiceSettings featureOnlineStoreAdminServiceSettings =
+ *     FeatureOnlineStoreAdminServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+ *     FeatureOnlineStoreAdminServiceClient.create(featureOnlineStoreAdminServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class FeatureOnlineStoreAdminServiceClient implements BackgroundResource { + private final FeatureOnlineStoreAdminServiceSettings settings; + private final FeatureOnlineStoreAdminServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of FeatureOnlineStoreAdminServiceClient with default settings. */ + public static final FeatureOnlineStoreAdminServiceClient create() throws IOException { + return create(FeatureOnlineStoreAdminServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of FeatureOnlineStoreAdminServiceClient, 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 FeatureOnlineStoreAdminServiceClient create( + FeatureOnlineStoreAdminServiceSettings settings) throws IOException { + return new FeatureOnlineStoreAdminServiceClient(settings); + } + + /** + * Constructs an instance of FeatureOnlineStoreAdminServiceClient, using the given stub for making + * calls. This is for advanced usage - prefer using + * create(FeatureOnlineStoreAdminServiceSettings). + */ + public static final FeatureOnlineStoreAdminServiceClient create( + FeatureOnlineStoreAdminServiceStub stub) { + return new FeatureOnlineStoreAdminServiceClient(stub); + } + + /** + * Constructs an instance of FeatureOnlineStoreAdminServiceClient, 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 FeatureOnlineStoreAdminServiceClient(FeatureOnlineStoreAdminServiceSettings settings) + throws IOException { + this.settings = settings; + this.stub = + ((FeatureOnlineStoreAdminServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + protected FeatureOnlineStoreAdminServiceClient(FeatureOnlineStoreAdminServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final FeatureOnlineStoreAdminServiceSettings getSettings() { + return settings; + } + + public FeatureOnlineStoreAdminServiceStub 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 OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new FeatureOnlineStore 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 (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   FeatureOnlineStore featureOnlineStore = FeatureOnlineStore.newBuilder().build();
+   *   String featureOnlineStoreId = "featureOnlineStoreId1046065331";
+   *   FeatureOnlineStore response =
+   *       featureOnlineStoreAdminServiceClient
+   *           .createFeatureOnlineStoreAsync(parent, featureOnlineStore, featureOnlineStoreId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create FeatureOnlineStores. + * Format: `projects/{project}/locations/{location}'` + * @param featureOnlineStore Required. The FeatureOnlineStore to create. + * @param featureOnlineStoreId Required. The ID to use for this FeatureOnlineStore, which will + * become the final component of the FeatureOnlineStore's resource name. + *

This value may be up to 60 characters, and valid characters are `[a-z0-9_]`. The first + * character cannot be a number. + *

The value must be unique within the project and location. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createFeatureOnlineStoreAsync( + LocationName parent, FeatureOnlineStore featureOnlineStore, String featureOnlineStoreId) { + CreateFeatureOnlineStoreRequest request = + CreateFeatureOnlineStoreRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFeatureOnlineStore(featureOnlineStore) + .setFeatureOnlineStoreId(featureOnlineStoreId) + .build(); + return createFeatureOnlineStoreAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new FeatureOnlineStore 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 (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   FeatureOnlineStore featureOnlineStore = FeatureOnlineStore.newBuilder().build();
+   *   String featureOnlineStoreId = "featureOnlineStoreId1046065331";
+   *   FeatureOnlineStore response =
+   *       featureOnlineStoreAdminServiceClient
+   *           .createFeatureOnlineStoreAsync(parent, featureOnlineStore, featureOnlineStoreId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create FeatureOnlineStores. + * Format: `projects/{project}/locations/{location}'` + * @param featureOnlineStore Required. The FeatureOnlineStore to create. + * @param featureOnlineStoreId Required. The ID to use for this FeatureOnlineStore, which will + * become the final component of the FeatureOnlineStore's resource name. + *

This value may be up to 60 characters, and valid characters are `[a-z0-9_]`. The first + * character cannot be a number. + *

The value must be unique within the project and location. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createFeatureOnlineStoreAsync( + String parent, FeatureOnlineStore featureOnlineStore, String featureOnlineStoreId) { + CreateFeatureOnlineStoreRequest request = + CreateFeatureOnlineStoreRequest.newBuilder() + .setParent(parent) + .setFeatureOnlineStore(featureOnlineStore) + .setFeatureOnlineStoreId(featureOnlineStoreId) + .build(); + return createFeatureOnlineStoreAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new FeatureOnlineStore 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 (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   CreateFeatureOnlineStoreRequest request =
+   *       CreateFeatureOnlineStoreRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFeatureOnlineStore(FeatureOnlineStore.newBuilder().build())
+   *           .setFeatureOnlineStoreId("featureOnlineStoreId1046065331")
+   *           .build();
+   *   FeatureOnlineStore response =
+   *       featureOnlineStoreAdminServiceClient.createFeatureOnlineStoreAsync(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 + createFeatureOnlineStoreAsync(CreateFeatureOnlineStoreRequest request) { + return createFeatureOnlineStoreOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new FeatureOnlineStore 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 (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   CreateFeatureOnlineStoreRequest request =
+   *       CreateFeatureOnlineStoreRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFeatureOnlineStore(FeatureOnlineStore.newBuilder().build())
+   *           .setFeatureOnlineStoreId("featureOnlineStoreId1046065331")
+   *           .build();
+   *   OperationFuture future =
+   *       featureOnlineStoreAdminServiceClient
+   *           .createFeatureOnlineStoreOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   FeatureOnlineStore response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateFeatureOnlineStoreRequest, + FeatureOnlineStore, + CreateFeatureOnlineStoreOperationMetadata> + createFeatureOnlineStoreOperationCallable() { + return stub.createFeatureOnlineStoreOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new FeatureOnlineStore 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 (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   CreateFeatureOnlineStoreRequest request =
+   *       CreateFeatureOnlineStoreRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFeatureOnlineStore(FeatureOnlineStore.newBuilder().build())
+   *           .setFeatureOnlineStoreId("featureOnlineStoreId1046065331")
+   *           .build();
+   *   ApiFuture future =
+   *       featureOnlineStoreAdminServiceClient
+   *           .createFeatureOnlineStoreCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createFeatureOnlineStoreCallable() { + return stub.createFeatureOnlineStoreCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single FeatureOnlineStore. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   GetFeatureOnlineStoreRequest request =
+   *       GetFeatureOnlineStoreRequest.newBuilder()
+   *           .setName(
+   *               FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       featureOnlineStoreAdminServiceClient.getFeatureOnlineStoreCallable().futureCall(request);
+   *   // Do something.
+   *   FeatureOnlineStore response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getFeatureOnlineStoreCallable() { + return stub.getFeatureOnlineStoreCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FeatureOnlineStores 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 (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (FeatureOnlineStore element :
+   *       featureOnlineStoreAdminServiceClient.listFeatureOnlineStores(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to list FeatureOnlineStores. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFeatureOnlineStoresPagedResponse listFeatureOnlineStores(LocationName parent) { + ListFeatureOnlineStoresRequest request = + ListFeatureOnlineStoresRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listFeatureOnlineStores(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FeatureOnlineStores 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 (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (FeatureOnlineStore element :
+   *       featureOnlineStoreAdminServiceClient.listFeatureOnlineStores(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to list FeatureOnlineStores. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFeatureOnlineStoresPagedResponse listFeatureOnlineStores(String parent) { + ListFeatureOnlineStoresRequest request = + ListFeatureOnlineStoresRequest.newBuilder().setParent(parent).build(); + return listFeatureOnlineStores(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FeatureOnlineStores 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 (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   ListFeatureOnlineStoresRequest request =
+   *       ListFeatureOnlineStoresRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (FeatureOnlineStore element :
+   *       featureOnlineStoreAdminServiceClient.listFeatureOnlineStores(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 ListFeatureOnlineStoresPagedResponse listFeatureOnlineStores( + ListFeatureOnlineStoresRequest request) { + return listFeatureOnlineStoresPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FeatureOnlineStores 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 (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   ListFeatureOnlineStoresRequest request =
+   *       ListFeatureOnlineStoresRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       featureOnlineStoreAdminServiceClient
+   *           .listFeatureOnlineStoresPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (FeatureOnlineStore element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listFeatureOnlineStoresPagedCallable() { + return stub.listFeatureOnlineStoresPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FeatureOnlineStores 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 (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   ListFeatureOnlineStoresRequest request =
+   *       ListFeatureOnlineStoresRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListFeatureOnlineStoresResponse response =
+   *         featureOnlineStoreAdminServiceClient.listFeatureOnlineStoresCallable().call(request);
+   *     for (FeatureOnlineStore element : response.getFeatureOnlineStoresList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listFeatureOnlineStoresCallable() { + return stub.listFeatureOnlineStoresCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single FeatureOnlineStore. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   FeatureOnlineStore featureOnlineStore = FeatureOnlineStore.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   FeatureOnlineStore response =
+   *       featureOnlineStoreAdminServiceClient
+   *           .updateFeatureOnlineStoreAsync(featureOnlineStore, updateMask)
+   *           .get();
+   * }
+   * }
+ * + * @param featureOnlineStore Required. The FeatureOnlineStore's `name` field is used to identify + * the FeatureOnlineStore to be updated. Format: + * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}` + * @param updateMask Field mask is used to specify the fields to be overwritten in the + * FeatureOnlineStore 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 only the non-empty fields present in the + * request will be overwritten. Set the update_mask to `*` to override all fields. + *

Updatable fields: + *

* `big_query_source` * `labels` * `sync_config` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateFeatureOnlineStoreAsync(FeatureOnlineStore featureOnlineStore, FieldMask updateMask) { + UpdateFeatureOnlineStoreRequest request = + UpdateFeatureOnlineStoreRequest.newBuilder() + .setFeatureOnlineStore(featureOnlineStore) + .setUpdateMask(updateMask) + .build(); + return updateFeatureOnlineStoreAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single FeatureOnlineStore. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   FeatureOnlineStoreName name =
+   *       FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]");
+   *   boolean force = true;
+   *   featureOnlineStoreAdminServiceClient.deleteFeatureOnlineStoreAsync(name, force).get();
+   * }
+   * }
+ * + * @param name Required. The name of the FeatureOnlineStore to be deleted. Format: + * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}` + * @param force If set to true, any FeatureViews and Features for this FeatureOnlineStore will + * also be deleted. (Otherwise, the request will only work if the FeatureOnlineStore has no + * FeatureViews.) + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteFeatureOnlineStoreAsync( + FeatureOnlineStoreName name, boolean force) { + DeleteFeatureOnlineStoreRequest request = + DeleteFeatureOnlineStoreRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setForce(force) + .build(); + return deleteFeatureOnlineStoreAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single FeatureOnlineStore. The FeatureOnlineStore must not contain any FeatureViews. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   String name =
+   *       FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]").toString();
+   *   boolean force = true;
+   *   featureOnlineStoreAdminServiceClient.deleteFeatureOnlineStoreAsync(name, force).get();
+   * }
+   * }
+ * + * @param name Required. The name of the FeatureOnlineStore to be deleted. Format: + * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}` + * @param force If set to true, any FeatureViews and Features for this FeatureOnlineStore will + * also be deleted. (Otherwise, the request will only work if the FeatureOnlineStore has no + * FeatureViews.) + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteFeatureOnlineStoreAsync( + String name, boolean force) { + DeleteFeatureOnlineStoreRequest request = + DeleteFeatureOnlineStoreRequest.newBuilder().setName(name).setForce(force).build(); + return deleteFeatureOnlineStoreAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single FeatureOnlineStore. The FeatureOnlineStore must not contain any FeatureViews. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   DeleteFeatureOnlineStoreRequest request =
+   *       DeleteFeatureOnlineStoreRequest.newBuilder()
+   *           .setName(
+   *               FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]")
+   *                   .toString())
+   *           .setForce(true)
+   *           .build();
+   *   featureOnlineStoreAdminServiceClient.deleteFeatureOnlineStoreAsync(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 deleteFeatureOnlineStoreAsync( + DeleteFeatureOnlineStoreRequest request) { + return deleteFeatureOnlineStoreOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single FeatureOnlineStore. The FeatureOnlineStore must not contain any FeatureViews. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   FeatureOnlineStoreName parent =
+   *       FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]");
+   *   FeatureView featureView = FeatureView.newBuilder().build();
+   *   String featureViewId = "featureViewId-1437334218";
+   *   FeatureView response =
+   *       featureOnlineStoreAdminServiceClient
+   *           .createFeatureViewAsync(parent, featureView, featureViewId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the FeatureOnlineStore to create FeatureViews. + * Format: + * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}` + * @param featureView Required. The FeatureView to create. + * @param featureViewId Required. The ID to use for the FeatureView, which will become the final + * component of the FeatureView's resource name. + *

This value may be up to 60 characters, and valid characters are `[a-z0-9_]`. The first + * character cannot be a number. + *

The value must be unique within a FeatureOnlineStore. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createFeatureViewAsync( + FeatureOnlineStoreName parent, FeatureView featureView, String featureViewId) { + CreateFeatureViewRequest request = + CreateFeatureViewRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFeatureView(featureView) + .setFeatureViewId(featureViewId) + .build(); + return createFeatureViewAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new FeatureView in a given FeatureOnlineStore. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   String parent =
+   *       FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]").toString();
+   *   FeatureView featureView = FeatureView.newBuilder().build();
+   *   String featureViewId = "featureViewId-1437334218";
+   *   FeatureView response =
+   *       featureOnlineStoreAdminServiceClient
+   *           .createFeatureViewAsync(parent, featureView, featureViewId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the FeatureOnlineStore to create FeatureViews. + * Format: + * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}` + * @param featureView Required. The FeatureView to create. + * @param featureViewId Required. The ID to use for the FeatureView, which will become the final + * component of the FeatureView's resource name. + *

This value may be up to 60 characters, and valid characters are `[a-z0-9_]`. The first + * character cannot be a number. + *

The value must be unique within a FeatureOnlineStore. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createFeatureViewAsync(String parent, FeatureView featureView, String featureViewId) { + CreateFeatureViewRequest request = + CreateFeatureViewRequest.newBuilder() + .setParent(parent) + .setFeatureView(featureView) + .setFeatureViewId(featureViewId) + .build(); + return createFeatureViewAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new FeatureView in a given FeatureOnlineStore. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   CreateFeatureViewRequest request =
+   *       CreateFeatureViewRequest.newBuilder()
+   *           .setParent(
+   *               FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]")
+   *                   .toString())
+   *           .setFeatureView(FeatureView.newBuilder().build())
+   *           .setFeatureViewId("featureViewId-1437334218")
+   *           .setRunSyncImmediately(true)
+   *           .build();
+   *   FeatureView response =
+   *       featureOnlineStoreAdminServiceClient.createFeatureViewAsync(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 + createFeatureViewAsync(CreateFeatureViewRequest request) { + return createFeatureViewOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new FeatureView in a given FeatureOnlineStore. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   CreateFeatureViewRequest request =
+   *       CreateFeatureViewRequest.newBuilder()
+   *           .setParent(
+   *               FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]")
+   *                   .toString())
+   *           .setFeatureView(FeatureView.newBuilder().build())
+   *           .setFeatureViewId("featureViewId-1437334218")
+   *           .setRunSyncImmediately(true)
+   *           .build();
+   *   OperationFuture future =
+   *       featureOnlineStoreAdminServiceClient
+   *           .createFeatureViewOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   FeatureView response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateFeatureViewRequest, FeatureView, CreateFeatureViewOperationMetadata> + createFeatureViewOperationCallable() { + return stub.createFeatureViewOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new FeatureView in a given FeatureOnlineStore. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   FeatureViewName name =
+   *       FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]");
+   *   FeatureView response = featureOnlineStoreAdminServiceClient.getFeatureView(name);
+   * }
+   * }
+ * + * @param name Required. The name of the FeatureView resource. Format: + * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FeatureView getFeatureView(FeatureViewName name) { + GetFeatureViewRequest request = + GetFeatureViewRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getFeatureView(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single FeatureView. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   String name =
+   *       FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]")
+   *           .toString();
+   *   FeatureView response = featureOnlineStoreAdminServiceClient.getFeatureView(name);
+   * }
+   * }
+ * + * @param name Required. The name of the FeatureView resource. Format: + * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FeatureView getFeatureView(String name) { + GetFeatureViewRequest request = GetFeatureViewRequest.newBuilder().setName(name).build(); + return getFeatureView(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single FeatureView. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   FeatureOnlineStoreName parent =
+   *       FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]");
+   *   for (FeatureView element :
+   *       featureOnlineStoreAdminServiceClient.listFeatureViews(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the FeatureOnlineStore to list FeatureViews. + * Format: + * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFeatureViewsPagedResponse listFeatureViews(FeatureOnlineStoreName parent) { + ListFeatureViewsRequest request = + ListFeatureViewsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listFeatureViews(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FeatureViews in a given FeatureOnlineStore. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   String parent =
+   *       FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]").toString();
+   *   for (FeatureView element :
+   *       featureOnlineStoreAdminServiceClient.listFeatureViews(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the FeatureOnlineStore to list FeatureViews. + * Format: + * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFeatureViewsPagedResponse listFeatureViews(String parent) { + ListFeatureViewsRequest request = + ListFeatureViewsRequest.newBuilder().setParent(parent).build(); + return listFeatureViews(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FeatureViews in a given FeatureOnlineStore. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   ListFeatureViewsRequest request =
+   *       ListFeatureViewsRequest.newBuilder()
+   *           .setParent(
+   *               FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]")
+   *                   .toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (FeatureView element :
+   *       featureOnlineStoreAdminServiceClient.listFeatureViews(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 ListFeatureViewsPagedResponse listFeatureViews(ListFeatureViewsRequest request) { + return listFeatureViewsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FeatureViews in a given FeatureOnlineStore. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   FeatureView featureView = FeatureView.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   FeatureView response =
+   *       featureOnlineStoreAdminServiceClient
+   *           .updateFeatureViewAsync(featureView, updateMask)
+   *           .get();
+   * }
+   * }
+ * + * @param featureView Required. The FeatureView's `name` field is used to identify the FeatureView + * to be updated. Format: + * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}` + * @param updateMask Field mask is used to specify the fields to be overwritten in the FeatureView + * 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 only the non-empty fields present in the request will be + * overwritten. Set the update_mask to `*` to override all fields. + *

Updatable fields: + *

* `labels` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateFeatureViewAsync(FeatureView featureView, FieldMask updateMask) { + UpdateFeatureViewRequest request = + UpdateFeatureViewRequest.newBuilder() + .setFeatureView(featureView) + .setUpdateMask(updateMask) + .build(); + return updateFeatureViewAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single FeatureView. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   FeatureViewName name =
+   *       FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]");
+   *   featureOnlineStoreAdminServiceClient.deleteFeatureViewAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the FeatureView to be deleted. Format: + * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteFeatureViewAsync( + FeatureViewName name) { + DeleteFeatureViewRequest request = + DeleteFeatureViewRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteFeatureViewAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single FeatureView. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   String name =
+   *       FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]")
+   *           .toString();
+   *   featureOnlineStoreAdminServiceClient.deleteFeatureViewAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the FeatureView to be deleted. Format: + * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteFeatureViewAsync(String name) { + DeleteFeatureViewRequest request = DeleteFeatureViewRequest.newBuilder().setName(name).build(); + return deleteFeatureViewAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single FeatureView. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   DeleteFeatureViewRequest request =
+   *       DeleteFeatureViewRequest.newBuilder()
+   *           .setName(
+   *               FeatureViewName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       featureOnlineStoreAdminServiceClient.deleteFeatureViewCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteFeatureViewCallable() { + return stub.deleteFeatureViewCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Triggers on-demand sync for the FeatureView. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   FeatureViewName featureView =
+   *       FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]");
+   *   SyncFeatureViewResponse response =
+   *       featureOnlineStoreAdminServiceClient.syncFeatureView(featureView);
+   * }
+   * }
+ * + * @param featureView Required. Format: + * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SyncFeatureViewResponse syncFeatureView(FeatureViewName featureView) { + SyncFeatureViewRequest request = + SyncFeatureViewRequest.newBuilder() + .setFeatureView(featureView == null ? null : featureView.toString()) + .build(); + return syncFeatureView(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Triggers on-demand sync for the FeatureView. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   String featureView =
+   *       FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]")
+   *           .toString();
+   *   SyncFeatureViewResponse response =
+   *       featureOnlineStoreAdminServiceClient.syncFeatureView(featureView);
+   * }
+   * }
+ * + * @param featureView Required. Format: + * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SyncFeatureViewResponse syncFeatureView(String featureView) { + SyncFeatureViewRequest request = + SyncFeatureViewRequest.newBuilder().setFeatureView(featureView).build(); + return syncFeatureView(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Triggers on-demand sync for the FeatureView. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   SyncFeatureViewRequest request =
+   *       SyncFeatureViewRequest.newBuilder()
+   *           .setFeatureView(
+   *               FeatureViewName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]")
+   *                   .toString())
+   *           .build();
+   *   SyncFeatureViewResponse response =
+   *       featureOnlineStoreAdminServiceClient.syncFeatureView(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 SyncFeatureViewResponse syncFeatureView(SyncFeatureViewRequest request) { + return syncFeatureViewCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Triggers on-demand sync for the FeatureView. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   FeatureViewSyncName name =
+   *       FeatureViewSyncName.of(
+   *           "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]");
+   *   FeatureViewSync response = featureOnlineStoreAdminServiceClient.getFeatureViewSync(name);
+   * }
+   * }
+ * + * @param name Required. The name of the FeatureViewSync resource. Format: + * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FeatureViewSync getFeatureViewSync(FeatureViewSyncName name) { + GetFeatureViewSyncRequest request = + GetFeatureViewSyncRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getFeatureViewSync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single FeatureViewSync. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   String name =
+   *       FeatureViewSyncName.of(
+   *               "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]")
+   *           .toString();
+   *   FeatureViewSync response = featureOnlineStoreAdminServiceClient.getFeatureViewSync(name);
+   * }
+   * }
+ * + * @param name Required. The name of the FeatureViewSync resource. Format: + * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FeatureViewSync getFeatureViewSync(String name) { + GetFeatureViewSyncRequest request = + GetFeatureViewSyncRequest.newBuilder().setName(name).build(); + return getFeatureViewSync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single FeatureViewSync. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   FeatureViewName parent =
+   *       FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]");
+   *   for (FeatureViewSync element :
+   *       featureOnlineStoreAdminServiceClient.listFeatureViewSyncs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the FeatureView to list FeatureViewSyncs. Format: + * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFeatureViewSyncsPagedResponse listFeatureViewSyncs(FeatureViewName parent) { + ListFeatureViewSyncsRequest request = + ListFeatureViewSyncsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listFeatureViewSyncs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FeatureViewSyncs in a given FeatureView. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   String parent =
+   *       FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]")
+   *           .toString();
+   *   for (FeatureViewSync element :
+   *       featureOnlineStoreAdminServiceClient.listFeatureViewSyncs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the FeatureView to list FeatureViewSyncs. Format: + * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFeatureViewSyncsPagedResponse listFeatureViewSyncs(String parent) { + ListFeatureViewSyncsRequest request = + ListFeatureViewSyncsRequest.newBuilder().setParent(parent).build(); + return listFeatureViewSyncs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FeatureViewSyncs in a given FeatureView. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   ListFeatureViewSyncsRequest request =
+   *       ListFeatureViewSyncsRequest.newBuilder()
+   *           .setParent(
+   *               FeatureViewName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]")
+   *                   .toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (FeatureViewSync element :
+   *       featureOnlineStoreAdminServiceClient.listFeatureViewSyncs(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 ListFeatureViewSyncsPagedResponse listFeatureViewSyncs( + ListFeatureViewSyncsRequest request) { + return listFeatureViewSyncsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FeatureViewSyncs in a given FeatureView. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element :
+   *       featureOnlineStoreAdminServiceClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       featureOnlineStoreAdminServiceClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         featureOnlineStoreAdminServiceClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a 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 (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = featureOnlineStoreAdminServiceClient.getLocation(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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a 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 (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       featureOnlineStoreAdminServiceClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = featureOnlineStoreAdminServiceClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       featureOnlineStoreAdminServiceClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = featureOnlineStoreAdminServiceClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       featureOnlineStoreAdminServiceClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response =
+   *       featureOnlineStoreAdminServiceClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient =
+   *     FeatureOnlineStoreAdminServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       featureOnlineStoreAdminServiceClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @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 ListFeatureOnlineStoresPagedResponse + extends AbstractPagedListResponse< + ListFeatureOnlineStoresRequest, + ListFeatureOnlineStoresResponse, + FeatureOnlineStore, + ListFeatureOnlineStoresPage, + ListFeatureOnlineStoresFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListFeatureOnlineStoresRequest, ListFeatureOnlineStoresResponse, FeatureOnlineStore> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListFeatureOnlineStoresPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListFeatureOnlineStoresPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListFeatureOnlineStoresPagedResponse(ListFeatureOnlineStoresPage page) { + super(page, ListFeatureOnlineStoresFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListFeatureOnlineStoresPage + extends AbstractPage< + ListFeatureOnlineStoresRequest, + ListFeatureOnlineStoresResponse, + FeatureOnlineStore, + ListFeatureOnlineStoresPage> { + + private ListFeatureOnlineStoresPage( + PageContext< + ListFeatureOnlineStoresRequest, ListFeatureOnlineStoresResponse, FeatureOnlineStore> + context, + ListFeatureOnlineStoresResponse response) { + super(context, response); + } + + private static ListFeatureOnlineStoresPage createEmptyPage() { + return new ListFeatureOnlineStoresPage(null, null); + } + + @Override + protected ListFeatureOnlineStoresPage createPage( + PageContext< + ListFeatureOnlineStoresRequest, ListFeatureOnlineStoresResponse, FeatureOnlineStore> + context, + ListFeatureOnlineStoresResponse response) { + return new ListFeatureOnlineStoresPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListFeatureOnlineStoresRequest, ListFeatureOnlineStoresResponse, FeatureOnlineStore> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListFeatureOnlineStoresFixedSizeCollection + extends AbstractFixedSizeCollection< + ListFeatureOnlineStoresRequest, + ListFeatureOnlineStoresResponse, + FeatureOnlineStore, + ListFeatureOnlineStoresPage, + ListFeatureOnlineStoresFixedSizeCollection> { + + private ListFeatureOnlineStoresFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListFeatureOnlineStoresFixedSizeCollection createEmptyCollection() { + return new ListFeatureOnlineStoresFixedSizeCollection(null, 0); + } + + @Override + protected ListFeatureOnlineStoresFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListFeatureOnlineStoresFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListFeatureViewsPagedResponse + extends AbstractPagedListResponse< + ListFeatureViewsRequest, + ListFeatureViewsResponse, + FeatureView, + ListFeatureViewsPage, + ListFeatureViewsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListFeatureViewsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListFeatureViewsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListFeatureViewsPagedResponse(ListFeatureViewsPage page) { + super(page, ListFeatureViewsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListFeatureViewsPage + extends AbstractPage< + ListFeatureViewsRequest, ListFeatureViewsResponse, FeatureView, ListFeatureViewsPage> { + + private ListFeatureViewsPage( + PageContext context, + ListFeatureViewsResponse response) { + super(context, response); + } + + private static ListFeatureViewsPage createEmptyPage() { + return new ListFeatureViewsPage(null, null); + } + + @Override + protected ListFeatureViewsPage createPage( + PageContext context, + ListFeatureViewsResponse response) { + return new ListFeatureViewsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListFeatureViewsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListFeatureViewsRequest, + ListFeatureViewsResponse, + FeatureView, + ListFeatureViewsPage, + ListFeatureViewsFixedSizeCollection> { + + private ListFeatureViewsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListFeatureViewsFixedSizeCollection createEmptyCollection() { + return new ListFeatureViewsFixedSizeCollection(null, 0); + } + + @Override + protected ListFeatureViewsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListFeatureViewsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListFeatureViewSyncsPagedResponse + extends AbstractPagedListResponse< + ListFeatureViewSyncsRequest, + ListFeatureViewSyncsResponse, + FeatureViewSync, + ListFeatureViewSyncsPage, + ListFeatureViewSyncsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListFeatureViewSyncsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListFeatureViewSyncsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListFeatureViewSyncsPagedResponse(ListFeatureViewSyncsPage page) { + super(page, ListFeatureViewSyncsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListFeatureViewSyncsPage + extends AbstractPage< + ListFeatureViewSyncsRequest, + ListFeatureViewSyncsResponse, + FeatureViewSync, + ListFeatureViewSyncsPage> { + + private ListFeatureViewSyncsPage( + PageContext + context, + ListFeatureViewSyncsResponse response) { + super(context, response); + } + + private static ListFeatureViewSyncsPage createEmptyPage() { + return new ListFeatureViewSyncsPage(null, null); + } + + @Override + protected ListFeatureViewSyncsPage createPage( + PageContext + context, + ListFeatureViewSyncsResponse response) { + return new ListFeatureViewSyncsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListFeatureViewSyncsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListFeatureViewSyncsRequest, + ListFeatureViewSyncsResponse, + FeatureViewSync, + ListFeatureViewSyncsPage, + ListFeatureViewSyncsFixedSizeCollection> { + + private ListFeatureViewSyncsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListFeatureViewSyncsFixedSizeCollection createEmptyCollection() { + return new ListFeatureViewSyncsFixedSizeCollection(null, 0); + } + + @Override + protected ListFeatureViewSyncsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListFeatureViewSyncsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceSettings.java new file mode 100644 index 000000000000..3467299c04d1 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceSettings.java @@ -0,0 +1,526 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1; + +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient.ListFeatureOnlineStoresPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient.ListFeatureViewSyncsPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient.ListFeatureViewsPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1.stub.FeatureOnlineStoreAdminServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 FeatureOnlineStoreAdminServiceClient}. + * + *

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

    + *
  • The default service address (aiplatform.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 getFeatureOnlineStore 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
+ * FeatureOnlineStoreAdminServiceSettings.Builder featureOnlineStoreAdminServiceSettingsBuilder =
+ *     FeatureOnlineStoreAdminServiceSettings.newBuilder();
+ * featureOnlineStoreAdminServiceSettingsBuilder
+ *     .getFeatureOnlineStoreSettings()
+ *     .setRetrySettings(
+ *         featureOnlineStoreAdminServiceSettingsBuilder
+ *             .getFeatureOnlineStoreSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * FeatureOnlineStoreAdminServiceSettings featureOnlineStoreAdminServiceSettings =
+ *     featureOnlineStoreAdminServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class FeatureOnlineStoreAdminServiceSettings + extends ClientSettings { + + /** Returns the object with the settings used for calls to createFeatureOnlineStore. */ + public UnaryCallSettings + createFeatureOnlineStoreSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()) + .createFeatureOnlineStoreSettings(); + } + + /** Returns the object with the settings used for calls to createFeatureOnlineStore. */ + public OperationCallSettings< + CreateFeatureOnlineStoreRequest, + FeatureOnlineStore, + CreateFeatureOnlineStoreOperationMetadata> + createFeatureOnlineStoreOperationSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()) + .createFeatureOnlineStoreOperationSettings(); + } + + /** Returns the object with the settings used for calls to getFeatureOnlineStore. */ + public UnaryCallSettings + getFeatureOnlineStoreSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()) + .getFeatureOnlineStoreSettings(); + } + + /** Returns the object with the settings used for calls to listFeatureOnlineStores. */ + public PagedCallSettings< + ListFeatureOnlineStoresRequest, + ListFeatureOnlineStoresResponse, + ListFeatureOnlineStoresPagedResponse> + listFeatureOnlineStoresSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()) + .listFeatureOnlineStoresSettings(); + } + + /** Returns the object with the settings used for calls to updateFeatureOnlineStore. */ + public UnaryCallSettings + updateFeatureOnlineStoreSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()) + .updateFeatureOnlineStoreSettings(); + } + + /** Returns the object with the settings used for calls to updateFeatureOnlineStore. */ + public OperationCallSettings< + UpdateFeatureOnlineStoreRequest, + FeatureOnlineStore, + UpdateFeatureOnlineStoreOperationMetadata> + updateFeatureOnlineStoreOperationSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()) + .updateFeatureOnlineStoreOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteFeatureOnlineStore. */ + public UnaryCallSettings + deleteFeatureOnlineStoreSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()) + .deleteFeatureOnlineStoreSettings(); + } + + /** Returns the object with the settings used for calls to deleteFeatureOnlineStore. */ + public OperationCallSettings + deleteFeatureOnlineStoreOperationSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()) + .deleteFeatureOnlineStoreOperationSettings(); + } + + /** Returns the object with the settings used for calls to createFeatureView. */ + public UnaryCallSettings createFeatureViewSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()) + .createFeatureViewSettings(); + } + + /** Returns the object with the settings used for calls to createFeatureView. */ + public OperationCallSettings< + CreateFeatureViewRequest, FeatureView, CreateFeatureViewOperationMetadata> + createFeatureViewOperationSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()) + .createFeatureViewOperationSettings(); + } + + /** Returns the object with the settings used for calls to getFeatureView. */ + public UnaryCallSettings getFeatureViewSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()) + .getFeatureViewSettings(); + } + + /** Returns the object with the settings used for calls to listFeatureViews. */ + public PagedCallSettings< + ListFeatureViewsRequest, ListFeatureViewsResponse, ListFeatureViewsPagedResponse> + listFeatureViewsSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()) + .listFeatureViewsSettings(); + } + + /** Returns the object with the settings used for calls to updateFeatureView. */ + public UnaryCallSettings updateFeatureViewSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()) + .updateFeatureViewSettings(); + } + + /** Returns the object with the settings used for calls to updateFeatureView. */ + public OperationCallSettings< + UpdateFeatureViewRequest, FeatureView, UpdateFeatureViewOperationMetadata> + updateFeatureViewOperationSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()) + .updateFeatureViewOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteFeatureView. */ + public UnaryCallSettings deleteFeatureViewSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()) + .deleteFeatureViewSettings(); + } + + /** Returns the object with the settings used for calls to deleteFeatureView. */ + public OperationCallSettings + deleteFeatureViewOperationSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()) + .deleteFeatureViewOperationSettings(); + } + + /** Returns the object with the settings used for calls to syncFeatureView. */ + public UnaryCallSettings + syncFeatureViewSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()) + .syncFeatureViewSettings(); + } + + /** Returns the object with the settings used for calls to getFeatureViewSync. */ + public UnaryCallSettings + getFeatureViewSyncSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()) + .getFeatureViewSyncSettings(); + } + + /** Returns the object with the settings used for calls to listFeatureViewSyncs. */ + public PagedCallSettings< + ListFeatureViewSyncsRequest, + ListFeatureViewSyncsResponse, + ListFeatureViewSyncsPagedResponse> + listFeatureViewSyncsSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()) + .listFeatureViewSyncsSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((FeatureOnlineStoreAdminServiceStubSettings) getStubSettings()) + .testIamPermissionsSettings(); + } + + public static final FeatureOnlineStoreAdminServiceSettings create( + FeatureOnlineStoreAdminServiceStubSettings stub) throws IOException { + return new FeatureOnlineStoreAdminServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return FeatureOnlineStoreAdminServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return FeatureOnlineStoreAdminServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return FeatureOnlineStoreAdminServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return FeatureOnlineStoreAdminServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return FeatureOnlineStoreAdminServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return FeatureOnlineStoreAdminServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return FeatureOnlineStoreAdminServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected FeatureOnlineStoreAdminServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for FeatureOnlineStoreAdminServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(FeatureOnlineStoreAdminServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(FeatureOnlineStoreAdminServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(FeatureOnlineStoreAdminServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(FeatureOnlineStoreAdminServiceStubSettings.newBuilder()); + } + + public FeatureOnlineStoreAdminServiceStubSettings.Builder getStubSettingsBuilder() { + return ((FeatureOnlineStoreAdminServiceStubSettings.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 createFeatureOnlineStore. */ + public UnaryCallSettings.Builder + createFeatureOnlineStoreSettings() { + return getStubSettingsBuilder().createFeatureOnlineStoreSettings(); + } + + /** Returns the builder for the settings used for calls to createFeatureOnlineStore. */ + public OperationCallSettings.Builder< + CreateFeatureOnlineStoreRequest, + FeatureOnlineStore, + CreateFeatureOnlineStoreOperationMetadata> + createFeatureOnlineStoreOperationSettings() { + return getStubSettingsBuilder().createFeatureOnlineStoreOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getFeatureOnlineStore. */ + public UnaryCallSettings.Builder + getFeatureOnlineStoreSettings() { + return getStubSettingsBuilder().getFeatureOnlineStoreSettings(); + } + + /** Returns the builder for the settings used for calls to listFeatureOnlineStores. */ + public PagedCallSettings.Builder< + ListFeatureOnlineStoresRequest, + ListFeatureOnlineStoresResponse, + ListFeatureOnlineStoresPagedResponse> + listFeatureOnlineStoresSettings() { + return getStubSettingsBuilder().listFeatureOnlineStoresSettings(); + } + + /** Returns the builder for the settings used for calls to updateFeatureOnlineStore. */ + public UnaryCallSettings.Builder + updateFeatureOnlineStoreSettings() { + return getStubSettingsBuilder().updateFeatureOnlineStoreSettings(); + } + + /** Returns the builder for the settings used for calls to updateFeatureOnlineStore. */ + public OperationCallSettings.Builder< + UpdateFeatureOnlineStoreRequest, + FeatureOnlineStore, + UpdateFeatureOnlineStoreOperationMetadata> + updateFeatureOnlineStoreOperationSettings() { + return getStubSettingsBuilder().updateFeatureOnlineStoreOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteFeatureOnlineStore. */ + public UnaryCallSettings.Builder + deleteFeatureOnlineStoreSettings() { + return getStubSettingsBuilder().deleteFeatureOnlineStoreSettings(); + } + + /** Returns the builder for the settings used for calls to deleteFeatureOnlineStore. */ + public OperationCallSettings.Builder< + DeleteFeatureOnlineStoreRequest, Empty, DeleteOperationMetadata> + deleteFeatureOnlineStoreOperationSettings() { + return getStubSettingsBuilder().deleteFeatureOnlineStoreOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createFeatureView. */ + public UnaryCallSettings.Builder + createFeatureViewSettings() { + return getStubSettingsBuilder().createFeatureViewSettings(); + } + + /** Returns the builder for the settings used for calls to createFeatureView. */ + public OperationCallSettings.Builder< + CreateFeatureViewRequest, FeatureView, CreateFeatureViewOperationMetadata> + createFeatureViewOperationSettings() { + return getStubSettingsBuilder().createFeatureViewOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getFeatureView. */ + public UnaryCallSettings.Builder getFeatureViewSettings() { + return getStubSettingsBuilder().getFeatureViewSettings(); + } + + /** Returns the builder for the settings used for calls to listFeatureViews. */ + public PagedCallSettings.Builder< + ListFeatureViewsRequest, ListFeatureViewsResponse, ListFeatureViewsPagedResponse> + listFeatureViewsSettings() { + return getStubSettingsBuilder().listFeatureViewsSettings(); + } + + /** Returns the builder for the settings used for calls to updateFeatureView. */ + public UnaryCallSettings.Builder + updateFeatureViewSettings() { + return getStubSettingsBuilder().updateFeatureViewSettings(); + } + + /** Returns the builder for the settings used for calls to updateFeatureView. */ + public OperationCallSettings.Builder< + UpdateFeatureViewRequest, FeatureView, UpdateFeatureViewOperationMetadata> + updateFeatureViewOperationSettings() { + return getStubSettingsBuilder().updateFeatureViewOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteFeatureView. */ + public UnaryCallSettings.Builder + deleteFeatureViewSettings() { + return getStubSettingsBuilder().deleteFeatureViewSettings(); + } + + /** Returns the builder for the settings used for calls to deleteFeatureView. */ + public OperationCallSettings.Builder + deleteFeatureViewOperationSettings() { + return getStubSettingsBuilder().deleteFeatureViewOperationSettings(); + } + + /** Returns the builder for the settings used for calls to syncFeatureView. */ + public UnaryCallSettings.Builder + syncFeatureViewSettings() { + return getStubSettingsBuilder().syncFeatureViewSettings(); + } + + /** Returns the builder for the settings used for calls to getFeatureViewSync. */ + public UnaryCallSettings.Builder + getFeatureViewSyncSettings() { + return getStubSettingsBuilder().getFeatureViewSyncSettings(); + } + + /** Returns the builder for the settings used for calls to listFeatureViewSyncs. */ + public PagedCallSettings.Builder< + ListFeatureViewSyncsRequest, + ListFeatureViewSyncsResponse, + ListFeatureViewSyncsPagedResponse> + listFeatureViewSyncsSettings() { + return getStubSettingsBuilder().listFeatureViewSyncsSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public FeatureOnlineStoreAdminServiceSettings build() throws IOException { + return new FeatureOnlineStoreAdminServiceSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceClient.java new file mode 100644 index 000000000000..eb528e8fb0ce --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceClient.java @@ -0,0 +1,806 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +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.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.stub.FeatureOnlineStoreServiceStub; +import com.google.cloud.aiplatform.v1.stub.FeatureOnlineStoreServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * 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 (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient =
+ *     FeatureOnlineStoreServiceClient.create()) {
+ *   FeatureViewName featureView =
+ *       FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]");
+ *   FeatureViewDataKey dataKey = FeatureViewDataKey.newBuilder().build();
+ *   FetchFeatureValuesResponse response =
+ *       featureOnlineStoreServiceClient.fetchFeatureValues(featureView, dataKey);
+ * }
+ * }
+ * + *

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

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

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

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

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

This class can be customized by passing in a custom instance of + * FeatureOnlineStoreServiceSettings 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
+ * FeatureOnlineStoreServiceSettings featureOnlineStoreServiceSettings =
+ *     FeatureOnlineStoreServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient =
+ *     FeatureOnlineStoreServiceClient.create(featureOnlineStoreServiceSettings);
+ * }
+ * + *

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
+ * FeatureOnlineStoreServiceSettings featureOnlineStoreServiceSettings =
+ *     FeatureOnlineStoreServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient =
+ *     FeatureOnlineStoreServiceClient.create(featureOnlineStoreServiceSettings);
+ * }
+ * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient =
+   *     FeatureOnlineStoreServiceClient.create()) {
+   *   FeatureViewName featureView =
+   *       FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]");
+   *   FeatureViewDataKey dataKey = FeatureViewDataKey.newBuilder().build();
+   *   FetchFeatureValuesResponse response =
+   *       featureOnlineStoreServiceClient.fetchFeatureValues(featureView, dataKey);
+   * }
+   * }
+ * + * @param featureView Required. FeatureView resource format + * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}` + * @param dataKey Optional. The request key to fetch feature values for. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchFeatureValuesResponse fetchFeatureValues( + FeatureViewName featureView, FeatureViewDataKey dataKey) { + FetchFeatureValuesRequest request = + FetchFeatureValuesRequest.newBuilder() + .setFeatureView(featureView == null ? null : featureView.toString()) + .setDataKey(dataKey) + .build(); + return fetchFeatureValues(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetch feature values under a FeatureView. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient =
+   *     FeatureOnlineStoreServiceClient.create()) {
+   *   String featureView =
+   *       FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]")
+   *           .toString();
+   *   FeatureViewDataKey dataKey = FeatureViewDataKey.newBuilder().build();
+   *   FetchFeatureValuesResponse response =
+   *       featureOnlineStoreServiceClient.fetchFeatureValues(featureView, dataKey);
+   * }
+   * }
+ * + * @param featureView Required. FeatureView resource format + * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}` + * @param dataKey Optional. The request key to fetch feature values for. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchFeatureValuesResponse fetchFeatureValues( + String featureView, FeatureViewDataKey dataKey) { + FetchFeatureValuesRequest request = + FetchFeatureValuesRequest.newBuilder() + .setFeatureView(featureView) + .setDataKey(dataKey) + .build(); + return fetchFeatureValues(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetch feature values under a FeatureView. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient =
+   *     FeatureOnlineStoreServiceClient.create()) {
+   *   FetchFeatureValuesRequest request =
+   *       FetchFeatureValuesRequest.newBuilder()
+   *           .setFeatureView(
+   *               FeatureViewName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]")
+   *                   .toString())
+   *           .setDataKey(FeatureViewDataKey.newBuilder().build())
+   *           .setDataFormat(FeatureViewDataFormat.forNumber(0))
+   *           .build();
+   *   FetchFeatureValuesResponse response =
+   *       featureOnlineStoreServiceClient.fetchFeatureValues(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 FetchFeatureValuesResponse fetchFeatureValues(FetchFeatureValuesRequest request) { + return fetchFeatureValuesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetch feature values under a FeatureView. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient =
+   *     FeatureOnlineStoreServiceClient.create()) {
+   *   FetchFeatureValuesRequest request =
+   *       FetchFeatureValuesRequest.newBuilder()
+   *           .setFeatureView(
+   *               FeatureViewName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]")
+   *                   .toString())
+   *           .setDataKey(FeatureViewDataKey.newBuilder().build())
+   *           .setDataFormat(FeatureViewDataFormat.forNumber(0))
+   *           .build();
+   *   ApiFuture future =
+   *       featureOnlineStoreServiceClient.fetchFeatureValuesCallable().futureCall(request);
+   *   // Do something.
+   *   FetchFeatureValuesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + fetchFeatureValuesCallable() { + return stub.fetchFeatureValuesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient =
+   *     FeatureOnlineStoreServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : featureOnlineStoreServiceClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient =
+   *     FeatureOnlineStoreServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       featureOnlineStoreServiceClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient =
+   *     FeatureOnlineStoreServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         featureOnlineStoreServiceClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a 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 (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient =
+   *     FeatureOnlineStoreServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = featureOnlineStoreServiceClient.getLocation(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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a 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 (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient =
+   *     FeatureOnlineStoreServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       featureOnlineStoreServiceClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient =
+   *     FeatureOnlineStoreServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = featureOnlineStoreServiceClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient =
+   *     FeatureOnlineStoreServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       featureOnlineStoreServiceClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient =
+   *     FeatureOnlineStoreServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = featureOnlineStoreServiceClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient =
+   *     FeatureOnlineStoreServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       featureOnlineStoreServiceClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient =
+   *     FeatureOnlineStoreServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response =
+   *       featureOnlineStoreServiceClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient =
+   *     FeatureOnlineStoreServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       featureOnlineStoreServiceClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @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 ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceSettings.java new file mode 100644 index 000000000000..b0fa73cb52fc --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceSettings.java @@ -0,0 +1,258 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1; + +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1.stub.FeatureOnlineStoreServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 FeatureOnlineStoreServiceClient}. + * + *

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

    + *
  • The default service address (aiplatform.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 fetchFeatureValues 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
+ * FeatureOnlineStoreServiceSettings.Builder featureOnlineStoreServiceSettingsBuilder =
+ *     FeatureOnlineStoreServiceSettings.newBuilder();
+ * featureOnlineStoreServiceSettingsBuilder
+ *     .fetchFeatureValuesSettings()
+ *     .setRetrySettings(
+ *         featureOnlineStoreServiceSettingsBuilder
+ *             .fetchFeatureValuesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * FeatureOnlineStoreServiceSettings featureOnlineStoreServiceSettings =
+ *     featureOnlineStoreServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class FeatureOnlineStoreServiceSettings + extends ClientSettings { + + /** Returns the object with the settings used for calls to fetchFeatureValues. */ + public UnaryCallSettings + fetchFeatureValuesSettings() { + return ((FeatureOnlineStoreServiceStubSettings) getStubSettings()).fetchFeatureValuesSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((FeatureOnlineStoreServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((FeatureOnlineStoreServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((FeatureOnlineStoreServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((FeatureOnlineStoreServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((FeatureOnlineStoreServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final FeatureOnlineStoreServiceSettings create( + FeatureOnlineStoreServiceStubSettings stub) throws IOException { + return new FeatureOnlineStoreServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return FeatureOnlineStoreServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return FeatureOnlineStoreServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return FeatureOnlineStoreServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return FeatureOnlineStoreServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return FeatureOnlineStoreServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return FeatureOnlineStoreServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return FeatureOnlineStoreServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected FeatureOnlineStoreServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for FeatureOnlineStoreServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(FeatureOnlineStoreServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(FeatureOnlineStoreServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(FeatureOnlineStoreServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(FeatureOnlineStoreServiceStubSettings.newBuilder()); + } + + public FeatureOnlineStoreServiceStubSettings.Builder getStubSettingsBuilder() { + return ((FeatureOnlineStoreServiceStubSettings.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 fetchFeatureValues. */ + public UnaryCallSettings.Builder + fetchFeatureValuesSettings() { + return getStubSettingsBuilder().fetchFeatureValuesSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public FeatureOnlineStoreServiceSettings build() throws IOException { + return new FeatureOnlineStoreServiceSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureRegistryServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureRegistryServiceClient.java new file mode 100644 index 000000000000..454f060064b6 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureRegistryServiceClient.java @@ -0,0 +1,2510 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +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.aiplatform.v1.stub.FeatureRegistryServiceStub; +import com.google.cloud.aiplatform.v1.stub.FeatureRegistryServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +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: The service that handles CRUD and List for resources for FeatureRegistry. + * + *

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 (FeatureRegistryServiceClient featureRegistryServiceClient =
+ *     FeatureRegistryServiceClient.create()) {
+ *   FeatureGroupName name = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]");
+ *   FeatureGroup response = featureRegistryServiceClient.getFeatureGroup(name);
+ * }
+ * }
+ * + *

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

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

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

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

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

This class can be customized by passing in a custom instance of FeatureRegistryServiceSettings + * 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
+ * FeatureRegistryServiceSettings featureRegistryServiceSettings =
+ *     FeatureRegistryServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * FeatureRegistryServiceClient featureRegistryServiceClient =
+ *     FeatureRegistryServiceClient.create(featureRegistryServiceSettings);
+ * }
+ * + *

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
+ * FeatureRegistryServiceSettings featureRegistryServiceSettings =
+ *     FeatureRegistryServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * FeatureRegistryServiceClient featureRegistryServiceClient =
+ *     FeatureRegistryServiceClient.create(featureRegistryServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class FeatureRegistryServiceClient implements BackgroundResource { + private final FeatureRegistryServiceSettings settings; + private final FeatureRegistryServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of FeatureRegistryServiceClient with default settings. */ + public static final FeatureRegistryServiceClient create() throws IOException { + return create(FeatureRegistryServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of FeatureRegistryServiceClient, 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 FeatureRegistryServiceClient create(FeatureRegistryServiceSettings settings) + throws IOException { + return new FeatureRegistryServiceClient(settings); + } + + /** + * Constructs an instance of FeatureRegistryServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(FeatureRegistryServiceSettings). + */ + public static final FeatureRegistryServiceClient create(FeatureRegistryServiceStub stub) { + return new FeatureRegistryServiceClient(stub); + } + + /** + * Constructs an instance of FeatureRegistryServiceClient, 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 FeatureRegistryServiceClient(FeatureRegistryServiceSettings settings) + throws IOException { + this.settings = settings; + this.stub = ((FeatureRegistryServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + protected FeatureRegistryServiceClient(FeatureRegistryServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final FeatureRegistryServiceSettings getSettings() { + return settings; + } + + public FeatureRegistryServiceStub 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 OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new FeatureGroup 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 (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   FeatureGroup featureGroup = FeatureGroup.newBuilder().build();
+   *   String featureGroupId = "featureGroupId-1768466396";
+   *   FeatureGroup response =
+   *       featureRegistryServiceClient
+   *           .createFeatureGroupAsync(parent, featureGroup, featureGroupId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create FeatureGroups. Format: + * `projects/{project}/locations/{location}'` + * @param featureGroup Required. The FeatureGroup to create. + * @param featureGroupId Required. The ID to use for this FeatureGroup, which will become the + * final component of the FeatureGroup's resource name. + *

This value may be up to 60 characters, and valid characters are `[a-z0-9_]`. The first + * character cannot be a number. + *

The value must be unique within the project and location. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createFeatureGroupAsync( + LocationName parent, FeatureGroup featureGroup, String featureGroupId) { + CreateFeatureGroupRequest request = + CreateFeatureGroupRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFeatureGroup(featureGroup) + .setFeatureGroupId(featureGroupId) + .build(); + return createFeatureGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new FeatureGroup 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 (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   FeatureGroup featureGroup = FeatureGroup.newBuilder().build();
+   *   String featureGroupId = "featureGroupId-1768466396";
+   *   FeatureGroup response =
+   *       featureRegistryServiceClient
+   *           .createFeatureGroupAsync(parent, featureGroup, featureGroupId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create FeatureGroups. Format: + * `projects/{project}/locations/{location}'` + * @param featureGroup Required. The FeatureGroup to create. + * @param featureGroupId Required. The ID to use for this FeatureGroup, which will become the + * final component of the FeatureGroup's resource name. + *

This value may be up to 60 characters, and valid characters are `[a-z0-9_]`. The first + * character cannot be a number. + *

The value must be unique within the project and location. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createFeatureGroupAsync(String parent, FeatureGroup featureGroup, String featureGroupId) { + CreateFeatureGroupRequest request = + CreateFeatureGroupRequest.newBuilder() + .setParent(parent) + .setFeatureGroup(featureGroup) + .setFeatureGroupId(featureGroupId) + .build(); + return createFeatureGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new FeatureGroup 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 (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   CreateFeatureGroupRequest request =
+   *       CreateFeatureGroupRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFeatureGroup(FeatureGroup.newBuilder().build())
+   *           .setFeatureGroupId("featureGroupId-1768466396")
+   *           .build();
+   *   FeatureGroup response = featureRegistryServiceClient.createFeatureGroupAsync(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 + createFeatureGroupAsync(CreateFeatureGroupRequest request) { + return createFeatureGroupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new FeatureGroup 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 (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   CreateFeatureGroupRequest request =
+   *       CreateFeatureGroupRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFeatureGroup(FeatureGroup.newBuilder().build())
+   *           .setFeatureGroupId("featureGroupId-1768466396")
+   *           .build();
+   *   OperationFuture future =
+   *       featureRegistryServiceClient.createFeatureGroupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   FeatureGroup response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateFeatureGroupRequest, FeatureGroup, CreateFeatureGroupOperationMetadata> + createFeatureGroupOperationCallable() { + return stub.createFeatureGroupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new FeatureGroup 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 (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   CreateFeatureGroupRequest request =
+   *       CreateFeatureGroupRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFeatureGroup(FeatureGroup.newBuilder().build())
+   *           .setFeatureGroupId("featureGroupId-1768466396")
+   *           .build();
+   *   ApiFuture future =
+   *       featureRegistryServiceClient.createFeatureGroupCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createFeatureGroupCallable() { + return stub.createFeatureGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single FeatureGroup. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   GetFeatureGroupRequest request =
+   *       GetFeatureGroupRequest.newBuilder()
+   *           .setName(FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       featureRegistryServiceClient.getFeatureGroupCallable().futureCall(request);
+   *   // Do something.
+   *   FeatureGroup response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getFeatureGroupCallable() { + return stub.getFeatureGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FeatureGroups 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 (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (FeatureGroup element :
+   *       featureRegistryServiceClient.listFeatureGroups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to list FeatureGroups. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFeatureGroupsPagedResponse listFeatureGroups(LocationName parent) { + ListFeatureGroupsRequest request = + ListFeatureGroupsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listFeatureGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FeatureGroups 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 (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (FeatureGroup element :
+   *       featureRegistryServiceClient.listFeatureGroups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to list FeatureGroups. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFeatureGroupsPagedResponse listFeatureGroups(String parent) { + ListFeatureGroupsRequest request = + ListFeatureGroupsRequest.newBuilder().setParent(parent).build(); + return listFeatureGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FeatureGroups 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 (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   ListFeatureGroupsRequest request =
+   *       ListFeatureGroupsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (FeatureGroup element :
+   *       featureRegistryServiceClient.listFeatureGroups(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 ListFeatureGroupsPagedResponse listFeatureGroups(ListFeatureGroupsRequest request) { + return listFeatureGroupsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FeatureGroups 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 (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   ListFeatureGroupsRequest request =
+   *       ListFeatureGroupsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       featureRegistryServiceClient.listFeatureGroupsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (FeatureGroup element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listFeatureGroupsPagedCallable() { + return stub.listFeatureGroupsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FeatureGroups 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 (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   ListFeatureGroupsRequest request =
+   *       ListFeatureGroupsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListFeatureGroupsResponse response =
+   *         featureRegistryServiceClient.listFeatureGroupsCallable().call(request);
+   *     for (FeatureGroup element : response.getFeatureGroupsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listFeatureGroupsCallable() { + return stub.listFeatureGroupsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single FeatureGroup. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   FeatureGroup featureGroup = FeatureGroup.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   FeatureGroup response =
+   *       featureRegistryServiceClient.updateFeatureGroupAsync(featureGroup, updateMask).get();
+   * }
+   * }
+ * + * @param featureGroup Required. The FeatureGroup's `name` field is used to identify the + * FeatureGroup to be updated. Format: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` + * @param updateMask Field mask is used to specify the fields to be overwritten in the + * FeatureGroup 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 only the non-empty fields present in the request will + * be overwritten. Set the update_mask to `*` to override all fields. + *

Updatable fields: + *

* `labels` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateFeatureGroupAsync(FeatureGroup featureGroup, FieldMask updateMask) { + UpdateFeatureGroupRequest request = + UpdateFeatureGroupRequest.newBuilder() + .setFeatureGroup(featureGroup) + .setUpdateMask(updateMask) + .build(); + return updateFeatureGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single FeatureGroup. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   FeatureGroupName name = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]");
+   *   boolean force = true;
+   *   featureRegistryServiceClient.deleteFeatureGroupAsync(name, force).get();
+   * }
+   * }
+ * + * @param name Required. The name of the FeatureGroup to be deleted. Format: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` + * @param force If set to true, any Features under this FeatureGroup will also be deleted. + * (Otherwise, the request will only work if the FeatureGroup has no Features.) + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteFeatureGroupAsync( + FeatureGroupName name, boolean force) { + DeleteFeatureGroupRequest request = + DeleteFeatureGroupRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setForce(force) + .build(); + return deleteFeatureGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single FeatureGroup. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   String name = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString();
+   *   boolean force = true;
+   *   featureRegistryServiceClient.deleteFeatureGroupAsync(name, force).get();
+   * }
+   * }
+ * + * @param name Required. The name of the FeatureGroup to be deleted. Format: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` + * @param force If set to true, any Features under this FeatureGroup will also be deleted. + * (Otherwise, the request will only work if the FeatureGroup has no Features.) + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteFeatureGroupAsync( + String name, boolean force) { + DeleteFeatureGroupRequest request = + DeleteFeatureGroupRequest.newBuilder().setName(name).setForce(force).build(); + return deleteFeatureGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single FeatureGroup. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   EntityTypeName parent =
+   *       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]");
+   *   Feature feature = Feature.newBuilder().build();
+   *   String featureId = "featureId-420503887";
+   *   Feature response =
+   *       featureRegistryServiceClient.createFeatureAsync(parent, feature, featureId).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the EntityType or FeatureGroup to create a + * Feature. Format for entity_type as parent: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` + * @param feature Required. The Feature to create. + * @param featureId Required. The ID to use for the Feature, which will become the final component + * of the Feature's resource name. + *

This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first + * character cannot be a number. + *

The value must be unique within an EntityType/FeatureGroup. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createFeatureAsync( + EntityTypeName parent, Feature feature, String featureId) { + CreateFeatureRequest request = + CreateFeatureRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFeature(feature) + .setFeatureId(featureId) + .build(); + return createFeatureAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Feature in a given FeatureGroup. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]");
+   *   Feature feature = Feature.newBuilder().build();
+   *   String featureId = "featureId-420503887";
+   *   Feature response =
+   *       featureRegistryServiceClient.createFeatureAsync(parent, feature, featureId).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the EntityType or FeatureGroup to create a + * Feature. Format for entity_type as parent: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` + * @param feature Required. The Feature to create. + * @param featureId Required. The ID to use for the Feature, which will become the final component + * of the Feature's resource name. + *

This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first + * character cannot be a number. + *

The value must be unique within an EntityType/FeatureGroup. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createFeatureAsync( + FeatureGroupName parent, Feature feature, String featureId) { + CreateFeatureRequest request = + CreateFeatureRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFeature(feature) + .setFeatureId(featureId) + .build(); + return createFeatureAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Feature in a given FeatureGroup. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   String parent =
+   *       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+   *           .toString();
+   *   Feature feature = Feature.newBuilder().build();
+   *   String featureId = "featureId-420503887";
+   *   Feature response =
+   *       featureRegistryServiceClient.createFeatureAsync(parent, feature, featureId).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the EntityType or FeatureGroup to create a + * Feature. Format for entity_type as parent: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` + * @param feature Required. The Feature to create. + * @param featureId Required. The ID to use for the Feature, which will become the final component + * of the Feature's resource name. + *

This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first + * character cannot be a number. + *

The value must be unique within an EntityType/FeatureGroup. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createFeatureAsync( + String parent, Feature feature, String featureId) { + CreateFeatureRequest request = + CreateFeatureRequest.newBuilder() + .setParent(parent) + .setFeature(feature) + .setFeatureId(featureId) + .build(); + return createFeatureAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Feature in a given FeatureGroup. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   CreateFeatureRequest request =
+   *       CreateFeatureRequest.newBuilder()
+   *           .setParent(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setFeature(Feature.newBuilder().build())
+   *           .setFeatureId("featureId-420503887")
+   *           .build();
+   *   Feature response = featureRegistryServiceClient.createFeatureAsync(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 createFeatureAsync( + CreateFeatureRequest request) { + return createFeatureOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Feature in a given FeatureGroup. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   CreateFeatureRequest request =
+   *       CreateFeatureRequest.newBuilder()
+   *           .setParent(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setFeature(Feature.newBuilder().build())
+   *           .setFeatureId("featureId-420503887")
+   *           .build();
+   *   OperationFuture future =
+   *       featureRegistryServiceClient.createFeatureOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Feature response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createFeatureOperationCallable() { + return stub.createFeatureOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Feature in a given FeatureGroup. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   FeatureName name =
+   *       FeatureName.ofProjectLocationFeatureGroupFeatureName(
+   *           "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]");
+   *   Feature response = featureRegistryServiceClient.getFeature(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Feature resource. Format for entity_type as parent: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Feature getFeature(FeatureName name) { + GetFeatureRequest request = + GetFeatureRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getFeature(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Feature. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   String name =
+   *       FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName(
+   *               "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]")
+   *           .toString();
+   *   Feature response = featureRegistryServiceClient.getFeature(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Feature resource. Format for entity_type as parent: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Feature getFeature(String name) { + GetFeatureRequest request = GetFeatureRequest.newBuilder().setName(name).build(); + return getFeature(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Feature. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   GetFeatureRequest request =
+   *       GetFeatureRequest.newBuilder()
+   *           .setName(
+   *               FeatureName.ofProjectLocationFeatureGroupFeatureName(
+   *                       "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       featureRegistryServiceClient.getFeatureCallable().futureCall(request);
+   *   // Do something.
+   *   Feature response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getFeatureCallable() { + return stub.getFeatureCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Features in a given FeatureGroup. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   EntityTypeName parent =
+   *       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]");
+   *   for (Feature element : featureRegistryServiceClient.listFeatures(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to list Features. Format for + * entity_type as parent: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFeaturesPagedResponse listFeatures(EntityTypeName parent) { + ListFeaturesRequest request = + ListFeaturesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listFeatures(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Features in a given FeatureGroup. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]");
+   *   for (Feature element : featureRegistryServiceClient.listFeatures(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to list Features. Format for + * entity_type as parent: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFeaturesPagedResponse listFeatures(FeatureGroupName parent) { + ListFeaturesRequest request = + ListFeaturesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listFeatures(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Features in a given FeatureGroup. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   String parent =
+   *       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+   *           .toString();
+   *   for (Feature element : featureRegistryServiceClient.listFeatures(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to list Features. Format for + * entity_type as parent: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFeaturesPagedResponse listFeatures(String parent) { + ListFeaturesRequest request = ListFeaturesRequest.newBuilder().setParent(parent).build(); + return listFeatures(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Features in a given FeatureGroup. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   ListFeaturesRequest request =
+   *       ListFeaturesRequest.newBuilder()
+   *           .setParent(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setLatestStatsCount(-878108489)
+   *           .build();
+   *   for (Feature element : featureRegistryServiceClient.listFeatures(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 ListFeaturesPagedResponse listFeatures(ListFeaturesRequest request) { + return listFeaturesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Features in a given FeatureGroup. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   Feature feature = Feature.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Feature response = featureRegistryServiceClient.updateFeatureAsync(feature, updateMask).get();
+   * }
+   * }
+ * + * @param feature Required. The Feature's `name` field is used to identify the Feature to be + * updated. Format: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` + * @param updateMask Field mask is used to specify the fields to be overwritten in the Features + * 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 only the non-empty fields present in the request will be + * overwritten. Set the update_mask to `*` to override all fields. + *

Updatable fields: + *

* `description` * `labels` * `disable_monitoring` (Not supported for + * FeatureRegistry Feature) + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateFeatureAsync( + Feature feature, FieldMask updateMask) { + UpdateFeatureRequest request = + UpdateFeatureRequest.newBuilder().setFeature(feature).setUpdateMask(updateMask).build(); + return updateFeatureAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Feature. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   FeatureName name =
+   *       FeatureName.ofProjectLocationFeatureGroupFeatureName(
+   *           "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]");
+   *   featureRegistryServiceClient.deleteFeatureAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the Features to be deleted. Format: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteFeatureAsync( + FeatureName name) { + DeleteFeatureRequest request = + DeleteFeatureRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteFeatureAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Feature. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   String name =
+   *       FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName(
+   *               "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]")
+   *           .toString();
+   *   featureRegistryServiceClient.deleteFeatureAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the Features to be deleted. Format: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteFeatureAsync(String name) { + DeleteFeatureRequest request = DeleteFeatureRequest.newBuilder().setName(name).build(); + return deleteFeatureAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Feature. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   DeleteFeatureRequest request =
+   *       DeleteFeatureRequest.newBuilder()
+   *           .setName(
+   *               FeatureName.ofProjectLocationFeatureGroupFeatureName(
+   *                       "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]")
+   *                   .toString())
+   *           .build();
+   *   featureRegistryServiceClient.deleteFeatureAsync(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 deleteFeatureAsync( + DeleteFeatureRequest request) { + return deleteFeatureOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Feature. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   DeleteFeatureRequest request =
+   *       DeleteFeatureRequest.newBuilder()
+   *           .setName(
+   *               FeatureName.ofProjectLocationFeatureGroupFeatureName(
+   *                       "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       featureRegistryServiceClient.deleteFeatureCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteFeatureCallable() { + return stub.deleteFeatureCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : featureRegistryServiceClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       featureRegistryServiceClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         featureRegistryServiceClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a 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 (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = featureRegistryServiceClient.getLocation(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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a 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 (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       featureRegistryServiceClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = featureRegistryServiceClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       featureRegistryServiceClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = featureRegistryServiceClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       featureRegistryServiceClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response =
+   *       featureRegistryServiceClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeatureRegistryServiceClient featureRegistryServiceClient =
+   *     FeatureRegistryServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       featureRegistryServiceClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @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 ListFeatureGroupsPagedResponse + extends AbstractPagedListResponse< + ListFeatureGroupsRequest, + ListFeatureGroupsResponse, + FeatureGroup, + ListFeatureGroupsPage, + ListFeatureGroupsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListFeatureGroupsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListFeatureGroupsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListFeatureGroupsPagedResponse(ListFeatureGroupsPage page) { + super(page, ListFeatureGroupsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListFeatureGroupsPage + extends AbstractPage< + ListFeatureGroupsRequest, + ListFeatureGroupsResponse, + FeatureGroup, + ListFeatureGroupsPage> { + + private ListFeatureGroupsPage( + PageContext context, + ListFeatureGroupsResponse response) { + super(context, response); + } + + private static ListFeatureGroupsPage createEmptyPage() { + return new ListFeatureGroupsPage(null, null); + } + + @Override + protected ListFeatureGroupsPage createPage( + PageContext context, + ListFeatureGroupsResponse response) { + return new ListFeatureGroupsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListFeatureGroupsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListFeatureGroupsRequest, + ListFeatureGroupsResponse, + FeatureGroup, + ListFeatureGroupsPage, + ListFeatureGroupsFixedSizeCollection> { + + private ListFeatureGroupsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListFeatureGroupsFixedSizeCollection createEmptyCollection() { + return new ListFeatureGroupsFixedSizeCollection(null, 0); + } + + @Override + protected ListFeatureGroupsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListFeatureGroupsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListFeaturesPagedResponse + extends AbstractPagedListResponse< + ListFeaturesRequest, + ListFeaturesResponse, + Feature, + ListFeaturesPage, + ListFeaturesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListFeaturesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListFeaturesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListFeaturesPagedResponse(ListFeaturesPage page) { + super(page, ListFeaturesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListFeaturesPage + extends AbstractPage { + + private ListFeaturesPage( + PageContext context, + ListFeaturesResponse response) { + super(context, response); + } + + private static ListFeaturesPage createEmptyPage() { + return new ListFeaturesPage(null, null); + } + + @Override + protected ListFeaturesPage createPage( + PageContext context, + ListFeaturesResponse response) { + return new ListFeaturesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListFeaturesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListFeaturesRequest, + ListFeaturesResponse, + Feature, + ListFeaturesPage, + ListFeaturesFixedSizeCollection> { + + private ListFeaturesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListFeaturesFixedSizeCollection createEmptyCollection() { + return new ListFeaturesFixedSizeCollection(null, 0); + } + + @Override + protected ListFeaturesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListFeaturesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureRegistryServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureRegistryServiceSettings.java new file mode 100644 index 000000000000..8a9bd99744b4 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeatureRegistryServiceSettings.java @@ -0,0 +1,445 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1; + +import static com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient.ListFeatureGroupsPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient.ListFeaturesPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1.stub.FeatureRegistryServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 FeatureRegistryServiceClient}. + * + *

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

    + *
  • The default service address (aiplatform.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 getFeatureGroup 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
+ * FeatureRegistryServiceSettings.Builder featureRegistryServiceSettingsBuilder =
+ *     FeatureRegistryServiceSettings.newBuilder();
+ * featureRegistryServiceSettingsBuilder
+ *     .getFeatureGroupSettings()
+ *     .setRetrySettings(
+ *         featureRegistryServiceSettingsBuilder
+ *             .getFeatureGroupSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * FeatureRegistryServiceSettings featureRegistryServiceSettings =
+ *     featureRegistryServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class FeatureRegistryServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createFeatureGroup. */ + public UnaryCallSettings createFeatureGroupSettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()).createFeatureGroupSettings(); + } + + /** Returns the object with the settings used for calls to createFeatureGroup. */ + public OperationCallSettings< + CreateFeatureGroupRequest, FeatureGroup, CreateFeatureGroupOperationMetadata> + createFeatureGroupOperationSettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()) + .createFeatureGroupOperationSettings(); + } + + /** Returns the object with the settings used for calls to getFeatureGroup. */ + public UnaryCallSettings getFeatureGroupSettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()).getFeatureGroupSettings(); + } + + /** Returns the object with the settings used for calls to listFeatureGroups. */ + public PagedCallSettings< + ListFeatureGroupsRequest, ListFeatureGroupsResponse, ListFeatureGroupsPagedResponse> + listFeatureGroupsSettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()).listFeatureGroupsSettings(); + } + + /** Returns the object with the settings used for calls to updateFeatureGroup. */ + public UnaryCallSettings updateFeatureGroupSettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()).updateFeatureGroupSettings(); + } + + /** Returns the object with the settings used for calls to updateFeatureGroup. */ + public OperationCallSettings< + UpdateFeatureGroupRequest, FeatureGroup, UpdateFeatureGroupOperationMetadata> + updateFeatureGroupOperationSettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()) + .updateFeatureGroupOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteFeatureGroup. */ + public UnaryCallSettings deleteFeatureGroupSettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()).deleteFeatureGroupSettings(); + } + + /** Returns the object with the settings used for calls to deleteFeatureGroup. */ + public OperationCallSettings + deleteFeatureGroupOperationSettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()) + .deleteFeatureGroupOperationSettings(); + } + + /** Returns the object with the settings used for calls to createFeature. */ + public UnaryCallSettings createFeatureSettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()).createFeatureSettings(); + } + + /** Returns the object with the settings used for calls to createFeature. */ + public OperationCallSettings + createFeatureOperationSettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()) + .createFeatureOperationSettings(); + } + + /** Returns the object with the settings used for calls to getFeature. */ + public UnaryCallSettings getFeatureSettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()).getFeatureSettings(); + } + + /** Returns the object with the settings used for calls to listFeatures. */ + public PagedCallSettings + listFeaturesSettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()).listFeaturesSettings(); + } + + /** Returns the object with the settings used for calls to updateFeature. */ + public UnaryCallSettings updateFeatureSettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()).updateFeatureSettings(); + } + + /** Returns the object with the settings used for calls to updateFeature. */ + public OperationCallSettings + updateFeatureOperationSettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()) + .updateFeatureOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteFeature. */ + public UnaryCallSettings deleteFeatureSettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()).deleteFeatureSettings(); + } + + /** Returns the object with the settings used for calls to deleteFeature. */ + public OperationCallSettings + deleteFeatureOperationSettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()) + .deleteFeatureOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((FeatureRegistryServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final FeatureRegistryServiceSettings create(FeatureRegistryServiceStubSettings stub) + throws IOException { + return new FeatureRegistryServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return FeatureRegistryServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return FeatureRegistryServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return FeatureRegistryServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return FeatureRegistryServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return FeatureRegistryServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return FeatureRegistryServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return FeatureRegistryServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected FeatureRegistryServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for FeatureRegistryServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(FeatureRegistryServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(FeatureRegistryServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(FeatureRegistryServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(FeatureRegistryServiceStubSettings.newBuilder()); + } + + public FeatureRegistryServiceStubSettings.Builder getStubSettingsBuilder() { + return ((FeatureRegistryServiceStubSettings.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 createFeatureGroup. */ + public UnaryCallSettings.Builder + createFeatureGroupSettings() { + return getStubSettingsBuilder().createFeatureGroupSettings(); + } + + /** Returns the builder for the settings used for calls to createFeatureGroup. */ + public OperationCallSettings.Builder< + CreateFeatureGroupRequest, FeatureGroup, CreateFeatureGroupOperationMetadata> + createFeatureGroupOperationSettings() { + return getStubSettingsBuilder().createFeatureGroupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getFeatureGroup. */ + public UnaryCallSettings.Builder + getFeatureGroupSettings() { + return getStubSettingsBuilder().getFeatureGroupSettings(); + } + + /** Returns the builder for the settings used for calls to listFeatureGroups. */ + public PagedCallSettings.Builder< + ListFeatureGroupsRequest, ListFeatureGroupsResponse, ListFeatureGroupsPagedResponse> + listFeatureGroupsSettings() { + return getStubSettingsBuilder().listFeatureGroupsSettings(); + } + + /** Returns the builder for the settings used for calls to updateFeatureGroup. */ + public UnaryCallSettings.Builder + updateFeatureGroupSettings() { + return getStubSettingsBuilder().updateFeatureGroupSettings(); + } + + /** Returns the builder for the settings used for calls to updateFeatureGroup. */ + public OperationCallSettings.Builder< + UpdateFeatureGroupRequest, FeatureGroup, UpdateFeatureGroupOperationMetadata> + updateFeatureGroupOperationSettings() { + return getStubSettingsBuilder().updateFeatureGroupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteFeatureGroup. */ + public UnaryCallSettings.Builder + deleteFeatureGroupSettings() { + return getStubSettingsBuilder().deleteFeatureGroupSettings(); + } + + /** Returns the builder for the settings used for calls to deleteFeatureGroup. */ + public OperationCallSettings.Builder + deleteFeatureGroupOperationSettings() { + return getStubSettingsBuilder().deleteFeatureGroupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createFeature. */ + public UnaryCallSettings.Builder createFeatureSettings() { + return getStubSettingsBuilder().createFeatureSettings(); + } + + /** Returns the builder for the settings used for calls to createFeature. */ + public OperationCallSettings.Builder< + CreateFeatureRequest, Feature, CreateFeatureOperationMetadata> + createFeatureOperationSettings() { + return getStubSettingsBuilder().createFeatureOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getFeature. */ + public UnaryCallSettings.Builder getFeatureSettings() { + return getStubSettingsBuilder().getFeatureSettings(); + } + + /** Returns the builder for the settings used for calls to listFeatures. */ + public PagedCallSettings.Builder< + ListFeaturesRequest, ListFeaturesResponse, ListFeaturesPagedResponse> + listFeaturesSettings() { + return getStubSettingsBuilder().listFeaturesSettings(); + } + + /** Returns the builder for the settings used for calls to updateFeature. */ + public UnaryCallSettings.Builder updateFeatureSettings() { + return getStubSettingsBuilder().updateFeatureSettings(); + } + + /** Returns the builder for the settings used for calls to updateFeature. */ + public OperationCallSettings.Builder< + UpdateFeatureRequest, Feature, UpdateFeatureOperationMetadata> + updateFeatureOperationSettings() { + return getStubSettingsBuilder().updateFeatureOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteFeature. */ + public UnaryCallSettings.Builder deleteFeatureSettings() { + return getStubSettingsBuilder().deleteFeatureSettings(); + } + + /** Returns the builder for the settings used for calls to deleteFeature. */ + public OperationCallSettings.Builder + deleteFeatureOperationSettings() { + return getStubSettingsBuilder().deleteFeatureOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public FeatureRegistryServiceSettings build() throws IOException { + return new FeatureRegistryServiceSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeaturestoreServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeaturestoreServiceClient.java index 189991180175..0e3966e54acc 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeaturestoreServiceClient.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/FeaturestoreServiceClient.java @@ -1980,8 +1980,11 @@ public final UnaryCallable deleteEntityTypeC * } * } * - * @param parent Required. The resource name of the EntityType to create a Feature. Format: + * @param parent Required. The resource name of the EntityType or FeatureGroup to create a + * Feature. Format for entity_type as parent: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @param feature Required. The Feature to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1995,6 +1998,43 @@ public final OperationFuture createFeat return createFeatureAsync(request); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Feature in a given EntityType. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+   *   FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]");
+   *   Feature feature = Feature.newBuilder().build();
+   *   Feature response = featurestoreServiceClient.createFeatureAsync(parent, feature).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the EntityType or FeatureGroup to create a + * Feature. Format for entity_type as parent: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` + * @param feature Required. The Feature to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createFeatureAsync( + FeatureGroupName parent, Feature feature) { + CreateFeatureRequest request = + CreateFeatureRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFeature(feature) + .build(); + return createFeatureAsync(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Feature in a given EntityType. @@ -2016,8 +2056,11 @@ public final OperationFuture createFeat * } * } * - * @param parent Required. The resource name of the EntityType to create a Feature. Format: + * @param parent Required. The resource name of the EntityType or FeatureGroup to create a + * Feature. Format for entity_type as parent: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @param feature Required. The Feature to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2050,14 +2093,17 @@ public final OperationFuture createFeat * } * } * - * @param parent Required. The resource name of the EntityType to create a Feature. Format: + * @param parent Required. The resource name of the EntityType or FeatureGroup to create a + * Feature. Format for entity_type as parent: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @param feature Required. The Feature to create. * @param featureId Required. The ID to use for the Feature, which will become the final component * of the Feature's resource name. *

This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first * character cannot be a number. - *

The value must be unique within an EntityType. + *

The value must be unique within an EntityType/FeatureGroup. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createFeatureAsync( @@ -2071,6 +2117,51 @@ public final OperationFuture createFeat return createFeatureAsync(request); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Feature in a given EntityType. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+   *   FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]");
+   *   Feature feature = Feature.newBuilder().build();
+   *   String featureId = "featureId-420503887";
+   *   Feature response =
+   *       featurestoreServiceClient.createFeatureAsync(parent, feature, featureId).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the EntityType or FeatureGroup to create a + * Feature. Format for entity_type as parent: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` + * @param feature Required. The Feature to create. + * @param featureId Required. The ID to use for the Feature, which will become the final component + * of the Feature's resource name. + *

This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first + * character cannot be a number. + *

The value must be unique within an EntityType/FeatureGroup. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createFeatureAsync( + FeatureGroupName parent, Feature feature, String featureId) { + CreateFeatureRequest request = + CreateFeatureRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFeature(feature) + .setFeatureId(featureId) + .build(); + return createFeatureAsync(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Feature in a given EntityType. @@ -2094,14 +2185,17 @@ public final OperationFuture createFeat * } * } * - * @param parent Required. The resource name of the EntityType to create a Feature. Format: + * @param parent Required. The resource name of the EntityType or FeatureGroup to create a + * Feature. Format for entity_type as parent: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @param feature Required. The Feature to create. * @param featureId Required. The ID to use for the Feature, which will become the final component * of the Feature's resource name. *

This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first * character cannot be a number. - *

The value must be unique within an EntityType. + *

The value must be unique within an EntityType/FeatureGroup. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createFeatureAsync( @@ -2404,13 +2498,16 @@ public final UnaryCallable batchCreateFea * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { * FeatureName name = - * FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]"); + * FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( + * "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]"); * Feature response = featurestoreServiceClient.getFeature(name); * } * } * - * @param name Required. The name of the Feature resource. Format: + * @param name Required. The name of the Feature resource. Format for entity_type as parent: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Feature getFeature(FeatureName name) { @@ -2433,14 +2530,17 @@ public final Feature getFeature(FeatureName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { * String name = - * FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") + * FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( + * "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") * .toString(); * Feature response = featurestoreServiceClient.getFeature(name); * } * } * - * @param name Required. The name of the Feature resource. Format: + * @param name Required. The name of the Feature resource. Format for entity_type as parent: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Feature getFeature(String name) { @@ -2464,7 +2564,7 @@ public final Feature getFeature(String name) { * GetFeatureRequest request = * GetFeatureRequest.newBuilder() * .setName( - * FeatureName.of( + * FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( * "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") * .toString()) * .build(); @@ -2495,7 +2595,7 @@ public final Feature getFeature(GetFeatureRequest request) { * GetFeatureRequest request = * GetFeatureRequest.newBuilder() * .setName( - * FeatureName.of( + * FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( * "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") * .toString()) * .build(); @@ -2531,8 +2631,11 @@ public final UnaryCallable getFeatureCallable() { * } * } * - * @param parent Required. The resource name of the Location to list Features. Format: + * @param parent Required. The resource name of the Location to list Features. Format for + * entity_type as parent: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListFeaturesPagedResponse listFeatures(EntityTypeName parent) { @@ -2543,6 +2646,41 @@ public final ListFeaturesPagedResponse listFeatures(EntityTypeName parent) { return listFeatures(request); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Features in a given EntityType. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+   *   FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]");
+   *   for (Feature element : featurestoreServiceClient.listFeatures(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to list Features. Format for + * entity_type as parent: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFeaturesPagedResponse listFeatures(FeatureGroupName parent) { + ListFeaturesRequest request = + ListFeaturesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listFeatures(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Features in a given EntityType. @@ -2565,8 +2703,11 @@ public final ListFeaturesPagedResponse listFeatures(EntityTypeName parent) { * } * } * - * @param parent Required. The resource name of the Location to list Features. Format: + * @param parent Required. The resource name of the Location to list Features. Format for + * entity_type as parent: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListFeaturesPagedResponse listFeatures(String parent) { @@ -2718,13 +2859,15 @@ public final UnaryCallable listFeatur * @param feature Required. The Feature's `name` field is used to identify the Feature to be * updated. Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * @param updateMask Field mask is used to specify the fields to be overwritten in the Features * 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 only the non-empty fields present in the request will be * overwritten. Set the update_mask to `*` to override all fields. *

Updatable fields: - *

* `description` * `labels` * `disable_monitoring` + *

* `description` * `labels` * `disable_monitoring` (Not supported for + * FeatureRegistry Feature) * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Feature updateFeature(Feature feature, FieldMask updateMask) { @@ -2805,13 +2948,15 @@ public final UnaryCallable updateFeatureCallable( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { * FeatureName name = - * FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]"); + * FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( + * "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]"); * featurestoreServiceClient.deleteFeatureAsync(name).get(); * } * } * * @param name Required. The name of the Features to be deleted. Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteFeatureAsync( @@ -2835,7 +2980,8 @@ public final OperationFuture deleteFeatureAsync( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { * String name = - * FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") + * FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( + * "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") * .toString(); * featurestoreServiceClient.deleteFeatureAsync(name).get(); * } @@ -2843,6 +2989,7 @@ public final OperationFuture deleteFeatureAsync( * * @param name Required. The name of the Features to be deleted. Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteFeatureAsync(String name) { @@ -2866,7 +3013,7 @@ public final OperationFuture deleteFeatureAsync( * DeleteFeatureRequest request = * DeleteFeatureRequest.newBuilder() * .setName( - * FeatureName.of( + * FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( * "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") * .toString()) * .build(); @@ -2898,7 +3045,7 @@ public final OperationFuture deleteFeatureAsync( * DeleteFeatureRequest request = * DeleteFeatureRequest.newBuilder() * .setName( - * FeatureName.of( + * FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( * "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") * .toString()) * .build(); @@ -2930,7 +3077,7 @@ public final OperationFuture deleteFeatureAsync( * DeleteFeatureRequest request = * DeleteFeatureRequest.newBuilder() * .setName( - * FeatureName.of( + * FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( * "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") * .toString()) * .build(); diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceClient.java new file mode 100644 index 000000000000..db951d202499 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceClient.java @@ -0,0 +1,912 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +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.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.stub.LlmUtilityServiceStub; +import com.google.cloud.aiplatform.v1.stub.LlmUtilityServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Value; +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 for LLM related utility functions. + * + *

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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+ *   EndpointName endpoint =
+ *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
+ *   List instances = new ArrayList<>();
+ *   CountTokensResponse response = llmUtilityServiceClient.countTokens(endpoint, instances);
+ * }
+ * }
+ * + *

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

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

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

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

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

This class can be customized by passing in a custom instance of LlmUtilityServiceSettings 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
+ * LlmUtilityServiceSettings llmUtilityServiceSettings =
+ *     LlmUtilityServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * LlmUtilityServiceClient llmUtilityServiceClient =
+ *     LlmUtilityServiceClient.create(llmUtilityServiceSettings);
+ * }
+ * + *

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
+ * LlmUtilityServiceSettings llmUtilityServiceSettings =
+ *     LlmUtilityServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * LlmUtilityServiceClient llmUtilityServiceClient =
+ *     LlmUtilityServiceClient.create(llmUtilityServiceSettings);
+ * }
+ * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   EndpointName endpoint =
+   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
+   *   List instances = new ArrayList<>();
+   *   CountTokensResponse response = llmUtilityServiceClient.countTokens(endpoint, instances);
+   * }
+   * }
+ * + * @param endpoint Required. The name of the Endpoint requested to perform token counting. Format: + * `projects/{project}/locations/{location}/endpoints/{endpoint}` + * @param instances Required. The instances that are the input to token counting call. Schema is + * identical to the prediction schema of the underlying model. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CountTokensResponse countTokens(EndpointName endpoint, List instances) { + CountTokensRequest request = + CountTokensRequest.newBuilder() + .setEndpoint(endpoint == null ? null : endpoint.toString()) + .addAllInstances(instances) + .build(); + return countTokens(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Perform a token counting. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   String endpoint =
+   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *           .toString();
+   *   List instances = new ArrayList<>();
+   *   CountTokensResponse response = llmUtilityServiceClient.countTokens(endpoint, instances);
+   * }
+   * }
+ * + * @param endpoint Required. The name of the Endpoint requested to perform token counting. Format: + * `projects/{project}/locations/{location}/endpoints/{endpoint}` + * @param instances Required. The instances that are the input to token counting call. Schema is + * identical to the prediction schema of the underlying model. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CountTokensResponse countTokens(String endpoint, List instances) { + CountTokensRequest request = + CountTokensRequest.newBuilder().setEndpoint(endpoint).addAllInstances(instances).build(); + return countTokens(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Perform a token counting. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   CountTokensRequest request =
+   *       CountTokensRequest.newBuilder()
+   *           .setEndpoint(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllInstances(new ArrayList())
+   *           .build();
+   *   CountTokensResponse response = llmUtilityServiceClient.countTokens(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 CountTokensResponse countTokens(CountTokensRequest request) { + return countTokensCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Perform a token counting. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   CountTokensRequest request =
+   *       CountTokensRequest.newBuilder()
+   *           .setEndpoint(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllInstances(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       llmUtilityServiceClient.countTokensCallable().futureCall(request);
+   *   // Do something.
+   *   CountTokensResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable countTokensCallable() { + return stub.countTokensCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Return a list of tokens based on the input text. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   EndpointName endpoint =
+   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
+   *   List instances = new ArrayList<>();
+   *   ComputeTokensResponse response = llmUtilityServiceClient.computeTokens(endpoint, instances);
+   * }
+   * }
+ * + * @param endpoint Required. The name of the Endpoint requested to get lists of tokens and token + * ids. + * @param instances Required. The instances that are the input to token computing API call. Schema + * is identical to the prediction schema of the text model, even for the non-text models, like + * chat models, or Codey models. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ComputeTokensResponse computeTokens(EndpointName endpoint, List instances) { + ComputeTokensRequest request = + ComputeTokensRequest.newBuilder() + .setEndpoint(endpoint == null ? null : endpoint.toString()) + .addAllInstances(instances) + .build(); + return computeTokens(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Return a list of tokens based on the input text. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   String endpoint =
+   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *           .toString();
+   *   List instances = new ArrayList<>();
+   *   ComputeTokensResponse response = llmUtilityServiceClient.computeTokens(endpoint, instances);
+   * }
+   * }
+ * + * @param endpoint Required. The name of the Endpoint requested to get lists of tokens and token + * ids. + * @param instances Required. The instances that are the input to token computing API call. Schema + * is identical to the prediction schema of the text model, even for the non-text models, like + * chat models, or Codey models. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ComputeTokensResponse computeTokens(String endpoint, List instances) { + ComputeTokensRequest request = + ComputeTokensRequest.newBuilder().setEndpoint(endpoint).addAllInstances(instances).build(); + return computeTokens(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Return a list of tokens based on the input text. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   ComputeTokensRequest request =
+   *       ComputeTokensRequest.newBuilder()
+   *           .setEndpoint(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllInstances(new ArrayList())
+   *           .build();
+   *   ComputeTokensResponse response = llmUtilityServiceClient.computeTokens(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 ComputeTokensResponse computeTokens(ComputeTokensRequest request) { + return computeTokensCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Return a list of tokens based on the input text. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   ComputeTokensRequest request =
+   *       ComputeTokensRequest.newBuilder()
+   *           .setEndpoint(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllInstances(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       llmUtilityServiceClient.computeTokensCallable().futureCall(request);
+   *   // Do something.
+   *   ComputeTokensResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable computeTokensCallable() { + return stub.computeTokensCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : llmUtilityServiceClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       llmUtilityServiceClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         llmUtilityServiceClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a 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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = llmUtilityServiceClient.getLocation(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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a 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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       llmUtilityServiceClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = llmUtilityServiceClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = llmUtilityServiceClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = llmUtilityServiceClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = llmUtilityServiceClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = llmUtilityServiceClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       llmUtilityServiceClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @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 ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceSettings.java new file mode 100644 index 000000000000..e7f9aefd8d59 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceSettings.java @@ -0,0 +1,265 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1; + +import static com.google.cloud.aiplatform.v1.LlmUtilityServiceClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1.stub.LlmUtilityServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 LlmUtilityServiceClient}. + * + *

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

    + *
  • The default service address (aiplatform.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 countTokens 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
+ * LlmUtilityServiceSettings.Builder llmUtilityServiceSettingsBuilder =
+ *     LlmUtilityServiceSettings.newBuilder();
+ * llmUtilityServiceSettingsBuilder
+ *     .countTokensSettings()
+ *     .setRetrySettings(
+ *         llmUtilityServiceSettingsBuilder
+ *             .countTokensSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * LlmUtilityServiceSettings llmUtilityServiceSettings = llmUtilityServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class LlmUtilityServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to countTokens. */ + public UnaryCallSettings countTokensSettings() { + return ((LlmUtilityServiceStubSettings) getStubSettings()).countTokensSettings(); + } + + /** Returns the object with the settings used for calls to computeTokens. */ + public UnaryCallSettings computeTokensSettings() { + return ((LlmUtilityServiceStubSettings) getStubSettings()).computeTokensSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((LlmUtilityServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((LlmUtilityServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((LlmUtilityServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((LlmUtilityServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((LlmUtilityServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final LlmUtilityServiceSettings create(LlmUtilityServiceStubSettings stub) + throws IOException { + return new LlmUtilityServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return LlmUtilityServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return LlmUtilityServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return LlmUtilityServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return LlmUtilityServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return LlmUtilityServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return LlmUtilityServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return LlmUtilityServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected LlmUtilityServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for LlmUtilityServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(LlmUtilityServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(LlmUtilityServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(LlmUtilityServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(LlmUtilityServiceStubSettings.newBuilder()); + } + + public LlmUtilityServiceStubSettings.Builder getStubSettingsBuilder() { + return ((LlmUtilityServiceStubSettings.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 countTokens. */ + public UnaryCallSettings.Builder + countTokensSettings() { + return getStubSettingsBuilder().countTokensSettings(); + } + + /** Returns the builder for the settings used for calls to computeTokens. */ + public UnaryCallSettings.Builder + computeTokensSettings() { + return getStubSettingsBuilder().computeTokensSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public LlmUtilityServiceSettings build() throws IOException { + return new LlmUtilityServiceSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json index dce7c4dc6698..8068a89d2445 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json @@ -131,6 +131,150 @@ } } }, + "FeatureOnlineStoreAdminService": { + "clients": { + "grpc": { + "libraryClient": "FeatureOnlineStoreAdminServiceClient", + "rpcs": { + "CreateFeatureOnlineStore": { + "methods": ["createFeatureOnlineStoreAsync", "createFeatureOnlineStoreAsync", "createFeatureOnlineStoreAsync", "createFeatureOnlineStoreOperationCallable", "createFeatureOnlineStoreCallable"] + }, + "CreateFeatureView": { + "methods": ["createFeatureViewAsync", "createFeatureViewAsync", "createFeatureViewAsync", "createFeatureViewOperationCallable", "createFeatureViewCallable"] + }, + "DeleteFeatureOnlineStore": { + "methods": ["deleteFeatureOnlineStoreAsync", "deleteFeatureOnlineStoreAsync", "deleteFeatureOnlineStoreAsync", "deleteFeatureOnlineStoreOperationCallable", "deleteFeatureOnlineStoreCallable"] + }, + "DeleteFeatureView": { + "methods": ["deleteFeatureViewAsync", "deleteFeatureViewAsync", "deleteFeatureViewAsync", "deleteFeatureViewOperationCallable", "deleteFeatureViewCallable"] + }, + "GetFeatureOnlineStore": { + "methods": ["getFeatureOnlineStore", "getFeatureOnlineStore", "getFeatureOnlineStore", "getFeatureOnlineStoreCallable"] + }, + "GetFeatureView": { + "methods": ["getFeatureView", "getFeatureView", "getFeatureView", "getFeatureViewCallable"] + }, + "GetFeatureViewSync": { + "methods": ["getFeatureViewSync", "getFeatureViewSync", "getFeatureViewSync", "getFeatureViewSyncCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListFeatureOnlineStores": { + "methods": ["listFeatureOnlineStores", "listFeatureOnlineStores", "listFeatureOnlineStores", "listFeatureOnlineStoresPagedCallable", "listFeatureOnlineStoresCallable"] + }, + "ListFeatureViewSyncs": { + "methods": ["listFeatureViewSyncs", "listFeatureViewSyncs", "listFeatureViewSyncs", "listFeatureViewSyncsPagedCallable", "listFeatureViewSyncsCallable"] + }, + "ListFeatureViews": { + "methods": ["listFeatureViews", "listFeatureViews", "listFeatureViews", "listFeatureViewsPagedCallable", "listFeatureViewsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "SyncFeatureView": { + "methods": ["syncFeatureView", "syncFeatureView", "syncFeatureView", "syncFeatureViewCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, + "UpdateFeatureOnlineStore": { + "methods": ["updateFeatureOnlineStoreAsync", "updateFeatureOnlineStoreAsync", "updateFeatureOnlineStoreOperationCallable", "updateFeatureOnlineStoreCallable"] + }, + "UpdateFeatureView": { + "methods": ["updateFeatureViewAsync", "updateFeatureViewAsync", "updateFeatureViewOperationCallable", "updateFeatureViewCallable"] + } + } + } + } + }, + "FeatureOnlineStoreService": { + "clients": { + "grpc": { + "libraryClient": "FeatureOnlineStoreServiceClient", + "rpcs": { + "FetchFeatureValues": { + "methods": ["fetchFeatureValues", "fetchFeatureValues", "fetchFeatureValues", "fetchFeatureValuesCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + } + } + } + } + }, + "FeatureRegistryService": { + "clients": { + "grpc": { + "libraryClient": "FeatureRegistryServiceClient", + "rpcs": { + "CreateFeature": { + "methods": ["createFeatureAsync", "createFeatureAsync", "createFeatureAsync", "createFeatureAsync", "createFeatureOperationCallable", "createFeatureCallable"] + }, + "CreateFeatureGroup": { + "methods": ["createFeatureGroupAsync", "createFeatureGroupAsync", "createFeatureGroupAsync", "createFeatureGroupOperationCallable", "createFeatureGroupCallable"] + }, + "DeleteFeature": { + "methods": ["deleteFeatureAsync", "deleteFeatureAsync", "deleteFeatureAsync", "deleteFeatureOperationCallable", "deleteFeatureCallable"] + }, + "DeleteFeatureGroup": { + "methods": ["deleteFeatureGroupAsync", "deleteFeatureGroupAsync", "deleteFeatureGroupAsync", "deleteFeatureGroupOperationCallable", "deleteFeatureGroupCallable"] + }, + "GetFeature": { + "methods": ["getFeature", "getFeature", "getFeature", "getFeatureCallable"] + }, + "GetFeatureGroup": { + "methods": ["getFeatureGroup", "getFeatureGroup", "getFeatureGroup", "getFeatureGroupCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListFeatureGroups": { + "methods": ["listFeatureGroups", "listFeatureGroups", "listFeatureGroups", "listFeatureGroupsPagedCallable", "listFeatureGroupsCallable"] + }, + "ListFeatures": { + "methods": ["listFeatures", "listFeatures", "listFeatures", "listFeatures", "listFeaturesPagedCallable", "listFeaturesCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, + "UpdateFeature": { + "methods": ["updateFeatureAsync", "updateFeatureAsync", "updateFeatureOperationCallable", "updateFeatureCallable"] + }, + "UpdateFeatureGroup": { + "methods": ["updateFeatureGroupAsync", "updateFeatureGroupAsync", "updateFeatureGroupOperationCallable", "updateFeatureGroupCallable"] + } + } + } + } + }, "FeaturestoreOnlineServingService": { "clients": { "grpc": { @@ -179,7 +323,7 @@ "methods": ["createEntityTypeAsync", "createEntityTypeAsync", "createEntityTypeAsync", "createEntityTypeAsync", "createEntityTypeAsync", "createEntityTypeOperationCallable", "createEntityTypeCallable"] }, "CreateFeature": { - "methods": ["createFeatureAsync", "createFeatureAsync", "createFeatureAsync", "createFeatureAsync", "createFeatureAsync", "createFeatureOperationCallable", "createFeatureCallable"] + "methods": ["createFeatureAsync", "createFeatureAsync", "createFeatureAsync", "createFeatureAsync", "createFeatureAsync", "createFeatureAsync", "createFeatureAsync", "createFeatureOperationCallable", "createFeatureCallable"] }, "CreateFeaturestore": { "methods": ["createFeaturestoreAsync", "createFeaturestoreAsync", "createFeaturestoreAsync", "createFeaturestoreAsync", "createFeaturestoreAsync", "createFeaturestoreOperationCallable", "createFeaturestoreCallable"] @@ -221,7 +365,7 @@ "methods": ["listEntityTypes", "listEntityTypes", "listEntityTypes", "listEntityTypesPagedCallable", "listEntityTypesCallable"] }, "ListFeatures": { - "methods": ["listFeatures", "listFeatures", "listFeatures", "listFeaturesPagedCallable", "listFeaturesCallable"] + "methods": ["listFeatures", "listFeatures", "listFeatures", "listFeatures", "listFeaturesPagedCallable", "listFeaturesCallable"] }, "ListFeaturestores": { "methods": ["listFeaturestores", "listFeaturestores", "listFeaturestores", "listFeaturestoresPagedCallable", "listFeaturestoresCallable"] @@ -473,6 +617,36 @@ } } }, + "LlmUtilityService": { + "clients": { + "grpc": { + "libraryClient": "LlmUtilityServiceClient", + "rpcs": { + "ComputeTokens": { + "methods": ["computeTokens", "computeTokens", "computeTokens", "computeTokensCallable"] + }, + "CountTokens": { + "methods": ["countTokens", "countTokens", "countTokens", "countTokensCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + } + } + } + } + }, "MatchService": { "clients": { "grpc": { diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/package-info.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/package-info.java index e7155cba4c33..3cd7219b044c 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/package-info.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/package-info.java @@ -56,6 +56,67 @@ * } * } * + *

======================= FeatureOnlineStoreAdminServiceClient ======================= + * + *

Service Description: The service that handles CRUD and List for resources for + * FeatureOnlineStore. + * + *

Sample for FeatureOnlineStoreAdminServiceClient: + * + *

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

======================= FeatureOnlineStoreServiceClient ======================= + * + *

Sample for FeatureOnlineStoreServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient =
+ *     FeatureOnlineStoreServiceClient.create()) {
+ *   FeatureViewName featureView =
+ *       FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]");
+ *   FeatureViewDataKey dataKey = FeatureViewDataKey.newBuilder().build();
+ *   FetchFeatureValuesResponse response =
+ *       featureOnlineStoreServiceClient.fetchFeatureValues(featureView, dataKey);
+ * }
+ * }
+ * + *

======================= FeatureRegistryServiceClient ======================= + * + *

Service Description: The service that handles CRUD and List for resources for FeatureRegistry. + * + *

Sample for FeatureRegistryServiceClient: + * + *

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

======================= FeaturestoreOnlineServingServiceClient ======================= * *

Service Description: A service for serving online feature values. @@ -151,6 +212,26 @@ * } * } * + *

======================= LlmUtilityServiceClient ======================= + * + *

Service Description: Service for LLM related utility functions. + * + *

Sample for LlmUtilityServiceClient: + * + *

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

======================= MatchServiceClient ======================= * *

Service Description: MatchService is a Google managed service for efficient vector similarity diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureOnlineStoreAdminServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureOnlineStoreAdminServiceStub.java new file mode 100644 index 000000000000..b9f3c45363b5 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureOnlineStoreAdminServiceStub.java @@ -0,0 +1,226 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient.ListFeatureOnlineStoresPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient.ListFeatureViewSyncsPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient.ListFeatureViewsPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient.ListLocationsPagedResponse; + +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.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest; +import com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateFeatureViewRequest; +import com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest; +import com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureView; +import com.google.cloud.aiplatform.v1.FeatureViewSync; +import com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest; +import com.google.cloud.aiplatform.v1.GetFeatureViewRequest; +import com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest; +import com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest; +import com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse; +import com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest; +import com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse; +import com.google.cloud.aiplatform.v1.ListFeatureViewsRequest; +import com.google.cloud.aiplatform.v1.ListFeatureViewsResponse; +import com.google.cloud.aiplatform.v1.SyncFeatureViewRequest; +import com.google.cloud.aiplatform.v1.SyncFeatureViewResponse; +import com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest; +import com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 FeatureOnlineStoreAdminService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class FeatureOnlineStoreAdminServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public OperationCallable< + CreateFeatureOnlineStoreRequest, + FeatureOnlineStore, + CreateFeatureOnlineStoreOperationMetadata> + createFeatureOnlineStoreOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createFeatureOnlineStoreOperationCallable()"); + } + + public UnaryCallable + createFeatureOnlineStoreCallable() { + throw new UnsupportedOperationException("Not implemented: createFeatureOnlineStoreCallable()"); + } + + public UnaryCallable + getFeatureOnlineStoreCallable() { + throw new UnsupportedOperationException("Not implemented: getFeatureOnlineStoreCallable()"); + } + + public UnaryCallable + listFeatureOnlineStoresPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listFeatureOnlineStoresPagedCallable()"); + } + + public UnaryCallable + listFeatureOnlineStoresCallable() { + throw new UnsupportedOperationException("Not implemented: listFeatureOnlineStoresCallable()"); + } + + public OperationCallable< + UpdateFeatureOnlineStoreRequest, + FeatureOnlineStore, + UpdateFeatureOnlineStoreOperationMetadata> + updateFeatureOnlineStoreOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateFeatureOnlineStoreOperationCallable()"); + } + + public UnaryCallable + updateFeatureOnlineStoreCallable() { + throw new UnsupportedOperationException("Not implemented: updateFeatureOnlineStoreCallable()"); + } + + public OperationCallable + deleteFeatureOnlineStoreOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteFeatureOnlineStoreOperationCallable()"); + } + + public UnaryCallable + deleteFeatureOnlineStoreCallable() { + throw new UnsupportedOperationException("Not implemented: deleteFeatureOnlineStoreCallable()"); + } + + public OperationCallable< + CreateFeatureViewRequest, FeatureView, CreateFeatureViewOperationMetadata> + createFeatureViewOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createFeatureViewOperationCallable()"); + } + + public UnaryCallable createFeatureViewCallable() { + throw new UnsupportedOperationException("Not implemented: createFeatureViewCallable()"); + } + + public UnaryCallable getFeatureViewCallable() { + throw new UnsupportedOperationException("Not implemented: getFeatureViewCallable()"); + } + + public UnaryCallable + listFeatureViewsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listFeatureViewsPagedCallable()"); + } + + public UnaryCallable + listFeatureViewsCallable() { + throw new UnsupportedOperationException("Not implemented: listFeatureViewsCallable()"); + } + + public OperationCallable< + UpdateFeatureViewRequest, FeatureView, UpdateFeatureViewOperationMetadata> + updateFeatureViewOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateFeatureViewOperationCallable()"); + } + + public UnaryCallable updateFeatureViewCallable() { + throw new UnsupportedOperationException("Not implemented: updateFeatureViewCallable()"); + } + + public OperationCallable + deleteFeatureViewOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteFeatureViewOperationCallable()"); + } + + public UnaryCallable deleteFeatureViewCallable() { + throw new UnsupportedOperationException("Not implemented: deleteFeatureViewCallable()"); + } + + public UnaryCallable syncFeatureViewCallable() { + throw new UnsupportedOperationException("Not implemented: syncFeatureViewCallable()"); + } + + public UnaryCallable getFeatureViewSyncCallable() { + throw new UnsupportedOperationException("Not implemented: getFeatureViewSyncCallable()"); + } + + public UnaryCallable + listFeatureViewSyncsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listFeatureViewSyncsPagedCallable()"); + } + + public UnaryCallable + listFeatureViewSyncsCallable() { + throw new UnsupportedOperationException("Not implemented: listFeatureViewSyncsCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureOnlineStoreAdminServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureOnlineStoreAdminServiceStubSettings.java new file mode 100644 index 000000000000..7e6dd3536c2a --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureOnlineStoreAdminServiceStubSettings.java @@ -0,0 +1,1350 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient.ListFeatureOnlineStoresPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient.ListFeatureViewSyncsPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient.ListFeatureViewsPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient.ListLocationsPagedResponse; + +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.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.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest; +import com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateFeatureViewRequest; +import com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest; +import com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureView; +import com.google.cloud.aiplatform.v1.FeatureViewSync; +import com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest; +import com.google.cloud.aiplatform.v1.GetFeatureViewRequest; +import com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest; +import com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest; +import com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse; +import com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest; +import com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse; +import com.google.cloud.aiplatform.v1.ListFeatureViewsRequest; +import com.google.cloud.aiplatform.v1.ListFeatureViewsResponse; +import com.google.cloud.aiplatform.v1.SyncFeatureViewRequest; +import com.google.cloud.aiplatform.v1.SyncFeatureViewResponse; +import com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest; +import com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 FeatureOnlineStoreAdminServiceStub}. + * + *

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

    + *
  • The default service address (aiplatform.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 getFeatureOnlineStore 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
+ * FeatureOnlineStoreAdminServiceStubSettings.Builder
+ *     featureOnlineStoreAdminServiceSettingsBuilder =
+ *         FeatureOnlineStoreAdminServiceStubSettings.newBuilder();
+ * featureOnlineStoreAdminServiceSettingsBuilder
+ *     .getFeatureOnlineStoreSettings()
+ *     .setRetrySettings(
+ *         featureOnlineStoreAdminServiceSettingsBuilder
+ *             .getFeatureOnlineStoreSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * FeatureOnlineStoreAdminServiceStubSettings featureOnlineStoreAdminServiceSettings =
+ *     featureOnlineStoreAdminServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class FeatureOnlineStoreAdminServiceStubSettings + 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 + createFeatureOnlineStoreSettings; + private final OperationCallSettings< + CreateFeatureOnlineStoreRequest, + FeatureOnlineStore, + CreateFeatureOnlineStoreOperationMetadata> + createFeatureOnlineStoreOperationSettings; + private final UnaryCallSettings + getFeatureOnlineStoreSettings; + private final PagedCallSettings< + ListFeatureOnlineStoresRequest, + ListFeatureOnlineStoresResponse, + ListFeatureOnlineStoresPagedResponse> + listFeatureOnlineStoresSettings; + private final UnaryCallSettings + updateFeatureOnlineStoreSettings; + private final OperationCallSettings< + UpdateFeatureOnlineStoreRequest, + FeatureOnlineStore, + UpdateFeatureOnlineStoreOperationMetadata> + updateFeatureOnlineStoreOperationSettings; + private final UnaryCallSettings + deleteFeatureOnlineStoreSettings; + private final OperationCallSettings< + DeleteFeatureOnlineStoreRequest, Empty, DeleteOperationMetadata> + deleteFeatureOnlineStoreOperationSettings; + private final UnaryCallSettings createFeatureViewSettings; + private final OperationCallSettings< + CreateFeatureViewRequest, FeatureView, CreateFeatureViewOperationMetadata> + createFeatureViewOperationSettings; + private final UnaryCallSettings getFeatureViewSettings; + private final PagedCallSettings< + ListFeatureViewsRequest, ListFeatureViewsResponse, ListFeatureViewsPagedResponse> + listFeatureViewsSettings; + private final UnaryCallSettings updateFeatureViewSettings; + private final OperationCallSettings< + UpdateFeatureViewRequest, FeatureView, UpdateFeatureViewOperationMetadata> + updateFeatureViewOperationSettings; + private final UnaryCallSettings deleteFeatureViewSettings; + private final OperationCallSettings + deleteFeatureViewOperationSettings; + private final UnaryCallSettings + syncFeatureViewSettings; + private final UnaryCallSettings + getFeatureViewSyncSettings; + private final PagedCallSettings< + ListFeatureViewSyncsRequest, + ListFeatureViewSyncsResponse, + ListFeatureViewSyncsPagedResponse> + listFeatureViewSyncsSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor< + ListFeatureOnlineStoresRequest, ListFeatureOnlineStoresResponse, FeatureOnlineStore> + LIST_FEATURE_ONLINE_STORES_PAGE_STR_DESC = + new PagedListDescriptor< + ListFeatureOnlineStoresRequest, + ListFeatureOnlineStoresResponse, + FeatureOnlineStore>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListFeatureOnlineStoresRequest injectToken( + ListFeatureOnlineStoresRequest payload, String token) { + return ListFeatureOnlineStoresRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListFeatureOnlineStoresRequest injectPageSize( + ListFeatureOnlineStoresRequest payload, int pageSize) { + return ListFeatureOnlineStoresRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListFeatureOnlineStoresRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListFeatureOnlineStoresResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListFeatureOnlineStoresResponse payload) { + return payload.getFeatureOnlineStoresList() == null + ? ImmutableList.of() + : payload.getFeatureOnlineStoresList(); + } + }; + + private static final PagedListDescriptor< + ListFeatureViewsRequest, ListFeatureViewsResponse, FeatureView> + LIST_FEATURE_VIEWS_PAGE_STR_DESC = + new PagedListDescriptor< + ListFeatureViewsRequest, ListFeatureViewsResponse, FeatureView>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListFeatureViewsRequest injectToken( + ListFeatureViewsRequest payload, String token) { + return ListFeatureViewsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListFeatureViewsRequest injectPageSize( + ListFeatureViewsRequest payload, int pageSize) { + return ListFeatureViewsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListFeatureViewsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListFeatureViewsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListFeatureViewsResponse payload) { + return payload.getFeatureViewsList() == null + ? ImmutableList.of() + : payload.getFeatureViewsList(); + } + }; + + private static final PagedListDescriptor< + ListFeatureViewSyncsRequest, ListFeatureViewSyncsResponse, FeatureViewSync> + LIST_FEATURE_VIEW_SYNCS_PAGE_STR_DESC = + new PagedListDescriptor< + ListFeatureViewSyncsRequest, ListFeatureViewSyncsResponse, FeatureViewSync>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListFeatureViewSyncsRequest injectToken( + ListFeatureViewSyncsRequest payload, String token) { + return ListFeatureViewSyncsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListFeatureViewSyncsRequest injectPageSize( + ListFeatureViewSyncsRequest payload, int pageSize) { + return ListFeatureViewSyncsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListFeatureViewSyncsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListFeatureViewSyncsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListFeatureViewSyncsResponse payload) { + return payload.getFeatureViewSyncsList() == null + ? ImmutableList.of() + : payload.getFeatureViewSyncsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListFeatureOnlineStoresRequest, + ListFeatureOnlineStoresResponse, + ListFeatureOnlineStoresPagedResponse> + LIST_FEATURE_ONLINE_STORES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListFeatureOnlineStoresRequest, + ListFeatureOnlineStoresResponse, + ListFeatureOnlineStoresPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListFeatureOnlineStoresRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListFeatureOnlineStoresRequest, + ListFeatureOnlineStoresResponse, + FeatureOnlineStore> + pageContext = + PageContext.create( + callable, LIST_FEATURE_ONLINE_STORES_PAGE_STR_DESC, request, context); + return ListFeatureOnlineStoresPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListFeatureViewsRequest, ListFeatureViewsResponse, ListFeatureViewsPagedResponse> + LIST_FEATURE_VIEWS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListFeatureViewsRequest, ListFeatureViewsResponse, ListFeatureViewsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListFeatureViewsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_FEATURE_VIEWS_PAGE_STR_DESC, request, context); + return ListFeatureViewsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListFeatureViewSyncsRequest, + ListFeatureViewSyncsResponse, + ListFeatureViewSyncsPagedResponse> + LIST_FEATURE_VIEW_SYNCS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListFeatureViewSyncsRequest, + ListFeatureViewSyncsResponse, + ListFeatureViewSyncsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListFeatureViewSyncsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListFeatureViewSyncsRequest, ListFeatureViewSyncsResponse, FeatureViewSync> + pageContext = + PageContext.create( + callable, LIST_FEATURE_VIEW_SYNCS_PAGE_STR_DESC, request, context); + return ListFeatureViewSyncsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createFeatureOnlineStore. */ + public UnaryCallSettings + createFeatureOnlineStoreSettings() { + return createFeatureOnlineStoreSettings; + } + + /** Returns the object with the settings used for calls to createFeatureOnlineStore. */ + public OperationCallSettings< + CreateFeatureOnlineStoreRequest, + FeatureOnlineStore, + CreateFeatureOnlineStoreOperationMetadata> + createFeatureOnlineStoreOperationSettings() { + return createFeatureOnlineStoreOperationSettings; + } + + /** Returns the object with the settings used for calls to getFeatureOnlineStore. */ + public UnaryCallSettings + getFeatureOnlineStoreSettings() { + return getFeatureOnlineStoreSettings; + } + + /** Returns the object with the settings used for calls to listFeatureOnlineStores. */ + public PagedCallSettings< + ListFeatureOnlineStoresRequest, + ListFeatureOnlineStoresResponse, + ListFeatureOnlineStoresPagedResponse> + listFeatureOnlineStoresSettings() { + return listFeatureOnlineStoresSettings; + } + + /** Returns the object with the settings used for calls to updateFeatureOnlineStore. */ + public UnaryCallSettings + updateFeatureOnlineStoreSettings() { + return updateFeatureOnlineStoreSettings; + } + + /** Returns the object with the settings used for calls to updateFeatureOnlineStore. */ + public OperationCallSettings< + UpdateFeatureOnlineStoreRequest, + FeatureOnlineStore, + UpdateFeatureOnlineStoreOperationMetadata> + updateFeatureOnlineStoreOperationSettings() { + return updateFeatureOnlineStoreOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteFeatureOnlineStore. */ + public UnaryCallSettings + deleteFeatureOnlineStoreSettings() { + return deleteFeatureOnlineStoreSettings; + } + + /** Returns the object with the settings used for calls to deleteFeatureOnlineStore. */ + public OperationCallSettings + deleteFeatureOnlineStoreOperationSettings() { + return deleteFeatureOnlineStoreOperationSettings; + } + + /** Returns the object with the settings used for calls to createFeatureView. */ + public UnaryCallSettings createFeatureViewSettings() { + return createFeatureViewSettings; + } + + /** Returns the object with the settings used for calls to createFeatureView. */ + public OperationCallSettings< + CreateFeatureViewRequest, FeatureView, CreateFeatureViewOperationMetadata> + createFeatureViewOperationSettings() { + return createFeatureViewOperationSettings; + } + + /** Returns the object with the settings used for calls to getFeatureView. */ + public UnaryCallSettings getFeatureViewSettings() { + return getFeatureViewSettings; + } + + /** Returns the object with the settings used for calls to listFeatureViews. */ + public PagedCallSettings< + ListFeatureViewsRequest, ListFeatureViewsResponse, ListFeatureViewsPagedResponse> + listFeatureViewsSettings() { + return listFeatureViewsSettings; + } + + /** Returns the object with the settings used for calls to updateFeatureView. */ + public UnaryCallSettings updateFeatureViewSettings() { + return updateFeatureViewSettings; + } + + /** Returns the object with the settings used for calls to updateFeatureView. */ + public OperationCallSettings< + UpdateFeatureViewRequest, FeatureView, UpdateFeatureViewOperationMetadata> + updateFeatureViewOperationSettings() { + return updateFeatureViewOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteFeatureView. */ + public UnaryCallSettings deleteFeatureViewSettings() { + return deleteFeatureViewSettings; + } + + /** Returns the object with the settings used for calls to deleteFeatureView. */ + public OperationCallSettings + deleteFeatureViewOperationSettings() { + return deleteFeatureViewOperationSettings; + } + + /** Returns the object with the settings used for calls to syncFeatureView. */ + public UnaryCallSettings + syncFeatureViewSettings() { + return syncFeatureViewSettings; + } + + /** Returns the object with the settings used for calls to getFeatureViewSync. */ + public UnaryCallSettings + getFeatureViewSyncSettings() { + return getFeatureViewSyncSettings; + } + + /** Returns the object with the settings used for calls to listFeatureViewSyncs. */ + public PagedCallSettings< + ListFeatureViewSyncsRequest, + ListFeatureViewSyncsResponse, + ListFeatureViewSyncsPagedResponse> + listFeatureViewSyncsSettings() { + return listFeatureViewSyncsSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public FeatureOnlineStoreAdminServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcFeatureOnlineStoreAdminServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "aiplatform.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "aiplatform.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 ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", + GaxProperties.getLibraryVersion(FeatureOnlineStoreAdminServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected FeatureOnlineStoreAdminServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createFeatureOnlineStoreSettings = settingsBuilder.createFeatureOnlineStoreSettings().build(); + createFeatureOnlineStoreOperationSettings = + settingsBuilder.createFeatureOnlineStoreOperationSettings().build(); + getFeatureOnlineStoreSettings = settingsBuilder.getFeatureOnlineStoreSettings().build(); + listFeatureOnlineStoresSettings = settingsBuilder.listFeatureOnlineStoresSettings().build(); + updateFeatureOnlineStoreSettings = settingsBuilder.updateFeatureOnlineStoreSettings().build(); + updateFeatureOnlineStoreOperationSettings = + settingsBuilder.updateFeatureOnlineStoreOperationSettings().build(); + deleteFeatureOnlineStoreSettings = settingsBuilder.deleteFeatureOnlineStoreSettings().build(); + deleteFeatureOnlineStoreOperationSettings = + settingsBuilder.deleteFeatureOnlineStoreOperationSettings().build(); + createFeatureViewSettings = settingsBuilder.createFeatureViewSettings().build(); + createFeatureViewOperationSettings = + settingsBuilder.createFeatureViewOperationSettings().build(); + getFeatureViewSettings = settingsBuilder.getFeatureViewSettings().build(); + listFeatureViewsSettings = settingsBuilder.listFeatureViewsSettings().build(); + updateFeatureViewSettings = settingsBuilder.updateFeatureViewSettings().build(); + updateFeatureViewOperationSettings = + settingsBuilder.updateFeatureViewOperationSettings().build(); + deleteFeatureViewSettings = settingsBuilder.deleteFeatureViewSettings().build(); + deleteFeatureViewOperationSettings = + settingsBuilder.deleteFeatureViewOperationSettings().build(); + syncFeatureViewSettings = settingsBuilder.syncFeatureViewSettings().build(); + getFeatureViewSyncSettings = settingsBuilder.getFeatureViewSyncSettings().build(); + listFeatureViewSyncsSettings = settingsBuilder.listFeatureViewSyncsSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for FeatureOnlineStoreAdminServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createFeatureOnlineStoreSettings; + private final OperationCallSettings.Builder< + CreateFeatureOnlineStoreRequest, + FeatureOnlineStore, + CreateFeatureOnlineStoreOperationMetadata> + createFeatureOnlineStoreOperationSettings; + private final UnaryCallSettings.Builder + getFeatureOnlineStoreSettings; + private final PagedCallSettings.Builder< + ListFeatureOnlineStoresRequest, + ListFeatureOnlineStoresResponse, + ListFeatureOnlineStoresPagedResponse> + listFeatureOnlineStoresSettings; + private final UnaryCallSettings.Builder + updateFeatureOnlineStoreSettings; + private final OperationCallSettings.Builder< + UpdateFeatureOnlineStoreRequest, + FeatureOnlineStore, + UpdateFeatureOnlineStoreOperationMetadata> + updateFeatureOnlineStoreOperationSettings; + private final UnaryCallSettings.Builder + deleteFeatureOnlineStoreSettings; + private final OperationCallSettings.Builder< + DeleteFeatureOnlineStoreRequest, Empty, DeleteOperationMetadata> + deleteFeatureOnlineStoreOperationSettings; + private final UnaryCallSettings.Builder + createFeatureViewSettings; + private final OperationCallSettings.Builder< + CreateFeatureViewRequest, FeatureView, CreateFeatureViewOperationMetadata> + createFeatureViewOperationSettings; + private final UnaryCallSettings.Builder + getFeatureViewSettings; + private final PagedCallSettings.Builder< + ListFeatureViewsRequest, ListFeatureViewsResponse, ListFeatureViewsPagedResponse> + listFeatureViewsSettings; + private final UnaryCallSettings.Builder + updateFeatureViewSettings; + private final OperationCallSettings.Builder< + UpdateFeatureViewRequest, FeatureView, UpdateFeatureViewOperationMetadata> + updateFeatureViewOperationSettings; + private final UnaryCallSettings.Builder + deleteFeatureViewSettings; + private final OperationCallSettings.Builder< + DeleteFeatureViewRequest, Empty, DeleteOperationMetadata> + deleteFeatureViewOperationSettings; + private final UnaryCallSettings.Builder + syncFeatureViewSettings; + private final UnaryCallSettings.Builder + getFeatureViewSyncSettings; + private final PagedCallSettings.Builder< + ListFeatureViewSyncsRequest, + ListFeatureViewSyncsResponse, + ListFeatureViewSyncsPagedResponse> + listFeatureViewSyncsSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + 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); + + createFeatureOnlineStoreSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createFeatureOnlineStoreOperationSettings = OperationCallSettings.newBuilder(); + getFeatureOnlineStoreSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listFeatureOnlineStoresSettings = + PagedCallSettings.newBuilder(LIST_FEATURE_ONLINE_STORES_PAGE_STR_FACT); + updateFeatureOnlineStoreSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateFeatureOnlineStoreOperationSettings = OperationCallSettings.newBuilder(); + deleteFeatureOnlineStoreSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteFeatureOnlineStoreOperationSettings = OperationCallSettings.newBuilder(); + createFeatureViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createFeatureViewOperationSettings = OperationCallSettings.newBuilder(); + getFeatureViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listFeatureViewsSettings = PagedCallSettings.newBuilder(LIST_FEATURE_VIEWS_PAGE_STR_FACT); + updateFeatureViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateFeatureViewOperationSettings = OperationCallSettings.newBuilder(); + deleteFeatureViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteFeatureViewOperationSettings = OperationCallSettings.newBuilder(); + syncFeatureViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getFeatureViewSyncSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listFeatureViewSyncsSettings = + PagedCallSettings.newBuilder(LIST_FEATURE_VIEW_SYNCS_PAGE_STR_FACT); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createFeatureOnlineStoreSettings, + getFeatureOnlineStoreSettings, + listFeatureOnlineStoresSettings, + updateFeatureOnlineStoreSettings, + deleteFeatureOnlineStoreSettings, + createFeatureViewSettings, + getFeatureViewSettings, + listFeatureViewsSettings, + updateFeatureViewSettings, + deleteFeatureViewSettings, + syncFeatureViewSettings, + getFeatureViewSyncSettings, + listFeatureViewSyncsSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(FeatureOnlineStoreAdminServiceStubSettings settings) { + super(settings); + + createFeatureOnlineStoreSettings = settings.createFeatureOnlineStoreSettings.toBuilder(); + createFeatureOnlineStoreOperationSettings = + settings.createFeatureOnlineStoreOperationSettings.toBuilder(); + getFeatureOnlineStoreSettings = settings.getFeatureOnlineStoreSettings.toBuilder(); + listFeatureOnlineStoresSettings = settings.listFeatureOnlineStoresSettings.toBuilder(); + updateFeatureOnlineStoreSettings = settings.updateFeatureOnlineStoreSettings.toBuilder(); + updateFeatureOnlineStoreOperationSettings = + settings.updateFeatureOnlineStoreOperationSettings.toBuilder(); + deleteFeatureOnlineStoreSettings = settings.deleteFeatureOnlineStoreSettings.toBuilder(); + deleteFeatureOnlineStoreOperationSettings = + settings.deleteFeatureOnlineStoreOperationSettings.toBuilder(); + createFeatureViewSettings = settings.createFeatureViewSettings.toBuilder(); + createFeatureViewOperationSettings = settings.createFeatureViewOperationSettings.toBuilder(); + getFeatureViewSettings = settings.getFeatureViewSettings.toBuilder(); + listFeatureViewsSettings = settings.listFeatureViewsSettings.toBuilder(); + updateFeatureViewSettings = settings.updateFeatureViewSettings.toBuilder(); + updateFeatureViewOperationSettings = settings.updateFeatureViewOperationSettings.toBuilder(); + deleteFeatureViewSettings = settings.deleteFeatureViewSettings.toBuilder(); + deleteFeatureViewOperationSettings = settings.deleteFeatureViewOperationSettings.toBuilder(); + syncFeatureViewSettings = settings.syncFeatureViewSettings.toBuilder(); + getFeatureViewSyncSettings = settings.getFeatureViewSyncSettings.toBuilder(); + listFeatureViewSyncsSettings = settings.listFeatureViewSyncsSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createFeatureOnlineStoreSettings, + getFeatureOnlineStoreSettings, + listFeatureOnlineStoresSettings, + updateFeatureOnlineStoreSettings, + deleteFeatureOnlineStoreSettings, + createFeatureViewSettings, + getFeatureViewSettings, + listFeatureViewsSettings, + updateFeatureViewSettings, + deleteFeatureViewSettings, + syncFeatureViewSettings, + getFeatureViewSyncSettings, + listFeatureViewSyncsSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createFeatureOnlineStoreSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getFeatureOnlineStoreSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listFeatureOnlineStoresSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateFeatureOnlineStoreSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteFeatureOnlineStoreSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createFeatureViewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getFeatureViewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listFeatureViewsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateFeatureViewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteFeatureViewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .syncFeatureViewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getFeatureViewSyncSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listFeatureViewSyncsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createFeatureOnlineStoreOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(FeatureOnlineStore.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CreateFeatureOnlineStoreOperationMetadata.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 + .updateFeatureOnlineStoreOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(FeatureOnlineStore.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + UpdateFeatureOnlineStoreOperationMetadata.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 + .deleteFeatureOnlineStoreOperationSettings() + .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(DeleteOperationMetadata.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 + .createFeatureViewOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(FeatureView.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CreateFeatureViewOperationMetadata.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 + .updateFeatureViewOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(FeatureView.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + UpdateFeatureViewOperationMetadata.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 + .deleteFeatureViewOperationSettings() + .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(DeleteOperationMetadata.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 createFeatureOnlineStore. */ + public UnaryCallSettings.Builder + createFeatureOnlineStoreSettings() { + return createFeatureOnlineStoreSettings; + } + + /** Returns the builder for the settings used for calls to createFeatureOnlineStore. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateFeatureOnlineStoreRequest, + FeatureOnlineStore, + CreateFeatureOnlineStoreOperationMetadata> + createFeatureOnlineStoreOperationSettings() { + return createFeatureOnlineStoreOperationSettings; + } + + /** Returns the builder for the settings used for calls to getFeatureOnlineStore. */ + public UnaryCallSettings.Builder + getFeatureOnlineStoreSettings() { + return getFeatureOnlineStoreSettings; + } + + /** Returns the builder for the settings used for calls to listFeatureOnlineStores. */ + public PagedCallSettings.Builder< + ListFeatureOnlineStoresRequest, + ListFeatureOnlineStoresResponse, + ListFeatureOnlineStoresPagedResponse> + listFeatureOnlineStoresSettings() { + return listFeatureOnlineStoresSettings; + } + + /** Returns the builder for the settings used for calls to updateFeatureOnlineStore. */ + public UnaryCallSettings.Builder + updateFeatureOnlineStoreSettings() { + return updateFeatureOnlineStoreSettings; + } + + /** Returns the builder for the settings used for calls to updateFeatureOnlineStore. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateFeatureOnlineStoreRequest, + FeatureOnlineStore, + UpdateFeatureOnlineStoreOperationMetadata> + updateFeatureOnlineStoreOperationSettings() { + return updateFeatureOnlineStoreOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteFeatureOnlineStore. */ + public UnaryCallSettings.Builder + deleteFeatureOnlineStoreSettings() { + return deleteFeatureOnlineStoreSettings; + } + + /** Returns the builder for the settings used for calls to deleteFeatureOnlineStore. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + DeleteFeatureOnlineStoreRequest, Empty, DeleteOperationMetadata> + deleteFeatureOnlineStoreOperationSettings() { + return deleteFeatureOnlineStoreOperationSettings; + } + + /** Returns the builder for the settings used for calls to createFeatureView. */ + public UnaryCallSettings.Builder + createFeatureViewSettings() { + return createFeatureViewSettings; + } + + /** Returns the builder for the settings used for calls to createFeatureView. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateFeatureViewRequest, FeatureView, CreateFeatureViewOperationMetadata> + createFeatureViewOperationSettings() { + return createFeatureViewOperationSettings; + } + + /** Returns the builder for the settings used for calls to getFeatureView. */ + public UnaryCallSettings.Builder getFeatureViewSettings() { + return getFeatureViewSettings; + } + + /** Returns the builder for the settings used for calls to listFeatureViews. */ + public PagedCallSettings.Builder< + ListFeatureViewsRequest, ListFeatureViewsResponse, ListFeatureViewsPagedResponse> + listFeatureViewsSettings() { + return listFeatureViewsSettings; + } + + /** Returns the builder for the settings used for calls to updateFeatureView. */ + public UnaryCallSettings.Builder + updateFeatureViewSettings() { + return updateFeatureViewSettings; + } + + /** Returns the builder for the settings used for calls to updateFeatureView. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateFeatureViewRequest, FeatureView, UpdateFeatureViewOperationMetadata> + updateFeatureViewOperationSettings() { + return updateFeatureViewOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteFeatureView. */ + public UnaryCallSettings.Builder + deleteFeatureViewSettings() { + return deleteFeatureViewSettings; + } + + /** Returns the builder for the settings used for calls to deleteFeatureView. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteFeatureViewOperationSettings() { + return deleteFeatureViewOperationSettings; + } + + /** Returns the builder for the settings used for calls to syncFeatureView. */ + public UnaryCallSettings.Builder + syncFeatureViewSettings() { + return syncFeatureViewSettings; + } + + /** Returns the builder for the settings used for calls to getFeatureViewSync. */ + public UnaryCallSettings.Builder + getFeatureViewSyncSettings() { + return getFeatureViewSyncSettings; + } + + /** Returns the builder for the settings used for calls to listFeatureViewSyncs. */ + public PagedCallSettings.Builder< + ListFeatureViewSyncsRequest, + ListFeatureViewSyncsResponse, + ListFeatureViewSyncsPagedResponse> + listFeatureViewSyncsSettings() { + return listFeatureViewSyncsSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @Override + public FeatureOnlineStoreAdminServiceStubSettings build() throws IOException { + return new FeatureOnlineStoreAdminServiceStubSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureOnlineStoreServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureOnlineStoreServiceStub.java new file mode 100644 index 000000000000..e868e567e2ed --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureOnlineStoreServiceStub.java @@ -0,0 +1,78 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest; +import com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the FeatureOnlineStoreService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class FeatureOnlineStoreServiceStub implements BackgroundResource { + + public UnaryCallable + fetchFeatureValuesCallable() { + throw new UnsupportedOperationException("Not implemented: fetchFeatureValuesCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureOnlineStoreServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureOnlineStoreServiceStubSettings.java new file mode 100644 index 000000000000..88ba4ab13e3a --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureOnlineStoreServiceStubSettings.java @@ -0,0 +1,467 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient.ListLocationsPagedResponse; + +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.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.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.aiplatform.v1.FetchFeatureValuesRequest; +import com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 FeatureOnlineStoreServiceStub}. + * + *

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

    + *
  • The default service address (aiplatform.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 fetchFeatureValues 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
+ * FeatureOnlineStoreServiceStubSettings.Builder featureOnlineStoreServiceSettingsBuilder =
+ *     FeatureOnlineStoreServiceStubSettings.newBuilder();
+ * featureOnlineStoreServiceSettingsBuilder
+ *     .fetchFeatureValuesSettings()
+ *     .setRetrySettings(
+ *         featureOnlineStoreServiceSettingsBuilder
+ *             .fetchFeatureValuesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * FeatureOnlineStoreServiceStubSettings featureOnlineStoreServiceSettings =
+ *     featureOnlineStoreServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class FeatureOnlineStoreServiceStubSettings + 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 + fetchFeatureValuesSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to fetchFeatureValues. */ + public UnaryCallSettings + fetchFeatureValuesSettings() { + return fetchFeatureValuesSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public FeatureOnlineStoreServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcFeatureOnlineStoreServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "aiplatform.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "aiplatform.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 ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(FeatureOnlineStoreServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected FeatureOnlineStoreServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + fetchFeatureValuesSettings = settingsBuilder.fetchFeatureValuesSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for FeatureOnlineStoreServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + fetchFeatureValuesSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + 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); + + fetchFeatureValuesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + fetchFeatureValuesSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(FeatureOnlineStoreServiceStubSettings settings) { + super(settings); + + fetchFeatureValuesSettings = settings.fetchFeatureValuesSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + fetchFeatureValuesSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .fetchFeatureValuesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .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 fetchFeatureValues. */ + public UnaryCallSettings.Builder + fetchFeatureValuesSettings() { + return fetchFeatureValuesSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @Override + public FeatureOnlineStoreServiceStubSettings build() throws IOException { + return new FeatureOnlineStoreServiceStubSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureRegistryServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureRegistryServiceStub.java new file mode 100644 index 000000000000..976b357bc056 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureRegistryServiceStub.java @@ -0,0 +1,185 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient.ListFeatureGroupsPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient.ListFeaturesPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient.ListLocationsPagedResponse; + +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.aiplatform.v1.CreateFeatureGroupOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest; +import com.google.cloud.aiplatform.v1.CreateFeatureOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateFeatureRequest; +import com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest; +import com.google.cloud.aiplatform.v1.DeleteFeatureRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.GetFeatureGroupRequest; +import com.google.cloud.aiplatform.v1.GetFeatureRequest; +import com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest; +import com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse; +import com.google.cloud.aiplatform.v1.ListFeaturesRequest; +import com.google.cloud.aiplatform.v1.ListFeaturesResponse; +import com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest; +import com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdateFeatureRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 FeatureRegistryService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class FeatureRegistryServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public OperationCallable< + CreateFeatureGroupRequest, FeatureGroup, CreateFeatureGroupOperationMetadata> + createFeatureGroupOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createFeatureGroupOperationCallable()"); + } + + public UnaryCallable createFeatureGroupCallable() { + throw new UnsupportedOperationException("Not implemented: createFeatureGroupCallable()"); + } + + public UnaryCallable getFeatureGroupCallable() { + throw new UnsupportedOperationException("Not implemented: getFeatureGroupCallable()"); + } + + public UnaryCallable + listFeatureGroupsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listFeatureGroupsPagedCallable()"); + } + + public UnaryCallable + listFeatureGroupsCallable() { + throw new UnsupportedOperationException("Not implemented: listFeatureGroupsCallable()"); + } + + public OperationCallable< + UpdateFeatureGroupRequest, FeatureGroup, UpdateFeatureGroupOperationMetadata> + updateFeatureGroupOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateFeatureGroupOperationCallable()"); + } + + public UnaryCallable updateFeatureGroupCallable() { + throw new UnsupportedOperationException("Not implemented: updateFeatureGroupCallable()"); + } + + public OperationCallable + deleteFeatureGroupOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteFeatureGroupOperationCallable()"); + } + + public UnaryCallable deleteFeatureGroupCallable() { + throw new UnsupportedOperationException("Not implemented: deleteFeatureGroupCallable()"); + } + + public OperationCallable + createFeatureOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createFeatureOperationCallable()"); + } + + public UnaryCallable createFeatureCallable() { + throw new UnsupportedOperationException("Not implemented: createFeatureCallable()"); + } + + public UnaryCallable getFeatureCallable() { + throw new UnsupportedOperationException("Not implemented: getFeatureCallable()"); + } + + public UnaryCallable listFeaturesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listFeaturesPagedCallable()"); + } + + public UnaryCallable listFeaturesCallable() { + throw new UnsupportedOperationException("Not implemented: listFeaturesCallable()"); + } + + public OperationCallable + updateFeatureOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateFeatureOperationCallable()"); + } + + public UnaryCallable updateFeatureCallable() { + throw new UnsupportedOperationException("Not implemented: updateFeatureCallable()"); + } + + public OperationCallable + deleteFeatureOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteFeatureOperationCallable()"); + } + + public UnaryCallable deleteFeatureCallable() { + throw new UnsupportedOperationException("Not implemented: deleteFeatureCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureRegistryServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureRegistryServiceStubSettings.java new file mode 100644 index 000000000000..dac50db14c0a --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/FeatureRegistryServiceStubSettings.java @@ -0,0 +1,1118 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient.ListFeatureGroupsPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient.ListFeaturesPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient.ListLocationsPagedResponse; + +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.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.aiplatform.v1.CreateFeatureGroupOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest; +import com.google.cloud.aiplatform.v1.CreateFeatureOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateFeatureRequest; +import com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest; +import com.google.cloud.aiplatform.v1.DeleteFeatureRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.GetFeatureGroupRequest; +import com.google.cloud.aiplatform.v1.GetFeatureRequest; +import com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest; +import com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse; +import com.google.cloud.aiplatform.v1.ListFeaturesRequest; +import com.google.cloud.aiplatform.v1.ListFeaturesResponse; +import com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest; +import com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdateFeatureRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 FeatureRegistryServiceStub}. + * + *

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

    + *
  • The default service address (aiplatform.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 getFeatureGroup 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
+ * FeatureRegistryServiceStubSettings.Builder featureRegistryServiceSettingsBuilder =
+ *     FeatureRegistryServiceStubSettings.newBuilder();
+ * featureRegistryServiceSettingsBuilder
+ *     .getFeatureGroupSettings()
+ *     .setRetrySettings(
+ *         featureRegistryServiceSettingsBuilder
+ *             .getFeatureGroupSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * FeatureRegistryServiceStubSettings featureRegistryServiceSettings =
+ *     featureRegistryServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class FeatureRegistryServiceStubSettings + 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 createFeatureGroupSettings; + private final OperationCallSettings< + CreateFeatureGroupRequest, FeatureGroup, CreateFeatureGroupOperationMetadata> + createFeatureGroupOperationSettings; + private final UnaryCallSettings getFeatureGroupSettings; + private final PagedCallSettings< + ListFeatureGroupsRequest, ListFeatureGroupsResponse, ListFeatureGroupsPagedResponse> + listFeatureGroupsSettings; + private final UnaryCallSettings updateFeatureGroupSettings; + private final OperationCallSettings< + UpdateFeatureGroupRequest, FeatureGroup, UpdateFeatureGroupOperationMetadata> + updateFeatureGroupOperationSettings; + private final UnaryCallSettings deleteFeatureGroupSettings; + private final OperationCallSettings + deleteFeatureGroupOperationSettings; + private final UnaryCallSettings createFeatureSettings; + private final OperationCallSettings + createFeatureOperationSettings; + private final UnaryCallSettings getFeatureSettings; + private final PagedCallSettings< + ListFeaturesRequest, ListFeaturesResponse, ListFeaturesPagedResponse> + listFeaturesSettings; + private final UnaryCallSettings updateFeatureSettings; + private final OperationCallSettings + updateFeatureOperationSettings; + private final UnaryCallSettings deleteFeatureSettings; + private final OperationCallSettings + deleteFeatureOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor< + ListFeatureGroupsRequest, ListFeatureGroupsResponse, FeatureGroup> + LIST_FEATURE_GROUPS_PAGE_STR_DESC = + new PagedListDescriptor< + ListFeatureGroupsRequest, ListFeatureGroupsResponse, FeatureGroup>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListFeatureGroupsRequest injectToken( + ListFeatureGroupsRequest payload, String token) { + return ListFeatureGroupsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListFeatureGroupsRequest injectPageSize( + ListFeatureGroupsRequest payload, int pageSize) { + return ListFeatureGroupsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListFeatureGroupsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListFeatureGroupsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListFeatureGroupsResponse payload) { + return payload.getFeatureGroupsList() == null + ? ImmutableList.of() + : payload.getFeatureGroupsList(); + } + }; + + private static final PagedListDescriptor + LIST_FEATURES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListFeaturesRequest injectToken(ListFeaturesRequest payload, String token) { + return ListFeaturesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListFeaturesRequest injectPageSize(ListFeaturesRequest payload, int pageSize) { + return ListFeaturesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListFeaturesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListFeaturesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListFeaturesResponse payload) { + return payload.getFeaturesList() == null + ? ImmutableList.of() + : payload.getFeaturesList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListFeatureGroupsRequest, ListFeatureGroupsResponse, ListFeatureGroupsPagedResponse> + LIST_FEATURE_GROUPS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListFeatureGroupsRequest, + ListFeatureGroupsResponse, + ListFeatureGroupsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListFeatureGroupsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_FEATURE_GROUPS_PAGE_STR_DESC, request, context); + return ListFeatureGroupsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListFeaturesRequest, ListFeaturesResponse, ListFeaturesPagedResponse> + LIST_FEATURES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListFeaturesRequest, ListFeaturesResponse, ListFeaturesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListFeaturesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_FEATURES_PAGE_STR_DESC, request, context); + return ListFeaturesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createFeatureGroup. */ + public UnaryCallSettings createFeatureGroupSettings() { + return createFeatureGroupSettings; + } + + /** Returns the object with the settings used for calls to createFeatureGroup. */ + public OperationCallSettings< + CreateFeatureGroupRequest, FeatureGroup, CreateFeatureGroupOperationMetadata> + createFeatureGroupOperationSettings() { + return createFeatureGroupOperationSettings; + } + + /** Returns the object with the settings used for calls to getFeatureGroup. */ + public UnaryCallSettings getFeatureGroupSettings() { + return getFeatureGroupSettings; + } + + /** Returns the object with the settings used for calls to listFeatureGroups. */ + public PagedCallSettings< + ListFeatureGroupsRequest, ListFeatureGroupsResponse, ListFeatureGroupsPagedResponse> + listFeatureGroupsSettings() { + return listFeatureGroupsSettings; + } + + /** Returns the object with the settings used for calls to updateFeatureGroup. */ + public UnaryCallSettings updateFeatureGroupSettings() { + return updateFeatureGroupSettings; + } + + /** Returns the object with the settings used for calls to updateFeatureGroup. */ + public OperationCallSettings< + UpdateFeatureGroupRequest, FeatureGroup, UpdateFeatureGroupOperationMetadata> + updateFeatureGroupOperationSettings() { + return updateFeatureGroupOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteFeatureGroup. */ + public UnaryCallSettings deleteFeatureGroupSettings() { + return deleteFeatureGroupSettings; + } + + /** Returns the object with the settings used for calls to deleteFeatureGroup. */ + public OperationCallSettings + deleteFeatureGroupOperationSettings() { + return deleteFeatureGroupOperationSettings; + } + + /** Returns the object with the settings used for calls to createFeature. */ + public UnaryCallSettings createFeatureSettings() { + return createFeatureSettings; + } + + /** Returns the object with the settings used for calls to createFeature. */ + public OperationCallSettings + createFeatureOperationSettings() { + return createFeatureOperationSettings; + } + + /** Returns the object with the settings used for calls to getFeature. */ + public UnaryCallSettings getFeatureSettings() { + return getFeatureSettings; + } + + /** Returns the object with the settings used for calls to listFeatures. */ + public PagedCallSettings + listFeaturesSettings() { + return listFeaturesSettings; + } + + /** Returns the object with the settings used for calls to updateFeature. */ + public UnaryCallSettings updateFeatureSettings() { + return updateFeatureSettings; + } + + /** Returns the object with the settings used for calls to updateFeature. */ + public OperationCallSettings + updateFeatureOperationSettings() { + return updateFeatureOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteFeature. */ + public UnaryCallSettings deleteFeatureSettings() { + return deleteFeatureSettings; + } + + /** Returns the object with the settings used for calls to deleteFeature. */ + public OperationCallSettings + deleteFeatureOperationSettings() { + return deleteFeatureOperationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public FeatureRegistryServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcFeatureRegistryServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "aiplatform.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "aiplatform.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 ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(FeatureRegistryServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected FeatureRegistryServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createFeatureGroupSettings = settingsBuilder.createFeatureGroupSettings().build(); + createFeatureGroupOperationSettings = + settingsBuilder.createFeatureGroupOperationSettings().build(); + getFeatureGroupSettings = settingsBuilder.getFeatureGroupSettings().build(); + listFeatureGroupsSettings = settingsBuilder.listFeatureGroupsSettings().build(); + updateFeatureGroupSettings = settingsBuilder.updateFeatureGroupSettings().build(); + updateFeatureGroupOperationSettings = + settingsBuilder.updateFeatureGroupOperationSettings().build(); + deleteFeatureGroupSettings = settingsBuilder.deleteFeatureGroupSettings().build(); + deleteFeatureGroupOperationSettings = + settingsBuilder.deleteFeatureGroupOperationSettings().build(); + createFeatureSettings = settingsBuilder.createFeatureSettings().build(); + createFeatureOperationSettings = settingsBuilder.createFeatureOperationSettings().build(); + getFeatureSettings = settingsBuilder.getFeatureSettings().build(); + listFeaturesSettings = settingsBuilder.listFeaturesSettings().build(); + updateFeatureSettings = settingsBuilder.updateFeatureSettings().build(); + updateFeatureOperationSettings = settingsBuilder.updateFeatureOperationSettings().build(); + deleteFeatureSettings = settingsBuilder.deleteFeatureSettings().build(); + deleteFeatureOperationSettings = settingsBuilder.deleteFeatureOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for FeatureRegistryServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createFeatureGroupSettings; + private final OperationCallSettings.Builder< + CreateFeatureGroupRequest, FeatureGroup, CreateFeatureGroupOperationMetadata> + createFeatureGroupOperationSettings; + private final UnaryCallSettings.Builder + getFeatureGroupSettings; + private final PagedCallSettings.Builder< + ListFeatureGroupsRequest, ListFeatureGroupsResponse, ListFeatureGroupsPagedResponse> + listFeatureGroupsSettings; + private final UnaryCallSettings.Builder + updateFeatureGroupSettings; + private final OperationCallSettings.Builder< + UpdateFeatureGroupRequest, FeatureGroup, UpdateFeatureGroupOperationMetadata> + updateFeatureGroupOperationSettings; + private final UnaryCallSettings.Builder + deleteFeatureGroupSettings; + private final OperationCallSettings.Builder< + DeleteFeatureGroupRequest, Empty, DeleteOperationMetadata> + deleteFeatureGroupOperationSettings; + private final UnaryCallSettings.Builder createFeatureSettings; + private final OperationCallSettings.Builder< + CreateFeatureRequest, Feature, CreateFeatureOperationMetadata> + createFeatureOperationSettings; + private final UnaryCallSettings.Builder getFeatureSettings; + private final PagedCallSettings.Builder< + ListFeaturesRequest, ListFeaturesResponse, ListFeaturesPagedResponse> + listFeaturesSettings; + private final UnaryCallSettings.Builder updateFeatureSettings; + private final OperationCallSettings.Builder< + UpdateFeatureRequest, Feature, UpdateFeatureOperationMetadata> + updateFeatureOperationSettings; + private final UnaryCallSettings.Builder deleteFeatureSettings; + private final OperationCallSettings.Builder< + DeleteFeatureRequest, Empty, DeleteOperationMetadata> + deleteFeatureOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + 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); + + createFeatureGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createFeatureGroupOperationSettings = OperationCallSettings.newBuilder(); + getFeatureGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listFeatureGroupsSettings = PagedCallSettings.newBuilder(LIST_FEATURE_GROUPS_PAGE_STR_FACT); + updateFeatureGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateFeatureGroupOperationSettings = OperationCallSettings.newBuilder(); + deleteFeatureGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteFeatureGroupOperationSettings = OperationCallSettings.newBuilder(); + createFeatureSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createFeatureOperationSettings = OperationCallSettings.newBuilder(); + getFeatureSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listFeaturesSettings = PagedCallSettings.newBuilder(LIST_FEATURES_PAGE_STR_FACT); + updateFeatureSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateFeatureOperationSettings = OperationCallSettings.newBuilder(); + deleteFeatureSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteFeatureOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createFeatureGroupSettings, + getFeatureGroupSettings, + listFeatureGroupsSettings, + updateFeatureGroupSettings, + deleteFeatureGroupSettings, + createFeatureSettings, + getFeatureSettings, + listFeaturesSettings, + updateFeatureSettings, + deleteFeatureSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(FeatureRegistryServiceStubSettings settings) { + super(settings); + + createFeatureGroupSettings = settings.createFeatureGroupSettings.toBuilder(); + createFeatureGroupOperationSettings = + settings.createFeatureGroupOperationSettings.toBuilder(); + getFeatureGroupSettings = settings.getFeatureGroupSettings.toBuilder(); + listFeatureGroupsSettings = settings.listFeatureGroupsSettings.toBuilder(); + updateFeatureGroupSettings = settings.updateFeatureGroupSettings.toBuilder(); + updateFeatureGroupOperationSettings = + settings.updateFeatureGroupOperationSettings.toBuilder(); + deleteFeatureGroupSettings = settings.deleteFeatureGroupSettings.toBuilder(); + deleteFeatureGroupOperationSettings = + settings.deleteFeatureGroupOperationSettings.toBuilder(); + createFeatureSettings = settings.createFeatureSettings.toBuilder(); + createFeatureOperationSettings = settings.createFeatureOperationSettings.toBuilder(); + getFeatureSettings = settings.getFeatureSettings.toBuilder(); + listFeaturesSettings = settings.listFeaturesSettings.toBuilder(); + updateFeatureSettings = settings.updateFeatureSettings.toBuilder(); + updateFeatureOperationSettings = settings.updateFeatureOperationSettings.toBuilder(); + deleteFeatureSettings = settings.deleteFeatureSettings.toBuilder(); + deleteFeatureOperationSettings = settings.deleteFeatureOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createFeatureGroupSettings, + getFeatureGroupSettings, + listFeatureGroupsSettings, + updateFeatureGroupSettings, + deleteFeatureGroupSettings, + createFeatureSettings, + getFeatureSettings, + listFeaturesSettings, + updateFeatureSettings, + deleteFeatureSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createFeatureGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getFeatureGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listFeatureGroupsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateFeatureGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteFeatureGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createFeatureSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getFeatureSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listFeaturesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateFeatureSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteFeatureSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createFeatureGroupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(FeatureGroup.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CreateFeatureGroupOperationMetadata.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 + .updateFeatureGroupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(FeatureGroup.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + UpdateFeatureGroupOperationMetadata.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 + .deleteFeatureGroupOperationSettings() + .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(DeleteOperationMetadata.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 + .createFeatureOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Feature.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CreateFeatureOperationMetadata.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 + .updateFeatureOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Feature.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + UpdateFeatureOperationMetadata.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 + .deleteFeatureOperationSettings() + .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(DeleteOperationMetadata.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 createFeatureGroup. */ + public UnaryCallSettings.Builder + createFeatureGroupSettings() { + return createFeatureGroupSettings; + } + + /** Returns the builder for the settings used for calls to createFeatureGroup. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateFeatureGroupRequest, FeatureGroup, CreateFeatureGroupOperationMetadata> + createFeatureGroupOperationSettings() { + return createFeatureGroupOperationSettings; + } + + /** Returns the builder for the settings used for calls to getFeatureGroup. */ + public UnaryCallSettings.Builder + getFeatureGroupSettings() { + return getFeatureGroupSettings; + } + + /** Returns the builder for the settings used for calls to listFeatureGroups. */ + public PagedCallSettings.Builder< + ListFeatureGroupsRequest, ListFeatureGroupsResponse, ListFeatureGroupsPagedResponse> + listFeatureGroupsSettings() { + return listFeatureGroupsSettings; + } + + /** Returns the builder for the settings used for calls to updateFeatureGroup. */ + public UnaryCallSettings.Builder + updateFeatureGroupSettings() { + return updateFeatureGroupSettings; + } + + /** Returns the builder for the settings used for calls to updateFeatureGroup. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateFeatureGroupRequest, FeatureGroup, UpdateFeatureGroupOperationMetadata> + updateFeatureGroupOperationSettings() { + return updateFeatureGroupOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteFeatureGroup. */ + public UnaryCallSettings.Builder + deleteFeatureGroupSettings() { + return deleteFeatureGroupSettings; + } + + /** Returns the builder for the settings used for calls to deleteFeatureGroup. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteFeatureGroupOperationSettings() { + return deleteFeatureGroupOperationSettings; + } + + /** Returns the builder for the settings used for calls to createFeature. */ + public UnaryCallSettings.Builder createFeatureSettings() { + return createFeatureSettings; + } + + /** Returns the builder for the settings used for calls to createFeature. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateFeatureRequest, Feature, CreateFeatureOperationMetadata> + createFeatureOperationSettings() { + return createFeatureOperationSettings; + } + + /** Returns the builder for the settings used for calls to getFeature. */ + public UnaryCallSettings.Builder getFeatureSettings() { + return getFeatureSettings; + } + + /** Returns the builder for the settings used for calls to listFeatures. */ + public PagedCallSettings.Builder< + ListFeaturesRequest, ListFeaturesResponse, ListFeaturesPagedResponse> + listFeaturesSettings() { + return listFeaturesSettings; + } + + /** Returns the builder for the settings used for calls to updateFeature. */ + public UnaryCallSettings.Builder updateFeatureSettings() { + return updateFeatureSettings; + } + + /** Returns the builder for the settings used for calls to updateFeature. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateFeatureRequest, Feature, UpdateFeatureOperationMetadata> + updateFeatureOperationSettings() { + return updateFeatureOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteFeature. */ + public UnaryCallSettings.Builder deleteFeatureSettings() { + return deleteFeatureSettings; + } + + /** Returns the builder for the settings used for calls to deleteFeature. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteFeatureOperationSettings() { + return deleteFeatureOperationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @Override + public FeatureRegistryServiceStubSettings build() throws IOException { + return new FeatureRegistryServiceStubSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureOnlineStoreAdminServiceCallableFactory.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureOnlineStoreAdminServiceCallableFactory.java new file mode 100644 index 000000000000..c766bc9267ad --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureOnlineStoreAdminServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.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 FeatureOnlineStoreAdminService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcFeatureOnlineStoreAdminServiceCallableFactory 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-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureOnlineStoreAdminServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureOnlineStoreAdminServiceStub.java new file mode 100644 index 000000000000..776772129885 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureOnlineStoreAdminServiceStub.java @@ -0,0 +1,915 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient.ListFeatureOnlineStoresPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient.ListFeatureViewSyncsPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient.ListFeatureViewsPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient.ListLocationsPagedResponse; + +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.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest; +import com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateFeatureViewRequest; +import com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest; +import com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureView; +import com.google.cloud.aiplatform.v1.FeatureViewSync; +import com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest; +import com.google.cloud.aiplatform.v1.GetFeatureViewRequest; +import com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest; +import com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest; +import com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse; +import com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest; +import com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse; +import com.google.cloud.aiplatform.v1.ListFeatureViewsRequest; +import com.google.cloud.aiplatform.v1.ListFeatureViewsResponse; +import com.google.cloud.aiplatform.v1.SyncFeatureViewRequest; +import com.google.cloud.aiplatform.v1.SyncFeatureViewResponse; +import com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest; +import com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 FeatureOnlineStoreAdminService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcFeatureOnlineStoreAdminServiceStub extends FeatureOnlineStoreAdminServiceStub { + private static final MethodDescriptor + createFeatureOnlineStoreMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService/CreateFeatureOnlineStore") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateFeatureOnlineStoreRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getFeatureOnlineStoreMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService/GetFeatureOnlineStore") + .setRequestMarshaller( + ProtoUtils.marshaller(GetFeatureOnlineStoreRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(FeatureOnlineStore.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListFeatureOnlineStoresRequest, ListFeatureOnlineStoresResponse> + listFeatureOnlineStoresMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService/ListFeatureOnlineStores") + .setRequestMarshaller( + ProtoUtils.marshaller(ListFeatureOnlineStoresRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListFeatureOnlineStoresResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateFeatureOnlineStoreMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService/UpdateFeatureOnlineStore") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateFeatureOnlineStoreRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteFeatureOnlineStoreMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService/DeleteFeatureOnlineStore") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteFeatureOnlineStoreRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createFeatureViewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService/CreateFeatureView") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateFeatureViewRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getFeatureViewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService/GetFeatureView") + .setRequestMarshaller( + ProtoUtils.marshaller(GetFeatureViewRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(FeatureView.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listFeatureViewsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService/ListFeatureViews") + .setRequestMarshaller( + ProtoUtils.marshaller(ListFeatureViewsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListFeatureViewsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateFeatureViewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService/UpdateFeatureView") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateFeatureViewRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteFeatureViewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService/DeleteFeatureView") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteFeatureViewRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + syncFeatureViewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService/SyncFeatureView") + .setRequestMarshaller( + ProtoUtils.marshaller(SyncFeatureViewRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SyncFeatureViewResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getFeatureViewSyncMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService/GetFeatureViewSync") + .setRequestMarshaller( + ProtoUtils.marshaller(GetFeatureViewSyncRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(FeatureViewSync.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listFeatureViewSyncsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService/ListFeatureViewSyncs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListFeatureViewSyncsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListFeatureViewSyncsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + createFeatureOnlineStoreCallable; + private final OperationCallable< + CreateFeatureOnlineStoreRequest, + FeatureOnlineStore, + CreateFeatureOnlineStoreOperationMetadata> + createFeatureOnlineStoreOperationCallable; + private final UnaryCallable + getFeatureOnlineStoreCallable; + private final UnaryCallable + listFeatureOnlineStoresCallable; + private final UnaryCallable + listFeatureOnlineStoresPagedCallable; + private final UnaryCallable + updateFeatureOnlineStoreCallable; + private final OperationCallable< + UpdateFeatureOnlineStoreRequest, + FeatureOnlineStore, + UpdateFeatureOnlineStoreOperationMetadata> + updateFeatureOnlineStoreOperationCallable; + private final UnaryCallable + deleteFeatureOnlineStoreCallable; + private final OperationCallable + deleteFeatureOnlineStoreOperationCallable; + private final UnaryCallable createFeatureViewCallable; + private final OperationCallable< + CreateFeatureViewRequest, FeatureView, CreateFeatureViewOperationMetadata> + createFeatureViewOperationCallable; + private final UnaryCallable getFeatureViewCallable; + private final UnaryCallable + listFeatureViewsCallable; + private final UnaryCallable + listFeatureViewsPagedCallable; + private final UnaryCallable updateFeatureViewCallable; + private final OperationCallable< + UpdateFeatureViewRequest, FeatureView, UpdateFeatureViewOperationMetadata> + updateFeatureViewOperationCallable; + private final UnaryCallable deleteFeatureViewCallable; + private final OperationCallable + deleteFeatureViewOperationCallable; + private final UnaryCallable + syncFeatureViewCallable; + private final UnaryCallable + getFeatureViewSyncCallable; + private final UnaryCallable + listFeatureViewSyncsCallable; + private final UnaryCallable + listFeatureViewSyncsPagedCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcFeatureOnlineStoreAdminServiceStub create( + FeatureOnlineStoreAdminServiceStubSettings settings) throws IOException { + return new GrpcFeatureOnlineStoreAdminServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcFeatureOnlineStoreAdminServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcFeatureOnlineStoreAdminServiceStub( + FeatureOnlineStoreAdminServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcFeatureOnlineStoreAdminServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcFeatureOnlineStoreAdminServiceStub( + FeatureOnlineStoreAdminServiceStubSettings.newBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of GrpcFeatureOnlineStoreAdminServiceStub, 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 GrpcFeatureOnlineStoreAdminServiceStub( + FeatureOnlineStoreAdminServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcFeatureOnlineStoreAdminServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcFeatureOnlineStoreAdminServiceStub, 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 GrpcFeatureOnlineStoreAdminServiceStub( + FeatureOnlineStoreAdminServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + createFeatureOnlineStoreTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createFeatureOnlineStoreMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getFeatureOnlineStoreTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getFeatureOnlineStoreMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listFeatureOnlineStoresTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listFeatureOnlineStoresMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateFeatureOnlineStoreTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateFeatureOnlineStoreMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "feature_online_store.name", + String.valueOf(request.getFeatureOnlineStore().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deleteFeatureOnlineStoreTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteFeatureOnlineStoreMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createFeatureViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createFeatureViewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getFeatureViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getFeatureViewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listFeatureViewsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listFeatureViewsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateFeatureViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateFeatureViewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "feature_view.name", String.valueOf(request.getFeatureView().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteFeatureViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteFeatureViewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + syncFeatureViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(syncFeatureViewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("feature_view", String.valueOf(request.getFeatureView())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getFeatureViewSyncTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getFeatureViewSyncMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listFeatureViewSyncsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listFeatureViewSyncsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + + this.createFeatureOnlineStoreCallable = + callableFactory.createUnaryCallable( + createFeatureOnlineStoreTransportSettings, + settings.createFeatureOnlineStoreSettings(), + clientContext); + this.createFeatureOnlineStoreOperationCallable = + callableFactory.createOperationCallable( + createFeatureOnlineStoreTransportSettings, + settings.createFeatureOnlineStoreOperationSettings(), + clientContext, + operationsStub); + this.getFeatureOnlineStoreCallable = + callableFactory.createUnaryCallable( + getFeatureOnlineStoreTransportSettings, + settings.getFeatureOnlineStoreSettings(), + clientContext); + this.listFeatureOnlineStoresCallable = + callableFactory.createUnaryCallable( + listFeatureOnlineStoresTransportSettings, + settings.listFeatureOnlineStoresSettings(), + clientContext); + this.listFeatureOnlineStoresPagedCallable = + callableFactory.createPagedCallable( + listFeatureOnlineStoresTransportSettings, + settings.listFeatureOnlineStoresSettings(), + clientContext); + this.updateFeatureOnlineStoreCallable = + callableFactory.createUnaryCallable( + updateFeatureOnlineStoreTransportSettings, + settings.updateFeatureOnlineStoreSettings(), + clientContext); + this.updateFeatureOnlineStoreOperationCallable = + callableFactory.createOperationCallable( + updateFeatureOnlineStoreTransportSettings, + settings.updateFeatureOnlineStoreOperationSettings(), + clientContext, + operationsStub); + this.deleteFeatureOnlineStoreCallable = + callableFactory.createUnaryCallable( + deleteFeatureOnlineStoreTransportSettings, + settings.deleteFeatureOnlineStoreSettings(), + clientContext); + this.deleteFeatureOnlineStoreOperationCallable = + callableFactory.createOperationCallable( + deleteFeatureOnlineStoreTransportSettings, + settings.deleteFeatureOnlineStoreOperationSettings(), + clientContext, + operationsStub); + this.createFeatureViewCallable = + callableFactory.createUnaryCallable( + createFeatureViewTransportSettings, + settings.createFeatureViewSettings(), + clientContext); + this.createFeatureViewOperationCallable = + callableFactory.createOperationCallable( + createFeatureViewTransportSettings, + settings.createFeatureViewOperationSettings(), + clientContext, + operationsStub); + this.getFeatureViewCallable = + callableFactory.createUnaryCallable( + getFeatureViewTransportSettings, settings.getFeatureViewSettings(), clientContext); + this.listFeatureViewsCallable = + callableFactory.createUnaryCallable( + listFeatureViewsTransportSettings, settings.listFeatureViewsSettings(), clientContext); + this.listFeatureViewsPagedCallable = + callableFactory.createPagedCallable( + listFeatureViewsTransportSettings, settings.listFeatureViewsSettings(), clientContext); + this.updateFeatureViewCallable = + callableFactory.createUnaryCallable( + updateFeatureViewTransportSettings, + settings.updateFeatureViewSettings(), + clientContext); + this.updateFeatureViewOperationCallable = + callableFactory.createOperationCallable( + updateFeatureViewTransportSettings, + settings.updateFeatureViewOperationSettings(), + clientContext, + operationsStub); + this.deleteFeatureViewCallable = + callableFactory.createUnaryCallable( + deleteFeatureViewTransportSettings, + settings.deleteFeatureViewSettings(), + clientContext); + this.deleteFeatureViewOperationCallable = + callableFactory.createOperationCallable( + deleteFeatureViewTransportSettings, + settings.deleteFeatureViewOperationSettings(), + clientContext, + operationsStub); + this.syncFeatureViewCallable = + callableFactory.createUnaryCallable( + syncFeatureViewTransportSettings, settings.syncFeatureViewSettings(), clientContext); + this.getFeatureViewSyncCallable = + callableFactory.createUnaryCallable( + getFeatureViewSyncTransportSettings, + settings.getFeatureViewSyncSettings(), + clientContext); + this.listFeatureViewSyncsCallable = + callableFactory.createUnaryCallable( + listFeatureViewSyncsTransportSettings, + settings.listFeatureViewSyncsSettings(), + clientContext); + this.listFeatureViewSyncsPagedCallable = + callableFactory.createPagedCallable( + listFeatureViewSyncsTransportSettings, + settings.listFeatureViewSyncsSettings(), + clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + createFeatureOnlineStoreCallable() { + return createFeatureOnlineStoreCallable; + } + + @Override + public OperationCallable< + CreateFeatureOnlineStoreRequest, + FeatureOnlineStore, + CreateFeatureOnlineStoreOperationMetadata> + createFeatureOnlineStoreOperationCallable() { + return createFeatureOnlineStoreOperationCallable; + } + + @Override + public UnaryCallable + getFeatureOnlineStoreCallable() { + return getFeatureOnlineStoreCallable; + } + + @Override + public UnaryCallable + listFeatureOnlineStoresCallable() { + return listFeatureOnlineStoresCallable; + } + + @Override + public UnaryCallable + listFeatureOnlineStoresPagedCallable() { + return listFeatureOnlineStoresPagedCallable; + } + + @Override + public UnaryCallable + updateFeatureOnlineStoreCallable() { + return updateFeatureOnlineStoreCallable; + } + + @Override + public OperationCallable< + UpdateFeatureOnlineStoreRequest, + FeatureOnlineStore, + UpdateFeatureOnlineStoreOperationMetadata> + updateFeatureOnlineStoreOperationCallable() { + return updateFeatureOnlineStoreOperationCallable; + } + + @Override + public UnaryCallable + deleteFeatureOnlineStoreCallable() { + return deleteFeatureOnlineStoreCallable; + } + + @Override + public OperationCallable + deleteFeatureOnlineStoreOperationCallable() { + return deleteFeatureOnlineStoreOperationCallable; + } + + @Override + public UnaryCallable createFeatureViewCallable() { + return createFeatureViewCallable; + } + + @Override + public OperationCallable< + CreateFeatureViewRequest, FeatureView, CreateFeatureViewOperationMetadata> + createFeatureViewOperationCallable() { + return createFeatureViewOperationCallable; + } + + @Override + public UnaryCallable getFeatureViewCallable() { + return getFeatureViewCallable; + } + + @Override + public UnaryCallable + listFeatureViewsCallable() { + return listFeatureViewsCallable; + } + + @Override + public UnaryCallable + listFeatureViewsPagedCallable() { + return listFeatureViewsPagedCallable; + } + + @Override + public UnaryCallable updateFeatureViewCallable() { + return updateFeatureViewCallable; + } + + @Override + public OperationCallable< + UpdateFeatureViewRequest, FeatureView, UpdateFeatureViewOperationMetadata> + updateFeatureViewOperationCallable() { + return updateFeatureViewOperationCallable; + } + + @Override + public UnaryCallable deleteFeatureViewCallable() { + return deleteFeatureViewCallable; + } + + @Override + public OperationCallable + deleteFeatureViewOperationCallable() { + return deleteFeatureViewOperationCallable; + } + + @Override + public UnaryCallable syncFeatureViewCallable() { + return syncFeatureViewCallable; + } + + @Override + public UnaryCallable getFeatureViewSyncCallable() { + return getFeatureViewSyncCallable; + } + + @Override + public UnaryCallable + listFeatureViewSyncsCallable() { + return listFeatureViewSyncsCallable; + } + + @Override + public UnaryCallable + listFeatureViewSyncsPagedCallable() { + return listFeatureViewSyncsPagedCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @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-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureOnlineStoreServiceCallableFactory.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureOnlineStoreServiceCallableFactory.java new file mode 100644 index 000000000000..edd5c6e9cd83 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureOnlineStoreServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.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 FeatureOnlineStoreService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcFeatureOnlineStoreServiceCallableFactory 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-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureOnlineStoreServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureOnlineStoreServiceStub.java new file mode 100644 index 000000000000..f8c2bc7c1b4a --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureOnlineStoreServiceStub.java @@ -0,0 +1,338 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient.ListLocationsPagedResponse; + +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.aiplatform.v1.FetchFeatureValuesRequest; +import com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 FeatureOnlineStoreService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcFeatureOnlineStoreServiceStub extends FeatureOnlineStoreServiceStub { + private static final MethodDescriptor + fetchFeatureValuesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.FeatureOnlineStoreService/FetchFeatureValues") + .setRequestMarshaller( + ProtoUtils.marshaller(FetchFeatureValuesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(FetchFeatureValuesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + fetchFeatureValuesCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcFeatureOnlineStoreServiceStub create( + FeatureOnlineStoreServiceStubSettings settings) throws IOException { + return new GrpcFeatureOnlineStoreServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcFeatureOnlineStoreServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcFeatureOnlineStoreServiceStub( + FeatureOnlineStoreServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcFeatureOnlineStoreServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcFeatureOnlineStoreServiceStub( + FeatureOnlineStoreServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcFeatureOnlineStoreServiceStub, 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 GrpcFeatureOnlineStoreServiceStub( + FeatureOnlineStoreServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcFeatureOnlineStoreServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcFeatureOnlineStoreServiceStub, 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 GrpcFeatureOnlineStoreServiceStub( + FeatureOnlineStoreServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + fetchFeatureValuesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(fetchFeatureValuesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("feature_view", String.valueOf(request.getFeatureView())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + + this.fetchFeatureValuesCallable = + callableFactory.createUnaryCallable( + fetchFeatureValuesTransportSettings, + settings.fetchFeatureValuesSettings(), + clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + fetchFeatureValuesCallable() { + return fetchFeatureValuesCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @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-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureRegistryServiceCallableFactory.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureRegistryServiceCallableFactory.java new file mode 100644 index 000000000000..d4f8bdfd2d77 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureRegistryServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.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 FeatureRegistryService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcFeatureRegistryServiceCallableFactory 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-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureRegistryServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureRegistryServiceStub.java new file mode 100644 index 000000000000..527e2324ec75 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcFeatureRegistryServiceStub.java @@ -0,0 +1,740 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient.ListFeatureGroupsPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient.ListFeaturesPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient.ListLocationsPagedResponse; + +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.aiplatform.v1.CreateFeatureGroupOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest; +import com.google.cloud.aiplatform.v1.CreateFeatureOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateFeatureRequest; +import com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest; +import com.google.cloud.aiplatform.v1.DeleteFeatureRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.GetFeatureGroupRequest; +import com.google.cloud.aiplatform.v1.GetFeatureRequest; +import com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest; +import com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse; +import com.google.cloud.aiplatform.v1.ListFeaturesRequest; +import com.google.cloud.aiplatform.v1.ListFeaturesResponse; +import com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest; +import com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdateFeatureRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 FeatureRegistryService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcFeatureRegistryServiceStub extends FeatureRegistryServiceStub { + private static final MethodDescriptor + createFeatureGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.FeatureRegistryService/CreateFeatureGroup") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateFeatureGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getFeatureGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.FeatureRegistryService/GetFeatureGroup") + .setRequestMarshaller( + ProtoUtils.marshaller(GetFeatureGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(FeatureGroup.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listFeatureGroupsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.FeatureRegistryService/ListFeatureGroups") + .setRequestMarshaller( + ProtoUtils.marshaller(ListFeatureGroupsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListFeatureGroupsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateFeatureGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.FeatureRegistryService/UpdateFeatureGroup") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateFeatureGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteFeatureGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.FeatureRegistryService/DeleteFeatureGroup") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteFeatureGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createFeatureMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.FeatureRegistryService/CreateFeature") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateFeatureRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getFeatureMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.FeatureRegistryService/GetFeature") + .setRequestMarshaller(ProtoUtils.marshaller(GetFeatureRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Feature.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listFeaturesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.FeatureRegistryService/ListFeatures") + .setRequestMarshaller(ProtoUtils.marshaller(ListFeaturesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListFeaturesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateFeatureMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.FeatureRegistryService/UpdateFeature") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateFeatureRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteFeatureMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.FeatureRegistryService/DeleteFeature") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteFeatureRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable createFeatureGroupCallable; + private final OperationCallable< + CreateFeatureGroupRequest, FeatureGroup, CreateFeatureGroupOperationMetadata> + createFeatureGroupOperationCallable; + private final UnaryCallable getFeatureGroupCallable; + private final UnaryCallable + listFeatureGroupsCallable; + private final UnaryCallable + listFeatureGroupsPagedCallable; + private final UnaryCallable updateFeatureGroupCallable; + private final OperationCallable< + UpdateFeatureGroupRequest, FeatureGroup, UpdateFeatureGroupOperationMetadata> + updateFeatureGroupOperationCallable; + private final UnaryCallable deleteFeatureGroupCallable; + private final OperationCallable + deleteFeatureGroupOperationCallable; + private final UnaryCallable createFeatureCallable; + private final OperationCallable + createFeatureOperationCallable; + private final UnaryCallable getFeatureCallable; + private final UnaryCallable listFeaturesCallable; + private final UnaryCallable + listFeaturesPagedCallable; + private final UnaryCallable updateFeatureCallable; + private final OperationCallable + updateFeatureOperationCallable; + private final UnaryCallable deleteFeatureCallable; + private final OperationCallable + deleteFeatureOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcFeatureRegistryServiceStub create( + FeatureRegistryServiceStubSettings settings) throws IOException { + return new GrpcFeatureRegistryServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcFeatureRegistryServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcFeatureRegistryServiceStub( + FeatureRegistryServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcFeatureRegistryServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcFeatureRegistryServiceStub( + FeatureRegistryServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcFeatureRegistryServiceStub, 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 GrpcFeatureRegistryServiceStub( + FeatureRegistryServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcFeatureRegistryServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcFeatureRegistryServiceStub, 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 GrpcFeatureRegistryServiceStub( + FeatureRegistryServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createFeatureGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createFeatureGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getFeatureGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getFeatureGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listFeatureGroupsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listFeatureGroupsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateFeatureGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateFeatureGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "feature_group.name", String.valueOf(request.getFeatureGroup().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteFeatureGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteFeatureGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createFeatureTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createFeatureMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getFeatureTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getFeatureMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listFeaturesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listFeaturesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateFeatureTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateFeatureMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("feature.name", String.valueOf(request.getFeature().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteFeatureTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteFeatureMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + + this.createFeatureGroupCallable = + callableFactory.createUnaryCallable( + createFeatureGroupTransportSettings, + settings.createFeatureGroupSettings(), + clientContext); + this.createFeatureGroupOperationCallable = + callableFactory.createOperationCallable( + createFeatureGroupTransportSettings, + settings.createFeatureGroupOperationSettings(), + clientContext, + operationsStub); + this.getFeatureGroupCallable = + callableFactory.createUnaryCallable( + getFeatureGroupTransportSettings, settings.getFeatureGroupSettings(), clientContext); + this.listFeatureGroupsCallable = + callableFactory.createUnaryCallable( + listFeatureGroupsTransportSettings, + settings.listFeatureGroupsSettings(), + clientContext); + this.listFeatureGroupsPagedCallable = + callableFactory.createPagedCallable( + listFeatureGroupsTransportSettings, + settings.listFeatureGroupsSettings(), + clientContext); + this.updateFeatureGroupCallable = + callableFactory.createUnaryCallable( + updateFeatureGroupTransportSettings, + settings.updateFeatureGroupSettings(), + clientContext); + this.updateFeatureGroupOperationCallable = + callableFactory.createOperationCallable( + updateFeatureGroupTransportSettings, + settings.updateFeatureGroupOperationSettings(), + clientContext, + operationsStub); + this.deleteFeatureGroupCallable = + callableFactory.createUnaryCallable( + deleteFeatureGroupTransportSettings, + settings.deleteFeatureGroupSettings(), + clientContext); + this.deleteFeatureGroupOperationCallable = + callableFactory.createOperationCallable( + deleteFeatureGroupTransportSettings, + settings.deleteFeatureGroupOperationSettings(), + clientContext, + operationsStub); + this.createFeatureCallable = + callableFactory.createUnaryCallable( + createFeatureTransportSettings, settings.createFeatureSettings(), clientContext); + this.createFeatureOperationCallable = + callableFactory.createOperationCallable( + createFeatureTransportSettings, + settings.createFeatureOperationSettings(), + clientContext, + operationsStub); + this.getFeatureCallable = + callableFactory.createUnaryCallable( + getFeatureTransportSettings, settings.getFeatureSettings(), clientContext); + this.listFeaturesCallable = + callableFactory.createUnaryCallable( + listFeaturesTransportSettings, settings.listFeaturesSettings(), clientContext); + this.listFeaturesPagedCallable = + callableFactory.createPagedCallable( + listFeaturesTransportSettings, settings.listFeaturesSettings(), clientContext); + this.updateFeatureCallable = + callableFactory.createUnaryCallable( + updateFeatureTransportSettings, settings.updateFeatureSettings(), clientContext); + this.updateFeatureOperationCallable = + callableFactory.createOperationCallable( + updateFeatureTransportSettings, + settings.updateFeatureOperationSettings(), + clientContext, + operationsStub); + this.deleteFeatureCallable = + callableFactory.createUnaryCallable( + deleteFeatureTransportSettings, settings.deleteFeatureSettings(), clientContext); + this.deleteFeatureOperationCallable = + callableFactory.createOperationCallable( + deleteFeatureTransportSettings, + settings.deleteFeatureOperationSettings(), + clientContext, + operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createFeatureGroupCallable() { + return createFeatureGroupCallable; + } + + @Override + public OperationCallable< + CreateFeatureGroupRequest, FeatureGroup, CreateFeatureGroupOperationMetadata> + createFeatureGroupOperationCallable() { + return createFeatureGroupOperationCallable; + } + + @Override + public UnaryCallable getFeatureGroupCallable() { + return getFeatureGroupCallable; + } + + @Override + public UnaryCallable + listFeatureGroupsCallable() { + return listFeatureGroupsCallable; + } + + @Override + public UnaryCallable + listFeatureGroupsPagedCallable() { + return listFeatureGroupsPagedCallable; + } + + @Override + public UnaryCallable updateFeatureGroupCallable() { + return updateFeatureGroupCallable; + } + + @Override + public OperationCallable< + UpdateFeatureGroupRequest, FeatureGroup, UpdateFeatureGroupOperationMetadata> + updateFeatureGroupOperationCallable() { + return updateFeatureGroupOperationCallable; + } + + @Override + public UnaryCallable deleteFeatureGroupCallable() { + return deleteFeatureGroupCallable; + } + + @Override + public OperationCallable + deleteFeatureGroupOperationCallable() { + return deleteFeatureGroupOperationCallable; + } + + @Override + public UnaryCallable createFeatureCallable() { + return createFeatureCallable; + } + + @Override + public OperationCallable + createFeatureOperationCallable() { + return createFeatureOperationCallable; + } + + @Override + public UnaryCallable getFeatureCallable() { + return getFeatureCallable; + } + + @Override + public UnaryCallable listFeaturesCallable() { + return listFeaturesCallable; + } + + @Override + public UnaryCallable listFeaturesPagedCallable() { + return listFeaturesPagedCallable; + } + + @Override + public UnaryCallable updateFeatureCallable() { + return updateFeatureCallable; + } + + @Override + public OperationCallable + updateFeatureOperationCallable() { + return updateFeatureOperationCallable; + } + + @Override + public UnaryCallable deleteFeatureCallable() { + return deleteFeatureCallable; + } + + @Override + public OperationCallable + deleteFeatureOperationCallable() { + return deleteFeatureOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @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-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcLlmUtilityServiceCallableFactory.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcLlmUtilityServiceCallableFactory.java new file mode 100644 index 000000000000..1fc200d96c4e --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcLlmUtilityServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.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 LlmUtilityService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcLlmUtilityServiceCallableFactory 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-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcLlmUtilityServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcLlmUtilityServiceStub.java new file mode 100644 index 000000000000..c676260de69e --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcLlmUtilityServiceStub.java @@ -0,0 +1,362 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.LlmUtilityServiceClient.ListLocationsPagedResponse; + +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.aiplatform.v1.ComputeTokensRequest; +import com.google.cloud.aiplatform.v1.ComputeTokensResponse; +import com.google.cloud.aiplatform.v1.CountTokensRequest; +import com.google.cloud.aiplatform.v1.CountTokensResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 LlmUtilityService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcLlmUtilityServiceStub extends LlmUtilityServiceStub { + private static final MethodDescriptor + countTokensMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.LlmUtilityService/CountTokens") + .setRequestMarshaller(ProtoUtils.marshaller(CountTokensRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(CountTokensResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + computeTokensMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.LlmUtilityService/ComputeTokens") + .setRequestMarshaller( + ProtoUtils.marshaller(ComputeTokensRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ComputeTokensResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable countTokensCallable; + private final UnaryCallable computeTokensCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcLlmUtilityServiceStub create(LlmUtilityServiceStubSettings settings) + throws IOException { + return new GrpcLlmUtilityServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcLlmUtilityServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcLlmUtilityServiceStub( + LlmUtilityServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcLlmUtilityServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcLlmUtilityServiceStub( + LlmUtilityServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcLlmUtilityServiceStub, 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 GrpcLlmUtilityServiceStub( + LlmUtilityServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcLlmUtilityServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcLlmUtilityServiceStub, 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 GrpcLlmUtilityServiceStub( + LlmUtilityServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings countTokensTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(countTokensMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("endpoint", String.valueOf(request.getEndpoint())); + return builder.build(); + }) + .build(); + GrpcCallSettings computeTokensTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(computeTokensMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("endpoint", String.valueOf(request.getEndpoint())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + + this.countTokensCallable = + callableFactory.createUnaryCallable( + countTokensTransportSettings, settings.countTokensSettings(), clientContext); + this.computeTokensCallable = + callableFactory.createUnaryCallable( + computeTokensTransportSettings, settings.computeTokensSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable countTokensCallable() { + return countTokensCallable; + } + + @Override + public UnaryCallable computeTokensCallable() { + return computeTokensCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @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-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/LlmUtilityServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/LlmUtilityServiceStub.java new file mode 100644 index 000000000000..6b3d1dedc3a3 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/LlmUtilityServiceStub.java @@ -0,0 +1,83 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.LlmUtilityServiceClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.ComputeTokensRequest; +import com.google.cloud.aiplatform.v1.ComputeTokensResponse; +import com.google.cloud.aiplatform.v1.CountTokensRequest; +import com.google.cloud.aiplatform.v1.CountTokensResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the LlmUtilityService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class LlmUtilityServiceStub implements BackgroundResource { + + public UnaryCallable countTokensCallable() { + throw new UnsupportedOperationException("Not implemented: countTokensCallable()"); + } + + public UnaryCallable computeTokensCallable() { + throw new UnsupportedOperationException("Not implemented: computeTokensCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/LlmUtilityServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/LlmUtilityServiceStubSettings.java new file mode 100644 index 000000000000..95e08d53eefe --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/LlmUtilityServiceStubSettings.java @@ -0,0 +1,490 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.LlmUtilityServiceClient.ListLocationsPagedResponse; + +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.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.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.aiplatform.v1.ComputeTokensRequest; +import com.google.cloud.aiplatform.v1.ComputeTokensResponse; +import com.google.cloud.aiplatform.v1.CountTokensRequest; +import com.google.cloud.aiplatform.v1.CountTokensResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 LlmUtilityServiceStub}. + * + *

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

    + *
  • The default service address (aiplatform.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 countTokens 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
+ * LlmUtilityServiceStubSettings.Builder llmUtilityServiceSettingsBuilder =
+ *     LlmUtilityServiceStubSettings.newBuilder();
+ * llmUtilityServiceSettingsBuilder
+ *     .countTokensSettings()
+ *     .setRetrySettings(
+ *         llmUtilityServiceSettingsBuilder
+ *             .countTokensSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * LlmUtilityServiceStubSettings llmUtilityServiceSettings =
+ *     llmUtilityServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class LlmUtilityServiceStubSettings 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 countTokensSettings; + private final UnaryCallSettings + computeTokensSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to countTokens. */ + public UnaryCallSettings countTokensSettings() { + return countTokensSettings; + } + + /** Returns the object with the settings used for calls to computeTokens. */ + public UnaryCallSettings computeTokensSettings() { + return computeTokensSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public LlmUtilityServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcLlmUtilityServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "aiplatform.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "aiplatform.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 ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(LlmUtilityServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected LlmUtilityServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + countTokensSettings = settingsBuilder.countTokensSettings().build(); + computeTokensSettings = settingsBuilder.computeTokensSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for LlmUtilityServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + countTokensSettings; + private final UnaryCallSettings.Builder + computeTokensSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + 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); + + countTokensSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + computeTokensSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + countTokensSettings, + computeTokensSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(LlmUtilityServiceStubSettings settings) { + super(settings); + + countTokensSettings = settings.countTokensSettings.toBuilder(); + computeTokensSettings = settings.computeTokensSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + countTokensSettings, + computeTokensSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .countTokensSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .computeTokensSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .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 countTokens. */ + public UnaryCallSettings.Builder + countTokensSettings() { + return countTokensSettings; + } + + /** Returns the builder for the settings used for calls to computeTokens. */ + public UnaryCallSettings.Builder + computeTokensSettings() { + return computeTokensSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @Override + public LlmUtilityServiceStubSettings build() throws IOException { + return new LlmUtilityServiceStubSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreServiceClient.java index 7a11d3afb361..74819fe3813d 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreServiceClient.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreServiceClient.java @@ -57,9 +57,9 @@ * FeatureOnlineStoreServiceClient.create()) { * FeatureViewName featureView = * FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); - * String id = "id3355"; + * FeatureViewDataKey dataKey = FeatureViewDataKey.newBuilder().build(); * FetchFeatureValuesResponse response = - * featureOnlineStoreServiceClient.fetchFeatureValues(featureView, id); + * featureOnlineStoreServiceClient.fetchFeatureValues(featureView, dataKey); * } * } * @@ -191,24 +191,23 @@ public FeatureOnlineStoreServiceStub getStub() { * FeatureOnlineStoreServiceClient.create()) { * FeatureViewName featureView = * FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); - * String id = "id3355"; + * FeatureViewDataKey dataKey = FeatureViewDataKey.newBuilder().build(); * FetchFeatureValuesResponse response = - * featureOnlineStoreServiceClient.fetchFeatureValues(featureView, id); + * featureOnlineStoreServiceClient.fetchFeatureValues(featureView, dataKey); * } * } * * @param featureView Required. FeatureView resource format * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}` - * @param id Simple ID. The whole string will be used as is to identify Entity to fetch feature - * values for. + * @param dataKey Optional. The request key to fetch feature values for. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final FetchFeatureValuesResponse fetchFeatureValues( - FeatureViewName featureView, String id) { + FeatureViewName featureView, FeatureViewDataKey dataKey) { FetchFeatureValuesRequest request = FetchFeatureValuesRequest.newBuilder() .setFeatureView(featureView == null ? null : featureView.toString()) - .setId(id) + .setDataKey(dataKey) .build(); return fetchFeatureValues(request); } @@ -230,21 +229,24 @@ public final FetchFeatureValuesResponse fetchFeatureValues( * String featureView = * FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") * .toString(); - * String id = "id3355"; + * FeatureViewDataKey dataKey = FeatureViewDataKey.newBuilder().build(); * FetchFeatureValuesResponse response = - * featureOnlineStoreServiceClient.fetchFeatureValues(featureView, id); + * featureOnlineStoreServiceClient.fetchFeatureValues(featureView, dataKey); * } * } * * @param featureView Required. FeatureView resource format * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}` - * @param id Simple ID. The whole string will be used as is to identify Entity to fetch feature - * values for. + * @param dataKey Optional. The request key to fetch feature values for. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final FetchFeatureValuesResponse fetchFeatureValues(String featureView, String id) { + public final FetchFeatureValuesResponse fetchFeatureValues( + String featureView, FeatureViewDataKey dataKey) { FetchFeatureValuesRequest request = - FetchFeatureValuesRequest.newBuilder().setFeatureView(featureView).setId(id).build(); + FetchFeatureValuesRequest.newBuilder() + .setFeatureView(featureView) + .setDataKey(dataKey) + .build(); return fetchFeatureValues(request); } @@ -268,6 +270,8 @@ public final FetchFeatureValuesResponse fetchFeatureValues(String featureView, S * FeatureViewName.of( * "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") * .toString()) + * .setDataKey(FeatureViewDataKey.newBuilder().build()) + * .setDataFormat(FeatureViewDataFormat.forNumber(0)) * .build(); * FetchFeatureValuesResponse response = * featureOnlineStoreServiceClient.fetchFeatureValues(request); @@ -301,6 +305,8 @@ public final FetchFeatureValuesResponse fetchFeatureValues(FetchFeatureValuesReq * FeatureViewName.of( * "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") * .toString()) + * .setDataKey(FeatureViewDataKey.newBuilder().build()) + * .setDataFormat(FeatureViewDataFormat.forNumber(0)) * .build(); * ApiFuture future = * featureOnlineStoreServiceClient.fetchFeatureValuesCallable().futureCall(request); diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureRegistryServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureRegistryServiceClient.java index 3570a2a1153a..651601a79343 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureRegistryServiceClient.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureRegistryServiceClient.java @@ -991,7 +991,11 @@ public final UnaryCallable deleteFeatureGr * } * } * - * @param parent + * @param parent Required. The resource name of the EntityType or FeatureGroup to create a + * Feature. Format for entity_type as parent: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @param feature Required. The Feature to create. * @param featureId Required. The ID to use for the Feature, which will become the final component * of the Feature's resource name. @@ -1033,7 +1037,11 @@ public final OperationFuture createFeat * } * } * - * @param parent + * @param parent Required. The resource name of the EntityType or FeatureGroup to create a + * Feature. Format for entity_type as parent: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @param feature Required. The Feature to create. * @param featureId Required. The ID to use for the Feature, which will become the final component * of the Feature's resource name. @@ -1077,7 +1085,11 @@ public final OperationFuture createFeat * } * } * - * @param parent + * @param parent Required. The resource name of the EntityType or FeatureGroup to create a + * Feature. Format for entity_type as parent: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @param feature Required. The Feature to create. * @param featureId Required. The ID to use for the Feature, which will become the final component * of the Feature's resource name. @@ -1219,8 +1231,9 @@ public final UnaryCallable createFeatureCallabl * } * } * - * @param name Required. The name of the Feature resource. Format: + * @param name Required. The name of the Feature resource. Format for entity_type as parent: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1252,8 +1265,9 @@ public final Feature getFeature(FeatureName name) { * } * } * - * @param name Required. The name of the Feature resource. Format: + * @param name Required. The name of the Feature resource. Format for entity_type as parent: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1348,8 +1362,10 @@ public final UnaryCallable getFeatureCallable() { * } * } * - * @param parent Required. The resource name of the Location to list Features. Format: + * @param parent Required. The resource name of the Location to list Features. Format for + * entity_type as parent: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1382,8 +1398,10 @@ public final ListFeaturesPagedResponse listFeatures(EntityTypeName parent) { * } * } * - * @param parent Required. The resource name of the Location to list Features. Format: + * @param parent Required. The resource name of the Location to list Features. Format for + * entity_type as parent: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1418,8 +1436,10 @@ public final ListFeaturesPagedResponse listFeatures(FeatureGroupName parent) { * } * } * - * @param parent Required. The resource name of the Location to list Features. Format: + * @param parent Required. The resource name of the Location to list Features. Format for + * entity_type as parent: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1583,7 +1603,8 @@ public final UnaryCallable listFeatur * user does not provide a mask then only the non-empty fields present in the request will be * overwritten. Set the update_mask to `*` to override all fields. *

Updatable fields: - *

* `description` * `labels` * `disable_monitoring` + *

* `description` * `labels` * `disable_monitoring` (Not supported for + * FeatureRegistry Feature) * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateFeatureAsync( diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/FeaturestoreServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/FeaturestoreServiceClient.java index eaa20cffa073..720264c2cd05 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/FeaturestoreServiceClient.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/FeaturestoreServiceClient.java @@ -1982,7 +1982,11 @@ public final UnaryCallable deleteEntityTypeC * } * } * - * @param parent + * @param parent Required. The resource name of the EntityType or FeatureGroup to create a + * Feature. Format for entity_type as parent: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @param feature Required. The Feature to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2015,7 +2019,11 @@ public final OperationFuture createFeat * } * } * - * @param parent + * @param parent Required. The resource name of the EntityType or FeatureGroup to create a + * Feature. Format for entity_type as parent: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @param feature Required. The Feature to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2050,7 +2058,11 @@ public final OperationFuture createFeat * } * } * - * @param parent + * @param parent Required. The resource name of the EntityType or FeatureGroup to create a + * Feature. Format for entity_type as parent: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @param feature Required. The Feature to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2083,7 +2095,11 @@ public final OperationFuture createFeat * } * } * - * @param parent + * @param parent Required. The resource name of the EntityType or FeatureGroup to create a + * Feature. Format for entity_type as parent: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @param feature Required. The Feature to create. * @param featureId Required. The ID to use for the Feature, which will become the final component * of the Feature's resource name. @@ -2124,7 +2140,11 @@ public final OperationFuture createFeat * } * } * - * @param parent + * @param parent Required. The resource name of the EntityType or FeatureGroup to create a + * Feature. Format for entity_type as parent: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @param feature Required. The Feature to create. * @param featureId Required. The ID to use for the Feature, which will become the final component * of the Feature's resource name. @@ -2167,7 +2187,11 @@ public final OperationFuture createFeat * } * } * - * @param parent + * @param parent Required. The resource name of the EntityType or FeatureGroup to create a + * Feature. Format for entity_type as parent: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: + * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @param feature Required. The Feature to create. * @param featureId Required. The ID to use for the Feature, which will become the final component * of the Feature's resource name. @@ -2482,8 +2506,9 @@ public final UnaryCallable batchCreateFea * } * } * - * @param name Required. The name of the Feature resource. Format: + * @param name Required. The name of the Feature resource. Format for entity_type as parent: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2514,8 +2539,9 @@ public final Feature getFeature(FeatureName name) { * } * } * - * @param name Required. The name of the Feature resource. Format: + * @param name Required. The name of the Feature resource. Format for entity_type as parent: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2607,8 +2633,10 @@ public final UnaryCallable getFeatureCallable() { * } * } * - * @param parent Required. The resource name of the Location to list Features. Format: + * @param parent Required. The resource name of the Location to list Features. Format for + * entity_type as parent: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2640,8 +2668,10 @@ public final ListFeaturesPagedResponse listFeatures(EntityTypeName parent) { * } * } * - * @param parent Required. The resource name of the Location to list Features. Format: + * @param parent Required. The resource name of the Location to list Features. Format for + * entity_type as parent: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2675,8 +2705,10 @@ public final ListFeaturesPagedResponse listFeatures(FeatureGroupName parent) { * } * } * - * @param parent Required. The resource name of the Location to list Features. Format: + * @param parent Required. The resource name of the Location to list Features. Format for + * entity_type as parent: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + * Format for feature_group as parent: * `projects/{project}/locations/{location}/featureGroups/{feature_group}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2836,7 +2868,8 @@ public final UnaryCallable listFeatur * user does not provide a mask then only the non-empty fields present in the request will be * overwritten. Set the update_mask to `*` to override all fields. *

Updatable fields: - *

* `description` * `labels` * `disable_monitoring` + *

* `description` * `labels` * `disable_monitoring` (Not supported for + * FeatureRegistry Feature) * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Feature updateFeature(Feature feature, FieldMask updateMask) { diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/LlmUtilityServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/LlmUtilityServiceClient.java new file mode 100644 index 000000000000..6cb476fc72f5 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/LlmUtilityServiceClient.java @@ -0,0 +1,782 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1; + +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.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.stub.LlmUtilityServiceStub; +import com.google.cloud.aiplatform.v1beta1.stub.LlmUtilityServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Value; +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 for LLM related utility functions. + * + *

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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+ *   EndpointName endpoint =
+ *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
+ *   List instances = new ArrayList<>();
+ *   ComputeTokensResponse response = llmUtilityServiceClient.computeTokens(endpoint, instances);
+ * }
+ * }
+ * + *

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

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

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

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

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

This class can be customized by passing in a custom instance of LlmUtilityServiceSettings 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
+ * LlmUtilityServiceSettings llmUtilityServiceSettings =
+ *     LlmUtilityServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * LlmUtilityServiceClient llmUtilityServiceClient =
+ *     LlmUtilityServiceClient.create(llmUtilityServiceSettings);
+ * }
+ * + *

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
+ * LlmUtilityServiceSettings llmUtilityServiceSettings =
+ *     LlmUtilityServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * LlmUtilityServiceClient llmUtilityServiceClient =
+ *     LlmUtilityServiceClient.create(llmUtilityServiceSettings);
+ * }
+ * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   EndpointName endpoint =
+   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
+   *   List instances = new ArrayList<>();
+   *   ComputeTokensResponse response = llmUtilityServiceClient.computeTokens(endpoint, instances);
+   * }
+   * }
+ * + * @param endpoint Required. The name of the Endpoint requested to get lists of tokens and token + * ids. + * @param instances Required. The instances that are the input to token computing API call. Schema + * is identical to the prediction schema of the text model, even for the non-text models, like + * chat models, or Codey models. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ComputeTokensResponse computeTokens(EndpointName endpoint, List instances) { + ComputeTokensRequest request = + ComputeTokensRequest.newBuilder() + .setEndpoint(endpoint == null ? null : endpoint.toString()) + .addAllInstances(instances) + .build(); + return computeTokens(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Return a list of tokens based on the input text. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   String endpoint =
+   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *           .toString();
+   *   List instances = new ArrayList<>();
+   *   ComputeTokensResponse response = llmUtilityServiceClient.computeTokens(endpoint, instances);
+   * }
+   * }
+ * + * @param endpoint Required. The name of the Endpoint requested to get lists of tokens and token + * ids. + * @param instances Required. The instances that are the input to token computing API call. Schema + * is identical to the prediction schema of the text model, even for the non-text models, like + * chat models, or Codey models. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ComputeTokensResponse computeTokens(String endpoint, List instances) { + ComputeTokensRequest request = + ComputeTokensRequest.newBuilder().setEndpoint(endpoint).addAllInstances(instances).build(); + return computeTokens(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Return a list of tokens based on the input text. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   ComputeTokensRequest request =
+   *       ComputeTokensRequest.newBuilder()
+   *           .setEndpoint(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllInstances(new ArrayList())
+   *           .build();
+   *   ComputeTokensResponse response = llmUtilityServiceClient.computeTokens(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 ComputeTokensResponse computeTokens(ComputeTokensRequest request) { + return computeTokensCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Return a list of tokens based on the input text. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   ComputeTokensRequest request =
+   *       ComputeTokensRequest.newBuilder()
+   *           .setEndpoint(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllInstances(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       llmUtilityServiceClient.computeTokensCallable().futureCall(request);
+   *   // Do something.
+   *   ComputeTokensResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable computeTokensCallable() { + return stub.computeTokensCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : llmUtilityServiceClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       llmUtilityServiceClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         llmUtilityServiceClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a 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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = llmUtilityServiceClient.getLocation(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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a 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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       llmUtilityServiceClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = llmUtilityServiceClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = llmUtilityServiceClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = llmUtilityServiceClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = llmUtilityServiceClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = llmUtilityServiceClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       llmUtilityServiceClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @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 ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/LlmUtilityServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/LlmUtilityServiceSettings.java new file mode 100644 index 000000000000..7fd8418aa2ab --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/LlmUtilityServiceSettings.java @@ -0,0 +1,255 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1; + +import static com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1beta1.stub.LlmUtilityServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 LlmUtilityServiceClient}. + * + *

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

    + *
  • The default service address (aiplatform.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 computeTokens 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
+ * LlmUtilityServiceSettings.Builder llmUtilityServiceSettingsBuilder =
+ *     LlmUtilityServiceSettings.newBuilder();
+ * llmUtilityServiceSettingsBuilder
+ *     .computeTokensSettings()
+ *     .setRetrySettings(
+ *         llmUtilityServiceSettingsBuilder
+ *             .computeTokensSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * LlmUtilityServiceSettings llmUtilityServiceSettings = llmUtilityServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class LlmUtilityServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to computeTokens. */ + public UnaryCallSettings computeTokensSettings() { + return ((LlmUtilityServiceStubSettings) getStubSettings()).computeTokensSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((LlmUtilityServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((LlmUtilityServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((LlmUtilityServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((LlmUtilityServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((LlmUtilityServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final LlmUtilityServiceSettings create(LlmUtilityServiceStubSettings stub) + throws IOException { + return new LlmUtilityServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return LlmUtilityServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return LlmUtilityServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return LlmUtilityServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return LlmUtilityServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return LlmUtilityServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return LlmUtilityServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return LlmUtilityServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected LlmUtilityServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for LlmUtilityServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(LlmUtilityServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(LlmUtilityServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(LlmUtilityServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(LlmUtilityServiceStubSettings.newBuilder()); + } + + public LlmUtilityServiceStubSettings.Builder getStubSettingsBuilder() { + return ((LlmUtilityServiceStubSettings.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 computeTokens. */ + public UnaryCallSettings.Builder + computeTokensSettings() { + return getStubSettingsBuilder().computeTokensSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public LlmUtilityServiceSettings build() throws IOException { + return new LlmUtilityServiceSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceClient.java index 515a563bbed2..bec1cce7c146 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceClient.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceClient.java @@ -1505,6 +1505,174 @@ public final UnaryCallable deletePipelineJo return stub.deletePipelineJobCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Batch deletes PipelineJobs The Operation is atomic. If it fails, none of the PipelineJobs are + * deleted. If it succeeds, all of the PipelineJobs are deleted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   List names = new ArrayList<>();
+   *   BatchDeletePipelineJobsResponse response =
+   *       pipelineServiceClient.batchDeletePipelineJobsAsync(parent, names).get();
+   * }
+   * }
+ * + * @param parent Required. The name of the PipelineJobs' parent resource. Format: + * `projects/{project}/locations/{location}` + * @param names Required. The names of the PipelineJobs to delete. A maximum of 32 PipelineJobs + * can be deleted in a batch. Format: + * `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + batchDeletePipelineJobsAsync(LocationName parent, List names) { + BatchDeletePipelineJobsRequest request = + BatchDeletePipelineJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllNames(names) + .build(); + return batchDeletePipelineJobsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Batch deletes PipelineJobs The Operation is atomic. If it fails, none of the PipelineJobs are + * deleted. If it succeeds, all of the PipelineJobs are deleted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   List names = new ArrayList<>();
+   *   BatchDeletePipelineJobsResponse response =
+   *       pipelineServiceClient.batchDeletePipelineJobsAsync(parent, names).get();
+   * }
+   * }
+ * + * @param parent Required. The name of the PipelineJobs' parent resource. Format: + * `projects/{project}/locations/{location}` + * @param names Required. The names of the PipelineJobs to delete. A maximum of 32 PipelineJobs + * can be deleted in a batch. Format: + * `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + batchDeletePipelineJobsAsync(String parent, List names) { + BatchDeletePipelineJobsRequest request = + BatchDeletePipelineJobsRequest.newBuilder().setParent(parent).addAllNames(names).build(); + return batchDeletePipelineJobsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Batch deletes PipelineJobs The Operation is atomic. If it fails, none of the PipelineJobs are + * deleted. If it succeeds, all of the PipelineJobs are deleted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   BatchDeletePipelineJobsRequest request =
+   *       BatchDeletePipelineJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   BatchDeletePipelineJobsResponse response =
+   *       pipelineServiceClient.batchDeletePipelineJobsAsync(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 + batchDeletePipelineJobsAsync(BatchDeletePipelineJobsRequest request) { + return batchDeletePipelineJobsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Batch deletes PipelineJobs The Operation is atomic. If it fails, none of the PipelineJobs are + * deleted. If it succeeds, all of the PipelineJobs are deleted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   BatchDeletePipelineJobsRequest request =
+   *       BatchDeletePipelineJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   OperationFuture future =
+   *       pipelineServiceClient.batchDeletePipelineJobsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   BatchDeletePipelineJobsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + BatchDeletePipelineJobsRequest, BatchDeletePipelineJobsResponse, DeleteOperationMetadata> + batchDeletePipelineJobsOperationCallable() { + return stub.batchDeletePipelineJobsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Batch deletes PipelineJobs The Operation is atomic. If it fails, none of the PipelineJobs are + * deleted. If it succeeds, all of the PipelineJobs are deleted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   BatchDeletePipelineJobsRequest request =
+   *       BatchDeletePipelineJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       pipelineServiceClient.batchDeletePipelineJobsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchDeletePipelineJobsCallable() { + return stub.batchDeletePipelineJobsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Cancels a PipelineJob. Starts asynchronous cancellation on the PipelineJob. The server makes a diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceSettings.java index 72fc6c780ed9..6f1fd2af7dba 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceSettings.java @@ -156,6 +156,20 @@ public UnaryCallSettings deletePipelineJobS return ((PipelineServiceStubSettings) getStubSettings()).deletePipelineJobOperationSettings(); } + /** Returns the object with the settings used for calls to batchDeletePipelineJobs. */ + public UnaryCallSettings + batchDeletePipelineJobsSettings() { + return ((PipelineServiceStubSettings) getStubSettings()).batchDeletePipelineJobsSettings(); + } + + /** Returns the object with the settings used for calls to batchDeletePipelineJobs. */ + public OperationCallSettings< + BatchDeletePipelineJobsRequest, BatchDeletePipelineJobsResponse, DeleteOperationMetadata> + batchDeletePipelineJobsOperationSettings() { + return ((PipelineServiceStubSettings) getStubSettings()) + .batchDeletePipelineJobsOperationSettings(); + } + /** Returns the object with the settings used for calls to cancelPipelineJob. */ public UnaryCallSettings cancelPipelineJobSettings() { return ((PipelineServiceStubSettings) getStubSettings()).cancelPipelineJobSettings(); @@ -355,6 +369,21 @@ public UnaryCallSettings.Builder getPipeline return getStubSettingsBuilder().deletePipelineJobOperationSettings(); } + /** Returns the builder for the settings used for calls to batchDeletePipelineJobs. */ + public UnaryCallSettings.Builder + batchDeletePipelineJobsSettings() { + return getStubSettingsBuilder().batchDeletePipelineJobsSettings(); + } + + /** Returns the builder for the settings used for calls to batchDeletePipelineJobs. */ + public OperationCallSettings.Builder< + BatchDeletePipelineJobsRequest, + BatchDeletePipelineJobsResponse, + DeleteOperationMetadata> + batchDeletePipelineJobsOperationSettings() { + return getStubSettingsBuilder().batchDeletePipelineJobsOperationSettings(); + } + /** Returns the builder for the settings used for calls to cancelPipelineJob. */ public UnaryCallSettings.Builder cancelPipelineJobSettings() { return getStubSettingsBuilder().cancelPipelineJobSettings(); diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json index 7a5b59754197..3c97b88b819f 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json @@ -659,6 +659,33 @@ } } }, + "LlmUtilityService": { + "clients": { + "grpc": { + "libraryClient": "LlmUtilityServiceClient", + "rpcs": { + "ComputeTokens": { + "methods": ["computeTokens", "computeTokens", "computeTokens", "computeTokensCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + } + } + } + } + }, "MatchService": { "clients": { "grpc": { @@ -991,6 +1018,9 @@ "grpc": { "libraryClient": "PipelineServiceClient", "rpcs": { + "BatchDeletePipelineJobs": { + "methods": ["batchDeletePipelineJobsAsync", "batchDeletePipelineJobsAsync", "batchDeletePipelineJobsAsync", "batchDeletePipelineJobsOperationCallable", "batchDeletePipelineJobsCallable"] + }, "CancelPipelineJob": { "methods": ["cancelPipelineJob", "cancelPipelineJob", "cancelPipelineJob", "cancelPipelineJobCallable"] }, diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java index 7fa82a2bfec5..b66d536a02d5 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java @@ -132,9 +132,9 @@ * FeatureOnlineStoreServiceClient.create()) { * FeatureViewName featureView = * FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); - * String id = "id3355"; + * FeatureViewDataKey dataKey = FeatureViewDataKey.newBuilder().build(); * FetchFeatureValuesResponse response = - * featureOnlineStoreServiceClient.fetchFeatureValues(featureView, id); + * featureOnlineStoreServiceClient.fetchFeatureValues(featureView, dataKey); * } * } * @@ -233,6 +233,26 @@ * } * } * + *

======================= LlmUtilityServiceClient ======================= + * + *

Service Description: Service for LLM related utility functions. + * + *

Sample for LlmUtilityServiceClient: + * + *

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

======================= MatchServiceClient ======================= * *

Service Description: MatchService is a Google managed service for efficient vector similarity diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcLlmUtilityServiceCallableFactory.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcLlmUtilityServiceCallableFactory.java new file mode 100644 index 000000000000..03273d792eef --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcLlmUtilityServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the LlmUtilityService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcLlmUtilityServiceCallableFactory 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-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcLlmUtilityServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcLlmUtilityServiceStub.java new file mode 100644 index 000000000000..e1c31ac8ac65 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcLlmUtilityServiceStub.java @@ -0,0 +1,333 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.stub; + +import static com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient.ListLocationsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest; +import com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 LlmUtilityService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcLlmUtilityServiceStub extends LlmUtilityServiceStub { + private static final MethodDescriptor + computeTokensMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1beta1.LlmUtilityService/ComputeTokens") + .setRequestMarshaller( + ProtoUtils.marshaller(ComputeTokensRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ComputeTokensResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable computeTokensCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcLlmUtilityServiceStub create(LlmUtilityServiceStubSettings settings) + throws IOException { + return new GrpcLlmUtilityServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcLlmUtilityServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcLlmUtilityServiceStub( + LlmUtilityServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcLlmUtilityServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcLlmUtilityServiceStub( + LlmUtilityServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcLlmUtilityServiceStub, 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 GrpcLlmUtilityServiceStub( + LlmUtilityServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcLlmUtilityServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcLlmUtilityServiceStub, 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 GrpcLlmUtilityServiceStub( + LlmUtilityServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings computeTokensTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(computeTokensMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("endpoint", String.valueOf(request.getEndpoint())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + + this.computeTokensCallable = + callableFactory.createUnaryCallable( + computeTokensTransportSettings, settings.computeTokensSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable computeTokensCallable() { + return computeTokensCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @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-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPipelineServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPipelineServiceStub.java index 9cb15f0c607f..b5dd678d1b1b 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPipelineServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPipelineServiceStub.java @@ -29,6 +29,8 @@ 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.aiplatform.v1beta1.BatchDeletePipelineJobsRequest; +import com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse; import com.google.cloud.aiplatform.v1beta1.CancelPipelineJobRequest; import com.google.cloud.aiplatform.v1beta1.CancelTrainingPipelineRequest; import com.google.cloud.aiplatform.v1beta1.CreatePipelineJobRequest; @@ -170,6 +172,17 @@ public class GrpcPipelineServiceStub extends PipelineServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + batchDeletePipelineJobsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.PipelineService/BatchDeletePipelineJobs") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchDeletePipelineJobsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor cancelPipelineJobMethodDescriptor = MethodDescriptor.newBuilder() @@ -249,6 +262,11 @@ public class GrpcPipelineServiceStub extends PipelineServiceStub { private final UnaryCallable deletePipelineJobCallable; private final OperationCallable deletePipelineJobOperationCallable; + private final UnaryCallable + batchDeletePipelineJobsCallable; + private final OperationCallable< + BatchDeletePipelineJobsRequest, BatchDeletePipelineJobsResponse, DeleteOperationMetadata> + batchDeletePipelineJobsOperationCallable; private final UnaryCallable cancelPipelineJobCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable @@ -399,6 +417,17 @@ protected GrpcPipelineServiceStub( return builder.build(); }) .build(); + GrpcCallSettings + batchDeletePipelineJobsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchDeletePipelineJobsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); GrpcCallSettings cancelPipelineJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(cancelPipelineJobMethodDescriptor) @@ -522,6 +551,17 @@ protected GrpcPipelineServiceStub( settings.deletePipelineJobOperationSettings(), clientContext, operationsStub); + this.batchDeletePipelineJobsCallable = + callableFactory.createUnaryCallable( + batchDeletePipelineJobsTransportSettings, + settings.batchDeletePipelineJobsSettings(), + clientContext); + this.batchDeletePipelineJobsOperationCallable = + callableFactory.createOperationCallable( + batchDeletePipelineJobsTransportSettings, + settings.batchDeletePipelineJobsOperationSettings(), + clientContext, + operationsStub); this.cancelPipelineJobCallable = callableFactory.createUnaryCallable( cancelPipelineJobTransportSettings, @@ -628,6 +668,19 @@ public UnaryCallable deletePipelineJobCalla return deletePipelineJobOperationCallable; } + @Override + public UnaryCallable + batchDeletePipelineJobsCallable() { + return batchDeletePipelineJobsCallable; + } + + @Override + public OperationCallable< + BatchDeletePipelineJobsRequest, BatchDeletePipelineJobsResponse, DeleteOperationMetadata> + batchDeletePipelineJobsOperationCallable() { + return batchDeletePipelineJobsOperationCallable; + } + @Override public UnaryCallable cancelPipelineJobCallable() { return cancelPipelineJobCallable; diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/LlmUtilityServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/LlmUtilityServiceStub.java new file mode 100644 index 000000000000..a9fd48663d3e --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/LlmUtilityServiceStub.java @@ -0,0 +1,79 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.stub; + +import static com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient.ListLocationsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest; +import com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the LlmUtilityService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class LlmUtilityServiceStub implements BackgroundResource { + + public UnaryCallable computeTokensCallable() { + throw new UnsupportedOperationException("Not implemented: computeTokensCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/LlmUtilityServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/LlmUtilityServiceStubSettings.java new file mode 100644 index 000000000000..41be55cbd0e4 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/LlmUtilityServiceStubSettings.java @@ -0,0 +1,465 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.stub; + +import static com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient.ListLocationsPagedResponse; + +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.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.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.aiplatform.v1beta1.ComputeTokensRequest; +import com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 LlmUtilityServiceStub}. + * + *

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

    + *
  • The default service address (aiplatform.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 computeTokens 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
+ * LlmUtilityServiceStubSettings.Builder llmUtilityServiceSettingsBuilder =
+ *     LlmUtilityServiceStubSettings.newBuilder();
+ * llmUtilityServiceSettingsBuilder
+ *     .computeTokensSettings()
+ *     .setRetrySettings(
+ *         llmUtilityServiceSettingsBuilder
+ *             .computeTokensSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * LlmUtilityServiceStubSettings llmUtilityServiceSettings =
+ *     llmUtilityServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class LlmUtilityServiceStubSettings 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 + computeTokensSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to computeTokens. */ + public UnaryCallSettings computeTokensSettings() { + return computeTokensSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public LlmUtilityServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcLlmUtilityServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "aiplatform.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "aiplatform.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 ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(LlmUtilityServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected LlmUtilityServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + computeTokensSettings = settingsBuilder.computeTokensSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for LlmUtilityServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + computeTokensSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + 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); + + computeTokensSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + computeTokensSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(LlmUtilityServiceStubSettings settings) { + super(settings); + + computeTokensSettings = settings.computeTokensSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + computeTokensSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .computeTokensSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .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 computeTokens. */ + public UnaryCallSettings.Builder + computeTokensSettings() { + return computeTokensSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @Override + public LlmUtilityServiceStubSettings build() throws IOException { + return new LlmUtilityServiceStubSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PipelineServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PipelineServiceStub.java index 52b87deb9a92..f15f09460b27 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PipelineServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PipelineServiceStub.java @@ -24,6 +24,8 @@ 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.aiplatform.v1beta1.BatchDeletePipelineJobsRequest; +import com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse; import com.google.cloud.aiplatform.v1beta1.CancelPipelineJobRequest; import com.google.cloud.aiplatform.v1beta1.CancelTrainingPipelineRequest; import com.google.cloud.aiplatform.v1beta1.CreatePipelineJobRequest; @@ -129,6 +131,18 @@ public UnaryCallable deletePipelineJobCalla throw new UnsupportedOperationException("Not implemented: deletePipelineJobCallable()"); } + public OperationCallable< + BatchDeletePipelineJobsRequest, BatchDeletePipelineJobsResponse, DeleteOperationMetadata> + batchDeletePipelineJobsOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: batchDeletePipelineJobsOperationCallable()"); + } + + public UnaryCallable + batchDeletePipelineJobsCallable() { + throw new UnsupportedOperationException("Not implemented: batchDeletePipelineJobsCallable()"); + } + public UnaryCallable cancelPipelineJobCallable() { throw new UnsupportedOperationException("Not implemented: cancelPipelineJobCallable()"); } diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PipelineServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PipelineServiceStubSettings.java index d73b998e260c..5b9ed0a0bd50 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PipelineServiceStubSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PipelineServiceStubSettings.java @@ -46,6 +46,8 @@ 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.aiplatform.v1beta1.BatchDeletePipelineJobsRequest; +import com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse; import com.google.cloud.aiplatform.v1beta1.CancelPipelineJobRequest; import com.google.cloud.aiplatform.v1beta1.CancelTrainingPipelineRequest; import com.google.cloud.aiplatform.v1beta1.CreatePipelineJobRequest; @@ -148,6 +150,11 @@ public class PipelineServiceStubSettings extends StubSettings deletePipelineJobSettings; private final OperationCallSettings deletePipelineJobOperationSettings; + private final UnaryCallSettings + batchDeletePipelineJobsSettings; + private final OperationCallSettings< + BatchDeletePipelineJobsRequest, BatchDeletePipelineJobsResponse, DeleteOperationMetadata> + batchDeletePipelineJobsOperationSettings; private final UnaryCallSettings cancelPipelineJobSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> @@ -401,6 +408,19 @@ public UnaryCallSettings deletePipelineJobS return deletePipelineJobOperationSettings; } + /** Returns the object with the settings used for calls to batchDeletePipelineJobs. */ + public UnaryCallSettings + batchDeletePipelineJobsSettings() { + return batchDeletePipelineJobsSettings; + } + + /** Returns the object with the settings used for calls to batchDeletePipelineJobs. */ + public OperationCallSettings< + BatchDeletePipelineJobsRequest, BatchDeletePipelineJobsResponse, DeleteOperationMetadata> + batchDeletePipelineJobsOperationSettings() { + return batchDeletePipelineJobsOperationSettings; + } + /** Returns the object with the settings used for calls to cancelPipelineJob. */ public UnaryCallSettings cancelPipelineJobSettings() { return cancelPipelineJobSettings; @@ -521,6 +541,9 @@ protected PipelineServiceStubSettings(Builder settingsBuilder) throws IOExceptio deletePipelineJobSettings = settingsBuilder.deletePipelineJobSettings().build(); deletePipelineJobOperationSettings = settingsBuilder.deletePipelineJobOperationSettings().build(); + batchDeletePipelineJobsSettings = settingsBuilder.batchDeletePipelineJobsSettings().build(); + batchDeletePipelineJobsOperationSettings = + settingsBuilder.batchDeletePipelineJobsOperationSettings().build(); cancelPipelineJobSettings = settingsBuilder.cancelPipelineJobSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); @@ -560,6 +583,13 @@ public static class Builder extends StubSettings.Builder deletePipelineJobOperationSettings; + private final UnaryCallSettings.Builder + batchDeletePipelineJobsSettings; + private final OperationCallSettings.Builder< + BatchDeletePipelineJobsRequest, + BatchDeletePipelineJobsResponse, + DeleteOperationMetadata> + batchDeletePipelineJobsOperationSettings; private final UnaryCallSettings.Builder cancelPipelineJobSettings; private final PagedCallSettings.Builder< @@ -619,6 +649,8 @@ protected Builder(ClientContext clientContext) { listPipelineJobsSettings = PagedCallSettings.newBuilder(LIST_PIPELINE_JOBS_PAGE_STR_FACT); deletePipelineJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deletePipelineJobOperationSettings = OperationCallSettings.newBuilder(); + batchDeletePipelineJobsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchDeletePipelineJobsOperationSettings = OperationCallSettings.newBuilder(); cancelPipelineJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -637,6 +669,7 @@ protected Builder(ClientContext clientContext) { getPipelineJobSettings, listPipelineJobsSettings, deletePipelineJobSettings, + batchDeletePipelineJobsSettings, cancelPipelineJobSettings, listLocationsSettings, getLocationSettings, @@ -661,6 +694,9 @@ protected Builder(PipelineServiceStubSettings settings) { listPipelineJobsSettings = settings.listPipelineJobsSettings.toBuilder(); deletePipelineJobSettings = settings.deletePipelineJobSettings.toBuilder(); deletePipelineJobOperationSettings = settings.deletePipelineJobOperationSettings.toBuilder(); + batchDeletePipelineJobsSettings = settings.batchDeletePipelineJobsSettings.toBuilder(); + batchDeletePipelineJobsOperationSettings = + settings.batchDeletePipelineJobsOperationSettings.toBuilder(); cancelPipelineJobSettings = settings.cancelPipelineJobSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -679,6 +715,7 @@ protected Builder(PipelineServiceStubSettings settings) { getPipelineJobSettings, listPipelineJobsSettings, deletePipelineJobSettings, + batchDeletePipelineJobsSettings, cancelPipelineJobSettings, listLocationsSettings, getLocationSettings, @@ -746,6 +783,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .batchDeletePipelineJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .cancelPipelineJobSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -824,6 +866,31 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder + .batchDeletePipelineJobsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + BatchDeletePipelineJobsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteOperationMetadata.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; } @@ -916,6 +983,23 @@ public UnaryCallSettings.Builder getPipeline return deletePipelineJobOperationSettings; } + /** Returns the builder for the settings used for calls to batchDeletePipelineJobs. */ + public UnaryCallSettings.Builder + batchDeletePipelineJobsSettings() { + return batchDeletePipelineJobsSettings; + } + + /** Returns the builder for the settings used for calls to batchDeletePipelineJobs. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + BatchDeletePipelineJobsRequest, + BatchDeletePipelineJobsResponse, + DeleteOperationMetadata> + batchDeletePipelineJobsOperationSettings() { + return batchDeletePipelineJobsOperationSettings; + } + /** Returns the builder for the settings used for calls to cancelPipelineJob. */ public UnaryCallSettings.Builder cancelPipelineJobSettings() { return cancelPipelineJobSettings; diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1/reflect-config.json b/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1/reflect-config.json index 450a6d45a85c..d4232da73a20 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1/reflect-config.json +++ b/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1/reflect-config.json @@ -1475,6 +1475,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.ComputeTokensRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ComputeTokensRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ComputeTokensResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ComputeTokensResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.ContainerRegistryDestination", "queryAllDeclaredConstructors": true, @@ -1583,6 +1619,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.CountTokensRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CountTokensRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CountTokensResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CountTokensResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.CreateArtifactRequest", "queryAllDeclaredConstructors": true, @@ -1835,6 +1907,78 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.CreateFeatureOperationMetadata", "queryAllDeclaredConstructors": true, @@ -1871,6 +2015,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CreateFeatureViewRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CreateFeatureViewRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.CreateFeaturestoreOperationMetadata", "queryAllDeclaredConstructors": true, @@ -2105,6 +2285,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.CreateScheduleRequest", "queryAllDeclaredConstructors": true, @@ -2663,6 +2861,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.DeleteFeatureRequest", "queryAllDeclaredConstructors": true, @@ -2807,6 +3041,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.DeleteFeaturestoreRequest", "queryAllDeclaredConstructors": true, @@ -4437,7 +4689,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeatureNoiseSigma", + "name": "com.google.cloud.aiplatform.v1.FeatureGroup", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4446,7 +4698,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeatureNoiseSigma$Builder", + "name": "com.google.cloud.aiplatform.v1.FeatureGroup$BigQuery", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4455,7 +4707,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeatureNoiseSigma$NoiseSigmaForFeature", + "name": "com.google.cloud.aiplatform.v1.FeatureGroup$BigQuery$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4464,7 +4716,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeatureNoiseSigma$NoiseSigmaForFeature$Builder", + "name": "com.google.cloud.aiplatform.v1.FeatureGroup$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4473,7 +4725,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeatureSelector", + "name": "com.google.cloud.aiplatform.v1.FeatureNoiseSigma", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4482,7 +4734,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeatureSelector$Builder", + "name": "com.google.cloud.aiplatform.v1.FeatureNoiseSigma$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4491,7 +4743,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeatureStatsAnomaly", + "name": "com.google.cloud.aiplatform.v1.FeatureNoiseSigma$NoiseSigmaForFeature", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4500,7 +4752,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeatureStatsAnomaly$Builder", + "name": "com.google.cloud.aiplatform.v1.FeatureNoiseSigma$NoiseSigmaForFeature$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4509,7 +4761,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeatureValue", + "name": "com.google.cloud.aiplatform.v1.FeatureOnlineStore", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4518,7 +4770,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeatureValue$Builder", + "name": "com.google.cloud.aiplatform.v1.FeatureOnlineStore$Bigtable", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4527,7 +4779,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeatureValue$Metadata", + "name": "com.google.cloud.aiplatform.v1.FeatureOnlineStore$Bigtable$AutoScaling", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4536,7 +4788,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeatureValue$Metadata$Builder", + "name": "com.google.cloud.aiplatform.v1.FeatureOnlineStore$Bigtable$AutoScaling$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4545,7 +4797,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeatureValueDestination", + "name": "com.google.cloud.aiplatform.v1.FeatureOnlineStore$Bigtable$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4554,7 +4806,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeatureValueDestination$Builder", + "name": "com.google.cloud.aiplatform.v1.FeatureOnlineStore$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4563,7 +4815,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeatureValueList", + "name": "com.google.cloud.aiplatform.v1.FeatureOnlineStore$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4572,7 +4824,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeatureValueList$Builder", + "name": "com.google.cloud.aiplatform.v1.FeatureSelector", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4581,7 +4833,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Featurestore", + "name": "com.google.cloud.aiplatform.v1.FeatureSelector$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4590,7 +4842,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Featurestore$Builder", + "name": "com.google.cloud.aiplatform.v1.FeatureStatsAnomaly", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4599,7 +4851,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Featurestore$OnlineServingConfig", + "name": "com.google.cloud.aiplatform.v1.FeatureStatsAnomaly$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4608,7 +4860,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Featurestore$OnlineServingConfig$Builder", + "name": "com.google.cloud.aiplatform.v1.FeatureValue", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4617,7 +4869,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Featurestore$OnlineServingConfig$Scaling", + "name": "com.google.cloud.aiplatform.v1.FeatureValue$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4626,7 +4878,304 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Featurestore$OnlineServingConfig$Scaling$Builder", + "name": "com.google.cloud.aiplatform.v1.FeatureValue$Metadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeatureValue$Metadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeatureValueDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeatureValueDestination$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeatureValueList", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeatureValueList$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeatureView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeatureView$BigQuerySource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeatureView$BigQuerySource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeatureView$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeatureView$FeatureRegistrySource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeatureView$FeatureRegistrySource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeatureView$FeatureRegistrySource$FeatureGroup", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeatureView$FeatureRegistrySource$FeatureGroup$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeatureView$SyncConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeatureView$SyncConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeatureViewDataFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeatureViewDataKey", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeatureViewDataKey$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeatureViewSync", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeatureViewSync$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.Featurestore", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.Featurestore$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.Featurestore$OnlineServingConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.Featurestore$OnlineServingConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.Featurestore$OnlineServingConfig$Scaling", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.Featurestore$OnlineServingConfig$Scaling$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.Featurestore$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig$ImportFeaturesAnalysis", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig$ImportFeaturesAnalysis$Baseline", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig$ImportFeaturesAnalysis$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig$ImportFeaturesAnalysis$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4635,7 +5184,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Featurestore$State", + "name": "com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig$SnapshotAnalysis", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4644,7 +5193,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig", + "name": "com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig$SnapshotAnalysis$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4653,7 +5202,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig$Builder", + "name": "com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig$ThresholdConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4662,7 +5211,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig$ImportFeaturesAnalysis", + "name": "com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig$ThresholdConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4671,7 +5220,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig$ImportFeaturesAnalysis$Baseline", + "name": "com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4680,7 +5229,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig$ImportFeaturesAnalysis$Builder", + "name": "com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4689,7 +5238,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig$ImportFeaturesAnalysis$State", + "name": "com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4698,7 +5247,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig$SnapshotAnalysis", + "name": "com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4707,7 +5256,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig$SnapshotAnalysis$Builder", + "name": "com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse$FeatureNameValuePairList", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4716,7 +5265,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig$ThresholdConfig", + "name": "com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse$FeatureNameValuePairList$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4725,7 +5274,16 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig$ThresholdConfig$Builder", + "name": "com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse$FeatureNameValuePairList$FeatureNameValuePair", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse$FeatureNameValuePairList$FeatureNameValuePair$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5111,6 +5669,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.GetFeatureGroupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.GetFeatureGroupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.GetFeatureRequest", "queryAllDeclaredConstructors": true, @@ -5129,6 +5723,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.GetFeatureViewRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.GetFeatureViewRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.GetFeaturestoreRequest", "queryAllDeclaredConstructors": true, @@ -5804,6 +6434,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.IndexDatapoint$NumericRestriction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.IndexDatapoint$NumericRestriction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.IndexDatapoint$NumericRestriction$Operator", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.IndexDatapoint$Restriction", "queryAllDeclaredConstructors": true, @@ -6192,7 +6849,151 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest", + "name": "com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListDatasetVersionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListDatasetVersionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListDatasetVersionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListDatasetVersionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListDatasetsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListDatasetsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListDatasetsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListDatasetsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListEndpointsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListEndpointsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListEndpointsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListEndpointsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListEntityTypesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6201,7 +7002,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest$Builder", + "name": "com.google.cloud.aiplatform.v1.ListEntityTypesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6210,7 +7011,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse", + "name": "com.google.cloud.aiplatform.v1.ListEntityTypesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6219,7 +7020,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse$Builder", + "name": "com.google.cloud.aiplatform.v1.ListEntityTypesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6228,7 +7029,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListDatasetVersionsRequest", + "name": "com.google.cloud.aiplatform.v1.ListExecutionsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6237,7 +7038,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListDatasetVersionsRequest$Builder", + "name": "com.google.cloud.aiplatform.v1.ListExecutionsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6246,7 +7047,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListDatasetVersionsResponse", + "name": "com.google.cloud.aiplatform.v1.ListExecutionsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6255,7 +7056,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListDatasetVersionsResponse$Builder", + "name": "com.google.cloud.aiplatform.v1.ListExecutionsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6264,7 +7065,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListDatasetsRequest", + "name": "com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6273,7 +7074,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListDatasetsRequest$Builder", + "name": "com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6282,7 +7083,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListDatasetsResponse", + "name": "com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6291,7 +7092,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListDatasetsResponse$Builder", + "name": "com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6300,7 +7101,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListEndpointsRequest", + "name": "com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6309,7 +7110,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListEndpointsRequest$Builder", + "name": "com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6318,7 +7119,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListEndpointsResponse", + "name": "com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6327,7 +7128,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListEndpointsResponse$Builder", + "name": "com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6336,7 +7137,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListEntityTypesRequest", + "name": "com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6345,7 +7146,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListEntityTypesRequest$Builder", + "name": "com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6354,7 +7155,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListEntityTypesResponse", + "name": "com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6363,7 +7164,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListEntityTypesResponse$Builder", + "name": "com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6372,7 +7173,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListExecutionsRequest", + "name": "com.google.cloud.aiplatform.v1.ListFeatureViewsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6381,7 +7182,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListExecutionsRequest$Builder", + "name": "com.google.cloud.aiplatform.v1.ListFeatureViewsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6390,7 +7191,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListExecutionsResponse", + "name": "com.google.cloud.aiplatform.v1.ListFeatureViewsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6399,7 +7200,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListExecutionsResponse$Builder", + "name": "com.google.cloud.aiplatform.v1.ListFeatureViewsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -9215,6 +10016,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.Probe", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.Probe$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.Probe$ExecAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.Probe$ExecAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.PublisherModel", "queryAllDeclaredConstructors": true, @@ -10952,6 +11789,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.StudySpec$StudyStoppingConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.StudySpec$StudyStoppingConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.StudyTimeConstraint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.StudyTimeConstraint$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.SuggestTrialsMetadata", "queryAllDeclaredConstructors": true, @@ -11006,6 +11879,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.SyncFeatureViewRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SyncFeatureViewRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SyncFeatureViewResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SyncFeatureViewResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.TFRecordDestination", "queryAllDeclaredConstructors": true, @@ -11276,6 +12185,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.TokensInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.TokensInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.TrainingConfig", "queryAllDeclaredConstructors": true, @@ -11663,6 +12590,96 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.UpdateFeatureRequest", "queryAllDeclaredConstructors": true, @@ -11681,6 +12698,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.UpdateFeaturestoreOperationMetadata", "queryAllDeclaredConstructors": true, diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json b/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json index 2cc3c82a9ace..ad922dbcf1ec 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json +++ b/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json @@ -827,6 +827,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest", "queryAllDeclaredConstructors": true, @@ -1475,6 +1511,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.ContainerRegistryDestination", "queryAllDeclaredConstructors": true, @@ -5246,6 +5318,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.FeatureViewDataFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.FeatureViewSync", "queryAllDeclaredConstructors": true, @@ -6677,6 +6776,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.IndexDatapoint$NumericRestriction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.IndexDatapoint$NumericRestriction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.IndexDatapoint$NumericRestriction$Operator", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.IndexDatapoint$Restriction", "queryAllDeclaredConstructors": true, @@ -10511,6 +10637,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.Probe", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.Probe$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.Probe$ExecAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.Probe$ExecAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.PublisherModel", "queryAllDeclaredConstructors": true, @@ -12464,6 +12626,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.StudySpec$StudyStoppingConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.StudySpec$StudyStoppingConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.StudySpec$TransferLearningConfig", "queryAllDeclaredConstructors": true, @@ -12482,6 +12662,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.SuggestTrialsMetadata", "queryAllDeclaredConstructors": true, @@ -12842,6 +13040,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.TokensInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.TokensInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.TrainingConfig", "queryAllDeclaredConstructors": true, diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceClientTest.java new file mode 100644 index 000000000000..fa7fbfcf3820 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceClientTest.java @@ -0,0 +1,1547 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1; + +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient.ListFeatureOnlineStoresPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient.ListFeatureViewSyncsPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient.ListFeatureViewsPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient.ListLocationsPagedResponse; + +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.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +import com.google.type.Interval; +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 FeatureOnlineStoreAdminServiceClientTest { + private static MockFeatureOnlineStoreAdminService mockFeatureOnlineStoreAdminService; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private FeatureOnlineStoreAdminServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockFeatureOnlineStoreAdminService = new MockFeatureOnlineStoreAdminService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList( + mockFeatureOnlineStoreAdminService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + FeatureOnlineStoreAdminServiceSettings settings = + FeatureOnlineStoreAdminServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = FeatureOnlineStoreAdminServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createFeatureOnlineStoreTest() throws Exception { + FeatureOnlineStore expectedResponse = + FeatureOnlineStore.newBuilder() + .setName( + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFeatureOnlineStoreTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + FeatureOnlineStore featureOnlineStore = FeatureOnlineStore.newBuilder().build(); + String featureOnlineStoreId = "featureOnlineStoreId1046065331"; + + FeatureOnlineStore actualResponse = + client + .createFeatureOnlineStoreAsync(parent, featureOnlineStore, featureOnlineStoreId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFeatureOnlineStoreRequest actualRequest = + ((CreateFeatureOnlineStoreRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(featureOnlineStore, actualRequest.getFeatureOnlineStore()); + Assert.assertEquals(featureOnlineStoreId, actualRequest.getFeatureOnlineStoreId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFeatureOnlineStoreExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + FeatureOnlineStore featureOnlineStore = FeatureOnlineStore.newBuilder().build(); + String featureOnlineStoreId = "featureOnlineStoreId1046065331"; + client.createFeatureOnlineStoreAsync(parent, featureOnlineStore, featureOnlineStoreId).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 createFeatureOnlineStoreTest2() throws Exception { + FeatureOnlineStore expectedResponse = + FeatureOnlineStore.newBuilder() + .setName( + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFeatureOnlineStoreTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(resultOperation); + + String parent = "parent-995424086"; + FeatureOnlineStore featureOnlineStore = FeatureOnlineStore.newBuilder().build(); + String featureOnlineStoreId = "featureOnlineStoreId1046065331"; + + FeatureOnlineStore actualResponse = + client + .createFeatureOnlineStoreAsync(parent, featureOnlineStore, featureOnlineStoreId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFeatureOnlineStoreRequest actualRequest = + ((CreateFeatureOnlineStoreRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(featureOnlineStore, actualRequest.getFeatureOnlineStore()); + Assert.assertEquals(featureOnlineStoreId, actualRequest.getFeatureOnlineStoreId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFeatureOnlineStoreExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + FeatureOnlineStore featureOnlineStore = FeatureOnlineStore.newBuilder().build(); + String featureOnlineStoreId = "featureOnlineStoreId1046065331"; + client.createFeatureOnlineStoreAsync(parent, featureOnlineStore, featureOnlineStoreId).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 getFeatureOnlineStoreTest() throws Exception { + FeatureOnlineStore expectedResponse = + FeatureOnlineStore.newBuilder() + .setName( + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(expectedResponse); + + FeatureOnlineStoreName name = + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]"); + + FeatureOnlineStore actualResponse = client.getFeatureOnlineStore(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFeatureOnlineStoreRequest actualRequest = + ((GetFeatureOnlineStoreRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFeatureOnlineStoreExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + FeatureOnlineStoreName name = + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]"); + client.getFeatureOnlineStore(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFeatureOnlineStoreTest2() throws Exception { + FeatureOnlineStore expectedResponse = + FeatureOnlineStore.newBuilder() + .setName( + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + FeatureOnlineStore actualResponse = client.getFeatureOnlineStore(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFeatureOnlineStoreRequest actualRequest = + ((GetFeatureOnlineStoreRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFeatureOnlineStoreExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + String name = "name3373707"; + client.getFeatureOnlineStore(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFeatureOnlineStoresTest() throws Exception { + FeatureOnlineStore responsesElement = FeatureOnlineStore.newBuilder().build(); + ListFeatureOnlineStoresResponse expectedResponse = + ListFeatureOnlineStoresResponse.newBuilder() + .setNextPageToken("") + .addAllFeatureOnlineStores(Arrays.asList(responsesElement)) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListFeatureOnlineStoresPagedResponse pagedListResponse = client.listFeatureOnlineStores(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFeatureOnlineStoresList().get(0), resources.get(0)); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFeatureOnlineStoresRequest actualRequest = + ((ListFeatureOnlineStoresRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFeatureOnlineStoresExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listFeatureOnlineStores(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFeatureOnlineStoresTest2() throws Exception { + FeatureOnlineStore responsesElement = FeatureOnlineStore.newBuilder().build(); + ListFeatureOnlineStoresResponse expectedResponse = + ListFeatureOnlineStoresResponse.newBuilder() + .setNextPageToken("") + .addAllFeatureOnlineStores(Arrays.asList(responsesElement)) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListFeatureOnlineStoresPagedResponse pagedListResponse = client.listFeatureOnlineStores(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFeatureOnlineStoresList().get(0), resources.get(0)); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFeatureOnlineStoresRequest actualRequest = + ((ListFeatureOnlineStoresRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFeatureOnlineStoresExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listFeatureOnlineStores(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateFeatureOnlineStoreTest() throws Exception { + FeatureOnlineStore expectedResponse = + FeatureOnlineStore.newBuilder() + .setName( + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateFeatureOnlineStoreTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(resultOperation); + + FeatureOnlineStore featureOnlineStore = FeatureOnlineStore.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + FeatureOnlineStore actualResponse = + client.updateFeatureOnlineStoreAsync(featureOnlineStore, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateFeatureOnlineStoreRequest actualRequest = + ((UpdateFeatureOnlineStoreRequest) actualRequests.get(0)); + + Assert.assertEquals(featureOnlineStore, actualRequest.getFeatureOnlineStore()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateFeatureOnlineStoreExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + FeatureOnlineStore featureOnlineStore = FeatureOnlineStore.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateFeatureOnlineStoreAsync(featureOnlineStore, 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 deleteFeatureOnlineStoreTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteFeatureOnlineStoreTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(resultOperation); + + FeatureOnlineStoreName name = + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]"); + boolean force = true; + + client.deleteFeatureOnlineStoreAsync(name, force).get(); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFeatureOnlineStoreRequest actualRequest = + ((DeleteFeatureOnlineStoreRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(force, actualRequest.getForce()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFeatureOnlineStoreExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + FeatureOnlineStoreName name = + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]"); + boolean force = true; + client.deleteFeatureOnlineStoreAsync(name, force).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 deleteFeatureOnlineStoreTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteFeatureOnlineStoreTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(resultOperation); + + String name = "name3373707"; + boolean force = true; + + client.deleteFeatureOnlineStoreAsync(name, force).get(); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFeatureOnlineStoreRequest actualRequest = + ((DeleteFeatureOnlineStoreRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(force, actualRequest.getForce()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFeatureOnlineStoreExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + String name = "name3373707"; + boolean force = true; + client.deleteFeatureOnlineStoreAsync(name, force).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 createFeatureViewTest() throws Exception { + FeatureView expectedResponse = + FeatureView.newBuilder() + .setName( + FeatureViewName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setSyncConfig(FeatureView.SyncConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFeatureViewTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(resultOperation); + + FeatureOnlineStoreName parent = + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]"); + FeatureView featureView = FeatureView.newBuilder().build(); + String featureViewId = "featureViewId-1437334218"; + + FeatureView actualResponse = + client.createFeatureViewAsync(parent, featureView, featureViewId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFeatureViewRequest actualRequest = ((CreateFeatureViewRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(featureView, actualRequest.getFeatureView()); + Assert.assertEquals(featureViewId, actualRequest.getFeatureViewId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFeatureViewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + FeatureOnlineStoreName parent = + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]"); + FeatureView featureView = FeatureView.newBuilder().build(); + String featureViewId = "featureViewId-1437334218"; + client.createFeatureViewAsync(parent, featureView, featureViewId).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 createFeatureViewTest2() throws Exception { + FeatureView expectedResponse = + FeatureView.newBuilder() + .setName( + FeatureViewName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setSyncConfig(FeatureView.SyncConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFeatureViewTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(resultOperation); + + String parent = "parent-995424086"; + FeatureView featureView = FeatureView.newBuilder().build(); + String featureViewId = "featureViewId-1437334218"; + + FeatureView actualResponse = + client.createFeatureViewAsync(parent, featureView, featureViewId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFeatureViewRequest actualRequest = ((CreateFeatureViewRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(featureView, actualRequest.getFeatureView()); + Assert.assertEquals(featureViewId, actualRequest.getFeatureViewId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFeatureViewExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + FeatureView featureView = FeatureView.newBuilder().build(); + String featureViewId = "featureViewId-1437334218"; + client.createFeatureViewAsync(parent, featureView, featureViewId).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 getFeatureViewTest() throws Exception { + FeatureView expectedResponse = + FeatureView.newBuilder() + .setName( + FeatureViewName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setSyncConfig(FeatureView.SyncConfig.newBuilder().build()) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(expectedResponse); + + FeatureViewName name = + FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); + + FeatureView actualResponse = client.getFeatureView(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFeatureViewRequest actualRequest = ((GetFeatureViewRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFeatureViewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + FeatureViewName name = + FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); + client.getFeatureView(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFeatureViewTest2() throws Exception { + FeatureView expectedResponse = + FeatureView.newBuilder() + .setName( + FeatureViewName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setSyncConfig(FeatureView.SyncConfig.newBuilder().build()) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + FeatureView actualResponse = client.getFeatureView(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFeatureViewRequest actualRequest = ((GetFeatureViewRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFeatureViewExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + String name = "name3373707"; + client.getFeatureView(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFeatureViewsTest() throws Exception { + FeatureView responsesElement = FeatureView.newBuilder().build(); + ListFeatureViewsResponse expectedResponse = + ListFeatureViewsResponse.newBuilder() + .setNextPageToken("") + .addAllFeatureViews(Arrays.asList(responsesElement)) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(expectedResponse); + + FeatureOnlineStoreName parent = + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]"); + + ListFeatureViewsPagedResponse pagedListResponse = client.listFeatureViews(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFeatureViewsList().get(0), resources.get(0)); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFeatureViewsRequest actualRequest = ((ListFeatureViewsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFeatureViewsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + FeatureOnlineStoreName parent = + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]"); + client.listFeatureViews(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFeatureViewsTest2() throws Exception { + FeatureView responsesElement = FeatureView.newBuilder().build(); + ListFeatureViewsResponse expectedResponse = + ListFeatureViewsResponse.newBuilder() + .setNextPageToken("") + .addAllFeatureViews(Arrays.asList(responsesElement)) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListFeatureViewsPagedResponse pagedListResponse = client.listFeatureViews(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFeatureViewsList().get(0), resources.get(0)); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFeatureViewsRequest actualRequest = ((ListFeatureViewsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFeatureViewsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listFeatureViews(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateFeatureViewTest() throws Exception { + FeatureView expectedResponse = + FeatureView.newBuilder() + .setName( + FeatureViewName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setSyncConfig(FeatureView.SyncConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateFeatureViewTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(resultOperation); + + FeatureView featureView = FeatureView.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + FeatureView actualResponse = client.updateFeatureViewAsync(featureView, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateFeatureViewRequest actualRequest = ((UpdateFeatureViewRequest) actualRequests.get(0)); + + Assert.assertEquals(featureView, actualRequest.getFeatureView()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateFeatureViewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + FeatureView featureView = FeatureView.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateFeatureViewAsync(featureView, 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 deleteFeatureViewTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteFeatureViewTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(resultOperation); + + FeatureViewName name = + FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); + + client.deleteFeatureViewAsync(name).get(); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFeatureViewRequest actualRequest = ((DeleteFeatureViewRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFeatureViewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + FeatureViewName name = + FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); + client.deleteFeatureViewAsync(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 deleteFeatureViewTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteFeatureViewTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteFeatureViewAsync(name).get(); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFeatureViewRequest actualRequest = ((DeleteFeatureViewRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFeatureViewExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + String name = "name3373707"; + client.deleteFeatureViewAsync(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 syncFeatureViewTest() throws Exception { + SyncFeatureViewResponse expectedResponse = + SyncFeatureViewResponse.newBuilder() + .setFeatureViewSync("featureViewSync1701607414") + .build(); + mockFeatureOnlineStoreAdminService.addResponse(expectedResponse); + + FeatureViewName featureView = + FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); + + SyncFeatureViewResponse actualResponse = client.syncFeatureView(featureView); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SyncFeatureViewRequest actualRequest = ((SyncFeatureViewRequest) actualRequests.get(0)); + + Assert.assertEquals(featureView.toString(), actualRequest.getFeatureView()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void syncFeatureViewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + FeatureViewName featureView = + FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); + client.syncFeatureView(featureView); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void syncFeatureViewTest2() throws Exception { + SyncFeatureViewResponse expectedResponse = + SyncFeatureViewResponse.newBuilder() + .setFeatureViewSync("featureViewSync1701607414") + .build(); + mockFeatureOnlineStoreAdminService.addResponse(expectedResponse); + + String featureView = "featureView-376914245"; + + SyncFeatureViewResponse actualResponse = client.syncFeatureView(featureView); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SyncFeatureViewRequest actualRequest = ((SyncFeatureViewRequest) actualRequests.get(0)); + + Assert.assertEquals(featureView, actualRequest.getFeatureView()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void syncFeatureViewExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + String featureView = "featureView-376914245"; + client.syncFeatureView(featureView); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFeatureViewSyncTest() throws Exception { + FeatureViewSync expectedResponse = + FeatureViewSync.newBuilder() + .setName( + FeatureViewSyncName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setRunTime(Interval.newBuilder().build()) + .setFinalStatus(Status.newBuilder().build()) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(expectedResponse); + + FeatureViewSyncName name = + FeatureViewSyncName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); + + FeatureViewSync actualResponse = client.getFeatureViewSync(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFeatureViewSyncRequest actualRequest = ((GetFeatureViewSyncRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFeatureViewSyncExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + FeatureViewSyncName name = + FeatureViewSyncName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); + client.getFeatureViewSync(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFeatureViewSyncTest2() throws Exception { + FeatureViewSync expectedResponse = + FeatureViewSync.newBuilder() + .setName( + FeatureViewSyncName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setRunTime(Interval.newBuilder().build()) + .setFinalStatus(Status.newBuilder().build()) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + FeatureViewSync actualResponse = client.getFeatureViewSync(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFeatureViewSyncRequest actualRequest = ((GetFeatureViewSyncRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFeatureViewSyncExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + String name = "name3373707"; + client.getFeatureViewSync(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFeatureViewSyncsTest() throws Exception { + FeatureViewSync responsesElement = FeatureViewSync.newBuilder().build(); + ListFeatureViewSyncsResponse expectedResponse = + ListFeatureViewSyncsResponse.newBuilder() + .setNextPageToken("") + .addAllFeatureViewSyncs(Arrays.asList(responsesElement)) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(expectedResponse); + + FeatureViewName parent = + FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); + + ListFeatureViewSyncsPagedResponse pagedListResponse = client.listFeatureViewSyncs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFeatureViewSyncsList().get(0), resources.get(0)); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFeatureViewSyncsRequest actualRequest = + ((ListFeatureViewSyncsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFeatureViewSyncsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + FeatureViewName parent = + FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); + client.listFeatureViewSyncs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFeatureViewSyncsTest2() throws Exception { + FeatureViewSync responsesElement = FeatureViewSync.newBuilder().build(); + ListFeatureViewSyncsResponse expectedResponse = + ListFeatureViewSyncsResponse.newBuilder() + .setNextPageToken("") + .addAllFeatureViewSyncs(Arrays.asList(responsesElement)) + .build(); + mockFeatureOnlineStoreAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListFeatureViewSyncsPagedResponse pagedListResponse = client.listFeatureViewSyncs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFeatureViewSyncsList().get(0), resources.get(0)); + + List actualRequests = mockFeatureOnlineStoreAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFeatureViewSyncsRequest actualRequest = + ((ListFeatureViewSyncsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFeatureViewSyncsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listFeatureViewSyncs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceClientTest.java new file mode 100644 index 000000000000..8e6acb655b7e --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceClientTest.java @@ -0,0 +1,445 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1; + +import static com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient.ListLocationsPagedResponse; + +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.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.FieldMask; +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 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 FeatureOnlineStoreServiceClientTest { + private static MockFeatureOnlineStoreService mockFeatureOnlineStoreService; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private FeatureOnlineStoreServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockFeatureOnlineStoreService = new MockFeatureOnlineStoreService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList( + mockFeatureOnlineStoreService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + FeatureOnlineStoreServiceSettings settings = + FeatureOnlineStoreServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = FeatureOnlineStoreServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void fetchFeatureValuesTest() throws Exception { + FetchFeatureValuesResponse expectedResponse = FetchFeatureValuesResponse.newBuilder().build(); + mockFeatureOnlineStoreService.addResponse(expectedResponse); + + FeatureViewName featureView = + FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); + FeatureViewDataKey dataKey = FeatureViewDataKey.newBuilder().build(); + + FetchFeatureValuesResponse actualResponse = client.fetchFeatureValues(featureView, dataKey); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureOnlineStoreService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FetchFeatureValuesRequest actualRequest = ((FetchFeatureValuesRequest) actualRequests.get(0)); + + Assert.assertEquals(featureView.toString(), actualRequest.getFeatureView()); + Assert.assertEquals(dataKey, actualRequest.getDataKey()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void fetchFeatureValuesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreService.addException(exception); + + try { + FeatureViewName featureView = + FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); + FeatureViewDataKey dataKey = FeatureViewDataKey.newBuilder().build(); + client.fetchFeatureValues(featureView, dataKey); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchFeatureValuesTest2() throws Exception { + FetchFeatureValuesResponse expectedResponse = FetchFeatureValuesResponse.newBuilder().build(); + mockFeatureOnlineStoreService.addResponse(expectedResponse); + + String featureView = "featureView-376914245"; + FeatureViewDataKey dataKey = FeatureViewDataKey.newBuilder().build(); + + FetchFeatureValuesResponse actualResponse = client.fetchFeatureValues(featureView, dataKey); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureOnlineStoreService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FetchFeatureValuesRequest actualRequest = ((FetchFeatureValuesRequest) actualRequests.get(0)); + + Assert.assertEquals(featureView, actualRequest.getFeatureView()); + Assert.assertEquals(dataKey, actualRequest.getDataKey()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void fetchFeatureValuesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureOnlineStoreService.addException(exception); + + try { + String featureView = "featureView-376914245"; + FeatureViewDataKey dataKey = FeatureViewDataKey.newBuilder().build(); + client.fetchFeatureValues(featureView, dataKey); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/FeatureRegistryServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/FeatureRegistryServiceClientTest.java new file mode 100644 index 000000000000..36191fd0faf4 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/FeatureRegistryServiceClientTest.java @@ -0,0 +1,1383 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1; + +import static com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient.ListFeatureGroupsPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient.ListFeaturesPagedResponse; +import static com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient.ListLocationsPagedResponse; + +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.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +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 FeatureRegistryServiceClientTest { + private static MockFeatureRegistryService mockFeatureRegistryService; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private FeatureRegistryServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockFeatureRegistryService = new MockFeatureRegistryService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList( + mockFeatureRegistryService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + FeatureRegistryServiceSettings settings = + FeatureRegistryServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = FeatureRegistryServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createFeatureGroupTest() throws Exception { + FeatureGroup expectedResponse = + FeatureGroup.newBuilder() + .setName(FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFeatureGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureRegistryService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + FeatureGroup featureGroup = FeatureGroup.newBuilder().build(); + String featureGroupId = "featureGroupId-1768466396"; + + FeatureGroup actualResponse = + client.createFeatureGroupAsync(parent, featureGroup, featureGroupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureRegistryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFeatureGroupRequest actualRequest = ((CreateFeatureGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(featureGroup, actualRequest.getFeatureGroup()); + Assert.assertEquals(featureGroupId, actualRequest.getFeatureGroupId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFeatureGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureRegistryService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + FeatureGroup featureGroup = FeatureGroup.newBuilder().build(); + String featureGroupId = "featureGroupId-1768466396"; + client.createFeatureGroupAsync(parent, featureGroup, featureGroupId).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 createFeatureGroupTest2() throws Exception { + FeatureGroup expectedResponse = + FeatureGroup.newBuilder() + .setName(FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFeatureGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureRegistryService.addResponse(resultOperation); + + String parent = "parent-995424086"; + FeatureGroup featureGroup = FeatureGroup.newBuilder().build(); + String featureGroupId = "featureGroupId-1768466396"; + + FeatureGroup actualResponse = + client.createFeatureGroupAsync(parent, featureGroup, featureGroupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureRegistryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFeatureGroupRequest actualRequest = ((CreateFeatureGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(featureGroup, actualRequest.getFeatureGroup()); + Assert.assertEquals(featureGroupId, actualRequest.getFeatureGroupId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFeatureGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureRegistryService.addException(exception); + + try { + String parent = "parent-995424086"; + FeatureGroup featureGroup = FeatureGroup.newBuilder().build(); + String featureGroupId = "featureGroupId-1768466396"; + client.createFeatureGroupAsync(parent, featureGroup, featureGroupId).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 getFeatureGroupTest() throws Exception { + FeatureGroup expectedResponse = + FeatureGroup.newBuilder() + .setName(FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .build(); + mockFeatureRegistryService.addResponse(expectedResponse); + + FeatureGroupName name = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + + FeatureGroup actualResponse = client.getFeatureGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureRegistryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFeatureGroupRequest actualRequest = ((GetFeatureGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFeatureGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureRegistryService.addException(exception); + + try { + FeatureGroupName name = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + client.getFeatureGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFeatureGroupTest2() throws Exception { + FeatureGroup expectedResponse = + FeatureGroup.newBuilder() + .setName(FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .build(); + mockFeatureRegistryService.addResponse(expectedResponse); + + String name = "name3373707"; + + FeatureGroup actualResponse = client.getFeatureGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureRegistryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFeatureGroupRequest actualRequest = ((GetFeatureGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFeatureGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureRegistryService.addException(exception); + + try { + String name = "name3373707"; + client.getFeatureGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFeatureGroupsTest() throws Exception { + FeatureGroup responsesElement = FeatureGroup.newBuilder().build(); + ListFeatureGroupsResponse expectedResponse = + ListFeatureGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllFeatureGroups(Arrays.asList(responsesElement)) + .build(); + mockFeatureRegistryService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListFeatureGroupsPagedResponse pagedListResponse = client.listFeatureGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFeatureGroupsList().get(0), resources.get(0)); + + List actualRequests = mockFeatureRegistryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFeatureGroupsRequest actualRequest = ((ListFeatureGroupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFeatureGroupsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureRegistryService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listFeatureGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFeatureGroupsTest2() throws Exception { + FeatureGroup responsesElement = FeatureGroup.newBuilder().build(); + ListFeatureGroupsResponse expectedResponse = + ListFeatureGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllFeatureGroups(Arrays.asList(responsesElement)) + .build(); + mockFeatureRegistryService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListFeatureGroupsPagedResponse pagedListResponse = client.listFeatureGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFeatureGroupsList().get(0), resources.get(0)); + + List actualRequests = mockFeatureRegistryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFeatureGroupsRequest actualRequest = ((ListFeatureGroupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFeatureGroupsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureRegistryService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listFeatureGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateFeatureGroupTest() throws Exception { + FeatureGroup expectedResponse = + FeatureGroup.newBuilder() + .setName(FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateFeatureGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureRegistryService.addResponse(resultOperation); + + FeatureGroup featureGroup = FeatureGroup.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + FeatureGroup actualResponse = client.updateFeatureGroupAsync(featureGroup, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureRegistryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateFeatureGroupRequest actualRequest = ((UpdateFeatureGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(featureGroup, actualRequest.getFeatureGroup()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateFeatureGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureRegistryService.addException(exception); + + try { + FeatureGroup featureGroup = FeatureGroup.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateFeatureGroupAsync(featureGroup, 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 deleteFeatureGroupTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteFeatureGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureRegistryService.addResponse(resultOperation); + + FeatureGroupName name = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + boolean force = true; + + client.deleteFeatureGroupAsync(name, force).get(); + + List actualRequests = mockFeatureRegistryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFeatureGroupRequest actualRequest = ((DeleteFeatureGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(force, actualRequest.getForce()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFeatureGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureRegistryService.addException(exception); + + try { + FeatureGroupName name = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + boolean force = true; + client.deleteFeatureGroupAsync(name, force).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 deleteFeatureGroupTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteFeatureGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureRegistryService.addResponse(resultOperation); + + String name = "name3373707"; + boolean force = true; + + client.deleteFeatureGroupAsync(name, force).get(); + + List actualRequests = mockFeatureRegistryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFeatureGroupRequest actualRequest = ((DeleteFeatureGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(force, actualRequest.getForce()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFeatureGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureRegistryService.addException(exception); + + try { + String name = "name3373707"; + boolean force = true; + client.deleteFeatureGroupAsync(name, force).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 createFeatureTest() throws Exception { + Feature expectedResponse = + Feature.newBuilder() + .setName( + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setDisableMonitoring(true) + .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFeatureTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureRegistryService.addResponse(resultOperation); + + EntityTypeName parent = + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); + Feature feature = Feature.newBuilder().build(); + String featureId = "featureId-420503887"; + + Feature actualResponse = client.createFeatureAsync(parent, feature, featureId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureRegistryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFeatureRequest actualRequest = ((CreateFeatureRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(feature, actualRequest.getFeature()); + Assert.assertEquals(featureId, actualRequest.getFeatureId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFeatureExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureRegistryService.addException(exception); + + try { + EntityTypeName parent = + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); + Feature feature = Feature.newBuilder().build(); + String featureId = "featureId-420503887"; + client.createFeatureAsync(parent, feature, featureId).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 createFeatureTest2() throws Exception { + Feature expectedResponse = + Feature.newBuilder() + .setName( + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setDisableMonitoring(true) + .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFeatureTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureRegistryService.addResponse(resultOperation); + + FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + Feature feature = Feature.newBuilder().build(); + String featureId = "featureId-420503887"; + + Feature actualResponse = client.createFeatureAsync(parent, feature, featureId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureRegistryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFeatureRequest actualRequest = ((CreateFeatureRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(feature, actualRequest.getFeature()); + Assert.assertEquals(featureId, actualRequest.getFeatureId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFeatureExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureRegistryService.addException(exception); + + try { + FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + Feature feature = Feature.newBuilder().build(); + String featureId = "featureId-420503887"; + client.createFeatureAsync(parent, feature, featureId).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 createFeatureTest3() throws Exception { + Feature expectedResponse = + Feature.newBuilder() + .setName( + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setDisableMonitoring(true) + .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFeatureTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureRegistryService.addResponse(resultOperation); + + String parent = "parent-995424086"; + Feature feature = Feature.newBuilder().build(); + String featureId = "featureId-420503887"; + + Feature actualResponse = client.createFeatureAsync(parent, feature, featureId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureRegistryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFeatureRequest actualRequest = ((CreateFeatureRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(feature, actualRequest.getFeature()); + Assert.assertEquals(featureId, actualRequest.getFeatureId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFeatureExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureRegistryService.addException(exception); + + try { + String parent = "parent-995424086"; + Feature feature = Feature.newBuilder().build(); + String featureId = "featureId-420503887"; + client.createFeatureAsync(parent, feature, featureId).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 getFeatureTest() throws Exception { + Feature expectedResponse = + Feature.newBuilder() + .setName( + FeatureName.ofProjectLocationFeatureGroupFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setDisableMonitoring(true) + .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") + .build(); + mockFeatureRegistryService.addResponse(expectedResponse); + + FeatureName name = + FeatureName.ofProjectLocationFeatureGroupFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]"); + + Feature actualResponse = client.getFeature(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureRegistryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFeatureRequest actualRequest = ((GetFeatureRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFeatureExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureRegistryService.addException(exception); + + try { + FeatureName name = + FeatureName.ofProjectLocationFeatureGroupFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]"); + client.getFeature(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFeatureTest2() throws Exception { + Feature expectedResponse = + Feature.newBuilder() + .setName( + FeatureName.ofProjectLocationFeatureGroupFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setDisableMonitoring(true) + .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") + .build(); + mockFeatureRegistryService.addResponse(expectedResponse); + + String name = "name3373707"; + + Feature actualResponse = client.getFeature(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureRegistryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFeatureRequest actualRequest = ((GetFeatureRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFeatureExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureRegistryService.addException(exception); + + try { + String name = "name3373707"; + client.getFeature(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFeaturesTest() throws Exception { + Feature responsesElement = Feature.newBuilder().build(); + ListFeaturesResponse expectedResponse = + ListFeaturesResponse.newBuilder() + .setNextPageToken("") + .addAllFeatures(Arrays.asList(responsesElement)) + .build(); + mockFeatureRegistryService.addResponse(expectedResponse); + + EntityTypeName parent = + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); + + ListFeaturesPagedResponse pagedListResponse = client.listFeatures(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFeaturesList().get(0), resources.get(0)); + + List actualRequests = mockFeatureRegistryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFeaturesRequest actualRequest = ((ListFeaturesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFeaturesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureRegistryService.addException(exception); + + try { + EntityTypeName parent = + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); + client.listFeatures(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFeaturesTest2() throws Exception { + Feature responsesElement = Feature.newBuilder().build(); + ListFeaturesResponse expectedResponse = + ListFeaturesResponse.newBuilder() + .setNextPageToken("") + .addAllFeatures(Arrays.asList(responsesElement)) + .build(); + mockFeatureRegistryService.addResponse(expectedResponse); + + FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + + ListFeaturesPagedResponse pagedListResponse = client.listFeatures(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFeaturesList().get(0), resources.get(0)); + + List actualRequests = mockFeatureRegistryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFeaturesRequest actualRequest = ((ListFeaturesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFeaturesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureRegistryService.addException(exception); + + try { + FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + client.listFeatures(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFeaturesTest3() throws Exception { + Feature responsesElement = Feature.newBuilder().build(); + ListFeaturesResponse expectedResponse = + ListFeaturesResponse.newBuilder() + .setNextPageToken("") + .addAllFeatures(Arrays.asList(responsesElement)) + .build(); + mockFeatureRegistryService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListFeaturesPagedResponse pagedListResponse = client.listFeatures(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFeaturesList().get(0), resources.get(0)); + + List actualRequests = mockFeatureRegistryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFeaturesRequest actualRequest = ((ListFeaturesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFeaturesExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureRegistryService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listFeatures(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateFeatureTest() throws Exception { + Feature expectedResponse = + Feature.newBuilder() + .setName( + FeatureName.ofProjectLocationFeatureGroupFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setDisableMonitoring(true) + .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateFeatureTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureRegistryService.addResponse(resultOperation); + + Feature feature = Feature.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Feature actualResponse = client.updateFeatureAsync(feature, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeatureRegistryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateFeatureRequest actualRequest = ((UpdateFeatureRequest) actualRequests.get(0)); + + Assert.assertEquals(feature, actualRequest.getFeature()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateFeatureExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureRegistryService.addException(exception); + + try { + Feature feature = Feature.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateFeatureAsync(feature, 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 deleteFeatureTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteFeatureTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureRegistryService.addResponse(resultOperation); + + FeatureName name = + FeatureName.ofProjectLocationFeatureGroupFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]"); + + client.deleteFeatureAsync(name).get(); + + List actualRequests = mockFeatureRegistryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFeatureRequest actualRequest = ((DeleteFeatureRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFeatureExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureRegistryService.addException(exception); + + try { + FeatureName name = + FeatureName.ofProjectLocationFeatureGroupFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]"); + client.deleteFeatureAsync(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 deleteFeatureTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteFeatureTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeatureRegistryService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteFeatureAsync(name).get(); + + List actualRequests = mockFeatureRegistryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFeatureRequest actualRequest = ((DeleteFeatureRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFeatureExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeatureRegistryService.addException(exception); + + try { + String name = "name3373707"; + client.deleteFeatureAsync(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 listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/FeaturestoreServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/FeaturestoreServiceClientTest.java index b31d0521b650..37a78bcc467e 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/FeaturestoreServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/FeaturestoreServiceClientTest.java @@ -1406,7 +1406,7 @@ public void createFeatureTest() throws Exception { Feature expectedResponse = Feature.newBuilder() .setName( - FeatureName.of( + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString()) .setDescription("description-1724546052") @@ -1416,6 +1416,7 @@ public void createFeatureTest() throws Exception { .setEtag("etag3123477") .setDisableMonitoring(true) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); Operation resultOperation = Operation.newBuilder() @@ -1467,7 +1468,7 @@ public void createFeatureTest2() throws Exception { Feature expectedResponse = Feature.newBuilder() .setName( - FeatureName.of( + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString()) .setDescription("description-1724546052") @@ -1477,6 +1478,67 @@ public void createFeatureTest2() throws Exception { .setEtag("etag3123477") .setDisableMonitoring(true) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFeatureTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeaturestoreService.addResponse(resultOperation); + + FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + Feature feature = Feature.newBuilder().build(); + + Feature actualResponse = client.createFeatureAsync(parent, feature).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeaturestoreService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFeatureRequest actualRequest = ((CreateFeatureRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(feature, actualRequest.getFeature()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFeatureExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeaturestoreService.addException(exception); + + try { + FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + Feature feature = Feature.newBuilder().build(); + client.createFeatureAsync(parent, feature).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 createFeatureTest3() throws Exception { + Feature expectedResponse = + Feature.newBuilder() + .setName( + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setDisableMonitoring(true) + .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); Operation resultOperation = Operation.newBuilder() @@ -1505,7 +1567,7 @@ public void createFeatureTest2() throws Exception { } @Test - public void createFeatureExceptionTest2() throws Exception { + public void createFeatureExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockFeaturestoreService.addException(exception); @@ -1522,11 +1584,11 @@ public void createFeatureExceptionTest2() throws Exception { } @Test - public void createFeatureTest3() throws Exception { + public void createFeatureTest4() throws Exception { Feature expectedResponse = Feature.newBuilder() .setName( - FeatureName.of( + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString()) .setDescription("description-1724546052") @@ -1536,6 +1598,7 @@ public void createFeatureTest3() throws Exception { .setEtag("etag3123477") .setDisableMonitoring(true) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); Operation resultOperation = Operation.newBuilder() @@ -1567,7 +1630,7 @@ public void createFeatureTest3() throws Exception { } @Test - public void createFeatureExceptionTest3() throws Exception { + public void createFeatureExceptionTest4() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockFeaturestoreService.addException(exception); @@ -1586,11 +1649,11 @@ public void createFeatureExceptionTest3() throws Exception { } @Test - public void createFeatureTest4() throws Exception { + public void createFeatureTest5() throws Exception { Feature expectedResponse = Feature.newBuilder() .setName( - FeatureName.of( + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString()) .setDescription("description-1724546052") @@ -1600,6 +1663,70 @@ public void createFeatureTest4() throws Exception { .setEtag("etag3123477") .setDisableMonitoring(true) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFeatureTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFeaturestoreService.addResponse(resultOperation); + + FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + Feature feature = Feature.newBuilder().build(); + String featureId = "featureId-420503887"; + + Feature actualResponse = client.createFeatureAsync(parent, feature, featureId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFeaturestoreService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFeatureRequest actualRequest = ((CreateFeatureRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(feature, actualRequest.getFeature()); + Assert.assertEquals(featureId, actualRequest.getFeatureId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFeatureExceptionTest5() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeaturestoreService.addException(exception); + + try { + FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + Feature feature = Feature.newBuilder().build(); + String featureId = "featureId-420503887"; + client.createFeatureAsync(parent, feature, featureId).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 createFeatureTest6() throws Exception { + Feature expectedResponse = + Feature.newBuilder() + .setName( + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setDisableMonitoring(true) + .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); Operation resultOperation = Operation.newBuilder() @@ -1630,7 +1757,7 @@ public void createFeatureTest4() throws Exception { } @Test - public void createFeatureExceptionTest4() throws Exception { + public void createFeatureExceptionTest6() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockFeaturestoreService.addException(exception); @@ -1750,7 +1877,7 @@ public void getFeatureTest() throws Exception { Feature expectedResponse = Feature.newBuilder() .setName( - FeatureName.of( + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString()) .setDescription("description-1724546052") @@ -1760,11 +1887,13 @@ public void getFeatureTest() throws Exception { .setEtag("etag3123477") .setDisableMonitoring(true) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); mockFeaturestoreService.addResponse(expectedResponse); FeatureName name = - FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]"); + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]"); Feature actualResponse = client.getFeature(name); Assert.assertEquals(expectedResponse, actualResponse); @@ -1787,7 +1916,8 @@ public void getFeatureExceptionTest() throws Exception { try { FeatureName name = - FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]"); + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]"); client.getFeature(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -1800,7 +1930,7 @@ public void getFeatureTest2() throws Exception { Feature expectedResponse = Feature.newBuilder() .setName( - FeatureName.of( + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString()) .setDescription("description-1724546052") @@ -1810,6 +1940,7 @@ public void getFeatureTest2() throws Exception { .setEtag("etag3123477") .setDisableMonitoring(true) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); mockFeaturestoreService.addResponse(expectedResponse); @@ -1899,6 +2030,50 @@ public void listFeaturesTest2() throws Exception { .build(); mockFeaturestoreService.addResponse(expectedResponse); + FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + + ListFeaturesPagedResponse pagedListResponse = client.listFeatures(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFeaturesList().get(0), resources.get(0)); + + List actualRequests = mockFeaturestoreService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFeaturesRequest actualRequest = ((ListFeaturesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFeaturesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFeaturestoreService.addException(exception); + + try { + FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + client.listFeatures(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFeaturesTest3() throws Exception { + Feature responsesElement = Feature.newBuilder().build(); + ListFeaturesResponse expectedResponse = + ListFeaturesResponse.newBuilder() + .setNextPageToken("") + .addAllFeatures(Arrays.asList(responsesElement)) + .build(); + mockFeaturestoreService.addResponse(expectedResponse); + String parent = "parent-995424086"; ListFeaturesPagedResponse pagedListResponse = client.listFeatures(parent); @@ -1920,7 +2095,7 @@ public void listFeaturesTest2() throws Exception { } @Test - public void listFeaturesExceptionTest2() throws Exception { + public void listFeaturesExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockFeaturestoreService.addException(exception); @@ -1938,7 +2113,7 @@ public void updateFeatureTest() throws Exception { Feature expectedResponse = Feature.newBuilder() .setName( - FeatureName.of( + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString()) .setDescription("description-1724546052") @@ -1948,6 +2123,7 @@ public void updateFeatureTest() throws Exception { .setEtag("etag3123477") .setDisableMonitoring(true) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); mockFeaturestoreService.addResponse(expectedResponse); @@ -1996,7 +2172,8 @@ public void deleteFeatureTest() throws Exception { mockFeaturestoreService.addResponse(resultOperation); FeatureName name = - FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]"); + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]"); client.deleteFeatureAsync(name).get(); @@ -2018,7 +2195,8 @@ public void deleteFeatureExceptionTest() throws Exception { try { FeatureName name = - FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]"); + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]"); client.deleteFeatureAsync(name).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceClientTest.java new file mode 100644 index 000000000000..38d410862416 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceClientTest.java @@ -0,0 +1,533 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1; + +import static com.google.cloud.aiplatform.v1.LlmUtilityServiceClient.ListLocationsPagedResponse; + +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.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Value; +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 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 LlmUtilityServiceClientTest { + private static MockIAMPolicy mockIAMPolicy; + private static MockLlmUtilityService mockLlmUtilityService; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private LlmUtilityServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockLlmUtilityService = new MockLlmUtilityService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockLlmUtilityService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + LlmUtilityServiceSettings settings = + LlmUtilityServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = LlmUtilityServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void countTokensTest() throws Exception { + CountTokensResponse expectedResponse = + CountTokensResponse.newBuilder() + .setTotalTokens(730673909) + .setTotalBillableCharacters(1242495501) + .build(); + mockLlmUtilityService.addResponse(expectedResponse); + + EndpointName endpoint = + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + List instances = new ArrayList<>(); + + CountTokensResponse actualResponse = client.countTokens(endpoint, instances); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLlmUtilityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CountTokensRequest actualRequest = ((CountTokensRequest) actualRequests.get(0)); + + Assert.assertEquals(endpoint.toString(), actualRequest.getEndpoint()); + Assert.assertEquals(instances, actualRequest.getInstancesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void countTokensExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLlmUtilityService.addException(exception); + + try { + EndpointName endpoint = + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + List instances = new ArrayList<>(); + client.countTokens(endpoint, instances); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void countTokensTest2() throws Exception { + CountTokensResponse expectedResponse = + CountTokensResponse.newBuilder() + .setTotalTokens(730673909) + .setTotalBillableCharacters(1242495501) + .build(); + mockLlmUtilityService.addResponse(expectedResponse); + + String endpoint = "endpoint1741102485"; + List instances = new ArrayList<>(); + + CountTokensResponse actualResponse = client.countTokens(endpoint, instances); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLlmUtilityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CountTokensRequest actualRequest = ((CountTokensRequest) actualRequests.get(0)); + + Assert.assertEquals(endpoint, actualRequest.getEndpoint()); + Assert.assertEquals(instances, actualRequest.getInstancesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void countTokensExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLlmUtilityService.addException(exception); + + try { + String endpoint = "endpoint1741102485"; + List instances = new ArrayList<>(); + client.countTokens(endpoint, instances); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void computeTokensTest() throws Exception { + ComputeTokensResponse expectedResponse = + ComputeTokensResponse.newBuilder().addAllTokensInfo(new ArrayList()).build(); + mockLlmUtilityService.addResponse(expectedResponse); + + EndpointName endpoint = + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + List instances = new ArrayList<>(); + + ComputeTokensResponse actualResponse = client.computeTokens(endpoint, instances); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLlmUtilityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ComputeTokensRequest actualRequest = ((ComputeTokensRequest) actualRequests.get(0)); + + Assert.assertEquals(endpoint.toString(), actualRequest.getEndpoint()); + Assert.assertEquals(instances, actualRequest.getInstancesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void computeTokensExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLlmUtilityService.addException(exception); + + try { + EndpointName endpoint = + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + List instances = new ArrayList<>(); + client.computeTokens(endpoint, instances); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void computeTokensTest2() throws Exception { + ComputeTokensResponse expectedResponse = + ComputeTokensResponse.newBuilder().addAllTokensInfo(new ArrayList()).build(); + mockLlmUtilityService.addResponse(expectedResponse); + + String endpoint = "endpoint1741102485"; + List instances = new ArrayList<>(); + + ComputeTokensResponse actualResponse = client.computeTokens(endpoint, instances); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLlmUtilityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ComputeTokensRequest actualRequest = ((ComputeTokensRequest) actualRequests.get(0)); + + Assert.assertEquals(endpoint, actualRequest.getEndpoint()); + Assert.assertEquals(instances, actualRequest.getInstancesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void computeTokensExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLlmUtilityService.addException(exception); + + try { + String endpoint = "endpoint1741102485"; + List instances = new ArrayList<>(); + client.computeTokens(endpoint, instances); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureOnlineStoreAdminService.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureOnlineStoreAdminService.java new file mode 100644 index 000000000000..d48f890588a4 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureOnlineStoreAdminService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.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 MockFeatureOnlineStoreAdminService implements MockGrpcService { + private final MockFeatureOnlineStoreAdminServiceImpl serviceImpl; + + public MockFeatureOnlineStoreAdminService() { + serviceImpl = new MockFeatureOnlineStoreAdminServiceImpl(); + } + + @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-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureOnlineStoreAdminServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureOnlineStoreAdminServiceImpl.java new file mode 100644 index 000000000000..5d8e0753c4eb --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureOnlineStoreAdminServiceImpl.java @@ -0,0 +1,336 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceGrpc.FeatureOnlineStoreAdminServiceImplBase; +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 MockFeatureOnlineStoreAdminServiceImpl extends FeatureOnlineStoreAdminServiceImplBase { + private List requests; + private Queue responses; + + public MockFeatureOnlineStoreAdminServiceImpl() { + 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 createFeatureOnlineStore( + CreateFeatureOnlineStoreRequest 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 CreateFeatureOnlineStore, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getFeatureOnlineStore( + GetFeatureOnlineStoreRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FeatureOnlineStore) { + requests.add(request); + responseObserver.onNext(((FeatureOnlineStore) 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 GetFeatureOnlineStore, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + FeatureOnlineStore.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listFeatureOnlineStores( + ListFeatureOnlineStoresRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListFeatureOnlineStoresResponse) { + requests.add(request); + responseObserver.onNext(((ListFeatureOnlineStoresResponse) 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 ListFeatureOnlineStores, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListFeatureOnlineStoresResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateFeatureOnlineStore( + UpdateFeatureOnlineStoreRequest 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 UpdateFeatureOnlineStore, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteFeatureOnlineStore( + DeleteFeatureOnlineStoreRequest 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 DeleteFeatureOnlineStore, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createFeatureView( + CreateFeatureViewRequest 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 CreateFeatureView, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getFeatureView( + GetFeatureViewRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FeatureView) { + requests.add(request); + responseObserver.onNext(((FeatureView) 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 GetFeatureView, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + FeatureView.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listFeatureViews( + ListFeatureViewsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListFeatureViewsResponse) { + requests.add(request); + responseObserver.onNext(((ListFeatureViewsResponse) 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 ListFeatureViews, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListFeatureViewsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateFeatureView( + UpdateFeatureViewRequest 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 UpdateFeatureView, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteFeatureView( + DeleteFeatureViewRequest 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 DeleteFeatureView, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void syncFeatureView( + SyncFeatureViewRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SyncFeatureViewResponse) { + requests.add(request); + responseObserver.onNext(((SyncFeatureViewResponse) 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 SyncFeatureView, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SyncFeatureViewResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getFeatureViewSync( + GetFeatureViewSyncRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FeatureViewSync) { + requests.add(request); + responseObserver.onNext(((FeatureViewSync) 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 GetFeatureViewSync, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + FeatureViewSync.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listFeatureViewSyncs( + ListFeatureViewSyncsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListFeatureViewSyncsResponse) { + requests.add(request); + responseObserver.onNext(((ListFeatureViewSyncsResponse) 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 ListFeatureViewSyncs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListFeatureViewSyncsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureOnlineStoreService.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureOnlineStoreService.java new file mode 100644 index 000000000000..9c27cb00c368 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureOnlineStoreService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.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 MockFeatureOnlineStoreService implements MockGrpcService { + private final MockFeatureOnlineStoreServiceImpl serviceImpl; + + public MockFeatureOnlineStoreService() { + serviceImpl = new MockFeatureOnlineStoreServiceImpl(); + } + + @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-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureOnlineStoreServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureOnlineStoreServiceImpl.java new file mode 100644 index 000000000000..7d428f19ac0a --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureOnlineStoreServiceImpl.java @@ -0,0 +1,82 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceGrpc.FeatureOnlineStoreServiceImplBase; +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 MockFeatureOnlineStoreServiceImpl extends FeatureOnlineStoreServiceImplBase { + private List requests; + private Queue responses; + + public MockFeatureOnlineStoreServiceImpl() { + 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 fetchFeatureValues( + FetchFeatureValuesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FetchFeatureValuesResponse) { + requests.add(request); + responseObserver.onNext(((FetchFeatureValuesResponse) 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 FetchFeatureValues, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + FetchFeatureValuesResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureRegistryService.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureRegistryService.java new file mode 100644 index 000000000000..1180777018c6 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureRegistryService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.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 MockFeatureRegistryService implements MockGrpcService { + private final MockFeatureRegistryServiceImpl serviceImpl; + + public MockFeatureRegistryService() { + serviceImpl = new MockFeatureRegistryServiceImpl(); + } + + @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-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureRegistryServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureRegistryServiceImpl.java new file mode 100644 index 000000000000..d76caa0753c2 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockFeatureRegistryServiceImpl.java @@ -0,0 +1,271 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceGrpc.FeatureRegistryServiceImplBase; +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 MockFeatureRegistryServiceImpl extends FeatureRegistryServiceImplBase { + private List requests; + private Queue responses; + + public MockFeatureRegistryServiceImpl() { + 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 createFeatureGroup( + CreateFeatureGroupRequest 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 CreateFeatureGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getFeatureGroup( + GetFeatureGroupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FeatureGroup) { + requests.add(request); + responseObserver.onNext(((FeatureGroup) 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 GetFeatureGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + FeatureGroup.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listFeatureGroups( + ListFeatureGroupsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListFeatureGroupsResponse) { + requests.add(request); + responseObserver.onNext(((ListFeatureGroupsResponse) 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 ListFeatureGroups, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListFeatureGroupsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateFeatureGroup( + UpdateFeatureGroupRequest 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 UpdateFeatureGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteFeatureGroup( + DeleteFeatureGroupRequest 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 DeleteFeatureGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createFeature( + CreateFeatureRequest 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 CreateFeature, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getFeature(GetFeatureRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Feature) { + requests.add(request); + responseObserver.onNext(((Feature) 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 GetFeature, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Feature.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listFeatures( + ListFeaturesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListFeaturesResponse) { + requests.add(request); + responseObserver.onNext(((ListFeaturesResponse) 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 ListFeatures, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListFeaturesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateFeature( + UpdateFeatureRequest 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 UpdateFeature, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteFeature( + DeleteFeatureRequest 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 DeleteFeature, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockLlmUtilityService.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockLlmUtilityService.java new file mode 100644 index 000000000000..fa3c25281774 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockLlmUtilityService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.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 MockLlmUtilityService implements MockGrpcService { + private final MockLlmUtilityServiceImpl serviceImpl; + + public MockLlmUtilityService() { + serviceImpl = new MockLlmUtilityServiceImpl(); + } + + @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-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockLlmUtilityServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockLlmUtilityServiceImpl.java new file mode 100644 index 000000000000..df43a02ba4ad --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockLlmUtilityServiceImpl.java @@ -0,0 +1,102 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1.LlmUtilityServiceGrpc.LlmUtilityServiceImplBase; +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 MockLlmUtilityServiceImpl extends LlmUtilityServiceImplBase { + private List requests; + private Queue responses; + + public MockLlmUtilityServiceImpl() { + 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 countTokens( + CountTokensRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof CountTokensResponse) { + requests.add(request); + responseObserver.onNext(((CountTokensResponse) 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 CountTokens, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + CountTokensResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void computeTokens( + ComputeTokensRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ComputeTokensResponse) { + requests.add(request); + responseObserver.onNext(((ComputeTokensResponse) 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 ComputeTokens, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ComputeTokensResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreServiceClientTest.java index ea044009f4b1..e57460ba05b5 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreServiceClientTest.java @@ -108,9 +108,9 @@ public void fetchFeatureValuesTest() throws Exception { FeatureViewName featureView = FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); - String id = "id3355"; + FeatureViewDataKey dataKey = FeatureViewDataKey.newBuilder().build(); - FetchFeatureValuesResponse actualResponse = client.fetchFeatureValues(featureView, id); + FetchFeatureValuesResponse actualResponse = client.fetchFeatureValues(featureView, dataKey); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockFeatureOnlineStoreService.getRequests(); @@ -118,7 +118,7 @@ public void fetchFeatureValuesTest() throws Exception { FetchFeatureValuesRequest actualRequest = ((FetchFeatureValuesRequest) actualRequests.get(0)); Assert.assertEquals(featureView.toString(), actualRequest.getFeatureView()); - Assert.assertEquals(id, actualRequest.getId()); + Assert.assertEquals(dataKey, actualRequest.getDataKey()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -133,8 +133,8 @@ public void fetchFeatureValuesExceptionTest() throws Exception { try { FeatureViewName featureView = FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); - String id = "id3355"; - client.fetchFeatureValues(featureView, id); + FeatureViewDataKey dataKey = FeatureViewDataKey.newBuilder().build(); + client.fetchFeatureValues(featureView, dataKey); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -147,9 +147,9 @@ public void fetchFeatureValuesTest2() throws Exception { mockFeatureOnlineStoreService.addResponse(expectedResponse); String featureView = "featureView-376914245"; - String id = "id3355"; + FeatureViewDataKey dataKey = FeatureViewDataKey.newBuilder().build(); - FetchFeatureValuesResponse actualResponse = client.fetchFeatureValues(featureView, id); + FetchFeatureValuesResponse actualResponse = client.fetchFeatureValues(featureView, dataKey); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockFeatureOnlineStoreService.getRequests(); @@ -157,7 +157,7 @@ public void fetchFeatureValuesTest2() throws Exception { FetchFeatureValuesRequest actualRequest = ((FetchFeatureValuesRequest) actualRequests.get(0)); Assert.assertEquals(featureView, actualRequest.getFeatureView()); - Assert.assertEquals(id, actualRequest.getId()); + Assert.assertEquals(dataKey, actualRequest.getDataKey()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -171,8 +171,8 @@ public void fetchFeatureValuesExceptionTest2() throws Exception { try { String featureView = "featureView-376914245"; - String id = "id3355"; - client.fetchFeatureValues(featureView, id); + FeatureViewDataKey dataKey = FeatureViewDataKey.newBuilder().build(); + client.fetchFeatureValues(featureView, dataKey); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/FeatureRegistryServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/FeatureRegistryServiceClientTest.java index 1759b158ca67..7cdbc83fabfa 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/FeatureRegistryServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/FeatureRegistryServiceClientTest.java @@ -559,6 +559,7 @@ public void createFeatureTest() throws Exception { .setDisableMonitoring(true) .addAllMonitoringStats(new ArrayList()) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); Operation resultOperation = Operation.newBuilder() @@ -625,6 +626,7 @@ public void createFeatureTest2() throws Exception { .setDisableMonitoring(true) .addAllMonitoringStats(new ArrayList()) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); Operation resultOperation = Operation.newBuilder() @@ -689,6 +691,7 @@ public void createFeatureTest3() throws Exception { .setDisableMonitoring(true) .addAllMonitoringStats(new ArrayList()) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); Operation resultOperation = Operation.newBuilder() @@ -753,6 +756,7 @@ public void getFeatureTest() throws Exception { .setDisableMonitoring(true) .addAllMonitoringStats(new ArrayList()) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); mockFeatureRegistryService.addResponse(expectedResponse); @@ -807,6 +811,7 @@ public void getFeatureTest2() throws Exception { .setDisableMonitoring(true) .addAllMonitoringStats(new ArrayList()) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); mockFeatureRegistryService.addResponse(expectedResponse); @@ -991,6 +996,7 @@ public void updateFeatureTest() throws Exception { .setDisableMonitoring(true) .addAllMonitoringStats(new ArrayList()) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); Operation resultOperation = Operation.newBuilder() diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/FeaturestoreServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/FeaturestoreServiceClientTest.java index 7ce5f561919d..f3299dc377c4 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/FeaturestoreServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/FeaturestoreServiceClientTest.java @@ -1418,6 +1418,7 @@ public void createFeatureTest() throws Exception { .setDisableMonitoring(true) .addAllMonitoringStats(new ArrayList()) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); Operation resultOperation = Operation.newBuilder() @@ -1481,6 +1482,7 @@ public void createFeatureTest2() throws Exception { .setDisableMonitoring(true) .addAllMonitoringStats(new ArrayList()) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); Operation resultOperation = Operation.newBuilder() @@ -1542,6 +1544,7 @@ public void createFeatureTest3() throws Exception { .setDisableMonitoring(true) .addAllMonitoringStats(new ArrayList()) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); Operation resultOperation = Operation.newBuilder() @@ -1603,6 +1606,7 @@ public void createFeatureTest4() throws Exception { .setDisableMonitoring(true) .addAllMonitoringStats(new ArrayList()) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); Operation resultOperation = Operation.newBuilder() @@ -1669,6 +1673,7 @@ public void createFeatureTest5() throws Exception { .setDisableMonitoring(true) .addAllMonitoringStats(new ArrayList()) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); Operation resultOperation = Operation.newBuilder() @@ -1733,6 +1738,7 @@ public void createFeatureTest6() throws Exception { .setDisableMonitoring(true) .addAllMonitoringStats(new ArrayList()) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); Operation resultOperation = Operation.newBuilder() @@ -1895,6 +1901,7 @@ public void getFeatureTest() throws Exception { .setDisableMonitoring(true) .addAllMonitoringStats(new ArrayList()) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); mockFeaturestoreService.addResponse(expectedResponse); @@ -1949,6 +1956,7 @@ public void getFeatureTest2() throws Exception { .setDisableMonitoring(true) .addAllMonitoringStats(new ArrayList()) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); mockFeaturestoreService.addResponse(expectedResponse); @@ -2133,6 +2141,7 @@ public void updateFeatureTest() throws Exception { .setDisableMonitoring(true) .addAllMonitoringStats(new ArrayList()) .addAllMonitoringStatsAnomalies(new ArrayList()) + .setVersionColumnName("versionColumnName-997658119") .build(); mockFeaturestoreService.addResponse(expectedResponse); diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/LlmUtilityServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/LlmUtilityServiceClientTest.java new file mode 100644 index 000000000000..342dbe57fbc6 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/LlmUtilityServiceClientTest.java @@ -0,0 +1,447 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1; + +import static com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient.ListLocationsPagedResponse; + +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.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Value; +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 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 LlmUtilityServiceClientTest { + private static MockIAMPolicy mockIAMPolicy; + private static MockLlmUtilityService mockLlmUtilityService; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private LlmUtilityServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockLlmUtilityService = new MockLlmUtilityService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockLlmUtilityService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + LlmUtilityServiceSettings settings = + LlmUtilityServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = LlmUtilityServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void computeTokensTest() throws Exception { + ComputeTokensResponse expectedResponse = + ComputeTokensResponse.newBuilder().addAllTokensInfo(new ArrayList()).build(); + mockLlmUtilityService.addResponse(expectedResponse); + + EndpointName endpoint = + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + List instances = new ArrayList<>(); + + ComputeTokensResponse actualResponse = client.computeTokens(endpoint, instances); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLlmUtilityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ComputeTokensRequest actualRequest = ((ComputeTokensRequest) actualRequests.get(0)); + + Assert.assertEquals(endpoint.toString(), actualRequest.getEndpoint()); + Assert.assertEquals(instances, actualRequest.getInstancesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void computeTokensExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLlmUtilityService.addException(exception); + + try { + EndpointName endpoint = + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + List instances = new ArrayList<>(); + client.computeTokens(endpoint, instances); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void computeTokensTest2() throws Exception { + ComputeTokensResponse expectedResponse = + ComputeTokensResponse.newBuilder().addAllTokensInfo(new ArrayList()).build(); + mockLlmUtilityService.addResponse(expectedResponse); + + String endpoint = "endpoint1741102485"; + List instances = new ArrayList<>(); + + ComputeTokensResponse actualResponse = client.computeTokens(endpoint, instances); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLlmUtilityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ComputeTokensRequest actualRequest = ((ComputeTokensRequest) actualRequests.get(0)); + + Assert.assertEquals(endpoint, actualRequest.getEndpoint()); + Assert.assertEquals(instances, actualRequest.getInstancesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void computeTokensExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLlmUtilityService.addException(exception); + + try { + String endpoint = "endpoint1741102485"; + List instances = new ArrayList<>(); + client.computeTokens(endpoint, instances); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockLlmUtilityService.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockLlmUtilityService.java new file mode 100644 index 000000000000..6d76393d5490 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockLlmUtilityService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1; + +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 MockLlmUtilityService implements MockGrpcService { + private final MockLlmUtilityServiceImpl serviceImpl; + + public MockLlmUtilityService() { + serviceImpl = new MockLlmUtilityServiceImpl(); + } + + @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-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockLlmUtilityServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockLlmUtilityServiceImpl.java new file mode 100644 index 000000000000..5bd9d6b48f6a --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockLlmUtilityServiceImpl.java @@ -0,0 +1,81 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceGrpc.LlmUtilityServiceImplBase; +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 MockLlmUtilityServiceImpl extends LlmUtilityServiceImplBase { + private List requests; + private Queue responses; + + public MockLlmUtilityServiceImpl() { + 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 computeTokens( + ComputeTokensRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ComputeTokensResponse) { + requests.add(request); + responseObserver.onNext(((ComputeTokensResponse) 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 ComputeTokens, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ComputeTokensResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPipelineServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPipelineServiceImpl.java index f65dbd84811e..d810beb15ee2 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPipelineServiceImpl.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPipelineServiceImpl.java @@ -250,6 +250,27 @@ public void deletePipelineJob( } } + @Override + public void batchDeletePipelineJobs( + BatchDeletePipelineJobsRequest 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 BatchDeletePipelineJobs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + @Override public void cancelPipelineJob( CancelPipelineJobRequest request, StreamObserver responseObserver) { diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceClientTest.java index 68adddfc5666..934f12c86c91 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceClientTest.java @@ -1002,6 +1002,108 @@ public void deletePipelineJobExceptionTest2() throws Exception { } } + @Test + public void batchDeletePipelineJobsTest() throws Exception { + BatchDeletePipelineJobsResponse expectedResponse = + BatchDeletePipelineJobsResponse.newBuilder() + .addAllPipelineJobs(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchDeletePipelineJobsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPipelineService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List names = new ArrayList<>(); + + BatchDeletePipelineJobsResponse actualResponse = + client.batchDeletePipelineJobsAsync(parent, names).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPipelineService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchDeletePipelineJobsRequest actualRequest = + ((BatchDeletePipelineJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(names, actualRequest.getNamesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchDeletePipelineJobsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPipelineService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List names = new ArrayList<>(); + client.batchDeletePipelineJobsAsync(parent, names).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 batchDeletePipelineJobsTest2() throws Exception { + BatchDeletePipelineJobsResponse expectedResponse = + BatchDeletePipelineJobsResponse.newBuilder() + .addAllPipelineJobs(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchDeletePipelineJobsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPipelineService.addResponse(resultOperation); + + String parent = "parent-995424086"; + List names = new ArrayList<>(); + + BatchDeletePipelineJobsResponse actualResponse = + client.batchDeletePipelineJobsAsync(parent, names).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPipelineService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchDeletePipelineJobsRequest actualRequest = + ((BatchDeletePipelineJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(names, actualRequest.getNamesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchDeletePipelineJobsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPipelineService.addException(exception); + + try { + String parent = "parent-995424086"; + List names = new ArrayList<>(); + client.batchDeletePipelineJobsAsync(parent, names).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 cancelPipelineJobTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceGrpc.java new file mode 100644 index 000000000000..47758ae2a9a3 --- /dev/null +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceGrpc.java @@ -0,0 +1,1874 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * The service that handles CRUD and List for resources for
+ * FeatureOnlineStore.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class FeatureOnlineStoreAdminServiceGrpc { + + private FeatureOnlineStoreAdminServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest, + com.google.longrunning.Operation> + getCreateFeatureOnlineStoreMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateFeatureOnlineStore", + requestType = com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest, + com.google.longrunning.Operation> + getCreateFeatureOnlineStoreMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest, + com.google.longrunning.Operation> + getCreateFeatureOnlineStoreMethod; + if ((getCreateFeatureOnlineStoreMethod = + FeatureOnlineStoreAdminServiceGrpc.getCreateFeatureOnlineStoreMethod) + == null) { + synchronized (FeatureOnlineStoreAdminServiceGrpc.class) { + if ((getCreateFeatureOnlineStoreMethod = + FeatureOnlineStoreAdminServiceGrpc.getCreateFeatureOnlineStoreMethod) + == null) { + FeatureOnlineStoreAdminServiceGrpc.getCreateFeatureOnlineStoreMethod = + getCreateFeatureOnlineStoreMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateFeatureOnlineStore")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new FeatureOnlineStoreAdminServiceMethodDescriptorSupplier( + "CreateFeatureOnlineStore")) + .build(); + } + } + } + return getCreateFeatureOnlineStoreMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest, + com.google.cloud.aiplatform.v1.FeatureOnlineStore> + getGetFeatureOnlineStoreMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetFeatureOnlineStore", + requestType = com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest.class, + responseType = com.google.cloud.aiplatform.v1.FeatureOnlineStore.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest, + com.google.cloud.aiplatform.v1.FeatureOnlineStore> + getGetFeatureOnlineStoreMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest, + com.google.cloud.aiplatform.v1.FeatureOnlineStore> + getGetFeatureOnlineStoreMethod; + if ((getGetFeatureOnlineStoreMethod = + FeatureOnlineStoreAdminServiceGrpc.getGetFeatureOnlineStoreMethod) + == null) { + synchronized (FeatureOnlineStoreAdminServiceGrpc.class) { + if ((getGetFeatureOnlineStoreMethod = + FeatureOnlineStoreAdminServiceGrpc.getGetFeatureOnlineStoreMethod) + == null) { + FeatureOnlineStoreAdminServiceGrpc.getGetFeatureOnlineStoreMethod = + getGetFeatureOnlineStoreMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetFeatureOnlineStore")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.FeatureOnlineStore + .getDefaultInstance())) + .setSchemaDescriptor( + new FeatureOnlineStoreAdminServiceMethodDescriptorSupplier( + "GetFeatureOnlineStore")) + .build(); + } + } + } + return getGetFeatureOnlineStoreMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest, + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse> + getListFeatureOnlineStoresMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListFeatureOnlineStores", + requestType = com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest, + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse> + getListFeatureOnlineStoresMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest, + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse> + getListFeatureOnlineStoresMethod; + if ((getListFeatureOnlineStoresMethod = + FeatureOnlineStoreAdminServiceGrpc.getListFeatureOnlineStoresMethod) + == null) { + synchronized (FeatureOnlineStoreAdminServiceGrpc.class) { + if ((getListFeatureOnlineStoresMethod = + FeatureOnlineStoreAdminServiceGrpc.getListFeatureOnlineStoresMethod) + == null) { + FeatureOnlineStoreAdminServiceGrpc.getListFeatureOnlineStoresMethod = + getListFeatureOnlineStoresMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListFeatureOnlineStores")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new FeatureOnlineStoreAdminServiceMethodDescriptorSupplier( + "ListFeatureOnlineStores")) + .build(); + } + } + } + return getListFeatureOnlineStoresMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest, + com.google.longrunning.Operation> + getUpdateFeatureOnlineStoreMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateFeatureOnlineStore", + requestType = com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest, + com.google.longrunning.Operation> + getUpdateFeatureOnlineStoreMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest, + com.google.longrunning.Operation> + getUpdateFeatureOnlineStoreMethod; + if ((getUpdateFeatureOnlineStoreMethod = + FeatureOnlineStoreAdminServiceGrpc.getUpdateFeatureOnlineStoreMethod) + == null) { + synchronized (FeatureOnlineStoreAdminServiceGrpc.class) { + if ((getUpdateFeatureOnlineStoreMethod = + FeatureOnlineStoreAdminServiceGrpc.getUpdateFeatureOnlineStoreMethod) + == null) { + FeatureOnlineStoreAdminServiceGrpc.getUpdateFeatureOnlineStoreMethod = + getUpdateFeatureOnlineStoreMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateFeatureOnlineStore")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new FeatureOnlineStoreAdminServiceMethodDescriptorSupplier( + "UpdateFeatureOnlineStore")) + .build(); + } + } + } + return getUpdateFeatureOnlineStoreMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest, + com.google.longrunning.Operation> + getDeleteFeatureOnlineStoreMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteFeatureOnlineStore", + requestType = com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest, + com.google.longrunning.Operation> + getDeleteFeatureOnlineStoreMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest, + com.google.longrunning.Operation> + getDeleteFeatureOnlineStoreMethod; + if ((getDeleteFeatureOnlineStoreMethod = + FeatureOnlineStoreAdminServiceGrpc.getDeleteFeatureOnlineStoreMethod) + == null) { + synchronized (FeatureOnlineStoreAdminServiceGrpc.class) { + if ((getDeleteFeatureOnlineStoreMethod = + FeatureOnlineStoreAdminServiceGrpc.getDeleteFeatureOnlineStoreMethod) + == null) { + FeatureOnlineStoreAdminServiceGrpc.getDeleteFeatureOnlineStoreMethod = + getDeleteFeatureOnlineStoreMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteFeatureOnlineStore")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new FeatureOnlineStoreAdminServiceMethodDescriptorSupplier( + "DeleteFeatureOnlineStore")) + .build(); + } + } + } + return getDeleteFeatureOnlineStoreMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateFeatureViewRequest, com.google.longrunning.Operation> + getCreateFeatureViewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateFeatureView", + requestType = com.google.cloud.aiplatform.v1.CreateFeatureViewRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateFeatureViewRequest, com.google.longrunning.Operation> + getCreateFeatureViewMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateFeatureViewRequest, + com.google.longrunning.Operation> + getCreateFeatureViewMethod; + if ((getCreateFeatureViewMethod = FeatureOnlineStoreAdminServiceGrpc.getCreateFeatureViewMethod) + == null) { + synchronized (FeatureOnlineStoreAdminServiceGrpc.class) { + if ((getCreateFeatureViewMethod = + FeatureOnlineStoreAdminServiceGrpc.getCreateFeatureViewMethod) + == null) { + FeatureOnlineStoreAdminServiceGrpc.getCreateFeatureViewMethod = + getCreateFeatureViewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateFeatureView")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CreateFeatureViewRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new FeatureOnlineStoreAdminServiceMethodDescriptorSupplier( + "CreateFeatureView")) + .build(); + } + } + } + return getCreateFeatureViewMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetFeatureViewRequest, + com.google.cloud.aiplatform.v1.FeatureView> + getGetFeatureViewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetFeatureView", + requestType = com.google.cloud.aiplatform.v1.GetFeatureViewRequest.class, + responseType = com.google.cloud.aiplatform.v1.FeatureView.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetFeatureViewRequest, + com.google.cloud.aiplatform.v1.FeatureView> + getGetFeatureViewMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetFeatureViewRequest, + com.google.cloud.aiplatform.v1.FeatureView> + getGetFeatureViewMethod; + if ((getGetFeatureViewMethod = FeatureOnlineStoreAdminServiceGrpc.getGetFeatureViewMethod) + == null) { + synchronized (FeatureOnlineStoreAdminServiceGrpc.class) { + if ((getGetFeatureViewMethod = FeatureOnlineStoreAdminServiceGrpc.getGetFeatureViewMethod) + == null) { + FeatureOnlineStoreAdminServiceGrpc.getGetFeatureViewMethod = + getGetFeatureViewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetFeatureView")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetFeatureViewRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.FeatureView.getDefaultInstance())) + .setSchemaDescriptor( + new FeatureOnlineStoreAdminServiceMethodDescriptorSupplier( + "GetFeatureView")) + .build(); + } + } + } + return getGetFeatureViewMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListFeatureViewsRequest, + com.google.cloud.aiplatform.v1.ListFeatureViewsResponse> + getListFeatureViewsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListFeatureViews", + requestType = com.google.cloud.aiplatform.v1.ListFeatureViewsRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListFeatureViewsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListFeatureViewsRequest, + com.google.cloud.aiplatform.v1.ListFeatureViewsResponse> + getListFeatureViewsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListFeatureViewsRequest, + com.google.cloud.aiplatform.v1.ListFeatureViewsResponse> + getListFeatureViewsMethod; + if ((getListFeatureViewsMethod = FeatureOnlineStoreAdminServiceGrpc.getListFeatureViewsMethod) + == null) { + synchronized (FeatureOnlineStoreAdminServiceGrpc.class) { + if ((getListFeatureViewsMethod = + FeatureOnlineStoreAdminServiceGrpc.getListFeatureViewsMethod) + == null) { + FeatureOnlineStoreAdminServiceGrpc.getListFeatureViewsMethod = + getListFeatureViewsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListFeatureViews")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListFeatureViewsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListFeatureViewsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new FeatureOnlineStoreAdminServiceMethodDescriptorSupplier( + "ListFeatureViews")) + .build(); + } + } + } + return getListFeatureViewsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest, com.google.longrunning.Operation> + getUpdateFeatureViewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateFeatureView", + requestType = com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest, com.google.longrunning.Operation> + getUpdateFeatureViewMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest, + com.google.longrunning.Operation> + getUpdateFeatureViewMethod; + if ((getUpdateFeatureViewMethod = FeatureOnlineStoreAdminServiceGrpc.getUpdateFeatureViewMethod) + == null) { + synchronized (FeatureOnlineStoreAdminServiceGrpc.class) { + if ((getUpdateFeatureViewMethod = + FeatureOnlineStoreAdminServiceGrpc.getUpdateFeatureViewMethod) + == null) { + FeatureOnlineStoreAdminServiceGrpc.getUpdateFeatureViewMethod = + getUpdateFeatureViewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateFeatureView")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new FeatureOnlineStoreAdminServiceMethodDescriptorSupplier( + "UpdateFeatureView")) + .build(); + } + } + } + return getUpdateFeatureViewMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest, com.google.longrunning.Operation> + getDeleteFeatureViewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteFeatureView", + requestType = com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest, com.google.longrunning.Operation> + getDeleteFeatureViewMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest, + com.google.longrunning.Operation> + getDeleteFeatureViewMethod; + if ((getDeleteFeatureViewMethod = FeatureOnlineStoreAdminServiceGrpc.getDeleteFeatureViewMethod) + == null) { + synchronized (FeatureOnlineStoreAdminServiceGrpc.class) { + if ((getDeleteFeatureViewMethod = + FeatureOnlineStoreAdminServiceGrpc.getDeleteFeatureViewMethod) + == null) { + FeatureOnlineStoreAdminServiceGrpc.getDeleteFeatureViewMethod = + getDeleteFeatureViewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteFeatureView")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new FeatureOnlineStoreAdminServiceMethodDescriptorSupplier( + "DeleteFeatureView")) + .build(); + } + } + } + return getDeleteFeatureViewMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.SyncFeatureViewRequest, + com.google.cloud.aiplatform.v1.SyncFeatureViewResponse> + getSyncFeatureViewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SyncFeatureView", + requestType = com.google.cloud.aiplatform.v1.SyncFeatureViewRequest.class, + responseType = com.google.cloud.aiplatform.v1.SyncFeatureViewResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.SyncFeatureViewRequest, + com.google.cloud.aiplatform.v1.SyncFeatureViewResponse> + getSyncFeatureViewMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.SyncFeatureViewRequest, + com.google.cloud.aiplatform.v1.SyncFeatureViewResponse> + getSyncFeatureViewMethod; + if ((getSyncFeatureViewMethod = FeatureOnlineStoreAdminServiceGrpc.getSyncFeatureViewMethod) + == null) { + synchronized (FeatureOnlineStoreAdminServiceGrpc.class) { + if ((getSyncFeatureViewMethod = FeatureOnlineStoreAdminServiceGrpc.getSyncFeatureViewMethod) + == null) { + FeatureOnlineStoreAdminServiceGrpc.getSyncFeatureViewMethod = + getSyncFeatureViewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SyncFeatureView")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.SyncFeatureViewRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.SyncFeatureViewResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new FeatureOnlineStoreAdminServiceMethodDescriptorSupplier( + "SyncFeatureView")) + .build(); + } + } + } + return getSyncFeatureViewMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest, + com.google.cloud.aiplatform.v1.FeatureViewSync> + getGetFeatureViewSyncMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetFeatureViewSync", + requestType = com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest.class, + responseType = com.google.cloud.aiplatform.v1.FeatureViewSync.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest, + com.google.cloud.aiplatform.v1.FeatureViewSync> + getGetFeatureViewSyncMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest, + com.google.cloud.aiplatform.v1.FeatureViewSync> + getGetFeatureViewSyncMethod; + if ((getGetFeatureViewSyncMethod = + FeatureOnlineStoreAdminServiceGrpc.getGetFeatureViewSyncMethod) + == null) { + synchronized (FeatureOnlineStoreAdminServiceGrpc.class) { + if ((getGetFeatureViewSyncMethod = + FeatureOnlineStoreAdminServiceGrpc.getGetFeatureViewSyncMethod) + == null) { + FeatureOnlineStoreAdminServiceGrpc.getGetFeatureViewSyncMethod = + getGetFeatureViewSyncMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetFeatureViewSync")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.FeatureViewSync.getDefaultInstance())) + .setSchemaDescriptor( + new FeatureOnlineStoreAdminServiceMethodDescriptorSupplier( + "GetFeatureViewSync")) + .build(); + } + } + } + return getGetFeatureViewSyncMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest, + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse> + getListFeatureViewSyncsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListFeatureViewSyncs", + requestType = com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest, + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse> + getListFeatureViewSyncsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest, + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse> + getListFeatureViewSyncsMethod; + if ((getListFeatureViewSyncsMethod = + FeatureOnlineStoreAdminServiceGrpc.getListFeatureViewSyncsMethod) + == null) { + synchronized (FeatureOnlineStoreAdminServiceGrpc.class) { + if ((getListFeatureViewSyncsMethod = + FeatureOnlineStoreAdminServiceGrpc.getListFeatureViewSyncsMethod) + == null) { + FeatureOnlineStoreAdminServiceGrpc.getListFeatureViewSyncsMethod = + getListFeatureViewSyncsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListFeatureViewSyncs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new FeatureOnlineStoreAdminServiceMethodDescriptorSupplier( + "ListFeatureViewSyncs")) + .build(); + } + } + } + return getListFeatureViewSyncsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static FeatureOnlineStoreAdminServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public FeatureOnlineStoreAdminServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FeatureOnlineStoreAdminServiceStub(channel, callOptions); + } + }; + return FeatureOnlineStoreAdminServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static FeatureOnlineStoreAdminServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public FeatureOnlineStoreAdminServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FeatureOnlineStoreAdminServiceBlockingStub(channel, callOptions); + } + }; + return FeatureOnlineStoreAdminServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static FeatureOnlineStoreAdminServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public FeatureOnlineStoreAdminServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FeatureOnlineStoreAdminServiceFutureStub(channel, callOptions); + } + }; + return FeatureOnlineStoreAdminServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * The service that handles CRUD and List for resources for
+   * FeatureOnlineStore.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a new FeatureOnlineStore in a given project and location.
+     * 
+ */ + default void createFeatureOnlineStore( + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateFeatureOnlineStoreMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single FeatureOnlineStore.
+     * 
+ */ + default void getFeatureOnlineStore( + com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetFeatureOnlineStoreMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists FeatureOnlineStores in a given project and location.
+     * 
+ */ + default void listFeatureOnlineStores( + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListFeatureOnlineStoresMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single FeatureOnlineStore.
+     * 
+ */ + default void updateFeatureOnlineStore( + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateFeatureOnlineStoreMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single FeatureOnlineStore. The FeatureOnlineStore must not
+     * contain any FeatureViews.
+     * 
+ */ + default void deleteFeatureOnlineStore( + com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteFeatureOnlineStoreMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new FeatureView in a given FeatureOnlineStore.
+     * 
+ */ + default void createFeatureView( + com.google.cloud.aiplatform.v1.CreateFeatureViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateFeatureViewMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single FeatureView.
+     * 
+ */ + default void getFeatureView( + com.google.cloud.aiplatform.v1.GetFeatureViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetFeatureViewMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists FeatureViews in a given FeatureOnlineStore.
+     * 
+ */ + default void listFeatureViews( + com.google.cloud.aiplatform.v1.ListFeatureViewsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListFeatureViewsMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single FeatureView.
+     * 
+ */ + default void updateFeatureView( + com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateFeatureViewMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single FeatureView.
+     * 
+ */ + default void deleteFeatureView( + com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteFeatureViewMethod(), responseObserver); + } + + /** + * + * + *
+     * Triggers on-demand sync for the FeatureView.
+     * 
+ */ + default void syncFeatureView( + com.google.cloud.aiplatform.v1.SyncFeatureViewRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSyncFeatureViewMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single FeatureViewSync.
+     * 
+ */ + default void getFeatureViewSync( + com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetFeatureViewSyncMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists FeatureViewSyncs in a given FeatureView.
+     * 
+ */ + default void listFeatureViewSyncs( + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListFeatureViewSyncsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service FeatureOnlineStoreAdminService. + * + *
+   * The service that handles CRUD and List for resources for
+   * FeatureOnlineStore.
+   * 
+ */ + public abstract static class FeatureOnlineStoreAdminServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return FeatureOnlineStoreAdminServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service FeatureOnlineStoreAdminService. + * + *
+   * The service that handles CRUD and List for resources for
+   * FeatureOnlineStore.
+   * 
+ */ + public static final class FeatureOnlineStoreAdminServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private FeatureOnlineStoreAdminServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected FeatureOnlineStoreAdminServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FeatureOnlineStoreAdminServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new FeatureOnlineStore in a given project and location.
+     * 
+ */ + public void createFeatureOnlineStore( + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateFeatureOnlineStoreMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single FeatureOnlineStore.
+     * 
+ */ + public void getFeatureOnlineStore( + com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetFeatureOnlineStoreMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists FeatureOnlineStores in a given project and location.
+     * 
+ */ + public void listFeatureOnlineStores( + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListFeatureOnlineStoresMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single FeatureOnlineStore.
+     * 
+ */ + public void updateFeatureOnlineStore( + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateFeatureOnlineStoreMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single FeatureOnlineStore. The FeatureOnlineStore must not
+     * contain any FeatureViews.
+     * 
+ */ + public void deleteFeatureOnlineStore( + com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteFeatureOnlineStoreMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new FeatureView in a given FeatureOnlineStore.
+     * 
+ */ + public void createFeatureView( + com.google.cloud.aiplatform.v1.CreateFeatureViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateFeatureViewMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single FeatureView.
+     * 
+ */ + public void getFeatureView( + com.google.cloud.aiplatform.v1.GetFeatureViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetFeatureViewMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists FeatureViews in a given FeatureOnlineStore.
+     * 
+ */ + public void listFeatureViews( + com.google.cloud.aiplatform.v1.ListFeatureViewsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListFeatureViewsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single FeatureView.
+     * 
+ */ + public void updateFeatureView( + com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateFeatureViewMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single FeatureView.
+     * 
+ */ + public void deleteFeatureView( + com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteFeatureViewMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Triggers on-demand sync for the FeatureView.
+     * 
+ */ + public void syncFeatureView( + com.google.cloud.aiplatform.v1.SyncFeatureViewRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSyncFeatureViewMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single FeatureViewSync.
+     * 
+ */ + public void getFeatureViewSync( + com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetFeatureViewSyncMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists FeatureViewSyncs in a given FeatureView.
+     * 
+ */ + public void listFeatureViewSyncs( + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListFeatureViewSyncsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service FeatureOnlineStoreAdminService. + * + *
+   * The service that handles CRUD and List for resources for
+   * FeatureOnlineStore.
+   * 
+ */ + public static final class FeatureOnlineStoreAdminServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private FeatureOnlineStoreAdminServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected FeatureOnlineStoreAdminServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FeatureOnlineStoreAdminServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new FeatureOnlineStore in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createFeatureOnlineStore( + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateFeatureOnlineStoreMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single FeatureOnlineStore.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.FeatureOnlineStore getFeatureOnlineStore( + com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetFeatureOnlineStoreMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists FeatureOnlineStores in a given project and location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse listFeatureOnlineStores( + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListFeatureOnlineStoresMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single FeatureOnlineStore.
+     * 
+ */ + public com.google.longrunning.Operation updateFeatureOnlineStore( + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateFeatureOnlineStoreMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single FeatureOnlineStore. The FeatureOnlineStore must not
+     * contain any FeatureViews.
+     * 
+ */ + public com.google.longrunning.Operation deleteFeatureOnlineStore( + com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteFeatureOnlineStoreMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new FeatureView in a given FeatureOnlineStore.
+     * 
+ */ + public com.google.longrunning.Operation createFeatureView( + com.google.cloud.aiplatform.v1.CreateFeatureViewRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateFeatureViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single FeatureView.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.FeatureView getFeatureView( + com.google.cloud.aiplatform.v1.GetFeatureViewRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetFeatureViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists FeatureViews in a given FeatureOnlineStore.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListFeatureViewsResponse listFeatureViews( + com.google.cloud.aiplatform.v1.ListFeatureViewsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListFeatureViewsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single FeatureView.
+     * 
+ */ + public com.google.longrunning.Operation updateFeatureView( + com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateFeatureViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single FeatureView.
+     * 
+ */ + public com.google.longrunning.Operation deleteFeatureView( + com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteFeatureViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Triggers on-demand sync for the FeatureView.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.SyncFeatureViewResponse syncFeatureView( + com.google.cloud.aiplatform.v1.SyncFeatureViewRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSyncFeatureViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single FeatureViewSync.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.FeatureViewSync getFeatureViewSync( + com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetFeatureViewSyncMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists FeatureViewSyncs in a given FeatureView.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse listFeatureViewSyncs( + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListFeatureViewSyncsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service + * FeatureOnlineStoreAdminService. + * + *
+   * The service that handles CRUD and List for resources for
+   * FeatureOnlineStore.
+   * 
+ */ + public static final class FeatureOnlineStoreAdminServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private FeatureOnlineStoreAdminServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected FeatureOnlineStoreAdminServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FeatureOnlineStoreAdminServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new FeatureOnlineStore in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createFeatureOnlineStore( + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateFeatureOnlineStoreMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single FeatureOnlineStore.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.FeatureOnlineStore> + getFeatureOnlineStore(com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetFeatureOnlineStoreMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists FeatureOnlineStores in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse> + listFeatureOnlineStores( + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListFeatureOnlineStoresMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single FeatureOnlineStore.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateFeatureOnlineStore( + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateFeatureOnlineStoreMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single FeatureOnlineStore. The FeatureOnlineStore must not
+     * contain any FeatureViews.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteFeatureOnlineStore( + com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteFeatureOnlineStoreMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new FeatureView in a given FeatureOnlineStore.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createFeatureView(com.google.cloud.aiplatform.v1.CreateFeatureViewRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateFeatureViewMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single FeatureView.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.FeatureView> + getFeatureView(com.google.cloud.aiplatform.v1.GetFeatureViewRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetFeatureViewMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists FeatureViews in a given FeatureOnlineStore.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListFeatureViewsResponse> + listFeatureViews(com.google.cloud.aiplatform.v1.ListFeatureViewsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListFeatureViewsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single FeatureView.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateFeatureView(com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateFeatureViewMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single FeatureView.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteFeatureView(com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteFeatureViewMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Triggers on-demand sync for the FeatureView.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.SyncFeatureViewResponse> + syncFeatureView(com.google.cloud.aiplatform.v1.SyncFeatureViewRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSyncFeatureViewMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single FeatureViewSync.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.FeatureViewSync> + getFeatureViewSync(com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetFeatureViewSyncMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists FeatureViewSyncs in a given FeatureView.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse> + listFeatureViewSyncs(com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListFeatureViewSyncsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_FEATURE_ONLINE_STORE = 0; + private static final int METHODID_GET_FEATURE_ONLINE_STORE = 1; + private static final int METHODID_LIST_FEATURE_ONLINE_STORES = 2; + private static final int METHODID_UPDATE_FEATURE_ONLINE_STORE = 3; + private static final int METHODID_DELETE_FEATURE_ONLINE_STORE = 4; + private static final int METHODID_CREATE_FEATURE_VIEW = 5; + private static final int METHODID_GET_FEATURE_VIEW = 6; + private static final int METHODID_LIST_FEATURE_VIEWS = 7; + private static final int METHODID_UPDATE_FEATURE_VIEW = 8; + private static final int METHODID_DELETE_FEATURE_VIEW = 9; + private static final int METHODID_SYNC_FEATURE_VIEW = 10; + private static final int METHODID_GET_FEATURE_VIEW_SYNC = 11; + private static final int METHODID_LIST_FEATURE_VIEW_SYNCS = 12; + + 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_FEATURE_ONLINE_STORE: + serviceImpl.createFeatureOnlineStore( + (com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_FEATURE_ONLINE_STORE: + serviceImpl.getFeatureOnlineStore( + (com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_FEATURE_ONLINE_STORES: + serviceImpl.listFeatureOnlineStores( + (com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse>) + responseObserver); + break; + case METHODID_UPDATE_FEATURE_ONLINE_STORE: + serviceImpl.updateFeatureOnlineStore( + (com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_FEATURE_ONLINE_STORE: + serviceImpl.deleteFeatureOnlineStore( + (com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_FEATURE_VIEW: + serviceImpl.createFeatureView( + (com.google.cloud.aiplatform.v1.CreateFeatureViewRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_FEATURE_VIEW: + serviceImpl.getFeatureView( + (com.google.cloud.aiplatform.v1.GetFeatureViewRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_FEATURE_VIEWS: + serviceImpl.listFeatureViews( + (com.google.cloud.aiplatform.v1.ListFeatureViewsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_FEATURE_VIEW: + serviceImpl.updateFeatureView( + (com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_FEATURE_VIEW: + serviceImpl.deleteFeatureView( + (com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SYNC_FEATURE_VIEW: + serviceImpl.syncFeatureView( + (com.google.cloud.aiplatform.v1.SyncFeatureViewRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_FEATURE_VIEW_SYNC: + serviceImpl.getFeatureViewSync( + (com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_FEATURE_VIEW_SYNCS: + serviceImpl.listFeatureViewSyncs( + (com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse>) + 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( + getCreateFeatureOnlineStoreMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_FEATURE_ONLINE_STORE))) + .addMethod( + getGetFeatureOnlineStoreMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest, + com.google.cloud.aiplatform.v1.FeatureOnlineStore>( + service, METHODID_GET_FEATURE_ONLINE_STORE))) + .addMethod( + getListFeatureOnlineStoresMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest, + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse>( + service, METHODID_LIST_FEATURE_ONLINE_STORES))) + .addMethod( + getUpdateFeatureOnlineStoreMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_FEATURE_ONLINE_STORE))) + .addMethod( + getDeleteFeatureOnlineStoreMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_FEATURE_ONLINE_STORE))) + .addMethod( + getCreateFeatureViewMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CreateFeatureViewRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_FEATURE_VIEW))) + .addMethod( + getGetFeatureViewMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetFeatureViewRequest, + com.google.cloud.aiplatform.v1.FeatureView>( + service, METHODID_GET_FEATURE_VIEW))) + .addMethod( + getListFeatureViewsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListFeatureViewsRequest, + com.google.cloud.aiplatform.v1.ListFeatureViewsResponse>( + service, METHODID_LIST_FEATURE_VIEWS))) + .addMethod( + getUpdateFeatureViewMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_FEATURE_VIEW))) + .addMethod( + getDeleteFeatureViewMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_FEATURE_VIEW))) + .addMethod( + getSyncFeatureViewMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.SyncFeatureViewRequest, + com.google.cloud.aiplatform.v1.SyncFeatureViewResponse>( + service, METHODID_SYNC_FEATURE_VIEW))) + .addMethod( + getGetFeatureViewSyncMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest, + com.google.cloud.aiplatform.v1.FeatureViewSync>( + service, METHODID_GET_FEATURE_VIEW_SYNC))) + .addMethod( + getListFeatureViewSyncsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest, + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse>( + service, METHODID_LIST_FEATURE_VIEW_SYNCS))) + .build(); + } + + private abstract static class FeatureOnlineStoreAdminServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + FeatureOnlineStoreAdminServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("FeatureOnlineStoreAdminService"); + } + } + + private static final class FeatureOnlineStoreAdminServiceFileDescriptorSupplier + extends FeatureOnlineStoreAdminServiceBaseDescriptorSupplier { + FeatureOnlineStoreAdminServiceFileDescriptorSupplier() {} + } + + private static final class FeatureOnlineStoreAdminServiceMethodDescriptorSupplier + extends FeatureOnlineStoreAdminServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + FeatureOnlineStoreAdminServiceMethodDescriptorSupplier(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 (FeatureOnlineStoreAdminServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor( + new FeatureOnlineStoreAdminServiceFileDescriptorSupplier()) + .addMethod(getCreateFeatureOnlineStoreMethod()) + .addMethod(getGetFeatureOnlineStoreMethod()) + .addMethod(getListFeatureOnlineStoresMethod()) + .addMethod(getUpdateFeatureOnlineStoreMethod()) + .addMethod(getDeleteFeatureOnlineStoreMethod()) + .addMethod(getCreateFeatureViewMethod()) + .addMethod(getGetFeatureViewMethod()) + .addMethod(getListFeatureViewsMethod()) + .addMethod(getUpdateFeatureViewMethod()) + .addMethod(getDeleteFeatureViewMethod()) + .addMethod(getSyncFeatureViewMethod()) + .addMethod(getGetFeatureViewSyncMethod()) + .addMethod(getListFeatureViewSyncsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceGrpc.java new file mode 100644 index 000000000000..9499cd26ac54 --- /dev/null +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceGrpc.java @@ -0,0 +1,355 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1/feature_online_store_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class FeatureOnlineStoreServiceGrpc { + + private FeatureOnlineStoreServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.aiplatform.v1.FeatureOnlineStoreService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse> + getFetchFeatureValuesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "FetchFeatureValues", + requestType = com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest.class, + responseType = com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse> + getFetchFeatureValuesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse> + getFetchFeatureValuesMethod; + if ((getFetchFeatureValuesMethod = FeatureOnlineStoreServiceGrpc.getFetchFeatureValuesMethod) + == null) { + synchronized (FeatureOnlineStoreServiceGrpc.class) { + if ((getFetchFeatureValuesMethod = + FeatureOnlineStoreServiceGrpc.getFetchFeatureValuesMethod) + == null) { + FeatureOnlineStoreServiceGrpc.getFetchFeatureValuesMethod = + getFetchFeatureValuesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "FetchFeatureValues")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new FeatureOnlineStoreServiceMethodDescriptorSupplier( + "FetchFeatureValues")) + .build(); + } + } + } + return getFetchFeatureValuesMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static FeatureOnlineStoreServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public FeatureOnlineStoreServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FeatureOnlineStoreServiceStub(channel, callOptions); + } + }; + return FeatureOnlineStoreServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static FeatureOnlineStoreServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public FeatureOnlineStoreServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FeatureOnlineStoreServiceBlockingStub(channel, callOptions); + } + }; + return FeatureOnlineStoreServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static FeatureOnlineStoreServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public FeatureOnlineStoreServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FeatureOnlineStoreServiceFutureStub(channel, callOptions); + } + }; + return FeatureOnlineStoreServiceFutureStub.newStub(factory, channel); + } + + /** */ + public interface AsyncService { + + /** + * + * + *
+     * Fetch feature values under a FeatureView.
+     * 
+ */ + default void fetchFeatureValues( + com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getFetchFeatureValuesMethod(), responseObserver); + } + } + + /** Base class for the server implementation of the service FeatureOnlineStoreService. */ + public abstract static class FeatureOnlineStoreServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return FeatureOnlineStoreServiceGrpc.bindService(this); + } + } + + /** A stub to allow clients to do asynchronous rpc calls to service FeatureOnlineStoreService. */ + public static final class FeatureOnlineStoreServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private FeatureOnlineStoreServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected FeatureOnlineStoreServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FeatureOnlineStoreServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Fetch feature values under a FeatureView.
+     * 
+ */ + public void fetchFeatureValues( + com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getFetchFeatureValuesMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** A stub to allow clients to do synchronous rpc calls to service FeatureOnlineStoreService. */ + public static final class FeatureOnlineStoreServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private FeatureOnlineStoreServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected FeatureOnlineStoreServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FeatureOnlineStoreServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Fetch feature values under a FeatureView.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse fetchFeatureValues( + com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getFetchFeatureValuesMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service + * FeatureOnlineStoreService. + */ + public static final class FeatureOnlineStoreServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private FeatureOnlineStoreServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected FeatureOnlineStoreServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FeatureOnlineStoreServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Fetch feature values under a FeatureView.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse> + fetchFeatureValues(com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getFetchFeatureValuesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_FETCH_FEATURE_VALUES = 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_FETCH_FEATURE_VALUES: + serviceImpl.fetchFeatureValues( + (com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse>) + 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( + getFetchFeatureValuesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse>( + service, METHODID_FETCH_FEATURE_VALUES))) + .build(); + } + + private abstract static class FeatureOnlineStoreServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + FeatureOnlineStoreServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("FeatureOnlineStoreService"); + } + } + + private static final class FeatureOnlineStoreServiceFileDescriptorSupplier + extends FeatureOnlineStoreServiceBaseDescriptorSupplier { + FeatureOnlineStoreServiceFileDescriptorSupplier() {} + } + + private static final class FeatureOnlineStoreServiceMethodDescriptorSupplier + extends FeatureOnlineStoreServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + FeatureOnlineStoreServiceMethodDescriptorSupplier(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 (FeatureOnlineStoreServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new FeatureOnlineStoreServiceFileDescriptorSupplier()) + .addMethod(getFetchFeatureValuesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureRegistryServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureRegistryServiceGrpc.java new file mode 100644 index 000000000000..9ef2ba7fcc6c --- /dev/null +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureRegistryServiceGrpc.java @@ -0,0 +1,1431 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * The service that handles CRUD and List for resources for
+ * FeatureRegistry.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1/feature_registry_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class FeatureRegistryServiceGrpc { + + private FeatureRegistryServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.aiplatform.v1.FeatureRegistryService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest, + com.google.longrunning.Operation> + getCreateFeatureGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateFeatureGroup", + requestType = com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest, + com.google.longrunning.Operation> + getCreateFeatureGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest, + com.google.longrunning.Operation> + getCreateFeatureGroupMethod; + if ((getCreateFeatureGroupMethod = FeatureRegistryServiceGrpc.getCreateFeatureGroupMethod) + == null) { + synchronized (FeatureRegistryServiceGrpc.class) { + if ((getCreateFeatureGroupMethod = FeatureRegistryServiceGrpc.getCreateFeatureGroupMethod) + == null) { + FeatureRegistryServiceGrpc.getCreateFeatureGroupMethod = + getCreateFeatureGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateFeatureGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new FeatureRegistryServiceMethodDescriptorSupplier("CreateFeatureGroup")) + .build(); + } + } + } + return getCreateFeatureGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetFeatureGroupRequest, + com.google.cloud.aiplatform.v1.FeatureGroup> + getGetFeatureGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetFeatureGroup", + requestType = com.google.cloud.aiplatform.v1.GetFeatureGroupRequest.class, + responseType = com.google.cloud.aiplatform.v1.FeatureGroup.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetFeatureGroupRequest, + com.google.cloud.aiplatform.v1.FeatureGroup> + getGetFeatureGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetFeatureGroupRequest, + com.google.cloud.aiplatform.v1.FeatureGroup> + getGetFeatureGroupMethod; + if ((getGetFeatureGroupMethod = FeatureRegistryServiceGrpc.getGetFeatureGroupMethod) == null) { + synchronized (FeatureRegistryServiceGrpc.class) { + if ((getGetFeatureGroupMethod = FeatureRegistryServiceGrpc.getGetFeatureGroupMethod) + == null) { + FeatureRegistryServiceGrpc.getGetFeatureGroupMethod = + getGetFeatureGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetFeatureGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetFeatureGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.FeatureGroup.getDefaultInstance())) + .setSchemaDescriptor( + new FeatureRegistryServiceMethodDescriptorSupplier("GetFeatureGroup")) + .build(); + } + } + } + return getGetFeatureGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest, + com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse> + getListFeatureGroupsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListFeatureGroups", + requestType = com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest, + com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse> + getListFeatureGroupsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest, + com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse> + getListFeatureGroupsMethod; + if ((getListFeatureGroupsMethod = FeatureRegistryServiceGrpc.getListFeatureGroupsMethod) + == null) { + synchronized (FeatureRegistryServiceGrpc.class) { + if ((getListFeatureGroupsMethod = FeatureRegistryServiceGrpc.getListFeatureGroupsMethod) + == null) { + FeatureRegistryServiceGrpc.getListFeatureGroupsMethod = + getListFeatureGroupsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListFeatureGroups")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new FeatureRegistryServiceMethodDescriptorSupplier("ListFeatureGroups")) + .build(); + } + } + } + return getListFeatureGroupsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest, + com.google.longrunning.Operation> + getUpdateFeatureGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateFeatureGroup", + requestType = com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest, + com.google.longrunning.Operation> + getUpdateFeatureGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest, + com.google.longrunning.Operation> + getUpdateFeatureGroupMethod; + if ((getUpdateFeatureGroupMethod = FeatureRegistryServiceGrpc.getUpdateFeatureGroupMethod) + == null) { + synchronized (FeatureRegistryServiceGrpc.class) { + if ((getUpdateFeatureGroupMethod = FeatureRegistryServiceGrpc.getUpdateFeatureGroupMethod) + == null) { + FeatureRegistryServiceGrpc.getUpdateFeatureGroupMethod = + getUpdateFeatureGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateFeatureGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new FeatureRegistryServiceMethodDescriptorSupplier("UpdateFeatureGroup")) + .build(); + } + } + } + return getUpdateFeatureGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest, + com.google.longrunning.Operation> + getDeleteFeatureGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteFeatureGroup", + requestType = com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest, + com.google.longrunning.Operation> + getDeleteFeatureGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest, + com.google.longrunning.Operation> + getDeleteFeatureGroupMethod; + if ((getDeleteFeatureGroupMethod = FeatureRegistryServiceGrpc.getDeleteFeatureGroupMethod) + == null) { + synchronized (FeatureRegistryServiceGrpc.class) { + if ((getDeleteFeatureGroupMethod = FeatureRegistryServiceGrpc.getDeleteFeatureGroupMethod) + == null) { + FeatureRegistryServiceGrpc.getDeleteFeatureGroupMethod = + getDeleteFeatureGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteFeatureGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new FeatureRegistryServiceMethodDescriptorSupplier("DeleteFeatureGroup")) + .build(); + } + } + } + return getDeleteFeatureGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateFeatureRequest, com.google.longrunning.Operation> + getCreateFeatureMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateFeature", + requestType = com.google.cloud.aiplatform.v1.CreateFeatureRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateFeatureRequest, com.google.longrunning.Operation> + getCreateFeatureMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateFeatureRequest, com.google.longrunning.Operation> + getCreateFeatureMethod; + if ((getCreateFeatureMethod = FeatureRegistryServiceGrpc.getCreateFeatureMethod) == null) { + synchronized (FeatureRegistryServiceGrpc.class) { + if ((getCreateFeatureMethod = FeatureRegistryServiceGrpc.getCreateFeatureMethod) == null) { + FeatureRegistryServiceGrpc.getCreateFeatureMethod = + getCreateFeatureMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateFeature")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CreateFeatureRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new FeatureRegistryServiceMethodDescriptorSupplier("CreateFeature")) + .build(); + } + } + } + return getCreateFeatureMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetFeatureRequest, com.google.cloud.aiplatform.v1.Feature> + getGetFeatureMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetFeature", + requestType = com.google.cloud.aiplatform.v1.GetFeatureRequest.class, + responseType = com.google.cloud.aiplatform.v1.Feature.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetFeatureRequest, com.google.cloud.aiplatform.v1.Feature> + getGetFeatureMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetFeatureRequest, + com.google.cloud.aiplatform.v1.Feature> + getGetFeatureMethod; + if ((getGetFeatureMethod = FeatureRegistryServiceGrpc.getGetFeatureMethod) == null) { + synchronized (FeatureRegistryServiceGrpc.class) { + if ((getGetFeatureMethod = FeatureRegistryServiceGrpc.getGetFeatureMethod) == null) { + FeatureRegistryServiceGrpc.getGetFeatureMethod = + getGetFeatureMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetFeature")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetFeatureRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.Feature.getDefaultInstance())) + .setSchemaDescriptor( + new FeatureRegistryServiceMethodDescriptorSupplier("GetFeature")) + .build(); + } + } + } + return getGetFeatureMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListFeaturesRequest, + com.google.cloud.aiplatform.v1.ListFeaturesResponse> + getListFeaturesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListFeatures", + requestType = com.google.cloud.aiplatform.v1.ListFeaturesRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListFeaturesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListFeaturesRequest, + com.google.cloud.aiplatform.v1.ListFeaturesResponse> + getListFeaturesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListFeaturesRequest, + com.google.cloud.aiplatform.v1.ListFeaturesResponse> + getListFeaturesMethod; + if ((getListFeaturesMethod = FeatureRegistryServiceGrpc.getListFeaturesMethod) == null) { + synchronized (FeatureRegistryServiceGrpc.class) { + if ((getListFeaturesMethod = FeatureRegistryServiceGrpc.getListFeaturesMethod) == null) { + FeatureRegistryServiceGrpc.getListFeaturesMethod = + getListFeaturesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListFeatures")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListFeaturesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListFeaturesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new FeatureRegistryServiceMethodDescriptorSupplier("ListFeatures")) + .build(); + } + } + } + return getListFeaturesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateFeatureRequest, com.google.longrunning.Operation> + getUpdateFeatureMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateFeature", + requestType = com.google.cloud.aiplatform.v1.UpdateFeatureRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateFeatureRequest, com.google.longrunning.Operation> + getUpdateFeatureMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateFeatureRequest, com.google.longrunning.Operation> + getUpdateFeatureMethod; + if ((getUpdateFeatureMethod = FeatureRegistryServiceGrpc.getUpdateFeatureMethod) == null) { + synchronized (FeatureRegistryServiceGrpc.class) { + if ((getUpdateFeatureMethod = FeatureRegistryServiceGrpc.getUpdateFeatureMethod) == null) { + FeatureRegistryServiceGrpc.getUpdateFeatureMethod = + getUpdateFeatureMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateFeature")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.UpdateFeatureRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new FeatureRegistryServiceMethodDescriptorSupplier("UpdateFeature")) + .build(); + } + } + } + return getUpdateFeatureMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteFeatureRequest, com.google.longrunning.Operation> + getDeleteFeatureMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteFeature", + requestType = com.google.cloud.aiplatform.v1.DeleteFeatureRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteFeatureRequest, com.google.longrunning.Operation> + getDeleteFeatureMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteFeatureRequest, com.google.longrunning.Operation> + getDeleteFeatureMethod; + if ((getDeleteFeatureMethod = FeatureRegistryServiceGrpc.getDeleteFeatureMethod) == null) { + synchronized (FeatureRegistryServiceGrpc.class) { + if ((getDeleteFeatureMethod = FeatureRegistryServiceGrpc.getDeleteFeatureMethod) == null) { + FeatureRegistryServiceGrpc.getDeleteFeatureMethod = + getDeleteFeatureMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteFeature")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.DeleteFeatureRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new FeatureRegistryServiceMethodDescriptorSupplier("DeleteFeature")) + .build(); + } + } + } + return getDeleteFeatureMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static FeatureRegistryServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public FeatureRegistryServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FeatureRegistryServiceStub(channel, callOptions); + } + }; + return FeatureRegistryServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static FeatureRegistryServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public FeatureRegistryServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FeatureRegistryServiceBlockingStub(channel, callOptions); + } + }; + return FeatureRegistryServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static FeatureRegistryServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public FeatureRegistryServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FeatureRegistryServiceFutureStub(channel, callOptions); + } + }; + return FeatureRegistryServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * The service that handles CRUD and List for resources for
+   * FeatureRegistry.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a new FeatureGroup in a given project and location.
+     * 
+ */ + default void createFeatureGroup( + com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateFeatureGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single FeatureGroup.
+     * 
+ */ + default void getFeatureGroup( + com.google.cloud.aiplatform.v1.GetFeatureGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetFeatureGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists FeatureGroups in a given project and location.
+     * 
+ */ + default void listFeatureGroups( + com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListFeatureGroupsMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single FeatureGroup.
+     * 
+ */ + default void updateFeatureGroup( + com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateFeatureGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single FeatureGroup.
+     * 
+ */ + default void deleteFeatureGroup( + com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteFeatureGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Feature in a given FeatureGroup.
+     * 
+ */ + default void createFeature( + com.google.cloud.aiplatform.v1.CreateFeatureRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateFeatureMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Feature.
+     * 
+ */ + default void getFeature( + com.google.cloud.aiplatform.v1.GetFeatureRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetFeatureMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Features in a given FeatureGroup.
+     * 
+ */ + default void listFeatures( + com.google.cloud.aiplatform.v1.ListFeaturesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListFeaturesMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Feature.
+     * 
+ */ + default void updateFeature( + com.google.cloud.aiplatform.v1.UpdateFeatureRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateFeatureMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Feature.
+     * 
+ */ + default void deleteFeature( + com.google.cloud.aiplatform.v1.DeleteFeatureRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteFeatureMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service FeatureRegistryService. + * + *
+   * The service that handles CRUD and List for resources for
+   * FeatureRegistry.
+   * 
+ */ + public abstract static class FeatureRegistryServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return FeatureRegistryServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service FeatureRegistryService. + * + *
+   * The service that handles CRUD and List for resources for
+   * FeatureRegistry.
+   * 
+ */ + public static final class FeatureRegistryServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private FeatureRegistryServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected FeatureRegistryServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FeatureRegistryServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new FeatureGroup in a given project and location.
+     * 
+ */ + public void createFeatureGroup( + com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateFeatureGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single FeatureGroup.
+     * 
+ */ + public void getFeatureGroup( + com.google.cloud.aiplatform.v1.GetFeatureGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetFeatureGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists FeatureGroups in a given project and location.
+     * 
+ */ + public void listFeatureGroups( + com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListFeatureGroupsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single FeatureGroup.
+     * 
+ */ + public void updateFeatureGroup( + com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateFeatureGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single FeatureGroup.
+     * 
+ */ + public void deleteFeatureGroup( + com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteFeatureGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new Feature in a given FeatureGroup.
+     * 
+ */ + public void createFeature( + com.google.cloud.aiplatform.v1.CreateFeatureRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateFeatureMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Feature.
+     * 
+ */ + public void getFeature( + com.google.cloud.aiplatform.v1.GetFeatureRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetFeatureMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists Features in a given FeatureGroup.
+     * 
+ */ + public void listFeatures( + com.google.cloud.aiplatform.v1.ListFeaturesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListFeaturesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Feature.
+     * 
+ */ + public void updateFeature( + com.google.cloud.aiplatform.v1.UpdateFeatureRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateFeatureMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Feature.
+     * 
+ */ + public void deleteFeature( + com.google.cloud.aiplatform.v1.DeleteFeatureRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteFeatureMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service FeatureRegistryService. + * + *
+   * The service that handles CRUD and List for resources for
+   * FeatureRegistry.
+   * 
+ */ + public static final class FeatureRegistryServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private FeatureRegistryServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected FeatureRegistryServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FeatureRegistryServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new FeatureGroup in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createFeatureGroup( + com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateFeatureGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single FeatureGroup.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.FeatureGroup getFeatureGroup( + com.google.cloud.aiplatform.v1.GetFeatureGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetFeatureGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists FeatureGroups in a given project and location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse listFeatureGroups( + com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListFeatureGroupsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single FeatureGroup.
+     * 
+ */ + public com.google.longrunning.Operation updateFeatureGroup( + com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateFeatureGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single FeatureGroup.
+     * 
+ */ + public com.google.longrunning.Operation deleteFeatureGroup( + com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteFeatureGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Feature in a given FeatureGroup.
+     * 
+ */ + public com.google.longrunning.Operation createFeature( + com.google.cloud.aiplatform.v1.CreateFeatureRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateFeatureMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Feature.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.Feature getFeature( + com.google.cloud.aiplatform.v1.GetFeatureRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetFeatureMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Features in a given FeatureGroup.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListFeaturesResponse listFeatures( + com.google.cloud.aiplatform.v1.ListFeaturesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListFeaturesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Feature.
+     * 
+ */ + public com.google.longrunning.Operation updateFeature( + com.google.cloud.aiplatform.v1.UpdateFeatureRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateFeatureMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Feature.
+     * 
+ */ + public com.google.longrunning.Operation deleteFeature( + com.google.cloud.aiplatform.v1.DeleteFeatureRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteFeatureMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service + * FeatureRegistryService. + * + *
+   * The service that handles CRUD and List for resources for
+   * FeatureRegistry.
+   * 
+ */ + public static final class FeatureRegistryServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private FeatureRegistryServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected FeatureRegistryServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FeatureRegistryServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new FeatureGroup in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createFeatureGroup(com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateFeatureGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single FeatureGroup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.FeatureGroup> + getFeatureGroup(com.google.cloud.aiplatform.v1.GetFeatureGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetFeatureGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists FeatureGroups in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse> + listFeatureGroups(com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListFeatureGroupsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single FeatureGroup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateFeatureGroup(com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateFeatureGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single FeatureGroup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteFeatureGroup(com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteFeatureGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Feature in a given FeatureGroup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createFeature(com.google.cloud.aiplatform.v1.CreateFeatureRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateFeatureMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Feature.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.Feature> + getFeature(com.google.cloud.aiplatform.v1.GetFeatureRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetFeatureMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Features in a given FeatureGroup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListFeaturesResponse> + listFeatures(com.google.cloud.aiplatform.v1.ListFeaturesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListFeaturesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Feature.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateFeature(com.google.cloud.aiplatform.v1.UpdateFeatureRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateFeatureMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Feature.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteFeature(com.google.cloud.aiplatform.v1.DeleteFeatureRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteFeatureMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_FEATURE_GROUP = 0; + private static final int METHODID_GET_FEATURE_GROUP = 1; + private static final int METHODID_LIST_FEATURE_GROUPS = 2; + private static final int METHODID_UPDATE_FEATURE_GROUP = 3; + private static final int METHODID_DELETE_FEATURE_GROUP = 4; + private static final int METHODID_CREATE_FEATURE = 5; + private static final int METHODID_GET_FEATURE = 6; + private static final int METHODID_LIST_FEATURES = 7; + private static final int METHODID_UPDATE_FEATURE = 8; + private static final int METHODID_DELETE_FEATURE = 9; + + 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_FEATURE_GROUP: + serviceImpl.createFeatureGroup( + (com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_FEATURE_GROUP: + serviceImpl.getFeatureGroup( + (com.google.cloud.aiplatform.v1.GetFeatureGroupRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_FEATURE_GROUPS: + serviceImpl.listFeatureGroups( + (com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse>) + responseObserver); + break; + case METHODID_UPDATE_FEATURE_GROUP: + serviceImpl.updateFeatureGroup( + (com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_FEATURE_GROUP: + serviceImpl.deleteFeatureGroup( + (com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_FEATURE: + serviceImpl.createFeature( + (com.google.cloud.aiplatform.v1.CreateFeatureRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_FEATURE: + serviceImpl.getFeature( + (com.google.cloud.aiplatform.v1.GetFeatureRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_FEATURES: + serviceImpl.listFeatures( + (com.google.cloud.aiplatform.v1.ListFeaturesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_FEATURE: + serviceImpl.updateFeature( + (com.google.cloud.aiplatform.v1.UpdateFeatureRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_FEATURE: + serviceImpl.deleteFeature( + (com.google.cloud.aiplatform.v1.DeleteFeatureRequest) 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( + getCreateFeatureGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_FEATURE_GROUP))) + .addMethod( + getGetFeatureGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetFeatureGroupRequest, + com.google.cloud.aiplatform.v1.FeatureGroup>( + service, METHODID_GET_FEATURE_GROUP))) + .addMethod( + getListFeatureGroupsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest, + com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse>( + service, METHODID_LIST_FEATURE_GROUPS))) + .addMethod( + getUpdateFeatureGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_FEATURE_GROUP))) + .addMethod( + getDeleteFeatureGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_FEATURE_GROUP))) + .addMethod( + getCreateFeatureMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CreateFeatureRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_FEATURE))) + .addMethod( + getGetFeatureMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetFeatureRequest, + com.google.cloud.aiplatform.v1.Feature>(service, METHODID_GET_FEATURE))) + .addMethod( + getListFeaturesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListFeaturesRequest, + com.google.cloud.aiplatform.v1.ListFeaturesResponse>( + service, METHODID_LIST_FEATURES))) + .addMethod( + getUpdateFeatureMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.UpdateFeatureRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_FEATURE))) + .addMethod( + getDeleteFeatureMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.DeleteFeatureRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_FEATURE))) + .build(); + } + + private abstract static class FeatureRegistryServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + FeatureRegistryServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("FeatureRegistryService"); + } + } + + private static final class FeatureRegistryServiceFileDescriptorSupplier + extends FeatureRegistryServiceBaseDescriptorSupplier { + FeatureRegistryServiceFileDescriptorSupplier() {} + } + + private static final class FeatureRegistryServiceMethodDescriptorSupplier + extends FeatureRegistryServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + FeatureRegistryServiceMethodDescriptorSupplier(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 (FeatureRegistryServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new FeatureRegistryServiceFileDescriptorSupplier()) + .addMethod(getCreateFeatureGroupMethod()) + .addMethod(getGetFeatureGroupMethod()) + .addMethod(getListFeatureGroupsMethod()) + .addMethod(getUpdateFeatureGroupMethod()) + .addMethod(getDeleteFeatureGroupMethod()) + .addMethod(getCreateFeatureMethod()) + .addMethod(getGetFeatureMethod()) + .addMethod(getListFeaturesMethod()) + .addMethod(getUpdateFeatureMethod()) + .addMethod(getDeleteFeatureMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceGrpc.java new file mode 100644 index 000000000000..fa15ea3fe85c --- /dev/null +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceGrpc.java @@ -0,0 +1,502 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for LLM related utility functions.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1/llm_utility_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class LlmUtilityServiceGrpc { + + private LlmUtilityServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.aiplatform.v1.LlmUtilityService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CountTokensRequest, + com.google.cloud.aiplatform.v1.CountTokensResponse> + getCountTokensMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CountTokens", + requestType = com.google.cloud.aiplatform.v1.CountTokensRequest.class, + responseType = com.google.cloud.aiplatform.v1.CountTokensResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CountTokensRequest, + com.google.cloud.aiplatform.v1.CountTokensResponse> + getCountTokensMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CountTokensRequest, + com.google.cloud.aiplatform.v1.CountTokensResponse> + getCountTokensMethod; + if ((getCountTokensMethod = LlmUtilityServiceGrpc.getCountTokensMethod) == null) { + synchronized (LlmUtilityServiceGrpc.class) { + if ((getCountTokensMethod = LlmUtilityServiceGrpc.getCountTokensMethod) == null) { + LlmUtilityServiceGrpc.getCountTokensMethod = + getCountTokensMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CountTokens")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CountTokensRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CountTokensResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new LlmUtilityServiceMethodDescriptorSupplier("CountTokens")) + .build(); + } + } + } + return getCountTokensMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ComputeTokensRequest, + com.google.cloud.aiplatform.v1.ComputeTokensResponse> + getComputeTokensMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ComputeTokens", + requestType = com.google.cloud.aiplatform.v1.ComputeTokensRequest.class, + responseType = com.google.cloud.aiplatform.v1.ComputeTokensResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ComputeTokensRequest, + com.google.cloud.aiplatform.v1.ComputeTokensResponse> + getComputeTokensMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ComputeTokensRequest, + com.google.cloud.aiplatform.v1.ComputeTokensResponse> + getComputeTokensMethod; + if ((getComputeTokensMethod = LlmUtilityServiceGrpc.getComputeTokensMethod) == null) { + synchronized (LlmUtilityServiceGrpc.class) { + if ((getComputeTokensMethod = LlmUtilityServiceGrpc.getComputeTokensMethod) == null) { + LlmUtilityServiceGrpc.getComputeTokensMethod = + getComputeTokensMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ComputeTokens")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ComputeTokensRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ComputeTokensResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new LlmUtilityServiceMethodDescriptorSupplier("ComputeTokens")) + .build(); + } + } + } + return getComputeTokensMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static LlmUtilityServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LlmUtilityServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LlmUtilityServiceStub(channel, callOptions); + } + }; + return LlmUtilityServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static LlmUtilityServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LlmUtilityServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LlmUtilityServiceBlockingStub(channel, callOptions); + } + }; + return LlmUtilityServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static LlmUtilityServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LlmUtilityServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LlmUtilityServiceFutureStub(channel, callOptions); + } + }; + return LlmUtilityServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for LLM related utility functions.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Perform a token counting.
+     * 
+ */ + default void countTokens( + com.google.cloud.aiplatform.v1.CountTokensRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCountTokensMethod(), responseObserver); + } + + /** + * + * + *
+     * Return a list of tokens based on the input text.
+     * 
+ */ + default void computeTokens( + com.google.cloud.aiplatform.v1.ComputeTokensRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getComputeTokensMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service LlmUtilityService. + * + *
+   * Service for LLM related utility functions.
+   * 
+ */ + public abstract static class LlmUtilityServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return LlmUtilityServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service LlmUtilityService. + * + *
+   * Service for LLM related utility functions.
+   * 
+ */ + public static final class LlmUtilityServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private LlmUtilityServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LlmUtilityServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LlmUtilityServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Perform a token counting.
+     * 
+ */ + public void countTokens( + com.google.cloud.aiplatform.v1.CountTokensRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCountTokensMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Return a list of tokens based on the input text.
+     * 
+ */ + public void computeTokens( + com.google.cloud.aiplatform.v1.ComputeTokensRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getComputeTokensMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service LlmUtilityService. + * + *
+   * Service for LLM related utility functions.
+   * 
+ */ + public static final class LlmUtilityServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private LlmUtilityServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LlmUtilityServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LlmUtilityServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Perform a token counting.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.CountTokensResponse countTokens( + com.google.cloud.aiplatform.v1.CountTokensRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCountTokensMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Return a list of tokens based on the input text.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ComputeTokensResponse computeTokens( + com.google.cloud.aiplatform.v1.ComputeTokensRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getComputeTokensMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service LlmUtilityService. + * + *
+   * Service for LLM related utility functions.
+   * 
+ */ + public static final class LlmUtilityServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private LlmUtilityServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LlmUtilityServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LlmUtilityServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Perform a token counting.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.CountTokensResponse> + countTokens(com.google.cloud.aiplatform.v1.CountTokensRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCountTokensMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Return a list of tokens based on the input text.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ComputeTokensResponse> + computeTokens(com.google.cloud.aiplatform.v1.ComputeTokensRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getComputeTokensMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_COUNT_TOKENS = 0; + private static final int METHODID_COMPUTE_TOKENS = 1; + + 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_COUNT_TOKENS: + serviceImpl.countTokens( + (com.google.cloud.aiplatform.v1.CountTokensRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_COMPUTE_TOKENS: + serviceImpl.computeTokens( + (com.google.cloud.aiplatform.v1.ComputeTokensRequest) 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( + getCountTokensMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CountTokensRequest, + com.google.cloud.aiplatform.v1.CountTokensResponse>( + service, METHODID_COUNT_TOKENS))) + .addMethod( + getComputeTokensMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ComputeTokensRequest, + com.google.cloud.aiplatform.v1.ComputeTokensResponse>( + service, METHODID_COMPUTE_TOKENS))) + .build(); + } + + private abstract static class LlmUtilityServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + LlmUtilityServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1.LlmUtilityServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("LlmUtilityService"); + } + } + + private static final class LlmUtilityServiceFileDescriptorSupplier + extends LlmUtilityServiceBaseDescriptorSupplier { + LlmUtilityServiceFileDescriptorSupplier() {} + } + + private static final class LlmUtilityServiceMethodDescriptorSupplier + extends LlmUtilityServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + LlmUtilityServiceMethodDescriptorSupplier(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 (LlmUtilityServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new LlmUtilityServiceFileDescriptorSupplier()) + .addMethod(getCountTokensMethod()) + .addMethod(getComputeTokensMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/LlmUtilityServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/LlmUtilityServiceGrpc.java new file mode 100644 index 000000000000..1b64c860cd66 --- /dev/null +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/LlmUtilityServiceGrpc.java @@ -0,0 +1,382 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for LLM related utility functions.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1beta1/llm_utility_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class LlmUtilityServiceGrpc { + + private LlmUtilityServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.aiplatform.v1beta1.LlmUtilityService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest, + com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse> + getComputeTokensMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ComputeTokens", + requestType = com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest, + com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse> + getComputeTokensMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest, + com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse> + getComputeTokensMethod; + if ((getComputeTokensMethod = LlmUtilityServiceGrpc.getComputeTokensMethod) == null) { + synchronized (LlmUtilityServiceGrpc.class) { + if ((getComputeTokensMethod = LlmUtilityServiceGrpc.getComputeTokensMethod) == null) { + LlmUtilityServiceGrpc.getComputeTokensMethod = + getComputeTokensMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ComputeTokens")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new LlmUtilityServiceMethodDescriptorSupplier("ComputeTokens")) + .build(); + } + } + } + return getComputeTokensMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static LlmUtilityServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LlmUtilityServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LlmUtilityServiceStub(channel, callOptions); + } + }; + return LlmUtilityServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static LlmUtilityServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LlmUtilityServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LlmUtilityServiceBlockingStub(channel, callOptions); + } + }; + return LlmUtilityServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static LlmUtilityServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LlmUtilityServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LlmUtilityServiceFutureStub(channel, callOptions); + } + }; + return LlmUtilityServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for LLM related utility functions.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Return a list of tokens based on the input text.
+     * 
+ */ + default void computeTokens( + com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getComputeTokensMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service LlmUtilityService. + * + *
+   * Service for LLM related utility functions.
+   * 
+ */ + public abstract static class LlmUtilityServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return LlmUtilityServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service LlmUtilityService. + * + *
+   * Service for LLM related utility functions.
+   * 
+ */ + public static final class LlmUtilityServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private LlmUtilityServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LlmUtilityServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LlmUtilityServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Return a list of tokens based on the input text.
+     * 
+ */ + public void computeTokens( + com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getComputeTokensMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service LlmUtilityService. + * + *
+   * Service for LLM related utility functions.
+   * 
+ */ + public static final class LlmUtilityServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private LlmUtilityServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LlmUtilityServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LlmUtilityServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Return a list of tokens based on the input text.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse computeTokens( + com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getComputeTokensMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service LlmUtilityService. + * + *
+   * Service for LLM related utility functions.
+   * 
+ */ + public static final class LlmUtilityServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private LlmUtilityServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LlmUtilityServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LlmUtilityServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Return a list of tokens based on the input text.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse> + computeTokens(com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getComputeTokensMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_COMPUTE_TOKENS = 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_COMPUTE_TOKENS: + serviceImpl.computeTokens( + (com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse>) + 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( + getComputeTokensMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest, + com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse>( + service, METHODID_COMPUTE_TOKENS))) + .build(); + } + + private abstract static class LlmUtilityServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + LlmUtilityServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("LlmUtilityService"); + } + } + + private static final class LlmUtilityServiceFileDescriptorSupplier + extends LlmUtilityServiceBaseDescriptorSupplier { + LlmUtilityServiceFileDescriptorSupplier() {} + } + + private static final class LlmUtilityServiceMethodDescriptorSupplier + extends LlmUtilityServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + LlmUtilityServiceMethodDescriptorSupplier(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 (LlmUtilityServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new LlmUtilityServiceFileDescriptorSupplier()) + .addMethod(getComputeTokensMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceGrpc.java index 8c72b44be09b..55f20291ce7f 100644 --- a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceGrpc.java +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceGrpc.java @@ -470,6 +470,56 @@ private PipelineServiceGrpc() {} return getDeletePipelineJobMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest, + com.google.longrunning.Operation> + getBatchDeletePipelineJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchDeletePipelineJobs", + requestType = com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest, + com.google.longrunning.Operation> + getBatchDeletePipelineJobsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest, + com.google.longrunning.Operation> + getBatchDeletePipelineJobsMethod; + if ((getBatchDeletePipelineJobsMethod = PipelineServiceGrpc.getBatchDeletePipelineJobsMethod) + == null) { + synchronized (PipelineServiceGrpc.class) { + if ((getBatchDeletePipelineJobsMethod = + PipelineServiceGrpc.getBatchDeletePipelineJobsMethod) + == null) { + PipelineServiceGrpc.getBatchDeletePipelineJobsMethod = + getBatchDeletePipelineJobsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "BatchDeletePipelineJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PipelineServiceMethodDescriptorSupplier("BatchDeletePipelineJobs")) + .build(); + } + } + } + return getBatchDeletePipelineJobsMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.aiplatform.v1beta1.CancelPipelineJobRequest, com.google.protobuf.Empty> getCancelPipelineJobMethod; @@ -712,6 +762,22 @@ default void deletePipelineJob( getDeletePipelineJobMethod(), responseObserver); } + /** + * + * + *
+     * Batch deletes PipelineJobs
+     * The Operation is atomic. If it fails, none of the PipelineJobs are deleted.
+     * If it succeeds, all of the PipelineJobs are deleted.
+     * 
+ */ + default void batchDeletePipelineJobs( + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBatchDeletePipelineJobsMethod(), responseObserver); + } + /** * * @@ -942,6 +1008,24 @@ public void deletePipelineJob( responseObserver); } + /** + * + * + *
+     * Batch deletes PipelineJobs
+     * The Operation is atomic. If it fails, none of the PipelineJobs are deleted.
+     * If it succeeds, all of the PipelineJobs are deleted.
+     * 
+ */ + public void batchDeletePipelineJobs( + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchDeletePipelineJobsMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1123,6 +1207,21 @@ public com.google.longrunning.Operation deletePipelineJob( getChannel(), getDeletePipelineJobMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Batch deletes PipelineJobs
+     * The Operation is atomic. If it fails, none of the PipelineJobs are deleted.
+     * If it succeeds, all of the PipelineJobs are deleted.
+     * 
+ */ + public com.google.longrunning.Operation batchDeletePipelineJobs( + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchDeletePipelineJobsMethod(), getCallOptions(), request); + } + /** * * @@ -1312,6 +1411,22 @@ protected PipelineServiceFutureStub build( getChannel().newCall(getDeletePipelineJobMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Batch deletes PipelineJobs
+     * The Operation is atomic. If it fails, none of the PipelineJobs are deleted.
+     * If it succeeds, all of the PipelineJobs are deleted.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + batchDeletePipelineJobs( + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchDeletePipelineJobsMethod(), getCallOptions()), request); + } + /** * * @@ -1347,7 +1462,8 @@ protected PipelineServiceFutureStub build( private static final int METHODID_GET_PIPELINE_JOB = 6; private static final int METHODID_LIST_PIPELINE_JOBS = 7; private static final int METHODID_DELETE_PIPELINE_JOB = 8; - private static final int METHODID_CANCEL_PIPELINE_JOB = 9; + private static final int METHODID_BATCH_DELETE_PIPELINE_JOBS = 9; + private static final int METHODID_CANCEL_PIPELINE_JOB = 10; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1419,6 +1535,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.aiplatform.v1beta1.DeletePipelineJobRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_BATCH_DELETE_PIPELINE_JOBS: + serviceImpl.batchDeletePipelineJobs( + (com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_CANCEL_PIPELINE_JOB: serviceImpl.cancelPipelineJob( (com.google.cloud.aiplatform.v1beta1.CancelPipelineJobRequest) request, @@ -1502,6 +1623,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.aiplatform.v1beta1.DeletePipelineJobRequest, com.google.longrunning.Operation>(service, METHODID_DELETE_PIPELINE_JOB))) + .addMethod( + getBatchDeletePipelineJobsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest, + com.google.longrunning.Operation>( + service, METHODID_BATCH_DELETE_PIPELINE_JOBS))) .addMethod( getCancelPipelineJobMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1568,6 +1696,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGetPipelineJobMethod()) .addMethod(getListPipelineJobsMethod()) .addMethod(getDeletePipelineJobMethod()) + .addMethod(getBatchDeletePipelineJobsMethod()) .addMethod(getCancelPipelineJobMethod()) .build(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputeTokensRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputeTokensRequest.java new file mode 100644 index 000000000000..880c1a8d3bf6 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputeTokensRequest.java @@ -0,0 +1,1218 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/llm_utility_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for ComputeTokens RPC call.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ComputeTokensRequest} + */ +public final class ComputeTokensRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ComputeTokensRequest) + ComputeTokensRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ComputeTokensRequest.newBuilder() to construct. + private ComputeTokensRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ComputeTokensRequest() { + endpoint_ = ""; + instances_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ComputeTokensRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1_ComputeTokensRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1_ComputeTokensRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ComputeTokensRequest.class, + com.google.cloud.aiplatform.v1.ComputeTokensRequest.Builder.class); + } + + public static final int ENDPOINT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object endpoint_ = ""; + /** + * + * + *
+   * Required. The name of the Endpoint requested to get lists of tokens and
+   * token ids.
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + @java.lang.Override + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Endpoint requested to get lists of tokens and
+   * token ids.
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List instances_; + /** + * + * + *
+   * Required. The instances that are the input to token computing API call.
+   * Schema is identical to the prediction schema of the text model, even for
+   * the non-text models, like chat models, or Codey models.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getInstancesList() { + return instances_; + } + /** + * + * + *
+   * Required. The instances that are the input to token computing API call.
+   * Schema is identical to the prediction schema of the text model, even for
+   * the non-text models, like chat models, or Codey models.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getInstancesOrBuilderList() { + return instances_; + } + /** + * + * + *
+   * Required. The instances that are the input to token computing API call.
+   * Schema is identical to the prediction schema of the text model, even for
+   * the non-text models, like chat models, or Codey models.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getInstancesCount() { + return instances_.size(); + } + /** + * + * + *
+   * Required. The instances that are the input to token computing API call.
+   * Schema is identical to the prediction schema of the text model, even for
+   * the non-text models, like chat models, or Codey models.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.Value getInstances(int index) { + return instances_.get(index); + } + /** + * + * + *
+   * Required. The instances that are the input to token computing API call.
+   * Schema is identical to the prediction schema of the text model, even for
+   * the non-text models, like chat models, or Codey models.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index) { + return instances_.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(endpoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, endpoint_); + } + for (int i = 0; i < instances_.size(); i++) { + output.writeMessage(2, instances_.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(endpoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, endpoint_); + } + for (int i = 0; i < instances_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, instances_.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.aiplatform.v1.ComputeTokensRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ComputeTokensRequest other = + (com.google.cloud.aiplatform.v1.ComputeTokensRequest) obj; + + if (!getEndpoint().equals(other.getEndpoint())) return false; + if (!getInstancesList().equals(other.getInstancesList())) return false; + if (!getUnknownFields().equals(other.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) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + if (getInstancesCount() > 0) { + hash = (37 * hash) + INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getInstancesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.ComputeTokensRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 ComputeTokens RPC call.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ComputeTokensRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ComputeTokensRequest) + com.google.cloud.aiplatform.v1.ComputeTokensRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1_ComputeTokensRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1_ComputeTokensRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ComputeTokensRequest.class, + com.google.cloud.aiplatform.v1.ComputeTokensRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ComputeTokensRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpoint_ = ""; + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + } else { + instances_ = null; + instancesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1_ComputeTokensRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ComputeTokensRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ComputeTokensRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ComputeTokensRequest build() { + com.google.cloud.aiplatform.v1.ComputeTokensRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ComputeTokensRequest buildPartial() { + com.google.cloud.aiplatform.v1.ComputeTokensRequest result = + new com.google.cloud.aiplatform.v1.ComputeTokensRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.ComputeTokensRequest result) { + if (instancesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + instances_ = java.util.Collections.unmodifiableList(instances_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.instances_ = instances_; + } else { + result.instances_ = instancesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ComputeTokensRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpoint_ = endpoint_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ComputeTokensRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ComputeTokensRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ComputeTokensRequest other) { + if (other == com.google.cloud.aiplatform.v1.ComputeTokensRequest.getDefaultInstance()) + return this; + if (!other.getEndpoint().isEmpty()) { + endpoint_ = other.endpoint_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (instancesBuilder_ == null) { + if (!other.instances_.isEmpty()) { + if (instances_.isEmpty()) { + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureInstancesIsMutable(); + instances_.addAll(other.instances_); + } + onChanged(); + } + } else { + if (!other.instances_.isEmpty()) { + if (instancesBuilder_.isEmpty()) { + instancesBuilder_.dispose(); + instancesBuilder_ = null; + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000002); + instancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInstancesFieldBuilder() + : null; + } else { + instancesBuilder_.addAllMessages(other.instances_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + endpoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.protobuf.Value m = + input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(m); + } else { + instancesBuilder_.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 endpoint_ = ""; + /** + * + * + *
+     * Required. The name of the Endpoint requested to get lists of tokens and
+     * token ids.
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Endpoint requested to get lists of tokens and
+     * token ids.
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Endpoint requested to get lists of tokens and
+     * token ids.
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + endpoint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Endpoint requested to get lists of tokens and
+     * token ids.
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEndpoint() { + endpoint_ = getDefaultInstance().getEndpoint(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Endpoint requested to get lists of tokens and
+     * token ids.
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + endpoint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List instances_ = + java.util.Collections.emptyList(); + + private void ensureInstancesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + instances_ = new java.util.ArrayList(instances_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + instancesBuilder_; + + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getInstancesList() { + if (instancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(instances_); + } else { + return instancesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getInstancesCount() { + if (instancesBuilder_ == null) { + return instances_.size(); + } else { + return instancesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Value getInstances(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstances(int index, com.google.protobuf.Value value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.set(index, value); + onChanged(); + } else { + instancesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstances(int index, com.google.protobuf.Value.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.set(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addInstances(com.google.protobuf.Value value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(value); + onChanged(); + } else { + instancesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addInstances(int index, com.google.protobuf.Value value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(index, value); + onChanged(); + } else { + instancesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addInstances(com.google.protobuf.Value.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addInstances(int index, com.google.protobuf.Value.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInstances() { + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + instancesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeInstances(int index) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.remove(index); + onChanged(); + } else { + instancesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Value.Builder getInstancesBuilder(int index) { + return getInstancesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getInstancesOrBuilderList() { + if (instancesBuilder_ != null) { + return instancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(instances_); + } + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Value.Builder addInstancesBuilder() { + return getInstancesFieldBuilder().addBuilder(com.google.protobuf.Value.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Value.Builder addInstancesBuilder(int index) { + return getInstancesFieldBuilder() + .addBuilder(index, com.google.protobuf.Value.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getInstancesBuilderList() { + return getInstancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getInstancesFieldBuilder() { + if (instancesBuilder_ == null) { + instancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + instances_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + instances_ = null; + } + return instancesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ComputeTokensRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ComputeTokensRequest) + private static final com.google.cloud.aiplatform.v1.ComputeTokensRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ComputeTokensRequest(); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComputeTokensRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ComputeTokensRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputeTokensRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputeTokensRequestOrBuilder.java new file mode 100644 index 000000000000..7715b8b4cea5 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputeTokensRequestOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/llm_utility_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ComputeTokensRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ComputeTokensRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Endpoint requested to get lists of tokens and
+   * token ids.
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + java.lang.String getEndpoint(); + /** + * + * + *
+   * Required. The name of the Endpoint requested to get lists of tokens and
+   * token ids.
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + com.google.protobuf.ByteString getEndpointBytes(); + + /** + * + * + *
+   * Required. The instances that are the input to token computing API call.
+   * Schema is identical to the prediction schema of the text model, even for
+   * the non-text models, like chat models, or Codey models.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getInstancesList(); + /** + * + * + *
+   * Required. The instances that are the input to token computing API call.
+   * Schema is identical to the prediction schema of the text model, even for
+   * the non-text models, like chat models, or Codey models.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.Value getInstances(int index); + /** + * + * + *
+   * Required. The instances that are the input to token computing API call.
+   * Schema is identical to the prediction schema of the text model, even for
+   * the non-text models, like chat models, or Codey models.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getInstancesCount(); + /** + * + * + *
+   * Required. The instances that are the input to token computing API call.
+   * Schema is identical to the prediction schema of the text model, even for
+   * the non-text models, like chat models, or Codey models.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getInstancesOrBuilderList(); + /** + * + * + *
+   * Required. The instances that are the input to token computing API call.
+   * Schema is identical to the prediction schema of the text model, even for
+   * the non-text models, like chat models, or Codey models.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputeTokensResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputeTokensResponse.java new file mode 100644 index 000000000000..a18f739edc27 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputeTokensResponse.java @@ -0,0 +1,983 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/llm_utility_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for ComputeTokens RPC call.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ComputeTokensResponse} + */ +public final class ComputeTokensResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ComputeTokensResponse) + ComputeTokensResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ComputeTokensResponse.newBuilder() to construct. + private ComputeTokensResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ComputeTokensResponse() { + tokensInfo_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ComputeTokensResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1_ComputeTokensResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1_ComputeTokensResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ComputeTokensResponse.class, + com.google.cloud.aiplatform.v1.ComputeTokensResponse.Builder.class); + } + + public static final int TOKENS_INFO_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List tokensInfo_; + /** + * + * + *
+   * Lists of tokens info from the input. A ComputeTokensRequest could have
+   * multiple instances with a prompt in each instance. We also need to return
+   * lists of tokens info for the request with multiple instances.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + @java.lang.Override + public java.util.List getTokensInfoList() { + return tokensInfo_; + } + /** + * + * + *
+   * Lists of tokens info from the input. A ComputeTokensRequest could have
+   * multiple instances with a prompt in each instance. We also need to return
+   * lists of tokens info for the request with multiple instances.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + @java.lang.Override + public java.util.List + getTokensInfoOrBuilderList() { + return tokensInfo_; + } + /** + * + * + *
+   * Lists of tokens info from the input. A ComputeTokensRequest could have
+   * multiple instances with a prompt in each instance. We also need to return
+   * lists of tokens info for the request with multiple instances.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + @java.lang.Override + public int getTokensInfoCount() { + return tokensInfo_.size(); + } + /** + * + * + *
+   * Lists of tokens info from the input. A ComputeTokensRequest could have
+   * multiple instances with a prompt in each instance. We also need to return
+   * lists of tokens info for the request with multiple instances.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TokensInfo getTokensInfo(int index) { + return tokensInfo_.get(index); + } + /** + * + * + *
+   * Lists of tokens info from the input. A ComputeTokensRequest could have
+   * multiple instances with a prompt in each instance. We also need to return
+   * lists of tokens info for the request with multiple instances.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TokensInfoOrBuilder getTokensInfoOrBuilder(int index) { + return tokensInfo_.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 < tokensInfo_.size(); i++) { + output.writeMessage(1, tokensInfo_.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 < tokensInfo_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, tokensInfo_.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.aiplatform.v1.ComputeTokensResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ComputeTokensResponse other = + (com.google.cloud.aiplatform.v1.ComputeTokensResponse) obj; + + if (!getTokensInfoList().equals(other.getTokensInfoList())) return false; + if (!getUnknownFields().equals(other.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 (getTokensInfoCount() > 0) { + hash = (37 * hash) + TOKENS_INFO_FIELD_NUMBER; + hash = (53 * hash) + getTokensInfoList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.ComputeTokensResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 ComputeTokens RPC call.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ComputeTokensResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ComputeTokensResponse) + com.google.cloud.aiplatform.v1.ComputeTokensResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1_ComputeTokensResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1_ComputeTokensResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ComputeTokensResponse.class, + com.google.cloud.aiplatform.v1.ComputeTokensResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ComputeTokensResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (tokensInfoBuilder_ == null) { + tokensInfo_ = java.util.Collections.emptyList(); + } else { + tokensInfo_ = null; + tokensInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1_ComputeTokensResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ComputeTokensResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ComputeTokensResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ComputeTokensResponse build() { + com.google.cloud.aiplatform.v1.ComputeTokensResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ComputeTokensResponse buildPartial() { + com.google.cloud.aiplatform.v1.ComputeTokensResponse result = + new com.google.cloud.aiplatform.v1.ComputeTokensResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.ComputeTokensResponse result) { + if (tokensInfoBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + tokensInfo_ = java.util.Collections.unmodifiableList(tokensInfo_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tokensInfo_ = tokensInfo_; + } else { + result.tokensInfo_ = tokensInfoBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ComputeTokensResponse 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.aiplatform.v1.ComputeTokensResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ComputeTokensResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ComputeTokensResponse other) { + if (other == com.google.cloud.aiplatform.v1.ComputeTokensResponse.getDefaultInstance()) + return this; + if (tokensInfoBuilder_ == null) { + if (!other.tokensInfo_.isEmpty()) { + if (tokensInfo_.isEmpty()) { + tokensInfo_ = other.tokensInfo_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTokensInfoIsMutable(); + tokensInfo_.addAll(other.tokensInfo_); + } + onChanged(); + } + } else { + if (!other.tokensInfo_.isEmpty()) { + if (tokensInfoBuilder_.isEmpty()) { + tokensInfoBuilder_.dispose(); + tokensInfoBuilder_ = null; + tokensInfo_ = other.tokensInfo_; + bitField0_ = (bitField0_ & ~0x00000001); + tokensInfoBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTokensInfoFieldBuilder() + : null; + } else { + tokensInfoBuilder_.addAllMessages(other.tokensInfo_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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.aiplatform.v1.TokensInfo m = + input.readMessage( + com.google.cloud.aiplatform.v1.TokensInfo.parser(), extensionRegistry); + if (tokensInfoBuilder_ == null) { + ensureTokensInfoIsMutable(); + tokensInfo_.add(m); + } else { + tokensInfoBuilder_.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 tokensInfo_ = + java.util.Collections.emptyList(); + + private void ensureTokensInfoIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tokensInfo_ = + new java.util.ArrayList(tokensInfo_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.TokensInfo, + com.google.cloud.aiplatform.v1.TokensInfo.Builder, + com.google.cloud.aiplatform.v1.TokensInfoOrBuilder> + tokensInfoBuilder_; + + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + public java.util.List getTokensInfoList() { + if (tokensInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(tokensInfo_); + } else { + return tokensInfoBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + public int getTokensInfoCount() { + if (tokensInfoBuilder_ == null) { + return tokensInfo_.size(); + } else { + return tokensInfoBuilder_.getCount(); + } + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + public com.google.cloud.aiplatform.v1.TokensInfo getTokensInfo(int index) { + if (tokensInfoBuilder_ == null) { + return tokensInfo_.get(index); + } else { + return tokensInfoBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + public Builder setTokensInfo(int index, com.google.cloud.aiplatform.v1.TokensInfo value) { + if (tokensInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTokensInfoIsMutable(); + tokensInfo_.set(index, value); + onChanged(); + } else { + tokensInfoBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + public Builder setTokensInfo( + int index, com.google.cloud.aiplatform.v1.TokensInfo.Builder builderForValue) { + if (tokensInfoBuilder_ == null) { + ensureTokensInfoIsMutable(); + tokensInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + tokensInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + public Builder addTokensInfo(com.google.cloud.aiplatform.v1.TokensInfo value) { + if (tokensInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTokensInfoIsMutable(); + tokensInfo_.add(value); + onChanged(); + } else { + tokensInfoBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + public Builder addTokensInfo(int index, com.google.cloud.aiplatform.v1.TokensInfo value) { + if (tokensInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTokensInfoIsMutable(); + tokensInfo_.add(index, value); + onChanged(); + } else { + tokensInfoBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + public Builder addTokensInfo( + com.google.cloud.aiplatform.v1.TokensInfo.Builder builderForValue) { + if (tokensInfoBuilder_ == null) { + ensureTokensInfoIsMutable(); + tokensInfo_.add(builderForValue.build()); + onChanged(); + } else { + tokensInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + public Builder addTokensInfo( + int index, com.google.cloud.aiplatform.v1.TokensInfo.Builder builderForValue) { + if (tokensInfoBuilder_ == null) { + ensureTokensInfoIsMutable(); + tokensInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + tokensInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + public Builder addAllTokensInfo( + java.lang.Iterable values) { + if (tokensInfoBuilder_ == null) { + ensureTokensInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tokensInfo_); + onChanged(); + } else { + tokensInfoBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + public Builder clearTokensInfo() { + if (tokensInfoBuilder_ == null) { + tokensInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tokensInfoBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + public Builder removeTokensInfo(int index) { + if (tokensInfoBuilder_ == null) { + ensureTokensInfoIsMutable(); + tokensInfo_.remove(index); + onChanged(); + } else { + tokensInfoBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + public com.google.cloud.aiplatform.v1.TokensInfo.Builder getTokensInfoBuilder(int index) { + return getTokensInfoFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + public com.google.cloud.aiplatform.v1.TokensInfoOrBuilder getTokensInfoOrBuilder(int index) { + if (tokensInfoBuilder_ == null) { + return tokensInfo_.get(index); + } else { + return tokensInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + public java.util.List + getTokensInfoOrBuilderList() { + if (tokensInfoBuilder_ != null) { + return tokensInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tokensInfo_); + } + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + public com.google.cloud.aiplatform.v1.TokensInfo.Builder addTokensInfoBuilder() { + return getTokensInfoFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.TokensInfo.getDefaultInstance()); + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + public com.google.cloud.aiplatform.v1.TokensInfo.Builder addTokensInfoBuilder(int index) { + return getTokensInfoFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.TokensInfo.getDefaultInstance()); + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + public java.util.List + getTokensInfoBuilderList() { + return getTokensInfoFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.TokensInfo, + com.google.cloud.aiplatform.v1.TokensInfo.Builder, + com.google.cloud.aiplatform.v1.TokensInfoOrBuilder> + getTokensInfoFieldBuilder() { + if (tokensInfoBuilder_ == null) { + tokensInfoBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.TokensInfo, + com.google.cloud.aiplatform.v1.TokensInfo.Builder, + com.google.cloud.aiplatform.v1.TokensInfoOrBuilder>( + tokensInfo_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + tokensInfo_ = null; + } + return tokensInfoBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ComputeTokensResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ComputeTokensResponse) + private static final com.google.cloud.aiplatform.v1.ComputeTokensResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ComputeTokensResponse(); + } + + public static com.google.cloud.aiplatform.v1.ComputeTokensResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComputeTokensResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ComputeTokensResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputeTokensResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputeTokensResponseOrBuilder.java new file mode 100644 index 000000000000..1fa355230e91 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputeTokensResponseOrBuilder.java @@ -0,0 +1,87 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/llm_utility_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ComputeTokensResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ComputeTokensResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Lists of tokens info from the input. A ComputeTokensRequest could have
+   * multiple instances with a prompt in each instance. We also need to return
+   * lists of tokens info for the request with multiple instances.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + java.util.List getTokensInfoList(); + /** + * + * + *
+   * Lists of tokens info from the input. A ComputeTokensRequest could have
+   * multiple instances with a prompt in each instance. We also need to return
+   * lists of tokens info for the request with multiple instances.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + com.google.cloud.aiplatform.v1.TokensInfo getTokensInfo(int index); + /** + * + * + *
+   * Lists of tokens info from the input. A ComputeTokensRequest could have
+   * multiple instances with a prompt in each instance. We also need to return
+   * lists of tokens info for the request with multiple instances.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + int getTokensInfoCount(); + /** + * + * + *
+   * Lists of tokens info from the input. A ComputeTokensRequest could have
+   * multiple instances with a prompt in each instance. We also need to return
+   * lists of tokens info for the request with multiple instances.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + java.util.List + getTokensInfoOrBuilderList(); + /** + * + * + *
+   * Lists of tokens info from the input. A ComputeTokensRequest could have
+   * multiple instances with a prompt in each instance. We also need to return
+   * lists of tokens info for the request with multiple instances.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TokensInfo tokens_info = 1; + */ + com.google.cloud.aiplatform.v1.TokensInfoOrBuilder getTokensInfoOrBuilder(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CountTokensRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CountTokensRequest.java new file mode 100644 index 000000000000..96d2443e172d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CountTokensRequest.java @@ -0,0 +1,1202 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/prediction_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [PredictionService.CountTokens][].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CountTokensRequest} + */ +public final class CountTokensRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CountTokensRequest) + CountTokensRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CountTokensRequest.newBuilder() to construct. + private CountTokensRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CountTokensRequest() { + endpoint_ = ""; + instances_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CountTokensRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1_CountTokensRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1_CountTokensRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CountTokensRequest.class, + com.google.cloud.aiplatform.v1.CountTokensRequest.Builder.class); + } + + public static final int ENDPOINT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object endpoint_ = ""; + /** + * + * + *
+   * Required. The name of the Endpoint requested to perform token counting.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + @java.lang.Override + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Endpoint requested to perform token counting.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List instances_; + /** + * + * + *
+   * Required. The instances that are the input to token counting call.
+   * Schema is identical to the prediction schema of the underlying model.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getInstancesList() { + return instances_; + } + /** + * + * + *
+   * Required. The instances that are the input to token counting call.
+   * Schema is identical to the prediction schema of the underlying model.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getInstancesOrBuilderList() { + return instances_; + } + /** + * + * + *
+   * Required. The instances that are the input to token counting call.
+   * Schema is identical to the prediction schema of the underlying model.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getInstancesCount() { + return instances_.size(); + } + /** + * + * + *
+   * Required. The instances that are the input to token counting call.
+   * Schema is identical to the prediction schema of the underlying model.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.Value getInstances(int index) { + return instances_.get(index); + } + /** + * + * + *
+   * Required. The instances that are the input to token counting call.
+   * Schema is identical to the prediction schema of the underlying model.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index) { + return instances_.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(endpoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, endpoint_); + } + for (int i = 0; i < instances_.size(); i++) { + output.writeMessage(2, instances_.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(endpoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, endpoint_); + } + for (int i = 0; i < instances_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, instances_.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.aiplatform.v1.CountTokensRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CountTokensRequest other = + (com.google.cloud.aiplatform.v1.CountTokensRequest) obj; + + if (!getEndpoint().equals(other.getEndpoint())) return false; + if (!getInstancesList().equals(other.getInstancesList())) return false; + if (!getUnknownFields().equals(other.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) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + if (getInstancesCount() > 0) { + hash = (37 * hash) + INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getInstancesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CountTokensRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CountTokensRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CountTokensRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CountTokensRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CountTokensRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CountTokensRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CountTokensRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CountTokensRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CountTokensRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CountTokensRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CountTokensRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CountTokensRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.CountTokensRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [PredictionService.CountTokens][].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CountTokensRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CountTokensRequest) + com.google.cloud.aiplatform.v1.CountTokensRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1_CountTokensRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1_CountTokensRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CountTokensRequest.class, + com.google.cloud.aiplatform.v1.CountTokensRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CountTokensRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpoint_ = ""; + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + } else { + instances_ = null; + instancesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1_CountTokensRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CountTokensRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CountTokensRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CountTokensRequest build() { + com.google.cloud.aiplatform.v1.CountTokensRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CountTokensRequest buildPartial() { + com.google.cloud.aiplatform.v1.CountTokensRequest result = + new com.google.cloud.aiplatform.v1.CountTokensRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.CountTokensRequest result) { + if (instancesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + instances_ = java.util.Collections.unmodifiableList(instances_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.instances_ = instances_; + } else { + result.instances_ = instancesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.CountTokensRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpoint_ = endpoint_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.CountTokensRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CountTokensRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CountTokensRequest other) { + if (other == com.google.cloud.aiplatform.v1.CountTokensRequest.getDefaultInstance()) + return this; + if (!other.getEndpoint().isEmpty()) { + endpoint_ = other.endpoint_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (instancesBuilder_ == null) { + if (!other.instances_.isEmpty()) { + if (instances_.isEmpty()) { + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureInstancesIsMutable(); + instances_.addAll(other.instances_); + } + onChanged(); + } + } else { + if (!other.instances_.isEmpty()) { + if (instancesBuilder_.isEmpty()) { + instancesBuilder_.dispose(); + instancesBuilder_ = null; + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000002); + instancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInstancesFieldBuilder() + : null; + } else { + instancesBuilder_.addAllMessages(other.instances_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + endpoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.protobuf.Value m = + input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(m); + } else { + instancesBuilder_.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 endpoint_ = ""; + /** + * + * + *
+     * Required. The name of the Endpoint requested to perform token counting.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Endpoint requested to perform token counting.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Endpoint requested to perform token counting.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + endpoint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Endpoint requested to perform token counting.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEndpoint() { + endpoint_ = getDefaultInstance().getEndpoint(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Endpoint requested to perform token counting.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + endpoint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List instances_ = + java.util.Collections.emptyList(); + + private void ensureInstancesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + instances_ = new java.util.ArrayList(instances_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + instancesBuilder_; + + /** + * + * + *
+     * Required. The instances that are the input to token counting call.
+     * Schema is identical to the prediction schema of the underlying model.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getInstancesList() { + if (instancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(instances_); + } else { + return instancesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The instances that are the input to token counting call.
+     * Schema is identical to the prediction schema of the underlying model.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getInstancesCount() { + if (instancesBuilder_ == null) { + return instances_.size(); + } else { + return instancesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The instances that are the input to token counting call.
+     * Schema is identical to the prediction schema of the underlying model.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Value getInstances(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The instances that are the input to token counting call.
+     * Schema is identical to the prediction schema of the underlying model.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstances(int index, com.google.protobuf.Value value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.set(index, value); + onChanged(); + } else { + instancesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token counting call.
+     * Schema is identical to the prediction schema of the underlying model.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstances(int index, com.google.protobuf.Value.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.set(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token counting call.
+     * Schema is identical to the prediction schema of the underlying model.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addInstances(com.google.protobuf.Value value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(value); + onChanged(); + } else { + instancesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token counting call.
+     * Schema is identical to the prediction schema of the underlying model.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addInstances(int index, com.google.protobuf.Value value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(index, value); + onChanged(); + } else { + instancesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token counting call.
+     * Schema is identical to the prediction schema of the underlying model.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addInstances(com.google.protobuf.Value.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token counting call.
+     * Schema is identical to the prediction schema of the underlying model.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addInstances(int index, com.google.protobuf.Value.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token counting call.
+     * Schema is identical to the prediction schema of the underlying model.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. The instances that are the input to token counting call.
+     * Schema is identical to the prediction schema of the underlying model.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInstances() { + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + instancesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token counting call.
+     * Schema is identical to the prediction schema of the underlying model.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeInstances(int index) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.remove(index); + onChanged(); + } else { + instancesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token counting call.
+     * Schema is identical to the prediction schema of the underlying model.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Value.Builder getInstancesBuilder(int index) { + return getInstancesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The instances that are the input to token counting call.
+     * Schema is identical to the prediction schema of the underlying model.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The instances that are the input to token counting call.
+     * Schema is identical to the prediction schema of the underlying model.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getInstancesOrBuilderList() { + if (instancesBuilder_ != null) { + return instancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(instances_); + } + } + /** + * + * + *
+     * Required. The instances that are the input to token counting call.
+     * Schema is identical to the prediction schema of the underlying model.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Value.Builder addInstancesBuilder() { + return getInstancesFieldBuilder().addBuilder(com.google.protobuf.Value.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The instances that are the input to token counting call.
+     * Schema is identical to the prediction schema of the underlying model.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Value.Builder addInstancesBuilder(int index) { + return getInstancesFieldBuilder() + .addBuilder(index, com.google.protobuf.Value.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The instances that are the input to token counting call.
+     * Schema is identical to the prediction schema of the underlying model.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getInstancesBuilderList() { + return getInstancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getInstancesFieldBuilder() { + if (instancesBuilder_ == null) { + instancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + instances_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + instances_ = null; + } + return instancesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.CountTokensRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CountTokensRequest) + private static final com.google.cloud.aiplatform.v1.CountTokensRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CountTokensRequest(); + } + + public static com.google.cloud.aiplatform.v1.CountTokensRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CountTokensRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CountTokensRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CountTokensRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CountTokensRequestOrBuilder.java new file mode 100644 index 000000000000..ec630edca69c --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CountTokensRequestOrBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/prediction_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CountTokensRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CountTokensRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Endpoint requested to perform token counting.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + java.lang.String getEndpoint(); + /** + * + * + *
+   * Required. The name of the Endpoint requested to perform token counting.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + com.google.protobuf.ByteString getEndpointBytes(); + + /** + * + * + *
+   * Required. The instances that are the input to token counting call.
+   * Schema is identical to the prediction schema of the underlying model.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getInstancesList(); + /** + * + * + *
+   * Required. The instances that are the input to token counting call.
+   * Schema is identical to the prediction schema of the underlying model.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.Value getInstances(int index); + /** + * + * + *
+   * Required. The instances that are the input to token counting call.
+   * Schema is identical to the prediction schema of the underlying model.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getInstancesCount(); + /** + * + * + *
+   * Required. The instances that are the input to token counting call.
+   * Schema is identical to the prediction schema of the underlying model.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getInstancesOrBuilderList(); + /** + * + * + *
+   * Required. The instances that are the input to token counting call.
+   * Schema is identical to the prediction schema of the underlying model.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CountTokensResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CountTokensResponse.java new file mode 100644 index 000000000000..3cbbccd6ff60 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CountTokensResponse.java @@ -0,0 +1,631 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/prediction_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [PredictionService.CountTokens][].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CountTokensResponse} + */ +public final class CountTokensResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CountTokensResponse) + CountTokensResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CountTokensResponse.newBuilder() to construct. + private CountTokensResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CountTokensResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CountTokensResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1_CountTokensResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1_CountTokensResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CountTokensResponse.class, + com.google.cloud.aiplatform.v1.CountTokensResponse.Builder.class); + } + + public static final int TOTAL_TOKENS_FIELD_NUMBER = 1; + private int totalTokens_ = 0; + /** + * + * + *
+   * The total number of tokens counted across all instances from the request.
+   * 
+ * + * int32 total_tokens = 1; + * + * @return The totalTokens. + */ + @java.lang.Override + public int getTotalTokens() { + return totalTokens_; + } + + public static final int TOTAL_BILLABLE_CHARACTERS_FIELD_NUMBER = 2; + private int totalBillableCharacters_ = 0; + /** + * + * + *
+   * The total number of billable characters counted across all instances from
+   * the request.
+   * 
+ * + * int32 total_billable_characters = 2; + * + * @return The totalBillableCharacters. + */ + @java.lang.Override + public int getTotalBillableCharacters() { + return totalBillableCharacters_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (totalTokens_ != 0) { + output.writeInt32(1, totalTokens_); + } + if (totalBillableCharacters_ != 0) { + output.writeInt32(2, totalBillableCharacters_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (totalTokens_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, totalTokens_); + } + if (totalBillableCharacters_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, totalBillableCharacters_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.CountTokensResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CountTokensResponse other = + (com.google.cloud.aiplatform.v1.CountTokensResponse) obj; + + if (getTotalTokens() != other.getTotalTokens()) return false; + if (getTotalBillableCharacters() != other.getTotalBillableCharacters()) return false; + if (!getUnknownFields().equals(other.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) + TOTAL_TOKENS_FIELD_NUMBER; + hash = (53 * hash) + getTotalTokens(); + hash = (37 * hash) + TOTAL_BILLABLE_CHARACTERS_FIELD_NUMBER; + hash = (53 * hash) + getTotalBillableCharacters(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CountTokensResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CountTokensResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CountTokensResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CountTokensResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CountTokensResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CountTokensResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CountTokensResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CountTokensResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CountTokensResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CountTokensResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CountTokensResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CountTokensResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.CountTokensResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [PredictionService.CountTokens][].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CountTokensResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CountTokensResponse) + com.google.cloud.aiplatform.v1.CountTokensResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1_CountTokensResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1_CountTokensResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CountTokensResponse.class, + com.google.cloud.aiplatform.v1.CountTokensResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CountTokensResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + totalTokens_ = 0; + totalBillableCharacters_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1_CountTokensResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CountTokensResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CountTokensResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CountTokensResponse build() { + com.google.cloud.aiplatform.v1.CountTokensResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CountTokensResponse buildPartial() { + com.google.cloud.aiplatform.v1.CountTokensResponse result = + new com.google.cloud.aiplatform.v1.CountTokensResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.CountTokensResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.totalTokens_ = totalTokens_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.totalBillableCharacters_ = totalBillableCharacters_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.CountTokensResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.CountTokensResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CountTokensResponse other) { + if (other == com.google.cloud.aiplatform.v1.CountTokensResponse.getDefaultInstance()) + return this; + if (other.getTotalTokens() != 0) { + setTotalTokens(other.getTotalTokens()); + } + if (other.getTotalBillableCharacters() != 0) { + setTotalBillableCharacters(other.getTotalBillableCharacters()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == 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: + { + totalTokens_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + totalBillableCharacters_ = 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 totalTokens_; + /** + * + * + *
+     * The total number of tokens counted across all instances from the request.
+     * 
+ * + * int32 total_tokens = 1; + * + * @return The totalTokens. + */ + @java.lang.Override + public int getTotalTokens() { + return totalTokens_; + } + /** + * + * + *
+     * The total number of tokens counted across all instances from the request.
+     * 
+ * + * int32 total_tokens = 1; + * + * @param value The totalTokens to set. + * @return This builder for chaining. + */ + public Builder setTotalTokens(int value) { + + totalTokens_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The total number of tokens counted across all instances from the request.
+     * 
+ * + * int32 total_tokens = 1; + * + * @return This builder for chaining. + */ + public Builder clearTotalTokens() { + bitField0_ = (bitField0_ & ~0x00000001); + totalTokens_ = 0; + onChanged(); + return this; + } + + private int totalBillableCharacters_; + /** + * + * + *
+     * The total number of billable characters counted across all instances from
+     * the request.
+     * 
+ * + * int32 total_billable_characters = 2; + * + * @return The totalBillableCharacters. + */ + @java.lang.Override + public int getTotalBillableCharacters() { + return totalBillableCharacters_; + } + /** + * + * + *
+     * The total number of billable characters counted across all instances from
+     * the request.
+     * 
+ * + * int32 total_billable_characters = 2; + * + * @param value The totalBillableCharacters to set. + * @return This builder for chaining. + */ + public Builder setTotalBillableCharacters(int value) { + + totalBillableCharacters_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The total number of billable characters counted across all instances from
+     * the request.
+     * 
+ * + * int32 total_billable_characters = 2; + * + * @return This builder for chaining. + */ + public Builder clearTotalBillableCharacters() { + bitField0_ = (bitField0_ & ~0x00000002); + totalBillableCharacters_ = 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.aiplatform.v1.CountTokensResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CountTokensResponse) + private static final com.google.cloud.aiplatform.v1.CountTokensResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CountTokensResponse(); + } + + public static com.google.cloud.aiplatform.v1.CountTokensResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CountTokensResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CountTokensResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CountTokensResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CountTokensResponseOrBuilder.java new file mode 100644 index 000000000000..0ac146bac3dc --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CountTokensResponseOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/prediction_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CountTokensResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CountTokensResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The total number of tokens counted across all instances from the request.
+   * 
+ * + * int32 total_tokens = 1; + * + * @return The totalTokens. + */ + int getTotalTokens(); + + /** + * + * + *
+   * The total number of billable characters counted across all instances from
+   * the request.
+   * 
+ * + * int32 total_billable_characters = 2; + * + * @return The totalBillableCharacters. + */ + int getTotalBillableCharacters(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureGroupOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureGroupOperationMetadata.java new file mode 100644 index 000000000000..b9cbf92610bb --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureGroupOperationMetadata.java @@ -0,0 +1,727 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Details of operations that perform create FeatureGroup.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata} + */ +public final class CreateFeatureGroupOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata) + CreateFeatureGroupOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateFeatureGroupOperationMetadata.newBuilder() to construct. + private CreateFeatureGroupOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateFeatureGroupOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateFeatureGroupOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureGroupOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureGroupOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata.class, + com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata.Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * Operation metadata for FeatureGroup.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * Operation metadata for FeatureGroup.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * Operation metadata for FeatureGroup.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata other = + (com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getUnknownFields().equals(other.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 (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of operations that perform create FeatureGroup.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata) + com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureGroupOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureGroupOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata.class, + com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureGroupOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata build() { + com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata result = + new com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.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.aiplatform.v1.CreateFeatureGroupOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(getGenericMetadataFieldBuilder().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.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * Operation metadata for FeatureGroup.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation metadata for FeatureGroup.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation metadata for FeatureGroup.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureGroup.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureGroup.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureGroup.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureGroup.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation metadata for FeatureGroup.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * Operation metadata for FeatureGroup.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata) + private static final com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateFeatureGroupOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureGroupOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureGroupOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..77cf9ddc613e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureGroupOperationMetadataOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CreateFeatureGroupOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation metadata for FeatureGroup.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * Operation metadata for FeatureGroup.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * Operation metadata for FeatureGroup.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureGroupRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureGroupRequest.java new file mode 100644 index 000000000000..81d14fd960dc --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureGroupRequest.java @@ -0,0 +1,1169 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [FeatureRegistryService.CreateFeatureGroup][google.cloud.aiplatform.v1.FeatureRegistryService.CreateFeatureGroup].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateFeatureGroupRequest} + */ +public final class CreateFeatureGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateFeatureGroupRequest) + CreateFeatureGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateFeatureGroupRequest.newBuilder() to construct. + private CreateFeatureGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateFeatureGroupRequest() { + parent_ = ""; + featureGroupId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateFeatureGroupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest.class, + com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location to create FeatureGroups.
+   * 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. The resource name of the Location to create FeatureGroups.
+   * 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 FEATURE_GROUP_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.FeatureGroup featureGroup_; + /** + * + * + *
+   * Required. The FeatureGroup to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the featureGroup field is set. + */ + @java.lang.Override + public boolean hasFeatureGroup() { + return featureGroup_ != null; + } + /** + * + * + *
+   * Required. The FeatureGroup to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The featureGroup. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureGroup getFeatureGroup() { + return featureGroup_ == null + ? com.google.cloud.aiplatform.v1.FeatureGroup.getDefaultInstance() + : featureGroup_; + } + /** + * + * + *
+   * Required. The FeatureGroup to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureGroupOrBuilder getFeatureGroupOrBuilder() { + return featureGroup_ == null + ? com.google.cloud.aiplatform.v1.FeatureGroup.getDefaultInstance() + : featureGroup_; + } + + public static final int FEATURE_GROUP_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object featureGroupId_ = ""; + /** + * + * + *
+   * Required. The ID to use for this FeatureGroup, which will become the final
+   * component of the FeatureGroup's resource name.
+   *
+   * This value may be up to 60 characters, and valid characters are
+   * `[a-z0-9_]`. The first character cannot be a number.
+   *
+   * The value must be unique within the project and location.
+   * 
+ * + * string feature_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The featureGroupId. + */ + @java.lang.Override + public java.lang.String getFeatureGroupId() { + java.lang.Object ref = featureGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + featureGroupId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ID to use for this FeatureGroup, which will become the final
+   * component of the FeatureGroup's resource name.
+   *
+   * This value may be up to 60 characters, and valid characters are
+   * `[a-z0-9_]`. The first character cannot be a number.
+   *
+   * The value must be unique within the project and location.
+   * 
+ * + * string feature_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for featureGroupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFeatureGroupIdBytes() { + java.lang.Object ref = featureGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + featureGroupId_ = 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 (featureGroup_ != null) { + output.writeMessage(2, getFeatureGroup()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(featureGroupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, featureGroupId_); + } + 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 (featureGroup_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFeatureGroup()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(featureGroupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, featureGroupId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest other = + (com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasFeatureGroup() != other.hasFeatureGroup()) return false; + if (hasFeatureGroup()) { + if (!getFeatureGroup().equals(other.getFeatureGroup())) return false; + } + if (!getFeatureGroupId().equals(other.getFeatureGroupId())) return false; + if (!getUnknownFields().equals(other.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 (hasFeatureGroup()) { + hash = (37 * hash) + FEATURE_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getFeatureGroup().hashCode(); + } + hash = (37 * hash) + FEATURE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getFeatureGroupId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureRegistryService.CreateFeatureGroup][google.cloud.aiplatform.v1.FeatureRegistryService.CreateFeatureGroup].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateFeatureGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateFeatureGroupRequest) + com.google.cloud.aiplatform.v1.CreateFeatureGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest.class, + com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + featureGroup_ = null; + if (featureGroupBuilder_ != null) { + featureGroupBuilder_.dispose(); + featureGroupBuilder_ = null; + } + featureGroupId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest build() { + com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest buildPartial() { + com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest result = + new com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.featureGroup_ = + featureGroupBuilder_ == null ? featureGroup_ : featureGroupBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.featureGroupId_ = featureGroupId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest other) { + if (other == com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasFeatureGroup()) { + mergeFeatureGroup(other.getFeatureGroup()); + } + if (!other.getFeatureGroupId().isEmpty()) { + featureGroupId_ = other.featureGroupId_; + 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(getFeatureGroupFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + featureGroupId_ = 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 resource name of the Location to create FeatureGroups.
+     * 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. The resource name of the Location to create FeatureGroups.
+     * 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. The resource name of the Location to create FeatureGroups.
+     * 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. The resource name of the Location to create FeatureGroups.
+     * 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. The resource name of the Location to create FeatureGroups.
+     * 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 com.google.cloud.aiplatform.v1.FeatureGroup featureGroup_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureGroup, + com.google.cloud.aiplatform.v1.FeatureGroup.Builder, + com.google.cloud.aiplatform.v1.FeatureGroupOrBuilder> + featureGroupBuilder_; + /** + * + * + *
+     * Required. The FeatureGroup to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the featureGroup field is set. + */ + public boolean hasFeatureGroup() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The FeatureGroup to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The featureGroup. + */ + public com.google.cloud.aiplatform.v1.FeatureGroup getFeatureGroup() { + if (featureGroupBuilder_ == null) { + return featureGroup_ == null + ? com.google.cloud.aiplatform.v1.FeatureGroup.getDefaultInstance() + : featureGroup_; + } else { + return featureGroupBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The FeatureGroup to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFeatureGroup(com.google.cloud.aiplatform.v1.FeatureGroup value) { + if (featureGroupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + featureGroup_ = value; + } else { + featureGroupBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureGroup to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFeatureGroup( + com.google.cloud.aiplatform.v1.FeatureGroup.Builder builderForValue) { + if (featureGroupBuilder_ == null) { + featureGroup_ = builderForValue.build(); + } else { + featureGroupBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureGroup to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFeatureGroup(com.google.cloud.aiplatform.v1.FeatureGroup value) { + if (featureGroupBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && featureGroup_ != null + && featureGroup_ != com.google.cloud.aiplatform.v1.FeatureGroup.getDefaultInstance()) { + getFeatureGroupBuilder().mergeFrom(value); + } else { + featureGroup_ = value; + } + } else { + featureGroupBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureGroup to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFeatureGroup() { + bitField0_ = (bitField0_ & ~0x00000002); + featureGroup_ = null; + if (featureGroupBuilder_ != null) { + featureGroupBuilder_.dispose(); + featureGroupBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureGroup to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureGroup.Builder getFeatureGroupBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFeatureGroupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The FeatureGroup to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureGroupOrBuilder getFeatureGroupOrBuilder() { + if (featureGroupBuilder_ != null) { + return featureGroupBuilder_.getMessageOrBuilder(); + } else { + return featureGroup_ == null + ? com.google.cloud.aiplatform.v1.FeatureGroup.getDefaultInstance() + : featureGroup_; + } + } + /** + * + * + *
+     * Required. The FeatureGroup to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureGroup, + com.google.cloud.aiplatform.v1.FeatureGroup.Builder, + com.google.cloud.aiplatform.v1.FeatureGroupOrBuilder> + getFeatureGroupFieldBuilder() { + if (featureGroupBuilder_ == null) { + featureGroupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureGroup, + com.google.cloud.aiplatform.v1.FeatureGroup.Builder, + com.google.cloud.aiplatform.v1.FeatureGroupOrBuilder>( + getFeatureGroup(), getParentForChildren(), isClean()); + featureGroup_ = null; + } + return featureGroupBuilder_; + } + + private java.lang.Object featureGroupId_ = ""; + /** + * + * + *
+     * Required. The ID to use for this FeatureGroup, which will become the final
+     * component of the FeatureGroup's resource name.
+     *
+     * This value may be up to 60 characters, and valid characters are
+     * `[a-z0-9_]`. The first character cannot be a number.
+     *
+     * The value must be unique within the project and location.
+     * 
+ * + * string feature_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The featureGroupId. + */ + public java.lang.String getFeatureGroupId() { + java.lang.Object ref = featureGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + featureGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ID to use for this FeatureGroup, which will become the final
+     * component of the FeatureGroup's resource name.
+     *
+     * This value may be up to 60 characters, and valid characters are
+     * `[a-z0-9_]`. The first character cannot be a number.
+     *
+     * The value must be unique within the project and location.
+     * 
+ * + * string feature_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for featureGroupId. + */ + public com.google.protobuf.ByteString getFeatureGroupIdBytes() { + java.lang.Object ref = featureGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + featureGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ID to use for this FeatureGroup, which will become the final
+     * component of the FeatureGroup's resource name.
+     *
+     * This value may be up to 60 characters, and valid characters are
+     * `[a-z0-9_]`. The first character cannot be a number.
+     *
+     * The value must be unique within the project and location.
+     * 
+ * + * string feature_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The featureGroupId to set. + * @return This builder for chaining. + */ + public Builder setFeatureGroupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + featureGroupId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID to use for this FeatureGroup, which will become the final
+     * component of the FeatureGroup's resource name.
+     *
+     * This value may be up to 60 characters, and valid characters are
+     * `[a-z0-9_]`. The first character cannot be a number.
+     *
+     * The value must be unique within the project and location.
+     * 
+ * + * string feature_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFeatureGroupId() { + featureGroupId_ = getDefaultInstance().getFeatureGroupId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID to use for this FeatureGroup, which will become the final
+     * component of the FeatureGroup's resource name.
+     *
+     * This value may be up to 60 characters, and valid characters are
+     * `[a-z0-9_]`. The first character cannot be a number.
+     *
+     * The value must be unique within the project and location.
+     * 
+ * + * string feature_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for featureGroupId to set. + * @return This builder for chaining. + */ + public Builder setFeatureGroupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + featureGroupId_ = 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.aiplatform.v1.CreateFeatureGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateFeatureGroupRequest) + private static final com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest(); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateFeatureGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureGroupRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureGroupRequestOrBuilder.java new file mode 100644 index 000000000000..bce71c7f9cbc --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureGroupRequestOrBuilder.java @@ -0,0 +1,136 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CreateFeatureGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateFeatureGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to create FeatureGroups.
+   * 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. The resource name of the Location to create FeatureGroups.
+   * 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(); + + /** + * + * + *
+   * Required. The FeatureGroup to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the featureGroup field is set. + */ + boolean hasFeatureGroup(); + /** + * + * + *
+   * Required. The FeatureGroup to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The featureGroup. + */ + com.google.cloud.aiplatform.v1.FeatureGroup getFeatureGroup(); + /** + * + * + *
+   * Required. The FeatureGroup to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.FeatureGroupOrBuilder getFeatureGroupOrBuilder(); + + /** + * + * + *
+   * Required. The ID to use for this FeatureGroup, which will become the final
+   * component of the FeatureGroup's resource name.
+   *
+   * This value may be up to 60 characters, and valid characters are
+   * `[a-z0-9_]`. The first character cannot be a number.
+   *
+   * The value must be unique within the project and location.
+   * 
+ * + * string feature_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The featureGroupId. + */ + java.lang.String getFeatureGroupId(); + /** + * + * + *
+   * Required. The ID to use for this FeatureGroup, which will become the final
+   * component of the FeatureGroup's resource name.
+   *
+   * This value may be up to 60 characters, and valid characters are
+   * `[a-z0-9_]`. The first character cannot be a number.
+   *
+   * The value must be unique within the project and location.
+   * 
+ * + * string feature_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for featureGroupId. + */ + com.google.protobuf.ByteString getFeatureGroupIdBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureOnlineStoreOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureOnlineStoreOperationMetadata.java new file mode 100644 index 000000000000..10d1b69b6d3d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureOnlineStoreOperationMetadata.java @@ -0,0 +1,734 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Details of operations that perform create FeatureOnlineStore.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata} + */ +public final class CreateFeatureOnlineStoreOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata) + CreateFeatureOnlineStoreOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateFeatureOnlineStoreOperationMetadata.newBuilder() to construct. + private CreateFeatureOnlineStoreOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateFeatureOnlineStoreOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateFeatureOnlineStoreOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureOnlineStoreOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureOnlineStoreOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata.class, + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata.Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * Operation metadata for FeatureOnlineStore.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * Operation metadata for FeatureOnlineStore.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * Operation metadata for FeatureOnlineStore.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata other = + (com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getUnknownFields().equals(other.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 (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of operations that perform create FeatureOnlineStore.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata) + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureOnlineStoreOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureOnlineStoreOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata.class, + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureOnlineStoreOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata build() { + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata result = + new com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.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.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(getGenericMetadataFieldBuilder().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.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * Operation metadata for FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation metadata for FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation metadata for FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation metadata for FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * Operation metadata for FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata) + private static final com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateFeatureOnlineStoreOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureOnlineStoreOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureOnlineStoreOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..75054378fca6 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureOnlineStoreOperationMetadataOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CreateFeatureOnlineStoreOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation metadata for FeatureOnlineStore.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * Operation metadata for FeatureOnlineStore.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * Operation metadata for FeatureOnlineStore.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureOnlineStoreRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureOnlineStoreRequest.java new file mode 100644 index 000000000000..3da870ccb9ad --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureOnlineStoreRequest.java @@ -0,0 +1,1184 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [FeatureOnlineStoreAdminService.CreateFeatureOnlineStore][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.CreateFeatureOnlineStore].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest} + */ +public final class CreateFeatureOnlineStoreRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest) + CreateFeatureOnlineStoreRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateFeatureOnlineStoreRequest.newBuilder() to construct. + private CreateFeatureOnlineStoreRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateFeatureOnlineStoreRequest() { + parent_ = ""; + featureOnlineStoreId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateFeatureOnlineStoreRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureOnlineStoreRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureOnlineStoreRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest.class, + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location to create FeatureOnlineStores.
+   * 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. The resource name of the Location to create FeatureOnlineStores.
+   * 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 FEATURE_ONLINE_STORE_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.FeatureOnlineStore featureOnlineStore_; + /** + * + * + *
+   * Required. The FeatureOnlineStore to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the featureOnlineStore field is set. + */ + @java.lang.Override + public boolean hasFeatureOnlineStore() { + return featureOnlineStore_ != null; + } + /** + * + * + *
+   * Required. The FeatureOnlineStore to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The featureOnlineStore. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore getFeatureOnlineStore() { + return featureOnlineStore_ == null + ? com.google.cloud.aiplatform.v1.FeatureOnlineStore.getDefaultInstance() + : featureOnlineStore_; + } + /** + * + * + *
+   * Required. The FeatureOnlineStore to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStoreOrBuilder + getFeatureOnlineStoreOrBuilder() { + return featureOnlineStore_ == null + ? com.google.cloud.aiplatform.v1.FeatureOnlineStore.getDefaultInstance() + : featureOnlineStore_; + } + + public static final int FEATURE_ONLINE_STORE_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object featureOnlineStoreId_ = ""; + /** + * + * + *
+   * Required. The ID to use for this FeatureOnlineStore, which will become the
+   * final component of the FeatureOnlineStore's resource name.
+   *
+   * This value may be up to 60 characters, and valid characters are
+   * `[a-z0-9_]`. The first character cannot be a number.
+   *
+   * The value must be unique within the project and location.
+   * 
+ * + * string feature_online_store_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The featureOnlineStoreId. + */ + @java.lang.Override + public java.lang.String getFeatureOnlineStoreId() { + java.lang.Object ref = featureOnlineStoreId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + featureOnlineStoreId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ID to use for this FeatureOnlineStore, which will become the
+   * final component of the FeatureOnlineStore's resource name.
+   *
+   * This value may be up to 60 characters, and valid characters are
+   * `[a-z0-9_]`. The first character cannot be a number.
+   *
+   * The value must be unique within the project and location.
+   * 
+ * + * string feature_online_store_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for featureOnlineStoreId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFeatureOnlineStoreIdBytes() { + java.lang.Object ref = featureOnlineStoreId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + featureOnlineStoreId_ = 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 (featureOnlineStore_ != null) { + output.writeMessage(2, getFeatureOnlineStore()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(featureOnlineStoreId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, featureOnlineStoreId_); + } + 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 (featureOnlineStore_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFeatureOnlineStore()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(featureOnlineStoreId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, featureOnlineStoreId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest other = + (com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasFeatureOnlineStore() != other.hasFeatureOnlineStore()) return false; + if (hasFeatureOnlineStore()) { + if (!getFeatureOnlineStore().equals(other.getFeatureOnlineStore())) return false; + } + if (!getFeatureOnlineStoreId().equals(other.getFeatureOnlineStoreId())) return false; + if (!getUnknownFields().equals(other.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 (hasFeatureOnlineStore()) { + hash = (37 * hash) + FEATURE_ONLINE_STORE_FIELD_NUMBER; + hash = (53 * hash) + getFeatureOnlineStore().hashCode(); + } + hash = (37 * hash) + FEATURE_ONLINE_STORE_ID_FIELD_NUMBER; + hash = (53 * hash) + getFeatureOnlineStoreId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureOnlineStoreAdminService.CreateFeatureOnlineStore][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.CreateFeatureOnlineStore].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest) + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureOnlineStoreRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureOnlineStoreRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest.class, + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + featureOnlineStore_ = null; + if (featureOnlineStoreBuilder_ != null) { + featureOnlineStoreBuilder_.dispose(); + featureOnlineStoreBuilder_ = null; + } + featureOnlineStoreId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureOnlineStoreRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest build() { + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest buildPartial() { + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest result = + new com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.featureOnlineStore_ = + featureOnlineStoreBuilder_ == null + ? featureOnlineStore_ + : featureOnlineStoreBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.featureOnlineStoreId_ = featureOnlineStoreId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest other) { + if (other + == com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasFeatureOnlineStore()) { + mergeFeatureOnlineStore(other.getFeatureOnlineStore()); + } + if (!other.getFeatureOnlineStoreId().isEmpty()) { + featureOnlineStoreId_ = other.featureOnlineStoreId_; + 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( + getFeatureOnlineStoreFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + featureOnlineStoreId_ = 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 resource name of the Location to create FeatureOnlineStores.
+     * 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. The resource name of the Location to create FeatureOnlineStores.
+     * 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. The resource name of the Location to create FeatureOnlineStores.
+     * 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. The resource name of the Location to create FeatureOnlineStores.
+     * 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. The resource name of the Location to create FeatureOnlineStores.
+     * 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 com.google.cloud.aiplatform.v1.FeatureOnlineStore featureOnlineStore_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureOnlineStore, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder, + com.google.cloud.aiplatform.v1.FeatureOnlineStoreOrBuilder> + featureOnlineStoreBuilder_; + /** + * + * + *
+     * Required. The FeatureOnlineStore to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the featureOnlineStore field is set. + */ + public boolean hasFeatureOnlineStore() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The FeatureOnlineStore to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The featureOnlineStore. + */ + public com.google.cloud.aiplatform.v1.FeatureOnlineStore getFeatureOnlineStore() { + if (featureOnlineStoreBuilder_ == null) { + return featureOnlineStore_ == null + ? com.google.cloud.aiplatform.v1.FeatureOnlineStore.getDefaultInstance() + : featureOnlineStore_; + } else { + return featureOnlineStoreBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The FeatureOnlineStore to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFeatureOnlineStore(com.google.cloud.aiplatform.v1.FeatureOnlineStore value) { + if (featureOnlineStoreBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + featureOnlineStore_ = value; + } else { + featureOnlineStoreBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureOnlineStore to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFeatureOnlineStore( + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder builderForValue) { + if (featureOnlineStoreBuilder_ == null) { + featureOnlineStore_ = builderForValue.build(); + } else { + featureOnlineStoreBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureOnlineStore to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFeatureOnlineStore( + com.google.cloud.aiplatform.v1.FeatureOnlineStore value) { + if (featureOnlineStoreBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && featureOnlineStore_ != null + && featureOnlineStore_ + != com.google.cloud.aiplatform.v1.FeatureOnlineStore.getDefaultInstance()) { + getFeatureOnlineStoreBuilder().mergeFrom(value); + } else { + featureOnlineStore_ = value; + } + } else { + featureOnlineStoreBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureOnlineStore to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFeatureOnlineStore() { + bitField0_ = (bitField0_ & ~0x00000002); + featureOnlineStore_ = null; + if (featureOnlineStoreBuilder_ != null) { + featureOnlineStoreBuilder_.dispose(); + featureOnlineStoreBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureOnlineStore to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder + getFeatureOnlineStoreBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFeatureOnlineStoreFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The FeatureOnlineStore to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureOnlineStoreOrBuilder + getFeatureOnlineStoreOrBuilder() { + if (featureOnlineStoreBuilder_ != null) { + return featureOnlineStoreBuilder_.getMessageOrBuilder(); + } else { + return featureOnlineStore_ == null + ? com.google.cloud.aiplatform.v1.FeatureOnlineStore.getDefaultInstance() + : featureOnlineStore_; + } + } + /** + * + * + *
+     * Required. The FeatureOnlineStore to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureOnlineStore, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder, + com.google.cloud.aiplatform.v1.FeatureOnlineStoreOrBuilder> + getFeatureOnlineStoreFieldBuilder() { + if (featureOnlineStoreBuilder_ == null) { + featureOnlineStoreBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureOnlineStore, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder, + com.google.cloud.aiplatform.v1.FeatureOnlineStoreOrBuilder>( + getFeatureOnlineStore(), getParentForChildren(), isClean()); + featureOnlineStore_ = null; + } + return featureOnlineStoreBuilder_; + } + + private java.lang.Object featureOnlineStoreId_ = ""; + /** + * + * + *
+     * Required. The ID to use for this FeatureOnlineStore, which will become the
+     * final component of the FeatureOnlineStore's resource name.
+     *
+     * This value may be up to 60 characters, and valid characters are
+     * `[a-z0-9_]`. The first character cannot be a number.
+     *
+     * The value must be unique within the project and location.
+     * 
+ * + * string feature_online_store_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The featureOnlineStoreId. + */ + public java.lang.String getFeatureOnlineStoreId() { + java.lang.Object ref = featureOnlineStoreId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + featureOnlineStoreId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ID to use for this FeatureOnlineStore, which will become the
+     * final component of the FeatureOnlineStore's resource name.
+     *
+     * This value may be up to 60 characters, and valid characters are
+     * `[a-z0-9_]`. The first character cannot be a number.
+     *
+     * The value must be unique within the project and location.
+     * 
+ * + * string feature_online_store_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for featureOnlineStoreId. + */ + public com.google.protobuf.ByteString getFeatureOnlineStoreIdBytes() { + java.lang.Object ref = featureOnlineStoreId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + featureOnlineStoreId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ID to use for this FeatureOnlineStore, which will become the
+     * final component of the FeatureOnlineStore's resource name.
+     *
+     * This value may be up to 60 characters, and valid characters are
+     * `[a-z0-9_]`. The first character cannot be a number.
+     *
+     * The value must be unique within the project and location.
+     * 
+ * + * string feature_online_store_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The featureOnlineStoreId to set. + * @return This builder for chaining. + */ + public Builder setFeatureOnlineStoreId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + featureOnlineStoreId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID to use for this FeatureOnlineStore, which will become the
+     * final component of the FeatureOnlineStore's resource name.
+     *
+     * This value may be up to 60 characters, and valid characters are
+     * `[a-z0-9_]`. The first character cannot be a number.
+     *
+     * The value must be unique within the project and location.
+     * 
+ * + * string feature_online_store_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFeatureOnlineStoreId() { + featureOnlineStoreId_ = getDefaultInstance().getFeatureOnlineStoreId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID to use for this FeatureOnlineStore, which will become the
+     * final component of the FeatureOnlineStore's resource name.
+     *
+     * This value may be up to 60 characters, and valid characters are
+     * `[a-z0-9_]`. The first character cannot be a number.
+     *
+     * The value must be unique within the project and location.
+     * 
+ * + * string feature_online_store_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for featureOnlineStoreId to set. + * @return This builder for chaining. + */ + public Builder setFeatureOnlineStoreIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + featureOnlineStoreId_ = 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.aiplatform.v1.CreateFeatureOnlineStoreRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest) + private static final com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest(); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateFeatureOnlineStoreRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureOnlineStoreRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureOnlineStoreRequestOrBuilder.java new file mode 100644 index 000000000000..392066740e06 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureOnlineStoreRequestOrBuilder.java @@ -0,0 +1,136 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CreateFeatureOnlineStoreRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to create FeatureOnlineStores.
+   * 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. The resource name of the Location to create FeatureOnlineStores.
+   * 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(); + + /** + * + * + *
+   * Required. The FeatureOnlineStore to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the featureOnlineStore field is set. + */ + boolean hasFeatureOnlineStore(); + /** + * + * + *
+   * Required. The FeatureOnlineStore to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The featureOnlineStore. + */ + com.google.cloud.aiplatform.v1.FeatureOnlineStore getFeatureOnlineStore(); + /** + * + * + *
+   * Required. The FeatureOnlineStore to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.FeatureOnlineStoreOrBuilder getFeatureOnlineStoreOrBuilder(); + + /** + * + * + *
+   * Required. The ID to use for this FeatureOnlineStore, which will become the
+   * final component of the FeatureOnlineStore's resource name.
+   *
+   * This value may be up to 60 characters, and valid characters are
+   * `[a-z0-9_]`. The first character cannot be a number.
+   *
+   * The value must be unique within the project and location.
+   * 
+ * + * string feature_online_store_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The featureOnlineStoreId. + */ + java.lang.String getFeatureOnlineStoreId(); + /** + * + * + *
+   * Required. The ID to use for this FeatureOnlineStore, which will become the
+   * final component of the FeatureOnlineStore's resource name.
+   *
+   * This value may be up to 60 characters, and valid characters are
+   * `[a-z0-9_]`. The first character cannot be a number.
+   *
+   * The value must be unique within the project and location.
+   * 
+ * + * string feature_online_store_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for featureOnlineStoreId. + */ + com.google.protobuf.ByteString getFeatureOnlineStoreIdBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureRequest.java index a88cb16adf23..5c74b0681957 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureRequest.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureRequest.java @@ -24,6 +24,8 @@ *
  * Request message for
  * [FeaturestoreService.CreateFeature][google.cloud.aiplatform.v1.FeaturestoreService.CreateFeature].
+ * Request message for
+ * [FeatureRegistryService.CreateFeature][google.cloud.aiplatform.v1.FeatureRegistryService.CreateFeature].
  * 
* * Protobuf type {@code google.cloud.aiplatform.v1.CreateFeatureRequest} @@ -72,9 +74,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The resource name of the EntityType to create a Feature.
-   * Format:
+   * Required. The resource name of the EntityType or FeatureGroup to create a
+   * Feature. Format for entity_type as parent:
    * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
    * 
* * @@ -99,9 +103,11 @@ public java.lang.String getParent() { * * *
-   * Required. The resource name of the EntityType to create a Feature.
-   * Format:
+   * Required. The resource name of the EntityType or FeatureGroup to create a
+   * Feature. Format for entity_type as parent:
    * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
    * 
* * @@ -193,7 +199,7 @@ public com.google.cloud.aiplatform.v1.FeatureOrBuilder getFeatureOrBuilder() { * This value may be up to 128 characters, and valid characters are * `[a-z0-9_]`. The first character cannot be a number. * - * The value must be unique within an EntityType. + * The value must be unique within an EntityType/FeatureGroup. * * * string feature_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -222,7 +228,7 @@ public java.lang.String getFeatureId() { * This value may be up to 128 characters, and valid characters are * `[a-z0-9_]`. The first character cannot be a number. * - * The value must be unique within an EntityType. + * The value must be unique within an EntityType/FeatureGroup. * * * string feature_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -430,6 +436,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * Request message for
    * [FeaturestoreService.CreateFeature][google.cloud.aiplatform.v1.FeaturestoreService.CreateFeature].
+   * Request message for
+   * [FeatureRegistryService.CreateFeature][google.cloud.aiplatform.v1.FeatureRegistryService.CreateFeature].
    * 
* * Protobuf type {@code google.cloud.aiplatform.v1.CreateFeatureRequest} @@ -645,9 +653,11 @@ public Builder mergeFrom( * * *
-     * Required. The resource name of the EntityType to create a Feature.
-     * Format:
+     * Required. The resource name of the EntityType or FeatureGroup to create a
+     * Feature. Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* * @@ -671,9 +681,11 @@ public java.lang.String getParent() { * * *
-     * Required. The resource name of the EntityType to create a Feature.
-     * Format:
+     * Required. The resource name of the EntityType or FeatureGroup to create a
+     * Feature. Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* * @@ -697,9 +709,11 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. The resource name of the EntityType to create a Feature.
-     * Format:
+     * Required. The resource name of the EntityType or FeatureGroup to create a
+     * Feature. Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* * @@ -722,9 +736,11 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. The resource name of the EntityType to create a Feature.
-     * Format:
+     * Required. The resource name of the EntityType or FeatureGroup to create a
+     * Feature. Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* * @@ -743,9 +759,11 @@ public Builder clearParent() { * * *
-     * Required. The resource name of the EntityType to create a Feature.
-     * Format:
+     * Required. The resource name of the EntityType or FeatureGroup to create a
+     * Feature. Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* * @@ -978,7 +996,7 @@ public com.google.cloud.aiplatform.v1.FeatureOrBuilder getFeatureOrBuilder() { * This value may be up to 128 characters, and valid characters are * `[a-z0-9_]`. The first character cannot be a number. * - * The value must be unique within an EntityType. + * The value must be unique within an EntityType/FeatureGroup. * * * string feature_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1006,7 +1024,7 @@ public java.lang.String getFeatureId() { * This value may be up to 128 characters, and valid characters are * `[a-z0-9_]`. The first character cannot be a number. * - * The value must be unique within an EntityType. + * The value must be unique within an EntityType/FeatureGroup. * * * string feature_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1034,7 +1052,7 @@ public com.google.protobuf.ByteString getFeatureIdBytes() { * This value may be up to 128 characters, and valid characters are * `[a-z0-9_]`. The first character cannot be a number. * - * The value must be unique within an EntityType. + * The value must be unique within an EntityType/FeatureGroup. * * * string feature_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1061,7 +1079,7 @@ public Builder setFeatureId(java.lang.String value) { * This value may be up to 128 characters, and valid characters are * `[a-z0-9_]`. The first character cannot be a number. * - * The value must be unique within an EntityType. + * The value must be unique within an EntityType/FeatureGroup. * * * string feature_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1084,7 +1102,7 @@ public Builder clearFeatureId() { * This value may be up to 128 characters, and valid characters are * `[a-z0-9_]`. The first character cannot be a number. * - * The value must be unique within an EntityType. + * The value must be unique within an EntityType/FeatureGroup. * * * string feature_id = 3 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureRequestOrBuilder.java index e09f4c0bb6cb..cdc24de5ac9f 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureRequestOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureRequestOrBuilder.java @@ -27,9 +27,11 @@ public interface CreateFeatureRequestOrBuilder * * *
-   * Required. The resource name of the EntityType to create a Feature.
-   * Format:
+   * Required. The resource name of the EntityType or FeatureGroup to create a
+   * Feature. Format for entity_type as parent:
    * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
    * 
* * @@ -43,9 +45,11 @@ public interface CreateFeatureRequestOrBuilder * * *
-   * Required. The resource name of the EntityType to create a Feature.
-   * Format:
+   * Required. The resource name of the EntityType or FeatureGroup to create a
+   * Feature. Format for entity_type as parent:
    * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
    * 
* * @@ -107,7 +111,7 @@ public interface CreateFeatureRequestOrBuilder * This value may be up to 128 characters, and valid characters are * `[a-z0-9_]`. The first character cannot be a number. * - * The value must be unique within an EntityType. + * The value must be unique within an EntityType/FeatureGroup. * * * string feature_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -125,7 +129,7 @@ public interface CreateFeatureRequestOrBuilder * This value may be up to 128 characters, and valid characters are * `[a-z0-9_]`. The first character cannot be a number. * - * The value must be unique within an EntityType. + * The value must be unique within an EntityType/FeatureGroup. * * * string feature_id = 3 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureViewOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureViewOperationMetadata.java new file mode 100644 index 000000000000..04166b3736d9 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureViewOperationMetadata.java @@ -0,0 +1,724 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Details of operations that perform create FeatureView.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata} + */ +public final class CreateFeatureViewOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata) + CreateFeatureViewOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateFeatureViewOperationMetadata.newBuilder() to construct. + private CreateFeatureViewOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateFeatureViewOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateFeatureViewOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureViewOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureViewOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata.class, + com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata.Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * Operation metadata for FeatureView Create.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * Operation metadata for FeatureView Create.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * Operation metadata for FeatureView Create.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata other = + (com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getUnknownFields().equals(other.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 (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of operations that perform create FeatureView.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata) + com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureViewOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureViewOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata.class, + com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureViewOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata build() { + com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata result = + new com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.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.aiplatform.v1.CreateFeatureViewOperationMetadata) { + return mergeFrom((com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata.getDefaultInstance()) + return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(getGenericMetadataFieldBuilder().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.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * Operation metadata for FeatureView Create.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation metadata for FeatureView Create.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation metadata for FeatureView Create.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureView Create.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureView Create.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureView Create.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureView Create.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation metadata for FeatureView Create.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * Operation metadata for FeatureView Create.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata) + private static final com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateFeatureViewOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureViewOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureViewOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..6610ee82d352 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureViewOperationMetadataOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CreateFeatureViewOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation metadata for FeatureView Create.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * Operation metadata for FeatureView Create.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * Operation metadata for FeatureView Create.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureViewRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureViewRequest.java new file mode 100644 index 000000000000..7f183ba2357f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureViewRequest.java @@ -0,0 +1,1274 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [FeatureOnlineStoreAdminService.CreateFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.CreateFeatureView].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateFeatureViewRequest} + */ +public final class CreateFeatureViewRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateFeatureViewRequest) + CreateFeatureViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateFeatureViewRequest.newBuilder() to construct. + private CreateFeatureViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateFeatureViewRequest() { + parent_ = ""; + featureViewId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateFeatureViewRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateFeatureViewRequest.class, + com.google.cloud.aiplatform.v1.CreateFeatureViewRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the FeatureOnlineStore to create
+   * FeatureViews. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+   * 
+ * + * + * 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 resource name of the FeatureOnlineStore to create
+   * FeatureViews. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+   * 
+ * + * + * 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 FEATURE_VIEW_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.FeatureView featureView_; + /** + * + * + *
+   * Required. The FeatureView to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the featureView field is set. + */ + @java.lang.Override + public boolean hasFeatureView() { + return featureView_ != null; + } + /** + * + * + *
+   * Required. The FeatureView to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The featureView. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView getFeatureView() { + return featureView_ == null + ? com.google.cloud.aiplatform.v1.FeatureView.getDefaultInstance() + : featureView_; + } + /** + * + * + *
+   * Required. The FeatureView to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureViewOrBuilder getFeatureViewOrBuilder() { + return featureView_ == null + ? com.google.cloud.aiplatform.v1.FeatureView.getDefaultInstance() + : featureView_; + } + + public static final int FEATURE_VIEW_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object featureViewId_ = ""; + /** + * + * + *
+   * Required. The ID to use for the FeatureView, which will become the final
+   * component of the FeatureView's resource name.
+   *
+   * This value may be up to 60 characters, and valid characters are
+   * `[a-z0-9_]`. The first character cannot be a number.
+   *
+   * The value must be unique within a FeatureOnlineStore.
+   * 
+ * + * string feature_view_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The featureViewId. + */ + @java.lang.Override + public java.lang.String getFeatureViewId() { + java.lang.Object ref = featureViewId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + featureViewId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ID to use for the FeatureView, which will become the final
+   * component of the FeatureView's resource name.
+   *
+   * This value may be up to 60 characters, and valid characters are
+   * `[a-z0-9_]`. The first character cannot be a number.
+   *
+   * The value must be unique within a FeatureOnlineStore.
+   * 
+ * + * string feature_view_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for featureViewId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFeatureViewIdBytes() { + java.lang.Object ref = featureViewId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + featureViewId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RUN_SYNC_IMMEDIATELY_FIELD_NUMBER = 4; + private boolean runSyncImmediately_ = false; + /** + * + * + *
+   * Immutable. If set to true, one on demand sync will be run immediately,
+   * regardless whether the
+   * [FeatureView.sync_config][google.cloud.aiplatform.v1.FeatureView.sync_config]
+   * is configured or not.
+   * 
+ * + * bool run_sync_immediately = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The runSyncImmediately. + */ + @java.lang.Override + public boolean getRunSyncImmediately() { + return runSyncImmediately_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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 (featureView_ != null) { + output.writeMessage(2, getFeatureView()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(featureViewId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, featureViewId_); + } + if (runSyncImmediately_ != false) { + output.writeBool(4, runSyncImmediately_); + } + 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 (featureView_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFeatureView()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(featureViewId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, featureViewId_); + } + if (runSyncImmediately_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, runSyncImmediately_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.CreateFeatureViewRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateFeatureViewRequest other = + (com.google.cloud.aiplatform.v1.CreateFeatureViewRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasFeatureView() != other.hasFeatureView()) return false; + if (hasFeatureView()) { + if (!getFeatureView().equals(other.getFeatureView())) return false; + } + if (!getFeatureViewId().equals(other.getFeatureViewId())) return false; + if (getRunSyncImmediately() != other.getRunSyncImmediately()) return false; + if (!getUnknownFields().equals(other.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 (hasFeatureView()) { + hash = (37 * hash) + FEATURE_VIEW_FIELD_NUMBER; + hash = (53 * hash) + getFeatureView().hashCode(); + } + hash = (37 * hash) + FEATURE_VIEW_ID_FIELD_NUMBER; + hash = (53 * hash) + getFeatureViewId().hashCode(); + hash = (37 * hash) + RUN_SYNC_IMMEDIATELY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRunSyncImmediately()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.CreateFeatureViewRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureOnlineStoreAdminService.CreateFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.CreateFeatureView].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateFeatureViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateFeatureViewRequest) + com.google.cloud.aiplatform.v1.CreateFeatureViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateFeatureViewRequest.class, + com.google.cloud.aiplatform.v1.CreateFeatureViewRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CreateFeatureViewRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + featureView_ = null; + if (featureViewBuilder_ != null) { + featureViewBuilder_.dispose(); + featureViewBuilder_ = null; + } + featureViewId_ = ""; + runSyncImmediately_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateFeatureViewRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureViewRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateFeatureViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureViewRequest build() { + com.google.cloud.aiplatform.v1.CreateFeatureViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureViewRequest buildPartial() { + com.google.cloud.aiplatform.v1.CreateFeatureViewRequest result = + new com.google.cloud.aiplatform.v1.CreateFeatureViewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.CreateFeatureViewRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.featureView_ = + featureViewBuilder_ == null ? featureView_ : featureViewBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.featureViewId_ = featureViewId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.runSyncImmediately_ = runSyncImmediately_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.CreateFeatureViewRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CreateFeatureViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CreateFeatureViewRequest other) { + if (other == com.google.cloud.aiplatform.v1.CreateFeatureViewRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasFeatureView()) { + mergeFeatureView(other.getFeatureView()); + } + if (!other.getFeatureViewId().isEmpty()) { + featureViewId_ = other.featureViewId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getRunSyncImmediately() != false) { + setRunSyncImmediately(other.getRunSyncImmediately()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(getFeatureViewFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + featureViewId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + runSyncImmediately_ = 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 parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the FeatureOnlineStore to create
+     * FeatureViews. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * 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 resource name of the FeatureOnlineStore to create
+     * FeatureViews. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * 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 resource name of the FeatureOnlineStore to create
+     * FeatureViews. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * 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 resource name of the FeatureOnlineStore to create
+     * FeatureViews. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * 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 resource name of the FeatureOnlineStore to create
+     * FeatureViews. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * 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.aiplatform.v1.FeatureView featureView_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView, + com.google.cloud.aiplatform.v1.FeatureView.Builder, + com.google.cloud.aiplatform.v1.FeatureViewOrBuilder> + featureViewBuilder_; + /** + * + * + *
+     * Required. The FeatureView to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the featureView field is set. + */ + public boolean hasFeatureView() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The FeatureView to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The featureView. + */ + public com.google.cloud.aiplatform.v1.FeatureView getFeatureView() { + if (featureViewBuilder_ == null) { + return featureView_ == null + ? com.google.cloud.aiplatform.v1.FeatureView.getDefaultInstance() + : featureView_; + } else { + return featureViewBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The FeatureView to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFeatureView(com.google.cloud.aiplatform.v1.FeatureView value) { + if (featureViewBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + featureView_ = value; + } else { + featureViewBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureView to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFeatureView( + com.google.cloud.aiplatform.v1.FeatureView.Builder builderForValue) { + if (featureViewBuilder_ == null) { + featureView_ = builderForValue.build(); + } else { + featureViewBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureView to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFeatureView(com.google.cloud.aiplatform.v1.FeatureView value) { + if (featureViewBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && featureView_ != null + && featureView_ != com.google.cloud.aiplatform.v1.FeatureView.getDefaultInstance()) { + getFeatureViewBuilder().mergeFrom(value); + } else { + featureView_ = value; + } + } else { + featureViewBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureView to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFeatureView() { + bitField0_ = (bitField0_ & ~0x00000002); + featureView_ = null; + if (featureViewBuilder_ != null) { + featureViewBuilder_.dispose(); + featureViewBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureView to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureView.Builder getFeatureViewBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFeatureViewFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The FeatureView to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureViewOrBuilder getFeatureViewOrBuilder() { + if (featureViewBuilder_ != null) { + return featureViewBuilder_.getMessageOrBuilder(); + } else { + return featureView_ == null + ? com.google.cloud.aiplatform.v1.FeatureView.getDefaultInstance() + : featureView_; + } + } + /** + * + * + *
+     * Required. The FeatureView to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView, + com.google.cloud.aiplatform.v1.FeatureView.Builder, + com.google.cloud.aiplatform.v1.FeatureViewOrBuilder> + getFeatureViewFieldBuilder() { + if (featureViewBuilder_ == null) { + featureViewBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView, + com.google.cloud.aiplatform.v1.FeatureView.Builder, + com.google.cloud.aiplatform.v1.FeatureViewOrBuilder>( + getFeatureView(), getParentForChildren(), isClean()); + featureView_ = null; + } + return featureViewBuilder_; + } + + private java.lang.Object featureViewId_ = ""; + /** + * + * + *
+     * Required. The ID to use for the FeatureView, which will become the final
+     * component of the FeatureView's resource name.
+     *
+     * This value may be up to 60 characters, and valid characters are
+     * `[a-z0-9_]`. The first character cannot be a number.
+     *
+     * The value must be unique within a FeatureOnlineStore.
+     * 
+ * + * string feature_view_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The featureViewId. + */ + public java.lang.String getFeatureViewId() { + java.lang.Object ref = featureViewId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + featureViewId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ID to use for the FeatureView, which will become the final
+     * component of the FeatureView's resource name.
+     *
+     * This value may be up to 60 characters, and valid characters are
+     * `[a-z0-9_]`. The first character cannot be a number.
+     *
+     * The value must be unique within a FeatureOnlineStore.
+     * 
+ * + * string feature_view_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for featureViewId. + */ + public com.google.protobuf.ByteString getFeatureViewIdBytes() { + java.lang.Object ref = featureViewId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + featureViewId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ID to use for the FeatureView, which will become the final
+     * component of the FeatureView's resource name.
+     *
+     * This value may be up to 60 characters, and valid characters are
+     * `[a-z0-9_]`. The first character cannot be a number.
+     *
+     * The value must be unique within a FeatureOnlineStore.
+     * 
+ * + * string feature_view_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The featureViewId to set. + * @return This builder for chaining. + */ + public Builder setFeatureViewId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + featureViewId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID to use for the FeatureView, which will become the final
+     * component of the FeatureView's resource name.
+     *
+     * This value may be up to 60 characters, and valid characters are
+     * `[a-z0-9_]`. The first character cannot be a number.
+     *
+     * The value must be unique within a FeatureOnlineStore.
+     * 
+ * + * string feature_view_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFeatureViewId() { + featureViewId_ = getDefaultInstance().getFeatureViewId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID to use for the FeatureView, which will become the final
+     * component of the FeatureView's resource name.
+     *
+     * This value may be up to 60 characters, and valid characters are
+     * `[a-z0-9_]`. The first character cannot be a number.
+     *
+     * The value must be unique within a FeatureOnlineStore.
+     * 
+ * + * string feature_view_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for featureViewId to set. + * @return This builder for chaining. + */ + public Builder setFeatureViewIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + featureViewId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean runSyncImmediately_; + /** + * + * + *
+     * Immutable. If set to true, one on demand sync will be run immediately,
+     * regardless whether the
+     * [FeatureView.sync_config][google.cloud.aiplatform.v1.FeatureView.sync_config]
+     * is configured or not.
+     * 
+ * + * bool run_sync_immediately = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The runSyncImmediately. + */ + @java.lang.Override + public boolean getRunSyncImmediately() { + return runSyncImmediately_; + } + /** + * + * + *
+     * Immutable. If set to true, one on demand sync will be run immediately,
+     * regardless whether the
+     * [FeatureView.sync_config][google.cloud.aiplatform.v1.FeatureView.sync_config]
+     * is configured or not.
+     * 
+ * + * bool run_sync_immediately = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The runSyncImmediately to set. + * @return This builder for chaining. + */ + public Builder setRunSyncImmediately(boolean value) { + + runSyncImmediately_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. If set to true, one on demand sync will be run immediately,
+     * regardless whether the
+     * [FeatureView.sync_config][google.cloud.aiplatform.v1.FeatureView.sync_config]
+     * is configured or not.
+     * 
+ * + * bool run_sync_immediately = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearRunSyncImmediately() { + bitField0_ = (bitField0_ & ~0x00000008); + runSyncImmediately_ = 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.aiplatform.v1.CreateFeatureViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateFeatureViewRequest) + private static final com.google.cloud.aiplatform.v1.CreateFeatureViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreateFeatureViewRequest(); + } + + public static com.google.cloud.aiplatform.v1.CreateFeatureViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateFeatureViewRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateFeatureViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureViewRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureViewRequestOrBuilder.java new file mode 100644 index 000000000000..f101614e71a5 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateFeatureViewRequestOrBuilder.java @@ -0,0 +1,152 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CreateFeatureViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateFeatureViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the FeatureOnlineStore to create
+   * FeatureViews. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the FeatureOnlineStore to create
+   * FeatureViews. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The FeatureView to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the featureView field is set. + */ + boolean hasFeatureView(); + /** + * + * + *
+   * Required. The FeatureView to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The featureView. + */ + com.google.cloud.aiplatform.v1.FeatureView getFeatureView(); + /** + * + * + *
+   * Required. The FeatureView to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.FeatureViewOrBuilder getFeatureViewOrBuilder(); + + /** + * + * + *
+   * Required. The ID to use for the FeatureView, which will become the final
+   * component of the FeatureView's resource name.
+   *
+   * This value may be up to 60 characters, and valid characters are
+   * `[a-z0-9_]`. The first character cannot be a number.
+   *
+   * The value must be unique within a FeatureOnlineStore.
+   * 
+ * + * string feature_view_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The featureViewId. + */ + java.lang.String getFeatureViewId(); + /** + * + * + *
+   * Required. The ID to use for the FeatureView, which will become the final
+   * component of the FeatureView's resource name.
+   *
+   * This value may be up to 60 characters, and valid characters are
+   * `[a-z0-9_]`. The first character cannot be a number.
+   *
+   * The value must be unique within a FeatureOnlineStore.
+   * 
+ * + * string feature_view_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for featureViewId. + */ + com.google.protobuf.ByteString getFeatureViewIdBytes(); + + /** + * + * + *
+   * Immutable. If set to true, one on demand sync will be run immediately,
+   * regardless whether the
+   * [FeatureView.sync_config][google.cloud.aiplatform.v1.FeatureView.sync_config]
+   * is configured or not.
+   * 
+ * + * bool run_sync_immediately = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The runSyncImmediately. + */ + boolean getRunSyncImmediately(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateRegistryFeatureOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateRegistryFeatureOperationMetadata.java new file mode 100644 index 000000000000..be570b42e08b --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateRegistryFeatureOperationMetadata.java @@ -0,0 +1,727 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Details of operations that perform create FeatureGroup.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata} + */ +public final class CreateRegistryFeatureOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata) + CreateRegistryFeatureOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateRegistryFeatureOperationMetadata.newBuilder() to construct. + private CreateRegistryFeatureOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateRegistryFeatureOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateRegistryFeatureOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateRegistryFeatureOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateRegistryFeatureOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata.class, + com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata.Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * Operation metadata for Feature.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * Operation metadata for Feature.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * Operation metadata for Feature.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata other = + (com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getUnknownFields().equals(other.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 (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of operations that perform create FeatureGroup.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata) + com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateRegistryFeatureOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateRegistryFeatureOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata.class, + com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateRegistryFeatureOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata build() { + com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata result = + new com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.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.aiplatform.v1.CreateRegistryFeatureOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(getGenericMetadataFieldBuilder().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.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * Operation metadata for Feature.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation metadata for Feature.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation metadata for Feature.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for Feature.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for Feature.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for Feature.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for Feature.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation metadata for Feature.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * Operation metadata for Feature.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata) + private static final com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateRegistryFeatureOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateRegistryFeatureOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateRegistryFeatureOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..df77bb3e898e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateRegistryFeatureOperationMetadataOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CreateRegistryFeatureOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation metadata for Feature.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * Operation metadata for Feature.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * Operation metadata for Feature.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobProto.java index 1aedb650c43a..99c929e114ec 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobProto.java @@ -101,7 +101,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\022\r\n\005value\030\002 \001(\t:\0028\001:i\352Af\n#aiplatform.goo" + "gleapis.com/CustomJob\022?projects/{project" + "}/locations/{location}/customJobs/{custo" - + "m_job}\"\351\004\n\rCustomJobSpec\022K\n\021worker_pool_" + + "m_job}\"\221\005\n\rCustomJobSpec\022K\n\021worker_pool_" + "specs\030\001 \003(\0132*.google.cloud.aiplatform.v1" + ".WorkerPoolSpecB\004\342A\001\002\022:\n\nscheduling\030\003 \001(" + "\0132&.google.cloud.aiplatform.v1.Schedulin" @@ -109,7 +109,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\001(\tB\'\342A\001\001\372A \n\036compute.googleapis.com/Net" + "work\022 \n\022reserved_ip_ranges\030\r \003(\tB\004\342A\001\001\022I" + "\n\025base_output_directory\030\006 \001(\0132*.google.c" - + "loud.aiplatform.v1.GcsDestination\022C\n\013ten" + + "loud.aiplatform.v1.GcsDestination\022&\n\036pro" + + "tected_artifact_location_id\030\023 \001(\t\022C\n\013ten" + "sorboard\030\007 \001(\tB.\342A\001\001\372A\'\n%aiplatform.goog" + "leapis.com/Tensorboard\022\037\n\021enable_web_acc" + "ess\030\n \001(\010B\004\342A\001\001\022%\n\027enable_dashboard_acce" @@ -206,6 +207,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Network", "ReservedIpRanges", "BaseOutputDirectory", + "ProtectedArtifactLocationId", "Tensorboard", "EnableWebAccess", "EnableDashboardAccess", diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpec.java index 71446050c8e1..cb438ba6bdd7 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpec.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpec.java @@ -42,6 +42,7 @@ private CustomJobSpec() { serviceAccount_ = ""; network_ = ""; reservedIpRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + protectedArtifactLocationId_ = ""; tensorboard_ = ""; experiment_ = ""; experimentRun_ = ""; @@ -550,6 +551,63 @@ public com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder getBaseOutputDirec : baseOutputDirectory_; } + public static final int PROTECTED_ARTIFACT_LOCATION_ID_FIELD_NUMBER = 19; + + @SuppressWarnings("serial") + private volatile java.lang.Object protectedArtifactLocationId_ = ""; + /** + * + * + *
+   * The ID of the location to store protected artifacts. e.g. us-central1.
+   * Populate only when the location is different than CustomJob location.
+   * List of supported locations:
+   * https://cloud.google.com/vertex-ai/docs/general/locations
+   * 
+ * + * string protected_artifact_location_id = 19; + * + * @return The protectedArtifactLocationId. + */ + @java.lang.Override + public java.lang.String getProtectedArtifactLocationId() { + java.lang.Object ref = protectedArtifactLocationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protectedArtifactLocationId_ = s; + return s; + } + } + /** + * + * + *
+   * The ID of the location to store protected artifacts. e.g. us-central1.
+   * Populate only when the location is different than CustomJob location.
+   * List of supported locations:
+   * https://cloud.google.com/vertex-ai/docs/general/locations
+   * 
+ * + * string protected_artifact_location_id = 19; + * + * @return The bytes for protectedArtifactLocationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProtectedArtifactLocationIdBytes() { + java.lang.Object ref = protectedArtifactLocationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protectedArtifactLocationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int TENSORBOARD_FIELD_NUMBER = 7; @SuppressWarnings("serial") @@ -831,6 +889,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(experimentRun_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 18, experimentRun_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protectedArtifactLocationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, protectedArtifactLocationId_); + } getUnknownFields().writeTo(output); } @@ -878,6 +939,11 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(experimentRun_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, experimentRun_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protectedArtifactLocationId_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 19, protectedArtifactLocationId_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -906,6 +972,8 @@ public boolean equals(final java.lang.Object obj) { if (hasBaseOutputDirectory()) { if (!getBaseOutputDirectory().equals(other.getBaseOutputDirectory())) return false; } + if (!getProtectedArtifactLocationId().equals(other.getProtectedArtifactLocationId())) + return false; if (!getTensorboard().equals(other.getTensorboard())) return false; if (getEnableWebAccess() != other.getEnableWebAccess()) return false; if (getEnableDashboardAccess() != other.getEnableDashboardAccess()) return false; @@ -942,6 +1010,8 @@ public int hashCode() { hash = (37 * hash) + BASE_OUTPUT_DIRECTORY_FIELD_NUMBER; hash = (53 * hash) + getBaseOutputDirectory().hashCode(); } + hash = (37 * hash) + PROTECTED_ARTIFACT_LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getProtectedArtifactLocationId().hashCode(); hash = (37 * hash) + TENSORBOARD_FIELD_NUMBER; hash = (53 * hash) + getTensorboard().hashCode(); hash = (37 * hash) + ENABLE_WEB_ACCESS_FIELD_NUMBER; @@ -1111,6 +1181,7 @@ public Builder clear() { baseOutputDirectoryBuilder_.dispose(); baseOutputDirectoryBuilder_ = null; } + protectedArtifactLocationId_ = ""; tensorboard_ = ""; enableWebAccess_ = false; enableDashboardAccess_ = false; @@ -1185,18 +1256,21 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.CustomJobSpec result) : baseOutputDirectoryBuilder_.build(); } if (((from_bitField0_ & 0x00000040) != 0)) { - result.tensorboard_ = tensorboard_; + result.protectedArtifactLocationId_ = protectedArtifactLocationId_; } if (((from_bitField0_ & 0x00000080) != 0)) { - result.enableWebAccess_ = enableWebAccess_; + result.tensorboard_ = tensorboard_; } if (((from_bitField0_ & 0x00000100) != 0)) { - result.enableDashboardAccess_ = enableDashboardAccess_; + result.enableWebAccess_ = enableWebAccess_; } if (((from_bitField0_ & 0x00000200) != 0)) { - result.experiment_ = experiment_; + result.enableDashboardAccess_ = enableDashboardAccess_; } if (((from_bitField0_ & 0x00000400) != 0)) { + result.experiment_ = experiment_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { result.experimentRun_ = experimentRun_; } } @@ -1299,9 +1373,14 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.CustomJobSpec other) { if (other.hasBaseOutputDirectory()) { mergeBaseOutputDirectory(other.getBaseOutputDirectory()); } + if (!other.getProtectedArtifactLocationId().isEmpty()) { + protectedArtifactLocationId_ = other.protectedArtifactLocationId_; + bitField0_ |= 0x00000040; + onChanged(); + } if (!other.getTensorboard().isEmpty()) { tensorboard_ = other.tensorboard_; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); } if (other.getEnableWebAccess() != false) { @@ -1312,12 +1391,12 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.CustomJobSpec other) { } if (!other.getExperiment().isEmpty()) { experiment_ = other.experiment_; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); } if (!other.getExperimentRun().isEmpty()) { experimentRun_ = other.experimentRun_; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -1387,13 +1466,13 @@ public Builder mergeFrom( case 58: { tensorboard_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; break; } // case 58 case 80: { enableWebAccess_ = input.readBool(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 80 case 106: @@ -1406,21 +1485,27 @@ public Builder mergeFrom( case 128: { enableDashboardAccess_ = input.readBool(); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 128 case 138: { experiment_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; break; } // case 138 case 146: { experimentRun_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; break; } // case 146 + case 154: + { + protectedArtifactLocationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 154 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2970,6 +3055,127 @@ public com.google.cloud.aiplatform.v1.GcsDestination.Builder getBaseOutputDirect return baseOutputDirectoryBuilder_; } + private java.lang.Object protectedArtifactLocationId_ = ""; + /** + * + * + *
+     * The ID of the location to store protected artifacts. e.g. us-central1.
+     * Populate only when the location is different than CustomJob location.
+     * List of supported locations:
+     * https://cloud.google.com/vertex-ai/docs/general/locations
+     * 
+ * + * string protected_artifact_location_id = 19; + * + * @return The protectedArtifactLocationId. + */ + public java.lang.String getProtectedArtifactLocationId() { + java.lang.Object ref = protectedArtifactLocationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protectedArtifactLocationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The ID of the location to store protected artifacts. e.g. us-central1.
+     * Populate only when the location is different than CustomJob location.
+     * List of supported locations:
+     * https://cloud.google.com/vertex-ai/docs/general/locations
+     * 
+ * + * string protected_artifact_location_id = 19; + * + * @return The bytes for protectedArtifactLocationId. + */ + public com.google.protobuf.ByteString getProtectedArtifactLocationIdBytes() { + java.lang.Object ref = protectedArtifactLocationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protectedArtifactLocationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The ID of the location to store protected artifacts. e.g. us-central1.
+     * Populate only when the location is different than CustomJob location.
+     * List of supported locations:
+     * https://cloud.google.com/vertex-ai/docs/general/locations
+     * 
+ * + * string protected_artifact_location_id = 19; + * + * @param value The protectedArtifactLocationId to set. + * @return This builder for chaining. + */ + public Builder setProtectedArtifactLocationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + protectedArtifactLocationId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The ID of the location to store protected artifacts. e.g. us-central1.
+     * Populate only when the location is different than CustomJob location.
+     * List of supported locations:
+     * https://cloud.google.com/vertex-ai/docs/general/locations
+     * 
+ * + * string protected_artifact_location_id = 19; + * + * @return This builder for chaining. + */ + public Builder clearProtectedArtifactLocationId() { + protectedArtifactLocationId_ = getDefaultInstance().getProtectedArtifactLocationId(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * The ID of the location to store protected artifacts. e.g. us-central1.
+     * Populate only when the location is different than CustomJob location.
+     * List of supported locations:
+     * https://cloud.google.com/vertex-ai/docs/general/locations
+     * 
+ * + * string protected_artifact_location_id = 19; + * + * @param value The bytes for protectedArtifactLocationId to set. + * @return This builder for chaining. + */ + public Builder setProtectedArtifactLocationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + protectedArtifactLocationId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + private java.lang.Object tensorboard_ = ""; /** * @@ -3047,7 +3253,7 @@ public Builder setTensorboard(java.lang.String value) { throw new NullPointerException(); } tensorboard_ = value; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3069,7 +3275,7 @@ public Builder setTensorboard(java.lang.String value) { */ public Builder clearTensorboard() { tensorboard_ = getDefaultInstance().getTensorboard(); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); onChanged(); return this; } @@ -3096,7 +3302,7 @@ public Builder setTensorboardBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); tensorboard_ = value; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3152,7 +3358,7 @@ public boolean getEnableWebAccess() { public Builder setEnableWebAccess(boolean value) { enableWebAccess_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3178,7 +3384,7 @@ public Builder setEnableWebAccess(boolean value) { * @return This builder for chaining. */ public Builder clearEnableWebAccess() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); enableWebAccess_ = false; onChanged(); return this; @@ -3233,7 +3439,7 @@ public boolean getEnableDashboardAccess() { public Builder setEnableDashboardAccess(boolean value) { enableDashboardAccess_ = value; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3258,7 +3464,7 @@ public Builder setEnableDashboardAccess(boolean value) { * @return This builder for chaining. */ public Builder clearEnableDashboardAccess() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); enableDashboardAccess_ = false; onChanged(); return this; @@ -3338,7 +3544,7 @@ public Builder setExperiment(java.lang.String value) { throw new NullPointerException(); } experiment_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3359,7 +3565,7 @@ public Builder setExperiment(java.lang.String value) { */ public Builder clearExperiment() { experiment_ = getDefaultInstance().getExperiment(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } @@ -3385,7 +3591,7 @@ public Builder setExperimentBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); experiment_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3464,7 +3670,7 @@ public Builder setExperimentRun(java.lang.String value) { throw new NullPointerException(); } experimentRun_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -3485,7 +3691,7 @@ public Builder setExperimentRun(java.lang.String value) { */ public Builder clearExperimentRun() { experimentRun_ = getDefaultInstance().getExperimentRun(); - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); onChanged(); return this; } @@ -3511,7 +3717,7 @@ public Builder setExperimentRunBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); experimentRun_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpecOrBuilder.java index 42df29508f91..13a50a232b3e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpecOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpecOrBuilder.java @@ -390,6 +390,37 @@ public interface CustomJobSpecOrBuilder */ com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder getBaseOutputDirectoryOrBuilder(); + /** + * + * + *
+   * The ID of the location to store protected artifacts. e.g. us-central1.
+   * Populate only when the location is different than CustomJob location.
+   * List of supported locations:
+   * https://cloud.google.com/vertex-ai/docs/general/locations
+   * 
+ * + * string protected_artifact_location_id = 19; + * + * @return The protectedArtifactLocationId. + */ + java.lang.String getProtectedArtifactLocationId(); + /** + * + * + *
+   * The ID of the location to store protected artifacts. e.g. us-central1.
+   * Populate only when the location is different than CustomJob location.
+   * List of supported locations:
+   * https://cloud.google.com/vertex-ai/docs/general/locations
+   * 
+ * + * string protected_artifact_location_id = 19; + * + * @return The bytes for protectedArtifactLocationId. + */ + com.google.protobuf.ByteString getProtectedArtifactLocationIdBytes(); + /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureGroupRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureGroupRequest.java new file mode 100644 index 000000000000..9bb466113a18 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureGroupRequest.java @@ -0,0 +1,756 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [FeatureRegistryService.DeleteFeatureGroup][google.cloud.aiplatform.v1.FeatureRegistryService.DeleteFeatureGroup].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteFeatureGroupRequest} + */ +public final class DeleteFeatureGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeleteFeatureGroupRequest) + DeleteFeatureGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteFeatureGroupRequest.newBuilder() to construct. + private DeleteFeatureGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteFeatureGroupRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteFeatureGroupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteFeatureGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteFeatureGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest.class, + com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the FeatureGroup to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+   * 
+ * + * + * 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 FeatureGroup to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+   * 
+ * + * + * 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 FORCE_FIELD_NUMBER = 2; + private boolean force_ = false; + /** + * + * + *
+   * If set to true, any Features under this FeatureGroup
+   * will also be deleted. (Otherwise, the request will only work if the
+   * FeatureGroup has no Features.)
+   * 
+ * + * bool force = 2; + * + * @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 (force_ != false) { + output.writeBool(2, 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 (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, 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.aiplatform.v1.DeleteFeatureGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest other = + (com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest) obj; + + if (!getName().equals(other.getName())) 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) + 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.aiplatform.v1.DeleteFeatureGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureRegistryService.DeleteFeatureGroup][google.cloud.aiplatform.v1.FeatureRegistryService.DeleteFeatureGroup].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteFeatureGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeleteFeatureGroupRequest) + com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteFeatureGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteFeatureGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest.class, + com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteFeatureGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest build() { + com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest buildPartial() { + com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest result = + new com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 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.aiplatform.v1.DeleteFeatureGroupRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest other) { + if (other == com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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 16: + { + force_ = 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 java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the FeatureGroup to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+     * 
+ * + * + * 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 FeatureGroup to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+     * 
+ * + * + * 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 FeatureGroup to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+     * 
+ * + * + * 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 FeatureGroup to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+     * 
+ * + * + * 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 FeatureGroup to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+     * 
+ * + * + * 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 force_; + /** + * + * + *
+     * If set to true, any Features under this FeatureGroup
+     * will also be deleted. (Otherwise, the request will only work if the
+     * FeatureGroup has no Features.)
+     * 
+ * + * bool force = 2; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * If set to true, any Features under this FeatureGroup
+     * will also be deleted. (Otherwise, the request will only work if the
+     * FeatureGroup has no Features.)
+     * 
+ * + * bool force = 2; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * If set to true, any Features under this FeatureGroup
+     * will also be deleted. (Otherwise, the request will only work if the
+     * FeatureGroup has no Features.)
+     * 
+ * + * bool force = 2; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000002); + 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.aiplatform.v1.DeleteFeatureGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeleteFeatureGroupRequest) + private static final com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest(); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteFeatureGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureGroupRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureGroupRequestOrBuilder.java new file mode 100644 index 000000000000..6c7ad02a2c45 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureGroupRequestOrBuilder.java @@ -0,0 +1,73 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface DeleteFeatureGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeleteFeatureGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the FeatureGroup to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the FeatureGroup to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If set to true, any Features under this FeatureGroup
+   * will also be deleted. (Otherwise, the request will only work if the
+   * FeatureGroup has no Features.)
+   * 
+ * + * bool force = 2; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureOnlineStoreRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureOnlineStoreRequest.java new file mode 100644 index 000000000000..bd540e7eb1e3 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureOnlineStoreRequest.java @@ -0,0 +1,763 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [FeatureOnlineStoreAdminService.DeleteFeatureOnlineStore][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.DeleteFeatureOnlineStore].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest} + */ +public final class DeleteFeatureOnlineStoreRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest) + DeleteFeatureOnlineStoreRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteFeatureOnlineStoreRequest.newBuilder() to construct. + private DeleteFeatureOnlineStoreRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteFeatureOnlineStoreRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteFeatureOnlineStoreRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteFeatureOnlineStoreRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteFeatureOnlineStoreRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest.class, + com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the FeatureOnlineStore to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+   * 
+ * + * + * 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 FeatureOnlineStore to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+   * 
+ * + * + * 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 FORCE_FIELD_NUMBER = 2; + private boolean force_ = false; + /** + * + * + *
+   * If set to true, any FeatureViews and Features for this FeatureOnlineStore
+   * will also be deleted. (Otherwise, the request will only work if the
+   * FeatureOnlineStore has no FeatureViews.)
+   * 
+ * + * bool force = 2; + * + * @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 (force_ != false) { + output.writeBool(2, 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 (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, 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.aiplatform.v1.DeleteFeatureOnlineStoreRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest other = + (com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest) obj; + + if (!getName().equals(other.getName())) 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) + 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.aiplatform.v1.DeleteFeatureOnlineStoreRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureOnlineStoreAdminService.DeleteFeatureOnlineStore][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.DeleteFeatureOnlineStore].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest) + com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteFeatureOnlineStoreRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteFeatureOnlineStoreRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest.class, + com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteFeatureOnlineStoreRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest build() { + com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest buildPartial() { + com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest result = + new com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 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.aiplatform.v1.DeleteFeatureOnlineStoreRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest other) { + if (other + == com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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 16: + { + force_ = 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 java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the FeatureOnlineStore to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * 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 FeatureOnlineStore to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * 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 FeatureOnlineStore to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * 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 FeatureOnlineStore to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * 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 FeatureOnlineStore to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * 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 force_; + /** + * + * + *
+     * If set to true, any FeatureViews and Features for this FeatureOnlineStore
+     * will also be deleted. (Otherwise, the request will only work if the
+     * FeatureOnlineStore has no FeatureViews.)
+     * 
+ * + * bool force = 2; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * If set to true, any FeatureViews and Features for this FeatureOnlineStore
+     * will also be deleted. (Otherwise, the request will only work if the
+     * FeatureOnlineStore has no FeatureViews.)
+     * 
+ * + * bool force = 2; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * If set to true, any FeatureViews and Features for this FeatureOnlineStore
+     * will also be deleted. (Otherwise, the request will only work if the
+     * FeatureOnlineStore has no FeatureViews.)
+     * 
+ * + * bool force = 2; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000002); + 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.aiplatform.v1.DeleteFeatureOnlineStoreRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest) + private static final com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest(); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteFeatureOnlineStoreRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureOnlineStoreRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureOnlineStoreRequestOrBuilder.java new file mode 100644 index 000000000000..ec3c39f83506 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureOnlineStoreRequestOrBuilder.java @@ -0,0 +1,73 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface DeleteFeatureOnlineStoreRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the FeatureOnlineStore to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the FeatureOnlineStore to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If set to true, any FeatureViews and Features for this FeatureOnlineStore
+   * will also be deleted. (Otherwise, the request will only work if the
+   * FeatureOnlineStore has no FeatureViews.)
+   * 
+ * + * bool force = 2; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureRequest.java index b9411ae700bc..1239c0e122e3 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureRequest.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureRequest.java @@ -24,6 +24,8 @@ *
  * Request message for
  * [FeaturestoreService.DeleteFeature][google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeature].
+ * Request message for
+ * [FeatureRegistryService.DeleteFeature][google.cloud.aiplatform.v1.FeatureRegistryService.DeleteFeature].
  * 
* * Protobuf type {@code google.cloud.aiplatform.v1.DeleteFeatureRequest} @@ -74,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Required. The name of the Features to be deleted. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * * @@ -101,6 +104,7 @@ public java.lang.String getName() { * Required. The name of the Features to be deleted. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * * @@ -287,6 +291,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * Request message for
    * [FeaturestoreService.DeleteFeature][google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeature].
+   * Request message for
+   * [FeatureRegistryService.DeleteFeature][google.cloud.aiplatform.v1.FeatureRegistryService.DeleteFeature].
    * 
* * Protobuf type {@code google.cloud.aiplatform.v1.DeleteFeatureRequest} @@ -473,6 +479,7 @@ public Builder mergeFrom( * Required. The name of the Features to be deleted. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * * @@ -499,6 +506,7 @@ public java.lang.String getName() { * Required. The name of the Features to be deleted. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * * @@ -525,6 +533,7 @@ public com.google.protobuf.ByteString getNameBytes() { * Required. The name of the Features to be deleted. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * * @@ -550,6 +559,7 @@ public Builder setName(java.lang.String value) { * Required. The name of the Features to be deleted. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * * @@ -571,6 +581,7 @@ public Builder clearName() { * Required. The name of the Features to be deleted. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureRequestOrBuilder.java index c7fea189a2df..c917eb3b59c8 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureRequestOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureRequestOrBuilder.java @@ -30,6 +30,7 @@ public interface DeleteFeatureRequestOrBuilder * Required. The name of the Features to be deleted. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * * @@ -46,6 +47,7 @@ public interface DeleteFeatureRequestOrBuilder * Required. The name of the Features to be deleted. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureViewRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureViewRequest.java new file mode 100644 index 000000000000..58197cfb5c52 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureViewRequest.java @@ -0,0 +1,653 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [FeatureOnlineStoreAdminService.DeleteFeatureViews][].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteFeatureViewRequest} + */ +public final class DeleteFeatureViewRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeleteFeatureViewRequest) + DeleteFeatureViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteFeatureViewRequest.newBuilder() to construct. + private DeleteFeatureViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteFeatureViewRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteFeatureViewRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteFeatureViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteFeatureViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest.class, + com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the FeatureView to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * 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 FeatureView to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * 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.aiplatform.v1.DeleteFeatureViewRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest other = + (com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest) 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.aiplatform.v1.DeleteFeatureViewRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [FeatureOnlineStoreAdminService.DeleteFeatureViews][].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteFeatureViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeleteFeatureViewRequest) + com.google.cloud.aiplatform.v1.DeleteFeatureViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteFeatureViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteFeatureViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest.class, + com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest.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.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteFeatureViewRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest build() { + com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest buildPartial() { + com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest result = + new com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest 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.aiplatform.v1.DeleteFeatureViewRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest other) { + if (other == com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest.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 FeatureView to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * 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 FeatureView to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * 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 FeatureView to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * 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 FeatureView to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * 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 FeatureView to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * 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.aiplatform.v1.DeleteFeatureViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeleteFeatureViewRequest) + private static final com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest(); + } + + public static com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteFeatureViewRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureViewRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureViewRequestOrBuilder.java new file mode 100644 index 000000000000..dcc7affdbce1 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteFeatureViewRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface DeleteFeatureViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeleteFeatureViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the FeatureView to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the FeatureView to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * 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-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedIndex.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedIndex.java index 7810b1d52306..687ba60eb66f 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedIndex.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedIndex.java @@ -525,10 +525,11 @@ public com.google.cloud.aiplatform.v1.AutomaticResources getAutomaticResources() * *
    * Optional. A description of resources that are dedicated to the
-   * DeployedIndex, and that need a higher degree of manual configuration. If
-   * min_replica_count is not set, the default value is 2 (we don't provide SLA
-   * when min_replica_count=1). If max_replica_count is not set, the default
-   * value is min_replica_count. The max allowed replica count is 1000.
+   * DeployedIndex, and that need a higher degree of manual configuration. The
+   * field min_replica_count must be set to a value strictly greater than 0, or
+   * else validation will fail. We don't provide SLA when min_replica_count=1.
+   * If max_replica_count is not set, the default value is min_replica_count.
+   * The max allowed replica count is 1000.
    *
    * Available machine types for SMALL shard:
    * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -558,10 +559,11 @@ public boolean hasDedicatedResources() {
    *
    * 
    * Optional. A description of resources that are dedicated to the
-   * DeployedIndex, and that need a higher degree of manual configuration. If
-   * min_replica_count is not set, the default value is 2 (we don't provide SLA
-   * when min_replica_count=1). If max_replica_count is not set, the default
-   * value is min_replica_count. The max allowed replica count is 1000.
+   * DeployedIndex, and that need a higher degree of manual configuration. The
+   * field min_replica_count must be set to a value strictly greater than 0, or
+   * else validation will fail. We don't provide SLA when min_replica_count=1.
+   * If max_replica_count is not set, the default value is min_replica_count.
+   * The max allowed replica count is 1000.
    *
    * Available machine types for SMALL shard:
    * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -593,10 +595,11 @@ public com.google.cloud.aiplatform.v1.DedicatedResources getDedicatedResources()
    *
    * 
    * Optional. A description of resources that are dedicated to the
-   * DeployedIndex, and that need a higher degree of manual configuration. If
-   * min_replica_count is not set, the default value is 2 (we don't provide SLA
-   * when min_replica_count=1). If max_replica_count is not set, the default
-   * value is min_replica_count. The max allowed replica count is 1000.
+   * DeployedIndex, and that need a higher degree of manual configuration. The
+   * field min_replica_count must be set to a value strictly greater than 0, or
+   * else validation will fail. We don't provide SLA when min_replica_count=1.
+   * If max_replica_count is not set, the default value is min_replica_count.
+   * The max allowed replica count is 1000.
    *
    * Available machine types for SMALL shard:
    * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -2942,10 +2945,11 @@ public Builder clearAutomaticResources() {
      *
      * 
      * Optional. A description of resources that are dedicated to the
-     * DeployedIndex, and that need a higher degree of manual configuration. If
-     * min_replica_count is not set, the default value is 2 (we don't provide SLA
-     * when min_replica_count=1). If max_replica_count is not set, the default
-     * value is min_replica_count. The max allowed replica count is 1000.
+     * DeployedIndex, and that need a higher degree of manual configuration. The
+     * field min_replica_count must be set to a value strictly greater than 0, or
+     * else validation will fail. We don't provide SLA when min_replica_count=1.
+     * If max_replica_count is not set, the default value is min_replica_count.
+     * The max allowed replica count is 1000.
      *
      * Available machine types for SMALL shard:
      * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -2974,10 +2978,11 @@ public boolean hasDedicatedResources() {
      *
      * 
      * Optional. A description of resources that are dedicated to the
-     * DeployedIndex, and that need a higher degree of manual configuration. If
-     * min_replica_count is not set, the default value is 2 (we don't provide SLA
-     * when min_replica_count=1). If max_replica_count is not set, the default
-     * value is min_replica_count. The max allowed replica count is 1000.
+     * DeployedIndex, and that need a higher degree of manual configuration. The
+     * field min_replica_count must be set to a value strictly greater than 0, or
+     * else validation will fail. We don't provide SLA when min_replica_count=1.
+     * If max_replica_count is not set, the default value is min_replica_count.
+     * The max allowed replica count is 1000.
      *
      * Available machine types for SMALL shard:
      * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -3012,10 +3017,11 @@ public com.google.cloud.aiplatform.v1.DedicatedResources getDedicatedResources()
      *
      * 
      * Optional. A description of resources that are dedicated to the
-     * DeployedIndex, and that need a higher degree of manual configuration. If
-     * min_replica_count is not set, the default value is 2 (we don't provide SLA
-     * when min_replica_count=1). If max_replica_count is not set, the default
-     * value is min_replica_count. The max allowed replica count is 1000.
+     * DeployedIndex, and that need a higher degree of manual configuration. The
+     * field min_replica_count must be set to a value strictly greater than 0, or
+     * else validation will fail. We don't provide SLA when min_replica_count=1.
+     * If max_replica_count is not set, the default value is min_replica_count.
+     * The max allowed replica count is 1000.
      *
      * Available machine types for SMALL shard:
      * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -3052,10 +3058,11 @@ public Builder setDedicatedResources(com.google.cloud.aiplatform.v1.DedicatedRes
      *
      * 
      * Optional. A description of resources that are dedicated to the
-     * DeployedIndex, and that need a higher degree of manual configuration. If
-     * min_replica_count is not set, the default value is 2 (we don't provide SLA
-     * when min_replica_count=1). If max_replica_count is not set, the default
-     * value is min_replica_count. The max allowed replica count is 1000.
+     * DeployedIndex, and that need a higher degree of manual configuration. The
+     * field min_replica_count must be set to a value strictly greater than 0, or
+     * else validation will fail. We don't provide SLA when min_replica_count=1.
+     * If max_replica_count is not set, the default value is min_replica_count.
+     * The max allowed replica count is 1000.
      *
      * Available machine types for SMALL shard:
      * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -3090,10 +3097,11 @@ public Builder setDedicatedResources(
      *
      * 
      * Optional. A description of resources that are dedicated to the
-     * DeployedIndex, and that need a higher degree of manual configuration. If
-     * min_replica_count is not set, the default value is 2 (we don't provide SLA
-     * when min_replica_count=1). If max_replica_count is not set, the default
-     * value is min_replica_count. The max allowed replica count is 1000.
+     * DeployedIndex, and that need a higher degree of manual configuration. The
+     * field min_replica_count must be set to a value strictly greater than 0, or
+     * else validation will fail. We don't provide SLA when min_replica_count=1.
+     * If max_replica_count is not set, the default value is min_replica_count.
+     * The max allowed replica count is 1000.
      *
      * Available machine types for SMALL shard:
      * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -3135,10 +3143,11 @@ public Builder mergeDedicatedResources(
      *
      * 
      * Optional. A description of resources that are dedicated to the
-     * DeployedIndex, and that need a higher degree of manual configuration. If
-     * min_replica_count is not set, the default value is 2 (we don't provide SLA
-     * when min_replica_count=1). If max_replica_count is not set, the default
-     * value is min_replica_count. The max allowed replica count is 1000.
+     * DeployedIndex, and that need a higher degree of manual configuration. The
+     * field min_replica_count must be set to a value strictly greater than 0, or
+     * else validation will fail. We don't provide SLA when min_replica_count=1.
+     * If max_replica_count is not set, the default value is min_replica_count.
+     * The max allowed replica count is 1000.
      *
      * Available machine types for SMALL shard:
      * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -3172,10 +3181,11 @@ public Builder clearDedicatedResources() {
      *
      * 
      * Optional. A description of resources that are dedicated to the
-     * DeployedIndex, and that need a higher degree of manual configuration. If
-     * min_replica_count is not set, the default value is 2 (we don't provide SLA
-     * when min_replica_count=1). If max_replica_count is not set, the default
-     * value is min_replica_count. The max allowed replica count is 1000.
+     * DeployedIndex, and that need a higher degree of manual configuration. The
+     * field min_replica_count must be set to a value strictly greater than 0, or
+     * else validation will fail. We don't provide SLA when min_replica_count=1.
+     * If max_replica_count is not set, the default value is min_replica_count.
+     * The max allowed replica count is 1000.
      *
      * Available machine types for SMALL shard:
      * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -3205,10 +3215,11 @@ public Builder clearDedicatedResources() {
      *
      * 
      * Optional. A description of resources that are dedicated to the
-     * DeployedIndex, and that need a higher degree of manual configuration. If
-     * min_replica_count is not set, the default value is 2 (we don't provide SLA
-     * when min_replica_count=1). If max_replica_count is not set, the default
-     * value is min_replica_count. The max allowed replica count is 1000.
+     * DeployedIndex, and that need a higher degree of manual configuration. The
+     * field min_replica_count must be set to a value strictly greater than 0, or
+     * else validation will fail. We don't provide SLA when min_replica_count=1.
+     * If max_replica_count is not set, the default value is min_replica_count.
+     * The max allowed replica count is 1000.
      *
      * Available machine types for SMALL shard:
      * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -3242,10 +3253,11 @@ public Builder clearDedicatedResources() {
      *
      * 
      * Optional. A description of resources that are dedicated to the
-     * DeployedIndex, and that need a higher degree of manual configuration. If
-     * min_replica_count is not set, the default value is 2 (we don't provide SLA
-     * when min_replica_count=1). If max_replica_count is not set, the default
-     * value is min_replica_count. The max allowed replica count is 1000.
+     * DeployedIndex, and that need a higher degree of manual configuration. The
+     * field min_replica_count must be set to a value strictly greater than 0, or
+     * else validation will fail. We don't provide SLA when min_replica_count=1.
+     * If max_replica_count is not set, the default value is min_replica_count.
+     * The max allowed replica count is 1000.
      *
      * Available machine types for SMALL shard:
      * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedIndexOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedIndexOrBuilder.java
index 2de342a86daa..47440a6933f7 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedIndexOrBuilder.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedIndexOrBuilder.java
@@ -344,10 +344,11 @@ public interface DeployedIndexOrBuilder
    *
    * 
    * Optional. A description of resources that are dedicated to the
-   * DeployedIndex, and that need a higher degree of manual configuration. If
-   * min_replica_count is not set, the default value is 2 (we don't provide SLA
-   * when min_replica_count=1). If max_replica_count is not set, the default
-   * value is min_replica_count. The max allowed replica count is 1000.
+   * DeployedIndex, and that need a higher degree of manual configuration. The
+   * field min_replica_count must be set to a value strictly greater than 0, or
+   * else validation will fail. We don't provide SLA when min_replica_count=1.
+   * If max_replica_count is not set, the default value is min_replica_count.
+   * The max allowed replica count is 1000.
    *
    * Available machine types for SMALL shard:
    * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -374,10 +375,11 @@ public interface DeployedIndexOrBuilder
    *
    * 
    * Optional. A description of resources that are dedicated to the
-   * DeployedIndex, and that need a higher degree of manual configuration. If
-   * min_replica_count is not set, the default value is 2 (we don't provide SLA
-   * when min_replica_count=1). If max_replica_count is not set, the default
-   * value is min_replica_count. The max allowed replica count is 1000.
+   * DeployedIndex, and that need a higher degree of manual configuration. The
+   * field min_replica_count must be set to a value strictly greater than 0, or
+   * else validation will fail. We don't provide SLA when min_replica_count=1.
+   * If max_replica_count is not set, the default value is min_replica_count.
+   * The max allowed replica count is 1000.
    *
    * Available machine types for SMALL shard:
    * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -404,10 +406,11 @@ public interface DeployedIndexOrBuilder
    *
    * 
    * Optional. A description of resources that are dedicated to the
-   * DeployedIndex, and that need a higher degree of manual configuration. If
-   * min_replica_count is not set, the default value is 2 (we don't provide SLA
-   * when min_replica_count=1). If max_replica_count is not set, the default
-   * value is min_replica_count. The max allowed replica count is 1000.
+   * DeployedIndex, and that need a higher degree of manual configuration. The
+   * field min_replica_count must be set to a value strictly greater than 0, or
+   * else validation will fail. We don't provide SLA when min_replica_count=1.
+   * If max_replica_count is not set, the default value is min_replica_count.
+   * The max allowed replica count is 1000.
    *
    * Available machine types for SMALL shard:
    * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Feature.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Feature.java
index b1d95690293d..fa457abc135f 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Feature.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Feature.java
@@ -22,9 +22,8 @@
  *
  *
  * 
- * Feature Metadata information that describes an attribute of an entity type.
- * For example, apple is an entity type, and color is a feature that describes
- * apple.
+ * Feature Metadata information.
+ * For example, color is a feature that describes an apple.
  * 
* * Protobuf type {@code google.cloud.aiplatform.v1.Feature} @@ -45,6 +44,7 @@ private Feature() { valueType_ = 0; etag_ = ""; monitoringStatsAnomalies_ = java.util.Collections.emptyList(); + versionColumnName_ = ""; } @java.lang.Override @@ -83,6 +83,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * * *
+   * Only applicable for Vertex AI Legacy Feature Store.
    * An enum representing the value type of a feature.
    * 
* @@ -1563,6 +1564,7 @@ public com.google.protobuf.Parser getParserForType() { * Immutable. Name of the Feature. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * The last part feature is assigned by the client. The feature can be up to * 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, @@ -1593,6 +1595,7 @@ public java.lang.String getName() { * Immutable. Name of the Feature. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * The last part feature is assigned by the client. The feature can be up to * 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, @@ -1674,11 +1677,12 @@ public com.google.protobuf.ByteString getDescriptionBytes() { * * *
-   * Required. Immutable. Type of Feature value.
+   * Immutable. Only applicable for Vertex AI Feature Store (Legacy).
+   * Type of Feature value.
    * 
* * - * .google.cloud.aiplatform.v1.Feature.ValueType value_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * .google.cloud.aiplatform.v1.Feature.ValueType value_type = 3 [(.google.api.field_behavior) = IMMUTABLE]; * * * @return The enum numeric value on the wire for valueType. @@ -1691,11 +1695,12 @@ public int getValueTypeValue() { * * *
-   * Required. Immutable. Type of Feature value.
+   * Immutable. Only applicable for Vertex AI Feature Store (Legacy).
+   * Type of Feature value.
    * 
* * - * .google.cloud.aiplatform.v1.Feature.ValueType value_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * .google.cloud.aiplatform.v1.Feature.ValueType value_type = 3 [(.google.api.field_behavior) = IMMUTABLE]; * * * @return The valueType. @@ -1713,7 +1718,8 @@ public com.google.cloud.aiplatform.v1.Feature.ValueType getValueType() { * * *
-   * Output only. Timestamp when this EntityType was created.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was created.
    * 
* * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1729,7 +1735,8 @@ public boolean hasCreateTime() { * * *
-   * Output only. Timestamp when this EntityType was created.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was created.
    * 
* * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1745,7 +1752,8 @@ public com.google.protobuf.Timestamp getCreateTime() { * * *
-   * Output only. Timestamp when this EntityType was created.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was created.
    * 
* * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1762,7 +1770,8 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *
-   * Output only. Timestamp when this EntityType was most recently updated.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was most recently updated.
    * 
* * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1778,7 +1787,8 @@ public boolean hasUpdateTime() { * * *
-   * Output only. Timestamp when this EntityType was most recently updated.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was most recently updated.
    * 
* * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1794,7 +1804,8 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * *
-   * Output only. Timestamp when this EntityType was most recently updated.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was most recently updated.
    * 
* * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2006,8 +2017,10 @@ public com.google.protobuf.ByteString getEtagBytes() { * * *
-   * Optional. If not set, use the monitoring_config defined for the EntityType
-   * this Feature belongs to. Only Features with type
+   * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+   * If not set, use the monitoring_config defined for the EntityType this
+   * Feature belongs to.
+   * Only Features with type
    * ([Feature.ValueType][google.cloud.aiplatform.v1.Feature.ValueType]) BOOL,
    * STRING, DOUBLE or INT64 can enable monitoring.
    *
@@ -2033,8 +2046,8 @@ public boolean getDisableMonitoring() {
    *
    *
    * 
-   * Output only. The list of historical stats and anomalies with specified
-   * objectives.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * The list of historical stats and anomalies with specified objectives.
    * 
* * @@ -2050,8 +2063,8 @@ public boolean getDisableMonitoring() { * * *
-   * Output only. The list of historical stats and anomalies with specified
-   * objectives.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * The list of historical stats and anomalies with specified objectives.
    * 
* * @@ -2068,8 +2081,8 @@ public boolean getDisableMonitoring() { * * *
-   * Output only. The list of historical stats and anomalies with specified
-   * objectives.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * The list of historical stats and anomalies with specified objectives.
    * 
* * @@ -2084,8 +2097,8 @@ public int getMonitoringStatsAnomaliesCount() { * * *
-   * Output only. The list of historical stats and anomalies with specified
-   * objectives.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * The list of historical stats and anomalies with specified objectives.
    * 
* * @@ -2101,8 +2114,8 @@ public com.google.cloud.aiplatform.v1.Feature.MonitoringStatsAnomaly getMonitori * * *
-   * Output only. The list of historical stats and anomalies with specified
-   * objectives.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * The list of historical stats and anomalies with specified objectives.
    * 
* * @@ -2115,6 +2128,61 @@ public com.google.cloud.aiplatform.v1.Feature.MonitoringStatsAnomaly getMonitori return monitoringStatsAnomalies_.get(index); } + public static final int VERSION_COLUMN_NAME_FIELD_NUMBER = 106; + + @SuppressWarnings("serial") + private volatile java.lang.Object versionColumnName_ = ""; + /** + * + * + *
+   * Only applicable for Vertex AI Feature Store.
+   * The name of the BigQuery Table/View columnn hosting data for this version.
+   * If no value is provided, will use feature_id.
+   * 
+ * + * string version_column_name = 106; + * + * @return The versionColumnName. + */ + @java.lang.Override + public java.lang.String getVersionColumnName() { + java.lang.Object ref = versionColumnName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + versionColumnName_ = s; + return s; + } + } + /** + * + * + *
+   * Only applicable for Vertex AI Feature Store.
+   * The name of the BigQuery Table/View columnn hosting data for this version.
+   * If no value is provided, will use feature_id.
+   * 
+ * + * string version_column_name = 106; + * + * @return The bytes for versionColumnName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionColumnNameBytes() { + java.lang.Object ref = versionColumnName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + versionColumnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2156,6 +2224,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (disableMonitoring_ != false) { output.writeBool(12, disableMonitoring_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(versionColumnName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 106, versionColumnName_); + } getUnknownFields().writeTo(output); } @@ -2202,6 +2273,9 @@ public int getSerializedSize() { if (disableMonitoring_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(12, disableMonitoring_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(versionColumnName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(106, versionColumnName_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2233,6 +2307,7 @@ public boolean equals(final java.lang.Object obj) { if (getDisableMonitoring() != other.getDisableMonitoring()) return false; if (!getMonitoringStatsAnomaliesList().equals(other.getMonitoringStatsAnomaliesList())) return false; + if (!getVersionColumnName().equals(other.getVersionColumnName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2270,6 +2345,8 @@ public int hashCode() { hash = (37 * hash) + MONITORING_STATS_ANOMALIES_FIELD_NUMBER; hash = (53 * hash) + getMonitoringStatsAnomaliesList().hashCode(); } + hash = (37 * hash) + VERSION_COLUMN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getVersionColumnName().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2374,9 +2451,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Feature Metadata information that describes an attribute of an entity type.
-   * For example, apple is an entity type, and color is a feature that describes
-   * apple.
+   * Feature Metadata information.
+   * For example, color is a feature that describes an apple.
    * 
* * Protobuf type {@code google.cloud.aiplatform.v1.Feature} @@ -2454,6 +2530,7 @@ public Builder clear() { monitoringStatsAnomaliesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000100); + versionColumnName_ = ""; return this; } @@ -2529,6 +2606,9 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.Feature result) { if (((from_bitField0_ & 0x00000080) != 0)) { result.disableMonitoring_ = disableMonitoring_; } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.versionColumnName_ = versionColumnName_; + } } @java.lang.Override @@ -2632,6 +2712,11 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.Feature other) { } } } + if (!other.getVersionColumnName().isEmpty()) { + versionColumnName_ = other.versionColumnName_; + bitField0_ |= 0x00000200; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2726,6 +2811,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000080; break; } // case 96 + case 850: + { + versionColumnName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 850 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2753,6 +2844,7 @@ public Builder mergeFrom( * Immutable. Name of the Feature. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * The last part feature is assigned by the client. The feature can be up to * 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, @@ -2782,6 +2874,7 @@ public java.lang.String getName() { * Immutable. Name of the Feature. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * The last part feature is assigned by the client. The feature can be up to * 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, @@ -2811,6 +2904,7 @@ public com.google.protobuf.ByteString getNameBytes() { * Immutable. Name of the Feature. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * The last part feature is assigned by the client. The feature can be up to * 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, @@ -2839,6 +2933,7 @@ public Builder setName(java.lang.String value) { * Immutable. Name of the Feature. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * The last part feature is assigned by the client. The feature can be up to * 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, @@ -2863,6 +2958,7 @@ public Builder clearName() { * Immutable. Name of the Feature. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * The last part feature is assigned by the client. The feature can be up to * 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, @@ -2997,11 +3093,12 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { * * *
-     * Required. Immutable. Type of Feature value.
+     * Immutable. Only applicable for Vertex AI Feature Store (Legacy).
+     * Type of Feature value.
      * 
* * - * .google.cloud.aiplatform.v1.Feature.ValueType value_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * .google.cloud.aiplatform.v1.Feature.ValueType value_type = 3 [(.google.api.field_behavior) = IMMUTABLE]; * * * @return The enum numeric value on the wire for valueType. @@ -3014,11 +3111,12 @@ public int getValueTypeValue() { * * *
-     * Required. Immutable. Type of Feature value.
+     * Immutable. Only applicable for Vertex AI Feature Store (Legacy).
+     * Type of Feature value.
      * 
* * - * .google.cloud.aiplatform.v1.Feature.ValueType value_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * .google.cloud.aiplatform.v1.Feature.ValueType value_type = 3 [(.google.api.field_behavior) = IMMUTABLE]; * * * @param value The enum numeric value on the wire for valueType to set. @@ -3034,11 +3132,12 @@ public Builder setValueTypeValue(int value) { * * *
-     * Required. Immutable. Type of Feature value.
+     * Immutable. Only applicable for Vertex AI Feature Store (Legacy).
+     * Type of Feature value.
      * 
* * - * .google.cloud.aiplatform.v1.Feature.ValueType value_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * .google.cloud.aiplatform.v1.Feature.ValueType value_type = 3 [(.google.api.field_behavior) = IMMUTABLE]; * * * @return The valueType. @@ -3055,11 +3154,12 @@ public com.google.cloud.aiplatform.v1.Feature.ValueType getValueType() { * * *
-     * Required. Immutable. Type of Feature value.
+     * Immutable. Only applicable for Vertex AI Feature Store (Legacy).
+     * Type of Feature value.
      * 
* * - * .google.cloud.aiplatform.v1.Feature.ValueType value_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * .google.cloud.aiplatform.v1.Feature.ValueType value_type = 3 [(.google.api.field_behavior) = IMMUTABLE]; * * * @param value The valueType to set. @@ -3078,11 +3178,12 @@ public Builder setValueType(com.google.cloud.aiplatform.v1.Feature.ValueType val * * *
-     * Required. Immutable. Type of Feature value.
+     * Immutable. Only applicable for Vertex AI Feature Store (Legacy).
+     * Type of Feature value.
      * 
* * - * .google.cloud.aiplatform.v1.Feature.ValueType value_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * .google.cloud.aiplatform.v1.Feature.ValueType value_type = 3 [(.google.api.field_behavior) = IMMUTABLE]; * * * @return This builder for chaining. @@ -3104,7 +3205,8 @@ public Builder clearValueType() { * * *
-     * Output only. Timestamp when this EntityType was created.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was created.
      * 
* * @@ -3120,7 +3222,8 @@ public boolean hasCreateTime() { * * *
-     * Output only. Timestamp when this EntityType was created.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was created.
      * 
* * @@ -3142,7 +3245,8 @@ public com.google.protobuf.Timestamp getCreateTime() { * * *
-     * Output only. Timestamp when this EntityType was created.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was created.
      * 
* * @@ -3166,7 +3270,8 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. Timestamp when this EntityType was created.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was created.
      * 
* * @@ -3187,7 +3292,8 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
-     * Output only. Timestamp when this EntityType was created.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was created.
      * 
* * @@ -3214,7 +3320,8 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. Timestamp when this EntityType was created.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was created.
      * 
* * @@ -3235,7 +3342,8 @@ public Builder clearCreateTime() { * * *
-     * Output only. Timestamp when this EntityType was created.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was created.
      * 
* * @@ -3251,7 +3359,8 @@ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { * * *
-     * Output only. Timestamp when this EntityType was created.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was created.
      * 
* * @@ -3271,7 +3380,8 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *
-     * Output only. Timestamp when this EntityType was created.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was created.
      * 
* * @@ -3305,7 +3415,8 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *
-     * Output only. Timestamp when this EntityType was most recently updated.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was most recently updated.
      * 
* * @@ -3321,7 +3432,8 @@ public boolean hasUpdateTime() { * * *
-     * Output only. Timestamp when this EntityType was most recently updated.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was most recently updated.
      * 
* * @@ -3343,7 +3455,8 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * *
-     * Output only. Timestamp when this EntityType was most recently updated.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was most recently updated.
      * 
* * @@ -3367,7 +3480,8 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. Timestamp when this EntityType was most recently updated.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was most recently updated.
      * 
* * @@ -3388,7 +3502,8 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
-     * Output only. Timestamp when this EntityType was most recently updated.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was most recently updated.
      * 
* * @@ -3415,7 +3530,8 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. Timestamp when this EntityType was most recently updated.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was most recently updated.
      * 
* * @@ -3436,7 +3552,8 @@ public Builder clearUpdateTime() { * * *
-     * Output only. Timestamp when this EntityType was most recently updated.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was most recently updated.
      * 
* * @@ -3452,7 +3569,8 @@ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { * * *
-     * Output only. Timestamp when this EntityType was most recently updated.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was most recently updated.
      * 
* * @@ -3472,7 +3590,8 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *
-     * Output only. Timestamp when this EntityType was most recently updated.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was most recently updated.
      * 
* * @@ -3845,8 +3964,10 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. If not set, use the monitoring_config defined for the EntityType
-     * this Feature belongs to. Only Features with type
+     * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+     * If not set, use the monitoring_config defined for the EntityType this
+     * Feature belongs to.
+     * Only Features with type
      * ([Feature.ValueType][google.cloud.aiplatform.v1.Feature.ValueType]) BOOL,
      * STRING, DOUBLE or INT64 can enable monitoring.
      *
@@ -3866,8 +3987,10 @@ public boolean getDisableMonitoring() {
      *
      *
      * 
-     * Optional. If not set, use the monitoring_config defined for the EntityType
-     * this Feature belongs to. Only Features with type
+     * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+     * If not set, use the monitoring_config defined for the EntityType this
+     * Feature belongs to.
+     * Only Features with type
      * ([Feature.ValueType][google.cloud.aiplatform.v1.Feature.ValueType]) BOOL,
      * STRING, DOUBLE or INT64 can enable monitoring.
      *
@@ -3891,8 +4014,10 @@ public Builder setDisableMonitoring(boolean value) {
      *
      *
      * 
-     * Optional. If not set, use the monitoring_config defined for the EntityType
-     * this Feature belongs to. Only Features with type
+     * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+     * If not set, use the monitoring_config defined for the EntityType this
+     * Feature belongs to.
+     * Only Features with type
      * ([Feature.ValueType][google.cloud.aiplatform.v1.Feature.ValueType]) BOOL,
      * STRING, DOUBLE or INT64 can enable monitoring.
      *
@@ -3933,8 +4058,8 @@ private void ensureMonitoringStatsAnomaliesIsMutable() {
      *
      *
      * 
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -3953,8 +4078,8 @@ private void ensureMonitoringStatsAnomaliesIsMutable() { * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -3972,8 +4097,8 @@ public int getMonitoringStatsAnomaliesCount() { * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -3992,8 +4117,8 @@ public int getMonitoringStatsAnomaliesCount() { * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -4018,8 +4143,8 @@ public Builder setMonitoringStatsAnomalies( * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -4042,8 +4167,8 @@ public Builder setMonitoringStatsAnomalies( * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -4068,8 +4193,8 @@ public Builder addMonitoringStatsAnomalies( * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -4094,8 +4219,8 @@ public Builder addMonitoringStatsAnomalies( * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -4117,8 +4242,8 @@ public Builder addMonitoringStatsAnomalies( * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -4141,8 +4266,8 @@ public Builder addMonitoringStatsAnomalies( * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -4165,8 +4290,8 @@ public Builder addAllMonitoringStatsAnomalies( * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -4187,8 +4312,8 @@ public Builder clearMonitoringStatsAnomalies() { * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -4209,8 +4334,8 @@ public Builder removeMonitoringStatsAnomalies(int index) { * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -4225,8 +4350,8 @@ public Builder removeMonitoringStatsAnomalies(int index) { * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -4245,8 +4370,8 @@ public Builder removeMonitoringStatsAnomalies(int index) { * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -4266,8 +4391,8 @@ public Builder removeMonitoringStatsAnomalies(int index) { * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -4284,8 +4409,8 @@ public Builder removeMonitoringStatsAnomalies(int index) { * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -4303,8 +4428,8 @@ public Builder removeMonitoringStatsAnomalies(int index) { * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -4336,6 +4461,122 @@ public Builder removeMonitoringStatsAnomalies(int index) { return monitoringStatsAnomaliesBuilder_; } + private java.lang.Object versionColumnName_ = ""; + /** + * + * + *
+     * Only applicable for Vertex AI Feature Store.
+     * The name of the BigQuery Table/View columnn hosting data for this version.
+     * If no value is provided, will use feature_id.
+     * 
+ * + * string version_column_name = 106; + * + * @return The versionColumnName. + */ + public java.lang.String getVersionColumnName() { + java.lang.Object ref = versionColumnName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + versionColumnName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Only applicable for Vertex AI Feature Store.
+     * The name of the BigQuery Table/View columnn hosting data for this version.
+     * If no value is provided, will use feature_id.
+     * 
+ * + * string version_column_name = 106; + * + * @return The bytes for versionColumnName. + */ + public com.google.protobuf.ByteString getVersionColumnNameBytes() { + java.lang.Object ref = versionColumnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + versionColumnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Only applicable for Vertex AI Feature Store.
+     * The name of the BigQuery Table/View columnn hosting data for this version.
+     * If no value is provided, will use feature_id.
+     * 
+ * + * string version_column_name = 106; + * + * @param value The versionColumnName to set. + * @return This builder for chaining. + */ + public Builder setVersionColumnName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + versionColumnName_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Only applicable for Vertex AI Feature Store.
+     * The name of the BigQuery Table/View columnn hosting data for this version.
+     * If no value is provided, will use feature_id.
+     * 
+ * + * string version_column_name = 106; + * + * @return This builder for chaining. + */ + public Builder clearVersionColumnName() { + versionColumnName_ = getDefaultInstance().getVersionColumnName(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+     * Only applicable for Vertex AI Feature Store.
+     * The name of the BigQuery Table/View columnn hosting data for this version.
+     * If no value is provided, will use feature_id.
+     * 
+ * + * string version_column_name = 106; + * + * @param value The bytes for versionColumnName to set. + * @return This builder for chaining. + */ + public Builder setVersionColumnNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + versionColumnName_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureGroup.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureGroup.java new file mode 100644 index 000000000000..3ba304552e2c --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureGroup.java @@ -0,0 +1,3554 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_group.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Vertex AI Feature Group.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FeatureGroup} + */ +public final class FeatureGroup extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.FeatureGroup) + FeatureGroupOrBuilder { + private static final long serialVersionUID = 0L; + // Use FeatureGroup.newBuilder() to construct. + private FeatureGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FeatureGroup() { + name_ = ""; + etag_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FeatureGroup(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureGroupProto + .internal_static_google_cloud_aiplatform_v1_FeatureGroup_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 5: + 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.aiplatform.v1.FeatureGroupProto + .internal_static_google_cloud_aiplatform_v1_FeatureGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureGroup.class, + com.google.cloud.aiplatform.v1.FeatureGroup.Builder.class); + } + + public interface BigQueryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.FeatureGroup.BigQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Immutable. The BigQuery source URI that points to either a
+     * BigQuery Table or View.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BigQuerySource big_query_source = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the bigQuerySource field is set. + */ + boolean hasBigQuerySource(); + /** + * + * + *
+     * Required. Immutable. The BigQuery source URI that points to either a
+     * BigQuery Table or View.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BigQuerySource big_query_source = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bigQuerySource. + */ + com.google.cloud.aiplatform.v1.BigQuerySource getBigQuerySource(); + /** + * + * + *
+     * Required. Immutable. The BigQuery source URI that points to either a
+     * BigQuery Table or View.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BigQuerySource big_query_source = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.BigQuerySourceOrBuilder getBigQuerySourceOrBuilder(); + + /** + * + * + *
+     * Optional. Columns to construct entity_id / row keys. Currently only
+     * supports 1 entity_id_column. If not provided defaults to `entity_id`.
+     * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the entityIdColumns. + */ + java.util.List getEntityIdColumnsList(); + /** + * + * + *
+     * Optional. Columns to construct entity_id / row keys. Currently only
+     * supports 1 entity_id_column. If not provided defaults to `entity_id`.
+     * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of entityIdColumns. + */ + int getEntityIdColumnsCount(); + /** + * + * + *
+     * Optional. Columns to construct entity_id / row keys. Currently only
+     * supports 1 entity_id_column. If not provided defaults to `entity_id`.
+     * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The entityIdColumns at the given index. + */ + java.lang.String getEntityIdColumns(int index); + /** + * + * + *
+     * Optional. Columns to construct entity_id / row keys. Currently only
+     * supports 1 entity_id_column. If not provided defaults to `entity_id`.
+     * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the entityIdColumns at the given index. + */ + com.google.protobuf.ByteString getEntityIdColumnsBytes(int index); + } + /** + * + * + *
+   * Input source type for BigQuery Tables and Views.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FeatureGroup.BigQuery} + */ + public static final class BigQuery extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.FeatureGroup.BigQuery) + BigQueryOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQuery.newBuilder() to construct. + private BigQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQuery() { + entityIdColumns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigQuery(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureGroupProto + .internal_static_google_cloud_aiplatform_v1_FeatureGroup_BigQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureGroupProto + .internal_static_google_cloud_aiplatform_v1_FeatureGroup_BigQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery.class, + com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery.Builder.class); + } + + public static final int BIG_QUERY_SOURCE_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.BigQuerySource bigQuerySource_; + /** + * + * + *
+     * Required. Immutable. The BigQuery source URI that points to either a
+     * BigQuery Table or View.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BigQuerySource big_query_source = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the bigQuerySource field is set. + */ + @java.lang.Override + public boolean hasBigQuerySource() { + return bigQuerySource_ != null; + } + /** + * + * + *
+     * Required. Immutable. The BigQuery source URI that points to either a
+     * BigQuery Table or View.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BigQuerySource big_query_source = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bigQuerySource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQuerySource getBigQuerySource() { + return bigQuerySource_ == null + ? com.google.cloud.aiplatform.v1.BigQuerySource.getDefaultInstance() + : bigQuerySource_; + } + /** + * + * + *
+     * Required. Immutable. The BigQuery source URI that points to either a
+     * BigQuery Table or View.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BigQuerySource big_query_source = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQuerySourceOrBuilder getBigQuerySourceOrBuilder() { + return bigQuerySource_ == null + ? com.google.cloud.aiplatform.v1.BigQuerySource.getDefaultInstance() + : bigQuerySource_; + } + + public static final int ENTITY_ID_COLUMNS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList entityIdColumns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Optional. Columns to construct entity_id / row keys. Currently only
+     * supports 1 entity_id_column. If not provided defaults to `entity_id`.
+     * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the entityIdColumns. + */ + public com.google.protobuf.ProtocolStringList getEntityIdColumnsList() { + return entityIdColumns_; + } + /** + * + * + *
+     * Optional. Columns to construct entity_id / row keys. Currently only
+     * supports 1 entity_id_column. If not provided defaults to `entity_id`.
+     * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of entityIdColumns. + */ + public int getEntityIdColumnsCount() { + return entityIdColumns_.size(); + } + /** + * + * + *
+     * Optional. Columns to construct entity_id / row keys. Currently only
+     * supports 1 entity_id_column. If not provided defaults to `entity_id`.
+     * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The entityIdColumns at the given index. + */ + public java.lang.String getEntityIdColumns(int index) { + return entityIdColumns_.get(index); + } + /** + * + * + *
+     * Optional. Columns to construct entity_id / row keys. Currently only
+     * supports 1 entity_id_column. If not provided defaults to `entity_id`.
+     * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the entityIdColumns at the given index. + */ + public com.google.protobuf.ByteString getEntityIdColumnsBytes(int index) { + return entityIdColumns_.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 { + if (bigQuerySource_ != null) { + output.writeMessage(1, getBigQuerySource()); + } + for (int i = 0; i < entityIdColumns_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, entityIdColumns_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (bigQuerySource_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBigQuerySource()); + } + { + int dataSize = 0; + for (int i = 0; i < entityIdColumns_.size(); i++) { + dataSize += computeStringSizeNoTag(entityIdColumns_.getRaw(i)); + } + size += dataSize; + size += 1 * getEntityIdColumnsList().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.aiplatform.v1.FeatureGroup.BigQuery)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery other = + (com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery) obj; + + if (hasBigQuerySource() != other.hasBigQuerySource()) return false; + if (hasBigQuerySource()) { + if (!getBigQuerySource().equals(other.getBigQuerySource())) return false; + } + if (!getEntityIdColumnsList().equals(other.getEntityIdColumnsList())) return false; + if (!getUnknownFields().equals(other.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 (hasBigQuerySource()) { + hash = (37 * hash) + BIG_QUERY_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getBigQuerySource().hashCode(); + } + if (getEntityIdColumnsCount() > 0) { + hash = (37 * hash) + ENTITY_ID_COLUMNS_FIELD_NUMBER; + hash = (53 * hash) + getEntityIdColumnsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Input source type for BigQuery Tables and Views.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FeatureGroup.BigQuery} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.FeatureGroup.BigQuery) + com.google.cloud.aiplatform.v1.FeatureGroup.BigQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureGroupProto + .internal_static_google_cloud_aiplatform_v1_FeatureGroup_BigQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureGroupProto + .internal_static_google_cloud_aiplatform_v1_FeatureGroup_BigQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery.class, + com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bigQuerySource_ = null; + if (bigQuerySourceBuilder_ != null) { + bigQuerySourceBuilder_.dispose(); + bigQuerySourceBuilder_ = null; + } + entityIdColumns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureGroupProto + .internal_static_google_cloud_aiplatform_v1_FeatureGroup_BigQuery_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery build() { + com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery buildPartial() { + com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery result = + new com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.bigQuerySource_ = + bigQuerySourceBuilder_ == null ? bigQuerySource_ : bigQuerySourceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + entityIdColumns_.makeImmutable(); + result.entityIdColumns_ = entityIdColumns_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery) { + return mergeFrom((com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery other) { + if (other == com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery.getDefaultInstance()) + return this; + if (other.hasBigQuerySource()) { + mergeBigQuerySource(other.getBigQuerySource()); + } + if (!other.entityIdColumns_.isEmpty()) { + if (entityIdColumns_.isEmpty()) { + entityIdColumns_ = other.entityIdColumns_; + bitField0_ |= 0x00000002; + } else { + ensureEntityIdColumnsIsMutable(); + entityIdColumns_.addAll(other.entityIdColumns_); + } + 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( + getBigQuerySourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureEntityIdColumnsIsMutable(); + entityIdColumns_.add(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 bitField0_; + + private com.google.cloud.aiplatform.v1.BigQuerySource bigQuerySource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BigQuerySource, + com.google.cloud.aiplatform.v1.BigQuerySource.Builder, + com.google.cloud.aiplatform.v1.BigQuerySourceOrBuilder> + bigQuerySourceBuilder_; + /** + * + * + *
+       * Required. Immutable. The BigQuery source URI that points to either a
+       * BigQuery Table or View.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.BigQuerySource big_query_source = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the bigQuerySource field is set. + */ + public boolean hasBigQuerySource() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Required. Immutable. The BigQuery source URI that points to either a
+       * BigQuery Table or View.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.BigQuerySource big_query_source = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bigQuerySource. + */ + public com.google.cloud.aiplatform.v1.BigQuerySource getBigQuerySource() { + if (bigQuerySourceBuilder_ == null) { + return bigQuerySource_ == null + ? com.google.cloud.aiplatform.v1.BigQuerySource.getDefaultInstance() + : bigQuerySource_; + } else { + return bigQuerySourceBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. Immutable. The BigQuery source URI that points to either a
+       * BigQuery Table or View.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.BigQuerySource big_query_source = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBigQuerySource(com.google.cloud.aiplatform.v1.BigQuerySource value) { + if (bigQuerySourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bigQuerySource_ = value; + } else { + bigQuerySourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Immutable. The BigQuery source URI that points to either a
+       * BigQuery Table or View.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.BigQuerySource big_query_source = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBigQuerySource( + com.google.cloud.aiplatform.v1.BigQuerySource.Builder builderForValue) { + if (bigQuerySourceBuilder_ == null) { + bigQuerySource_ = builderForValue.build(); + } else { + bigQuerySourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Immutable. The BigQuery source URI that points to either a
+       * BigQuery Table or View.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.BigQuerySource big_query_source = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBigQuerySource(com.google.cloud.aiplatform.v1.BigQuerySource value) { + if (bigQuerySourceBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && bigQuerySource_ != null + && bigQuerySource_ + != com.google.cloud.aiplatform.v1.BigQuerySource.getDefaultInstance()) { + getBigQuerySourceBuilder().mergeFrom(value); + } else { + bigQuerySource_ = value; + } + } else { + bigQuerySourceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Immutable. The BigQuery source URI that points to either a
+       * BigQuery Table or View.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.BigQuerySource big_query_source = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBigQuerySource() { + bitField0_ = (bitField0_ & ~0x00000001); + bigQuerySource_ = null; + if (bigQuerySourceBuilder_ != null) { + bigQuerySourceBuilder_.dispose(); + bigQuerySourceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Immutable. The BigQuery source URI that points to either a
+       * BigQuery Table or View.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.BigQuerySource big_query_source = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.BigQuerySource.Builder getBigQuerySourceBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getBigQuerySourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Immutable. The BigQuery source URI that points to either a
+       * BigQuery Table or View.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.BigQuerySource big_query_source = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.BigQuerySourceOrBuilder getBigQuerySourceOrBuilder() { + if (bigQuerySourceBuilder_ != null) { + return bigQuerySourceBuilder_.getMessageOrBuilder(); + } else { + return bigQuerySource_ == null + ? com.google.cloud.aiplatform.v1.BigQuerySource.getDefaultInstance() + : bigQuerySource_; + } + } + /** + * + * + *
+       * Required. Immutable. The BigQuery source URI that points to either a
+       * BigQuery Table or View.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.BigQuerySource big_query_source = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BigQuerySource, + com.google.cloud.aiplatform.v1.BigQuerySource.Builder, + com.google.cloud.aiplatform.v1.BigQuerySourceOrBuilder> + getBigQuerySourceFieldBuilder() { + if (bigQuerySourceBuilder_ == null) { + bigQuerySourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BigQuerySource, + com.google.cloud.aiplatform.v1.BigQuerySource.Builder, + com.google.cloud.aiplatform.v1.BigQuerySourceOrBuilder>( + getBigQuerySource(), getParentForChildren(), isClean()); + bigQuerySource_ = null; + } + return bigQuerySourceBuilder_; + } + + private com.google.protobuf.LazyStringArrayList entityIdColumns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureEntityIdColumnsIsMutable() { + if (!entityIdColumns_.isModifiable()) { + entityIdColumns_ = new com.google.protobuf.LazyStringArrayList(entityIdColumns_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+       * Optional. Columns to construct entity_id / row keys. Currently only
+       * supports 1 entity_id_column. If not provided defaults to `entity_id`.
+       * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the entityIdColumns. + */ + public com.google.protobuf.ProtocolStringList getEntityIdColumnsList() { + entityIdColumns_.makeImmutable(); + return entityIdColumns_; + } + /** + * + * + *
+       * Optional. Columns to construct entity_id / row keys. Currently only
+       * supports 1 entity_id_column. If not provided defaults to `entity_id`.
+       * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of entityIdColumns. + */ + public int getEntityIdColumnsCount() { + return entityIdColumns_.size(); + } + /** + * + * + *
+       * Optional. Columns to construct entity_id / row keys. Currently only
+       * supports 1 entity_id_column. If not provided defaults to `entity_id`.
+       * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The entityIdColumns at the given index. + */ + public java.lang.String getEntityIdColumns(int index) { + return entityIdColumns_.get(index); + } + /** + * + * + *
+       * Optional. Columns to construct entity_id / row keys. Currently only
+       * supports 1 entity_id_column. If not provided defaults to `entity_id`.
+       * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the entityIdColumns at the given index. + */ + public com.google.protobuf.ByteString getEntityIdColumnsBytes(int index) { + return entityIdColumns_.getByteString(index); + } + /** + * + * + *
+       * Optional. Columns to construct entity_id / row keys. Currently only
+       * supports 1 entity_id_column. If not provided defaults to `entity_id`.
+       * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The entityIdColumns to set. + * @return This builder for chaining. + */ + public Builder setEntityIdColumns(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityIdColumnsIsMutable(); + entityIdColumns_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Columns to construct entity_id / row keys. Currently only
+       * supports 1 entity_id_column. If not provided defaults to `entity_id`.
+       * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The entityIdColumns to add. + * @return This builder for chaining. + */ + public Builder addEntityIdColumns(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityIdColumnsIsMutable(); + entityIdColumns_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Columns to construct entity_id / row keys. Currently only
+       * supports 1 entity_id_column. If not provided defaults to `entity_id`.
+       * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The entityIdColumns to add. + * @return This builder for chaining. + */ + public Builder addAllEntityIdColumns(java.lang.Iterable values) { + ensureEntityIdColumnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entityIdColumns_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Columns to construct entity_id / row keys. Currently only
+       * supports 1 entity_id_column. If not provided defaults to `entity_id`.
+       * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEntityIdColumns() { + entityIdColumns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Columns to construct entity_id / row keys. Currently only
+       * supports 1 entity_id_column. If not provided defaults to `entity_id`.
+       * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the entityIdColumns to add. + * @return This builder for chaining. + */ + public Builder addEntityIdColumnsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureEntityIdColumnsIsMutable(); + entityIdColumns_.add(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.aiplatform.v1.FeatureGroup.BigQuery) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.FeatureGroup.BigQuery) + private static final com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery(); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQuery parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + 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 { + BIG_QUERY(7), + 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 7: + return BIG_QUERY; + 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 BIG_QUERY_FIELD_NUMBER = 7; + /** + * + * + *
+   * Indicates that features for this group come from BigQuery Table/View.
+   * By default treats the source as a sparse time series source, which is
+   * required to have an entity_id and a feature_timestamp column in the
+   * source.
+   * 
+ * + * .google.cloud.aiplatform.v1.FeatureGroup.BigQuery big_query = 7; + * + * @return Whether the bigQuery field is set. + */ + @java.lang.Override + public boolean hasBigQuery() { + return sourceCase_ == 7; + } + /** + * + * + *
+   * Indicates that features for this group come from BigQuery Table/View.
+   * By default treats the source as a sparse time series source, which is
+   * required to have an entity_id and a feature_timestamp column in the
+   * source.
+   * 
+ * + * .google.cloud.aiplatform.v1.FeatureGroup.BigQuery big_query = 7; + * + * @return The bigQuery. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery getBigQuery() { + if (sourceCase_ == 7) { + return (com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery) source_; + } + return com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery.getDefaultInstance(); + } + /** + * + * + *
+   * Indicates that features for this group come from BigQuery Table/View.
+   * By default treats the source as a sparse time series source, which is
+   * required to have an entity_id and a feature_timestamp column in the
+   * source.
+   * 
+ * + * .google.cloud.aiplatform.v1.FeatureGroup.BigQuery big_query = 7; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureGroup.BigQueryOrBuilder getBigQueryOrBuilder() { + if (sourceCase_ == 7) { + return (com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery) source_; + } + return com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Name of the FeatureGroup. Format:
+   * `projects/{project}/locations/{location}/featureGroups/{featureGroup}`
+   * 
+ * + * 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 FeatureGroup. Format:
+   * `projects/{project}/locations/{location}/featureGroups/{featureGroup}`
+   * 
+ * + * 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. Timestamp when this FeatureGroup was created.
+   * 
+ * + * .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 createTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this FeatureGroup was created.
+   * 
+ * + * .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. Timestamp when this FeatureGroup was created.
+   * 
+ * + * .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. Timestamp when this FeatureGroup was last updated.
+   * 
+ * + * .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 updateTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this FeatureGroup was last updated.
+   * 
+ * + * .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. Timestamp when this FeatureGroup was last updated.
+   * 
+ * + * .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 ETAG_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set,
+   * a blind "overwrite" update happens.
+   * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set,
+   * a blind "overwrite" update happens.
+   * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 5; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.FeatureGroupProto + .internal_static_google_cloud_aiplatform_v1_FeatureGroup_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 with user-defined metadata to organize your
+   * FeatureGroup.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureGroup(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 5 [(.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 with user-defined metadata to organize your
+   * FeatureGroup.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureGroup(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your
+   * FeatureGroup.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureGroup(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 5 [(.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 with user-defined metadata to organize your
+   * FeatureGroup.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureGroup(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 5 [(.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 DESCRIPTION_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. Description of the FeatureGroup.
+   * 
+ * + * string description = 6 [(.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 FeatureGroup.
+   * 
+ * + * string description = 6 [(.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 (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, etag_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 5); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); + } + if (sourceCase_ == 7) { + output.writeMessage(7, (com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery) 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, etag_); + } + 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(5, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); + } + if (sourceCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery) 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.aiplatform.v1.FeatureGroup)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.FeatureGroup other = + (com.google.cloud.aiplatform.v1.FeatureGroup) 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 (!getEtag().equals(other.getEtag())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 7: + if (!getBigQuery().equals(other.getBigQuery())) 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(); + 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) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + switch (sourceCase_) { + case 7: + hash = (37 * hash) + BIG_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getBigQuery().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.FeatureGroup prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Vertex AI Feature Group.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FeatureGroup} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.FeatureGroup) + com.google.cloud.aiplatform.v1.FeatureGroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureGroupProto + .internal_static_google_cloud_aiplatform_v1_FeatureGroup_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 5: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 5: + 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.aiplatform.v1.FeatureGroupProto + .internal_static_google_cloud_aiplatform_v1_FeatureGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureGroup.class, + com.google.cloud.aiplatform.v1.FeatureGroup.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.FeatureGroup.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bigQueryBuilder_ != null) { + bigQueryBuilder_.clear(); + } + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + etag_ = ""; + internalGetMutableLabels().clear(); + description_ = ""; + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureGroupProto + .internal_static_google_cloud_aiplatform_v1_FeatureGroup_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureGroup getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.FeatureGroup.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureGroup build() { + com.google.cloud.aiplatform.v1.FeatureGroup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureGroup buildPartial() { + com.google.cloud.aiplatform.v1.FeatureGroup result = + new com.google.cloud.aiplatform.v1.FeatureGroup(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.FeatureGroup result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.description_ = description_; + } + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1.FeatureGroup result) { + result.sourceCase_ = sourceCase_; + result.source_ = this.source_; + if (sourceCase_ == 7 && bigQueryBuilder_ != null) { + result.source_ = bigQueryBuilder_.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.aiplatform.v1.FeatureGroup) { + return mergeFrom((com.google.cloud.aiplatform.v1.FeatureGroup) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.FeatureGroup other) { + if (other == com.google.cloud.aiplatform.v1.FeatureGroup.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000010; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000020; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000040; + onChanged(); + } + switch (other.getSourceCase()) { + case BIG_QUERY: + { + mergeBigQuery(other.getBigQuery()); + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 50: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 50 + case 58: + { + input.readMessage(getBigQueryFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 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 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_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery, + com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery.Builder, + com.google.cloud.aiplatform.v1.FeatureGroup.BigQueryOrBuilder> + bigQueryBuilder_; + /** + * + * + *
+     * Indicates that features for this group come from BigQuery Table/View.
+     * By default treats the source as a sparse time series source, which is
+     * required to have an entity_id and a feature_timestamp column in the
+     * source.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureGroup.BigQuery big_query = 7; + * + * @return Whether the bigQuery field is set. + */ + @java.lang.Override + public boolean hasBigQuery() { + return sourceCase_ == 7; + } + /** + * + * + *
+     * Indicates that features for this group come from BigQuery Table/View.
+     * By default treats the source as a sparse time series source, which is
+     * required to have an entity_id and a feature_timestamp column in the
+     * source.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureGroup.BigQuery big_query = 7; + * + * @return The bigQuery. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery getBigQuery() { + if (bigQueryBuilder_ == null) { + if (sourceCase_ == 7) { + return (com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery) source_; + } + return com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery.getDefaultInstance(); + } else { + if (sourceCase_ == 7) { + return bigQueryBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery.getDefaultInstance(); + } + } + /** + * + * + *
+     * Indicates that features for this group come from BigQuery Table/View.
+     * By default treats the source as a sparse time series source, which is
+     * required to have an entity_id and a feature_timestamp column in the
+     * source.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureGroup.BigQuery big_query = 7; + */ + public Builder setBigQuery(com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery value) { + if (bigQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + bigQueryBuilder_.setMessage(value); + } + sourceCase_ = 7; + return this; + } + /** + * + * + *
+     * Indicates that features for this group come from BigQuery Table/View.
+     * By default treats the source as a sparse time series source, which is
+     * required to have an entity_id and a feature_timestamp column in the
+     * source.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureGroup.BigQuery big_query = 7; + */ + public Builder setBigQuery( + com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery.Builder builderForValue) { + if (bigQueryBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + bigQueryBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 7; + return this; + } + /** + * + * + *
+     * Indicates that features for this group come from BigQuery Table/View.
+     * By default treats the source as a sparse time series source, which is
+     * required to have an entity_id and a feature_timestamp column in the
+     * source.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureGroup.BigQuery big_query = 7; + */ + public Builder mergeBigQuery(com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery value) { + if (bigQueryBuilder_ == null) { + if (sourceCase_ == 7 + && source_ + != com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery.getDefaultInstance()) { + source_ = + com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery.newBuilder( + (com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 7) { + bigQueryBuilder_.mergeFrom(value); + } else { + bigQueryBuilder_.setMessage(value); + } + } + sourceCase_ = 7; + return this; + } + /** + * + * + *
+     * Indicates that features for this group come from BigQuery Table/View.
+     * By default treats the source as a sparse time series source, which is
+     * required to have an entity_id and a feature_timestamp column in the
+     * source.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureGroup.BigQuery big_query = 7; + */ + public Builder clearBigQuery() { + if (bigQueryBuilder_ == null) { + if (sourceCase_ == 7) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 7) { + sourceCase_ = 0; + source_ = null; + } + bigQueryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Indicates that features for this group come from BigQuery Table/View.
+     * By default treats the source as a sparse time series source, which is
+     * required to have an entity_id and a feature_timestamp column in the
+     * source.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureGroup.BigQuery big_query = 7; + */ + public com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery.Builder getBigQueryBuilder() { + return getBigQueryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Indicates that features for this group come from BigQuery Table/View.
+     * By default treats the source as a sparse time series source, which is
+     * required to have an entity_id and a feature_timestamp column in the
+     * source.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureGroup.BigQuery big_query = 7; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureGroup.BigQueryOrBuilder getBigQueryOrBuilder() { + if ((sourceCase_ == 7) && (bigQueryBuilder_ != null)) { + return bigQueryBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 7) { + return (com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery) source_; + } + return com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery.getDefaultInstance(); + } + } + /** + * + * + *
+     * Indicates that features for this group come from BigQuery Table/View.
+     * By default treats the source as a sparse time series source, which is
+     * required to have an entity_id and a feature_timestamp column in the
+     * source.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureGroup.BigQuery big_query = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery, + com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery.Builder, + com.google.cloud.aiplatform.v1.FeatureGroup.BigQueryOrBuilder> + getBigQueryFieldBuilder() { + if (bigQueryBuilder_ == null) { + if (!(sourceCase_ == 7)) { + source_ = com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery.getDefaultInstance(); + } + bigQueryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery, + com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery.Builder, + com.google.cloud.aiplatform.v1.FeatureGroup.BigQueryOrBuilder>( + (com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 7; + onChanged(); + return bigQueryBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Name of the FeatureGroup. Format:
+     * `projects/{project}/locations/{location}/featureGroups/{featureGroup}`
+     * 
+ * + * 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 FeatureGroup. Format:
+     * `projects/{project}/locations/{location}/featureGroups/{featureGroup}`
+     * 
+ * + * 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 FeatureGroup. Format:
+     * `projects/{project}/locations/{location}/featureGroups/{featureGroup}`
+     * 
+ * + * 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. Name of the FeatureGroup. Format:
+     * `projects/{project}/locations/{location}/featureGroups/{featureGroup}`
+     * 
+ * + * 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. Name of the FeatureGroup. Format:
+     * `projects/{project}/locations/{location}/featureGroups/{featureGroup}`
+     * 
+ * + * 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 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. Timestamp when this FeatureGroup was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureGroup was created.
+     * 
+ * + * + * .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. Timestamp when this FeatureGroup was created.
+     * 
+ * + * + * .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_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureGroup was created.
+     * 
+ * + * + * .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_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureGroup was created.
+     * 
+ * + * + * .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_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureGroup was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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. Timestamp when this FeatureGroup was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureGroup was created.
+     * 
+ * + * + * .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. Timestamp when this FeatureGroup was created.
+     * 
+ * + * + * .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. Timestamp when this FeatureGroup was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureGroup was last updated.
+     * 
+ * + * + * .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. Timestamp when this FeatureGroup was last updated.
+     * 
+ * + * + * .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_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureGroup was last updated.
+     * 
+ * + * + * .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_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureGroup was last updated.
+     * 
+ * + * + * .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_ & 0x00000008) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureGroup was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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. Timestamp when this FeatureGroup was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureGroup was last updated.
+     * 
+ * + * + * .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. Timestamp when this FeatureGroup was last updated.
+     * 
+ * + * + * .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 etag_ = ""; + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set,
+     * a blind "overwrite" update happens.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set,
+     * a blind "overwrite" update happens.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set,
+     * a blind "overwrite" update happens.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set,
+     * a blind "overwrite" update happens.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set,
+     * a blind "overwrite" update happens.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000010; + 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 with user-defined metadata to organize your
+     * FeatureGroup.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureGroup(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * map<string, string> labels = 5 [(.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 with user-defined metadata to organize your
+     * FeatureGroup.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureGroup(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your
+     * FeatureGroup.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureGroup(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * map<string, string> labels = 5 [(.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 with user-defined metadata to organize your
+     * FeatureGroup.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureGroup(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * map<string, string> labels = 5 [(.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 with user-defined metadata to organize your
+     * FeatureGroup.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureGroup(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * map<string, string> labels = 5 [(.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 with user-defined metadata to organize your
+     * FeatureGroup.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureGroup(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * map<string, string> labels = 5 [(.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 with user-defined metadata to organize your
+     * FeatureGroup.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureGroup(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000020; + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. Description of the FeatureGroup.
+     * 
+ * + * string description = 6 [(.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 FeatureGroup.
+     * 
+ * + * string description = 6 [(.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 FeatureGroup.
+     * 
+ * + * string description = 6 [(.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_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the FeatureGroup.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the FeatureGroup.
+     * 
+ * + * string description = 6 [(.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_ |= 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.aiplatform.v1.FeatureGroup) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.FeatureGroup) + private static final com.google.cloud.aiplatform.v1.FeatureGroup DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.FeatureGroup(); + } + + public static com.google.cloud.aiplatform.v1.FeatureGroup getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FeatureGroup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureGroup getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureGroupName.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureGroupName.java new file mode 100644 index 000000000000..af04f7bf06aa --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureGroupName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.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 FeatureGroupName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_FEATURE_GROUP = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/featureGroups/{feature_group}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String featureGroup; + + @Deprecated + protected FeatureGroupName() { + project = null; + location = null; + featureGroup = null; + } + + private FeatureGroupName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + featureGroup = Preconditions.checkNotNull(builder.getFeatureGroup()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getFeatureGroup() { + return featureGroup; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static FeatureGroupName of(String project, String location, String featureGroup) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setFeatureGroup(featureGroup) + .build(); + } + + public static String format(String project, String location, String featureGroup) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setFeatureGroup(featureGroup) + .build() + .toString(); + } + + public static FeatureGroupName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_FEATURE_GROUP.validatedMatch( + formattedString, "FeatureGroupName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("feature_group")); + } + + 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 (FeatureGroupName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_FEATURE_GROUP.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 (featureGroup != null) { + fieldMapBuilder.put("feature_group", featureGroup); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_FEATURE_GROUP.instantiate( + "project", project, "location", location, "feature_group", featureGroup); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + FeatureGroupName that = ((FeatureGroupName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.featureGroup, that.featureGroup); + } + 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(featureGroup); + return h; + } + + /** Builder for projects/{project}/locations/{location}/featureGroups/{feature_group}. */ + public static class Builder { + private String project; + private String location; + private String featureGroup; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getFeatureGroup() { + return featureGroup; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setFeatureGroup(String featureGroup) { + this.featureGroup = featureGroup; + return this; + } + + private Builder(FeatureGroupName featureGroupName) { + this.project = featureGroupName.project; + this.location = featureGroupName.location; + this.featureGroup = featureGroupName.featureGroup; + } + + public FeatureGroupName build() { + return new FeatureGroupName(this); + } + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureGroupOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureGroupOrBuilder.java new file mode 100644 index 000000000000..e0cfb8949289 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureGroupOrBuilder.java @@ -0,0 +1,334 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_group.proto + +package com.google.cloud.aiplatform.v1; + +public interface FeatureGroupOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.FeatureGroup) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Indicates that features for this group come from BigQuery Table/View.
+   * By default treats the source as a sparse time series source, which is
+   * required to have an entity_id and a feature_timestamp column in the
+   * source.
+   * 
+ * + * .google.cloud.aiplatform.v1.FeatureGroup.BigQuery big_query = 7; + * + * @return Whether the bigQuery field is set. + */ + boolean hasBigQuery(); + /** + * + * + *
+   * Indicates that features for this group come from BigQuery Table/View.
+   * By default treats the source as a sparse time series source, which is
+   * required to have an entity_id and a feature_timestamp column in the
+   * source.
+   * 
+ * + * .google.cloud.aiplatform.v1.FeatureGroup.BigQuery big_query = 7; + * + * @return The bigQuery. + */ + com.google.cloud.aiplatform.v1.FeatureGroup.BigQuery getBigQuery(); + /** + * + * + *
+   * Indicates that features for this group come from BigQuery Table/View.
+   * By default treats the source as a sparse time series source, which is
+   * required to have an entity_id and a feature_timestamp column in the
+   * source.
+   * 
+ * + * .google.cloud.aiplatform.v1.FeatureGroup.BigQuery big_query = 7; + */ + com.google.cloud.aiplatform.v1.FeatureGroup.BigQueryOrBuilder getBigQueryOrBuilder(); + + /** + * + * + *
+   * Output only. Name of the FeatureGroup. Format:
+   * `projects/{project}/locations/{location}/featureGroups/{featureGroup}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Name of the FeatureGroup. Format:
+   * `projects/{project}/locations/{location}/featureGroups/{featureGroup}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Timestamp when this FeatureGroup was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this FeatureGroup was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this FeatureGroup was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this FeatureGroup was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this FeatureGroup was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this FeatureGroup was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set,
+   * a blind "overwrite" update happens.
+   * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set,
+   * a blind "overwrite" update happens.
+   * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your
+   * FeatureGroup.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureGroup(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your
+   * FeatureGroup.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureGroup(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 5 [(.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 with user-defined metadata to organize your
+   * FeatureGroup.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureGroup(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your
+   * FeatureGroup.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureGroup(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your
+   * FeatureGroup.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureGroup(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Description of the FeatureGroup.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. Description of the FeatureGroup.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + com.google.cloud.aiplatform.v1.FeatureGroup.SourceCase getSourceCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureGroupProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureGroupProto.java new file mode 100644 index 000000000000..73add7017ad7 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureGroupProto.java @@ -0,0 +1,133 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_group.proto + +package com.google.cloud.aiplatform.v1; + +public final class FeatureGroupProto { + private FeatureGroupProto() {} + + 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_aiplatform_v1_FeatureGroup_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FeatureGroup_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_FeatureGroup_BigQuery_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FeatureGroup_BigQuery_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_FeatureGroup_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FeatureGroup_LabelsEntry_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/aiplatform/v1/feature_gro" + + "up.proto\022\032google.cloud.aiplatform.v1\032\037go" + + "ogle/api/field_behavior.proto\032\031google/ap" + + "i/resource.proto\032#google/cloud/aiplatfor" + + "m/v1/io.proto\032\037google/protobuf/timestamp" + + ".proto\"\231\005\n\014FeatureGroup\022F\n\tbig_query\030\007 \001" + + "(\01321.google.cloud.aiplatform.v1.FeatureG" + + "roup.BigQueryH\000\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\0225\n\013c" + + "reate_time\030\002 \001(\0132\032.google.protobuf.Times" + + "tampB\004\342A\001\003\0225\n\013update_time\030\003 \001(\0132\032.google" + + ".protobuf.TimestampB\004\342A\001\003\022\022\n\004etag\030\004 \001(\tB" + + "\004\342A\001\001\022J\n\006labels\030\005 \003(\01324.google.cloud.aip" + + "latform.v1.FeatureGroup.LabelsEntryB\004\342A\001" + + "\001\022\031\n\013description\030\006 \001(\tB\004\342A\001\001\032x\n\010BigQuery" + + "\022K\n\020big_query_source\030\001 \001(\0132*.google.clou" + + "d.aiplatform.v1.BigQuerySourceB\005\342A\002\005\002\022\037\n" + + "\021entity_id_columns\030\002 \003(\tB\004\342A\001\001\032-\n\013Labels" + + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\220\001" + + "\352A\214\001\n&aiplatform.googleapis.com/FeatureG" + + "roup\022Eprojects/{project}/locations/{loca" + + "tion}/featureGroups/{feature_group}*\rfea" + + "tureGroups2\014featureGroupB\010\n\006sourceB\317\001\n\036c" + + "om.google.cloud.aiplatform.v1B\021FeatureGr" + + "oupProtoP\001Z>cloud.google.com/go/aiplatfo" + + "rm/apiv1/aiplatformpb;aiplatformpb\252\002\032Goo" + + "gle.Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\A" + + "IPlatform\\V1\352\002\035Google::Cloud::AIPlatform" + + "::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.cloud.aiplatform.v1.IoProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_FeatureGroup_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_FeatureGroup_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FeatureGroup_descriptor, + new java.lang.String[] { + "BigQuery", + "Name", + "CreateTime", + "UpdateTime", + "Etag", + "Labels", + "Description", + "Source", + }); + internal_static_google_cloud_aiplatform_v1_FeatureGroup_BigQuery_descriptor = + internal_static_google_cloud_aiplatform_v1_FeatureGroup_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_aiplatform_v1_FeatureGroup_BigQuery_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FeatureGroup_BigQuery_descriptor, + new java.lang.String[] { + "BigQuerySource", "EntityIdColumns", + }); + internal_static_google_cloud_aiplatform_v1_FeatureGroup_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_FeatureGroup_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_aiplatform_v1_FeatureGroup_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FeatureGroup_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + 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.cloud.aiplatform.v1.IoProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureName.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureName.java index 37813593e90f..db0aca9e5c7c 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureName.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureName.java @@ -16,7 +16,9 @@ package com.google.cloud.aiplatform.v1; +import com.google.api.core.BetaApi; import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; import com.google.api.resourcenames.ResourceName; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; @@ -32,12 +34,18 @@ public class FeatureName implements ResourceName { private static final PathTemplate PROJECT_LOCATION_FEATURESTORE_ENTITY_TYPE_FEATURE = PathTemplate.createWithoutUrlEncoding( "projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}"); + private static final PathTemplate PROJECT_LOCATION_FEATURE_GROUP_FEATURE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}"); private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; private final String project; private final String location; private final String featurestore; private final String entityType; private final String feature; + private final String featureGroup; @Deprecated protected FeatureName() { @@ -46,6 +54,7 @@ protected FeatureName() { featurestore = null; entityType = null; feature = null; + featureGroup = null; } private FeatureName(Builder builder) { @@ -54,6 +63,18 @@ private FeatureName(Builder builder) { featurestore = Preconditions.checkNotNull(builder.getFeaturestore()); entityType = Preconditions.checkNotNull(builder.getEntityType()); feature = Preconditions.checkNotNull(builder.getFeature()); + featureGroup = null; + pathTemplate = PROJECT_LOCATION_FEATURESTORE_ENTITY_TYPE_FEATURE; + } + + private FeatureName(ProjectLocationFeatureGroupFeatureBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + featureGroup = Preconditions.checkNotNull(builder.getFeatureGroup()); + feature = Preconditions.checkNotNull(builder.getFeature()); + featurestore = null; + entityType = null; + pathTemplate = PROJECT_LOCATION_FEATURE_GROUP_FEATURE; } public String getProject() { @@ -76,10 +97,25 @@ public String getFeature() { return feature; } + public String getFeatureGroup() { + return featureGroup; + } + public static Builder newBuilder() { return new Builder(); } + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectLocationFeaturestoreEntityTypeFeatureBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationFeatureGroupFeatureBuilder + newProjectLocationFeatureGroupFeatureBuilder() { + return new ProjectLocationFeatureGroupFeatureBuilder(); + } + public Builder toBuilder() { return new Builder(this); } @@ -95,6 +131,29 @@ public static FeatureName of( .build(); } + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static FeatureName ofProjectLocationFeaturestoreEntityTypeFeatureName( + String project, String location, String featurestore, String entityType, String feature) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setFeaturestore(featurestore) + .setEntityType(entityType) + .setFeature(feature) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static FeatureName ofProjectLocationFeatureGroupFeatureName( + String project, String location, String featureGroup, String feature) { + return newProjectLocationFeatureGroupFeatureBuilder() + .setProject(project) + .setLocation(location) + .setFeatureGroup(featureGroup) + .setFeature(feature) + .build(); + } + public static String format( String project, String location, String featurestore, String entityType, String feature) { return newBuilder() @@ -107,19 +166,53 @@ public static String format( .toString(); } + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationFeaturestoreEntityTypeFeatureName( + String project, String location, String featurestore, String entityType, String feature) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setFeaturestore(featurestore) + .setEntityType(entityType) + .setFeature(feature) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationFeatureGroupFeatureName( + String project, String location, String featureGroup, String feature) { + return newProjectLocationFeatureGroupFeatureBuilder() + .setProject(project) + .setLocation(location) + .setFeatureGroup(featureGroup) + .setFeature(feature) + .build() + .toString(); + } + public static FeatureName parse(String formattedString) { if (formattedString.isEmpty()) { return null; } - Map matchMap = - PROJECT_LOCATION_FEATURESTORE_ENTITY_TYPE_FEATURE.validatedMatch( - formattedString, "FeatureName.parse: formattedString not in valid format"); - return of( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("featurestore"), - matchMap.get("entity_type"), - matchMap.get("feature")); + if (PROJECT_LOCATION_FEATURESTORE_ENTITY_TYPE_FEATURE.matches(formattedString)) { + Map matchMap = + PROJECT_LOCATION_FEATURESTORE_ENTITY_TYPE_FEATURE.match(formattedString); + return ofProjectLocationFeaturestoreEntityTypeFeatureName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("featurestore"), + matchMap.get("entity_type"), + matchMap.get("feature")); + } else if (PROJECT_LOCATION_FEATURE_GROUP_FEATURE.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_FEATURE_GROUP_FEATURE.match(formattedString); + return ofProjectLocationFeatureGroupFeatureName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("feature_group"), + matchMap.get("feature")); + } + throw new ValidationException("FeatureName.parse: formattedString not in valid format"); } public static List parseList(List formattedStrings) { @@ -143,7 +236,8 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_FEATURESTORE_ENTITY_TYPE_FEATURE.matches(formattedString); + return PROJECT_LOCATION_FEATURESTORE_ENTITY_TYPE_FEATURE.matches(formattedString) + || PROJECT_LOCATION_FEATURE_GROUP_FEATURE.matches(formattedString); } @Override @@ -167,6 +261,9 @@ public Map getFieldValuesMap() { if (feature != null) { fieldMapBuilder.put("feature", feature); } + if (featureGroup != null) { + fieldMapBuilder.put("feature_group", featureGroup); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -180,17 +277,7 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PROJECT_LOCATION_FEATURESTORE_ENTITY_TYPE_FEATURE.instantiate( - "project", - project, - "location", - location, - "featurestore", - featurestore, - "entity_type", - entityType, - "feature", - feature); + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); } @Override @@ -204,7 +291,8 @@ public boolean equals(Object o) { && Objects.equals(this.location, that.location) && Objects.equals(this.featurestore, that.featurestore) && Objects.equals(this.entityType, that.entityType) - && Objects.equals(this.feature, that.feature); + && Objects.equals(this.feature, that.feature) + && Objects.equals(this.featureGroup, that.featureGroup); } return false; } @@ -213,6 +301,8 @@ public boolean equals(Object o) { public int hashCode() { int h = 1; h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; h ^= Objects.hashCode(project); h *= 1000003; h ^= Objects.hashCode(location); @@ -222,6 +312,8 @@ public int hashCode() { h ^= Objects.hashCode(entityType); h *= 1000003; h ^= Objects.hashCode(feature); + h *= 1000003; + h ^= Objects.hashCode(featureGroup); return h; } @@ -284,6 +376,10 @@ public Builder setFeature(String feature) { } private Builder(FeatureName featureName) { + Preconditions.checkArgument( + Objects.equals( + featureName.pathTemplate, PROJECT_LOCATION_FEATURESTORE_ENTITY_TYPE_FEATURE), + "toBuilder is only supported when FeatureName has the pattern of projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}"); this.project = featureName.project; this.location = featureName.location; this.featurestore = featureName.featurestore; @@ -295,4 +391,58 @@ public FeatureName build() { return new FeatureName(this); } } + + /** + * Builder for + * projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationFeatureGroupFeatureBuilder { + private String project; + private String location; + private String featureGroup; + private String feature; + + protected ProjectLocationFeatureGroupFeatureBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getFeatureGroup() { + return featureGroup; + } + + public String getFeature() { + return feature; + } + + public ProjectLocationFeatureGroupFeatureBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationFeatureGroupFeatureBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationFeatureGroupFeatureBuilder setFeatureGroup(String featureGroup) { + this.featureGroup = featureGroup; + return this; + } + + public ProjectLocationFeatureGroupFeatureBuilder setFeature(String feature) { + this.feature = feature; + return this; + } + + public FeatureName build() { + return new FeatureName(this); + } + } } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStore.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStore.java new file mode 100644 index 000000000000..1a26ac9b970d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStore.java @@ -0,0 +1,4135 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Vertex AI Feature Online Store provides a centralized repository for serving
+ * ML features and embedding indexes at low latency. The Feature Online Store is
+ * a top-level container.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FeatureOnlineStore} + */ +public final class FeatureOnlineStore extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.FeatureOnlineStore) + FeatureOnlineStoreOrBuilder { + private static final long serialVersionUID = 0L; + // Use FeatureOnlineStore.newBuilder() to construct. + private FeatureOnlineStore(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FeatureOnlineStore() { + name_ = ""; + etag_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FeatureOnlineStore(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreProto + .internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(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.aiplatform.v1.FeatureOnlineStoreProto + .internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureOnlineStore.class, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder.class); + } + + /** + * + * + *
+   * Possible states a featureOnlineStore can have.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.FeatureOnlineStore.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * State when the featureOnlineStore configuration is not being updated and
+     * the fields reflect the current configuration of the featureOnlineStore.
+     * The featureOnlineStore is usable in this state.
+     * 
+ * + * STABLE = 1; + */ + STABLE(1), + /** + * + * + *
+     * The state of the featureOnlineStore configuration when it is being
+     * updated. During an update, the fields reflect either the original
+     * configuration or the updated configuration of the featureOnlineStore. The
+     * featureOnlineStore is still usable in this state.
+     * 
+ * + * UPDATING = 2; + */ + UPDATING(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * State when the featureOnlineStore configuration is not being updated and
+     * the fields reflect the current configuration of the featureOnlineStore.
+     * The featureOnlineStore is usable in this state.
+     * 
+ * + * STABLE = 1; + */ + public static final int STABLE_VALUE = 1; + /** + * + * + *
+     * The state of the featureOnlineStore configuration when it is being
+     * updated. During an update, the fields reflect either the original
+     * configuration or the updated configuration of the featureOnlineStore. The
+     * featureOnlineStore is still usable in this state.
+     * 
+ * + * UPDATING = 2; + */ + public static final int UPDATING_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 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 STABLE; + case 2: + 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.aiplatform.v1.FeatureOnlineStore.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.aiplatform.v1.FeatureOnlineStore.State) + } + + public interface BigtableOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Autoscaling config applied to Bigtable Instance.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling auto_scaling = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the autoScaling field is set. + */ + boolean hasAutoScaling(); + /** + * + * + *
+     * Required. Autoscaling config applied to Bigtable Instance.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling auto_scaling = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoScaling. + */ + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling getAutoScaling(); + /** + * + * + *
+     * Required. Autoscaling config applied to Bigtable Instance.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling auto_scaling = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScalingOrBuilder + getAutoScalingOrBuilder(); + } + /** Protobuf type {@code google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable} */ + public static final class Bigtable extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable) + BigtableOrBuilder { + private static final long serialVersionUID = 0L; + // Use Bigtable.newBuilder() to construct. + private Bigtable(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Bigtable() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Bigtable(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreProto + .internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreProto + .internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.class, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.Builder.class); + } + + public interface AutoScalingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. The minimum number of nodes to scale down to. Must be greater
+       * than or equal to 1.
+       * 
+ * + * int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minNodeCount. + */ + int getMinNodeCount(); + + /** + * + * + *
+       * Required. The maximum number of nodes to scale up to. Must be greater
+       * than or equal to min_node_count, and less than or equal to 10 times of
+       * 'min_node_count'.
+       * 
+ * + * int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxNodeCount. + */ + int getMaxNodeCount(); + + /** + * + * + *
+       * Optional. A percentage of the cluster's CPU capacity. Can be from 10%
+       * to 80%. When a cluster's CPU utilization exceeds the target that you
+       * have set, Bigtable immediately adds nodes to the cluster. When CPU
+       * utilization is substantially lower than the target, Bigtable removes
+       * nodes. If not set will default to 50%.
+       * 
+ * + * int32 cpu_utilization_target = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The cpuUtilizationTarget. + */ + int getCpuUtilizationTarget(); + } + /** Protobuf type {@code google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling} */ + public static final class AutoScaling extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling) + AutoScalingOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoScaling.newBuilder() to construct. + private AutoScaling(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoScaling() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoScaling(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreProto + .internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_AutoScaling_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreProto + .internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_AutoScaling_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling.class, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling.Builder + .class); + } + + public static final int MIN_NODE_COUNT_FIELD_NUMBER = 1; + private int minNodeCount_ = 0; + /** + * + * + *
+       * Required. The minimum number of nodes to scale down to. Must be greater
+       * than or equal to 1.
+       * 
+ * + * int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minNodeCount. + */ + @java.lang.Override + public int getMinNodeCount() { + return minNodeCount_; + } + + public static final int MAX_NODE_COUNT_FIELD_NUMBER = 2; + private int maxNodeCount_ = 0; + /** + * + * + *
+       * Required. The maximum number of nodes to scale up to. Must be greater
+       * than or equal to min_node_count, and less than or equal to 10 times of
+       * 'min_node_count'.
+       * 
+ * + * int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxNodeCount. + */ + @java.lang.Override + public int getMaxNodeCount() { + return maxNodeCount_; + } + + public static final int CPU_UTILIZATION_TARGET_FIELD_NUMBER = 3; + private int cpuUtilizationTarget_ = 0; + /** + * + * + *
+       * Optional. A percentage of the cluster's CPU capacity. Can be from 10%
+       * to 80%. When a cluster's CPU utilization exceeds the target that you
+       * have set, Bigtable immediately adds nodes to the cluster. When CPU
+       * utilization is substantially lower than the target, Bigtable removes
+       * nodes. If not set will default to 50%.
+       * 
+ * + * int32 cpu_utilization_target = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The cpuUtilizationTarget. + */ + @java.lang.Override + public int getCpuUtilizationTarget() { + return cpuUtilizationTarget_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (minNodeCount_ != 0) { + output.writeInt32(1, minNodeCount_); + } + if (maxNodeCount_ != 0) { + output.writeInt32(2, maxNodeCount_); + } + if (cpuUtilizationTarget_ != 0) { + output.writeInt32(3, cpuUtilizationTarget_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minNodeCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, minNodeCount_); + } + if (maxNodeCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxNodeCount_); + } + if (cpuUtilizationTarget_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, cpuUtilizationTarget_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling other = + (com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling) obj; + + if (getMinNodeCount() != other.getMinNodeCount()) return false; + if (getMaxNodeCount() != other.getMaxNodeCount()) return false; + if (getCpuUtilizationTarget() != other.getCpuUtilizationTarget()) return false; + if (!getUnknownFields().equals(other.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) + MIN_NODE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMinNodeCount(); + hash = (37 * hash) + MAX_NODE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxNodeCount(); + hash = (37 * hash) + CPU_UTILIZATION_TARGET_FIELD_NUMBER; + hash = (53 * hash) + getCpuUtilizationTarget(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling) + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScalingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreProto + .internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_AutoScaling_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreProto + .internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_AutoScaling_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling.class, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + minNodeCount_ = 0; + maxNodeCount_ = 0; + cpuUtilizationTarget_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreProto + .internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_AutoScaling_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling build() { + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + buildPartial() { + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling result = + new com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.minNodeCount_ = minNodeCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxNodeCount_ = maxNodeCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.cpuUtilizationTarget_ = cpuUtilizationTarget_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling other) { + if (other + == com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + .getDefaultInstance()) return this; + if (other.getMinNodeCount() != 0) { + setMinNodeCount(other.getMinNodeCount()); + } + if (other.getMaxNodeCount() != 0) { + setMaxNodeCount(other.getMaxNodeCount()); + } + if (other.getCpuUtilizationTarget() != 0) { + setCpuUtilizationTarget(other.getCpuUtilizationTarget()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == 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: + { + minNodeCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + maxNodeCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + cpuUtilizationTarget_ = 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 int minNodeCount_; + /** + * + * + *
+         * Required. The minimum number of nodes to scale down to. Must be greater
+         * than or equal to 1.
+         * 
+ * + * int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minNodeCount. + */ + @java.lang.Override + public int getMinNodeCount() { + return minNodeCount_; + } + /** + * + * + *
+         * Required. The minimum number of nodes to scale down to. Must be greater
+         * than or equal to 1.
+         * 
+ * + * int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The minNodeCount to set. + * @return This builder for chaining. + */ + public Builder setMinNodeCount(int value) { + + minNodeCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The minimum number of nodes to scale down to. Must be greater
+         * than or equal to 1.
+         * 
+ * + * int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMinNodeCount() { + bitField0_ = (bitField0_ & ~0x00000001); + minNodeCount_ = 0; + onChanged(); + return this; + } + + private int maxNodeCount_; + /** + * + * + *
+         * Required. The maximum number of nodes to scale up to. Must be greater
+         * than or equal to min_node_count, and less than or equal to 10 times of
+         * 'min_node_count'.
+         * 
+ * + * int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxNodeCount. + */ + @java.lang.Override + public int getMaxNodeCount() { + return maxNodeCount_; + } + /** + * + * + *
+         * Required. The maximum number of nodes to scale up to. Must be greater
+         * than or equal to min_node_count, and less than or equal to 10 times of
+         * 'min_node_count'.
+         * 
+ * + * int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The maxNodeCount to set. + * @return This builder for chaining. + */ + public Builder setMaxNodeCount(int value) { + + maxNodeCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The maximum number of nodes to scale up to. Must be greater
+         * than or equal to min_node_count, and less than or equal to 10 times of
+         * 'min_node_count'.
+         * 
+ * + * int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMaxNodeCount() { + bitField0_ = (bitField0_ & ~0x00000002); + maxNodeCount_ = 0; + onChanged(); + return this; + } + + private int cpuUtilizationTarget_; + /** + * + * + *
+         * Optional. A percentage of the cluster's CPU capacity. Can be from 10%
+         * to 80%. When a cluster's CPU utilization exceeds the target that you
+         * have set, Bigtable immediately adds nodes to the cluster. When CPU
+         * utilization is substantially lower than the target, Bigtable removes
+         * nodes. If not set will default to 50%.
+         * 
+ * + * int32 cpu_utilization_target = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The cpuUtilizationTarget. + */ + @java.lang.Override + public int getCpuUtilizationTarget() { + return cpuUtilizationTarget_; + } + /** + * + * + *
+         * Optional. A percentage of the cluster's CPU capacity. Can be from 10%
+         * to 80%. When a cluster's CPU utilization exceeds the target that you
+         * have set, Bigtable immediately adds nodes to the cluster. When CPU
+         * utilization is substantially lower than the target, Bigtable removes
+         * nodes. If not set will default to 50%.
+         * 
+ * + * int32 cpu_utilization_target = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The cpuUtilizationTarget to set. + * @return This builder for chaining. + */ + public Builder setCpuUtilizationTarget(int value) { + + cpuUtilizationTarget_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. A percentage of the cluster's CPU capacity. Can be from 10%
+         * to 80%. When a cluster's CPU utilization exceeds the target that you
+         * have set, Bigtable immediately adds nodes to the cluster. When CPU
+         * utilization is substantially lower than the target, Bigtable removes
+         * nodes. If not set will default to 50%.
+         * 
+ * + * int32 cpu_utilization_target = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCpuUtilizationTarget() { + bitField0_ = (bitField0_ & ~0x00000004); + cpuUtilizationTarget_ = 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.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling) + private static final com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling(); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoScaling parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int AUTO_SCALING_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling autoScaling_; + /** + * + * + *
+     * Required. Autoscaling config applied to Bigtable Instance.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling auto_scaling = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the autoScaling field is set. + */ + @java.lang.Override + public boolean hasAutoScaling() { + return autoScaling_ != null; + } + /** + * + * + *
+     * Required. Autoscaling config applied to Bigtable Instance.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling auto_scaling = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoScaling. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling getAutoScaling() { + return autoScaling_ == null + ? com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + .getDefaultInstance() + : autoScaling_; + } + /** + * + * + *
+     * Required. Autoscaling config applied to Bigtable Instance.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling auto_scaling = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScalingOrBuilder + getAutoScalingOrBuilder() { + return autoScaling_ == null + ? com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + .getDefaultInstance() + : autoScaling_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (autoScaling_ != null) { + output.writeMessage(1, getAutoScaling()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (autoScaling_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAutoScaling()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable other = + (com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable) obj; + + if (hasAutoScaling() != other.hasAutoScaling()) return false; + if (hasAutoScaling()) { + if (!getAutoScaling().equals(other.getAutoScaling())) return false; + } + if (!getUnknownFields().equals(other.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 (hasAutoScaling()) { + hash = (37 * hash) + AUTO_SCALING_FIELD_NUMBER; + hash = (53 * hash) + getAutoScaling().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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.aiplatform.v1.FeatureOnlineStore.Bigtable} */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable) + com.google.cloud.aiplatform.v1.FeatureOnlineStore.BigtableOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreProto + .internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreProto + .internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.class, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + autoScaling_ = null; + if (autoScalingBuilder_ != null) { + autoScalingBuilder_.dispose(); + autoScalingBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreProto + .internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable build() { + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable buildPartial() { + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable result = + new com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.autoScaling_ = + autoScalingBuilder_ == null ? autoScaling_ : autoScalingBuilder_.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.aiplatform.v1.FeatureOnlineStore.Bigtable) { + return mergeFrom((com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable other) { + if (other + == com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.getDefaultInstance()) + return this; + if (other.hasAutoScaling()) { + mergeAutoScaling(other.getAutoScaling()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(getAutoScalingFieldBuilder().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.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling autoScaling_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling.Builder, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScalingOrBuilder> + autoScalingBuilder_; + /** + * + * + *
+       * Required. Autoscaling config applied to Bigtable Instance.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling auto_scaling = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the autoScaling field is set. + */ + public boolean hasAutoScaling() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Required. Autoscaling config applied to Bigtable Instance.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling auto_scaling = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoScaling. + */ + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + getAutoScaling() { + if (autoScalingBuilder_ == null) { + return autoScaling_ == null + ? com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + .getDefaultInstance() + : autoScaling_; + } else { + return autoScalingBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. Autoscaling config applied to Bigtable Instance.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling auto_scaling = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAutoScaling( + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling value) { + if (autoScalingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + autoScaling_ = value; + } else { + autoScalingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Autoscaling config applied to Bigtable Instance.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling auto_scaling = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAutoScaling( + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling.Builder + builderForValue) { + if (autoScalingBuilder_ == null) { + autoScaling_ = builderForValue.build(); + } else { + autoScalingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Autoscaling config applied to Bigtable Instance.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling auto_scaling = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAutoScaling( + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling value) { + if (autoScalingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && autoScaling_ != null + && autoScaling_ + != com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + .getDefaultInstance()) { + getAutoScalingBuilder().mergeFrom(value); + } else { + autoScaling_ = value; + } + } else { + autoScalingBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Autoscaling config applied to Bigtable Instance.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling auto_scaling = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAutoScaling() { + bitField0_ = (bitField0_ & ~0x00000001); + autoScaling_ = null; + if (autoScalingBuilder_ != null) { + autoScalingBuilder_.dispose(); + autoScalingBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Autoscaling config applied to Bigtable Instance.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling auto_scaling = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling.Builder + getAutoScalingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAutoScalingFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Autoscaling config applied to Bigtable Instance.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling auto_scaling = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScalingOrBuilder + getAutoScalingOrBuilder() { + if (autoScalingBuilder_ != null) { + return autoScalingBuilder_.getMessageOrBuilder(); + } else { + return autoScaling_ == null + ? com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling + .getDefaultInstance() + : autoScaling_; + } + } + /** + * + * + *
+       * Required. Autoscaling config applied to Bigtable Instance.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling auto_scaling = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling.Builder, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScalingOrBuilder> + getAutoScalingFieldBuilder() { + if (autoScalingBuilder_ == null) { + autoScalingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling.Builder, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScalingOrBuilder>( + getAutoScaling(), getParentForChildren(), isClean()); + autoScaling_ = null; + } + return autoScalingBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable) + private static final com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable(); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Bigtable parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int storageTypeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object storageType_; + + public enum StorageTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BIGTABLE(8), + STORAGETYPE_NOT_SET(0); + private final int value; + + private StorageTypeCase(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 StorageTypeCase valueOf(int value) { + return forNumber(value); + } + + public static StorageTypeCase forNumber(int value) { + switch (value) { + case 8: + return BIGTABLE; + case 0: + return STORAGETYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public StorageTypeCase getStorageTypeCase() { + return StorageTypeCase.forNumber(storageTypeCase_); + } + + public static final int BIGTABLE_FIELD_NUMBER = 8; + /** + * + * + *
+   * Contains settings for the Cloud Bigtable instance that will be created
+   * to serve featureValues for all FeatureViews under this
+   * FeatureOnlineStore.
+   * 
+ * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable bigtable = 8; + * + * @return Whether the bigtable field is set. + */ + @java.lang.Override + public boolean hasBigtable() { + return storageTypeCase_ == 8; + } + /** + * + * + *
+   * Contains settings for the Cloud Bigtable instance that will be created
+   * to serve featureValues for all FeatureViews under this
+   * FeatureOnlineStore.
+   * 
+ * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable bigtable = 8; + * + * @return The bigtable. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable getBigtable() { + if (storageTypeCase_ == 8) { + return (com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable) storageType_; + } + return com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.getDefaultInstance(); + } + /** + * + * + *
+   * Contains settings for the Cloud Bigtable instance that will be created
+   * to serve featureValues for all FeatureViews under this
+   * FeatureOnlineStore.
+   * 
+ * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable bigtable = 8; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.BigtableOrBuilder + getBigtableOrBuilder() { + if (storageTypeCase_ == 8) { + return (com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable) storageType_; + } + return com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Name of the FeatureOnlineStore. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`
+   * 
+ * + * 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 FeatureOnlineStore. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`
+   * 
+ * + * 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 = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when this FeatureOnlineStore was created.
+   * 
+ * + * .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 createTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this FeatureOnlineStore was created.
+   * 
+ * + * .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. Timestamp when this FeatureOnlineStore was created.
+   * 
+ * + * .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. Timestamp when this FeatureOnlineStore was last updated.
+   * 
+ * + * .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 updateTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this FeatureOnlineStore was last updated.
+   * 
+ * + * .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. Timestamp when this FeatureOnlineStore was last updated.
+   * 
+ * + * .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_; + } + + public static final int ETAG_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set,
+   * a blind "overwrite" update happens.
+   * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set,
+   * a blind "overwrite" update happens.
+   * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.aiplatform.v1.FeatureOnlineStoreProto + .internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_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 with user-defined metadata to organize your
+   * FeatureOnlineStore.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * 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 with user-defined metadata to organize your
+   * FeatureOnlineStore.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your
+   * FeatureOnlineStore.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * 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 with user-defined metadata to organize your
+   * FeatureOnlineStore.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * 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 STATE_FIELD_NUMBER = 7; + private int state_ = 0; + /** + * + * + *
+   * Output only. State of the featureOnlineStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.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. State of the featureOnlineStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.State getState() { + com.google.cloud.aiplatform.v1.FeatureOnlineStore.State result = + com.google.cloud.aiplatform.v1.FeatureOnlineStore.State.forNumber(state_); + return result == null + ? com.google.cloud.aiplatform.v1.FeatureOnlineStore.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 (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(4, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, etag_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 6); + if (state_ + != com.google.cloud.aiplatform.v1.FeatureOnlineStore.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, state_); + } + if (storageTypeCase_ == 8) { + output.writeMessage( + 8, (com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable) storageType_); + } + 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 (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, etag_); + } + 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 (state_ + != com.google.cloud.aiplatform.v1.FeatureOnlineStore.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, state_); + } + if (storageTypeCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable) storageType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.FeatureOnlineStore)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.FeatureOnlineStore other = + (com.google.cloud.aiplatform.v1.FeatureOnlineStore) 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 (!getEtag().equals(other.getEtag())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (state_ != other.state_) return false; + if (!getStorageTypeCase().equals(other.getStorageTypeCase())) return false; + switch (storageTypeCase_) { + case 8: + if (!getBigtable().equals(other.getBigtable())) 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(); + 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) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + switch (storageTypeCase_) { + case 8: + hash = (37 * hash) + BIGTABLE_FIELD_NUMBER; + hash = (53 * hash) + getBigtable().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.FeatureOnlineStore prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Vertex AI Feature Online Store provides a centralized repository for serving
+   * ML features and embedding indexes at low latency. The Feature Online Store is
+   * a top-level container.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FeatureOnlineStore} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.FeatureOnlineStore) + com.google.cloud.aiplatform.v1.FeatureOnlineStoreOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreProto + .internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 6: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(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.aiplatform.v1.FeatureOnlineStoreProto + .internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureOnlineStore.class, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.FeatureOnlineStore.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bigtableBuilder_ != null) { + bigtableBuilder_.clear(); + } + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + etag_ = ""; + internalGetMutableLabels().clear(); + state_ = 0; + storageTypeCase_ = 0; + storageType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreProto + .internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStore.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore build() { + com.google.cloud.aiplatform.v1.FeatureOnlineStore result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore buildPartial() { + com.google.cloud.aiplatform.v1.FeatureOnlineStore result = + new com.google.cloud.aiplatform.v1.FeatureOnlineStore(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.FeatureOnlineStore result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.state_ = state_; + } + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1.FeatureOnlineStore result) { + result.storageTypeCase_ = storageTypeCase_; + result.storageType_ = this.storageType_; + if (storageTypeCase_ == 8 && bigtableBuilder_ != null) { + result.storageType_ = bigtableBuilder_.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.aiplatform.v1.FeatureOnlineStore) { + return mergeFrom((com.google.cloud.aiplatform.v1.FeatureOnlineStore) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.FeatureOnlineStore other) { + if (other == com.google.cloud.aiplatform.v1.FeatureOnlineStore.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000010; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000020; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + switch (other.getStorageTypeCase()) { + case BIGTABLE: + { + mergeBigtable(other.getBigtable()); + break; + } + case STORAGETYPE_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 26: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + 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 56: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: + { + input.readMessage(getBigtableFieldBuilder().getBuilder(), extensionRegistry); + storageTypeCase_ = 8; + 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 storageTypeCase_ = 0; + private java.lang.Object storageType_; + + public StorageTypeCase getStorageTypeCase() { + return StorageTypeCase.forNumber(storageTypeCase_); + } + + public Builder clearStorageType() { + storageTypeCase_ = 0; + storageType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.Builder, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.BigtableOrBuilder> + bigtableBuilder_; + /** + * + * + *
+     * Contains settings for the Cloud Bigtable instance that will be created
+     * to serve featureValues for all FeatureViews under this
+     * FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable bigtable = 8; + * + * @return Whether the bigtable field is set. + */ + @java.lang.Override + public boolean hasBigtable() { + return storageTypeCase_ == 8; + } + /** + * + * + *
+     * Contains settings for the Cloud Bigtable instance that will be created
+     * to serve featureValues for all FeatureViews under this
+     * FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable bigtable = 8; + * + * @return The bigtable. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable getBigtable() { + if (bigtableBuilder_ == null) { + if (storageTypeCase_ == 8) { + return (com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable) storageType_; + } + return com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.getDefaultInstance(); + } else { + if (storageTypeCase_ == 8) { + return bigtableBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.getDefaultInstance(); + } + } + /** + * + * + *
+     * Contains settings for the Cloud Bigtable instance that will be created
+     * to serve featureValues for all FeatureViews under this
+     * FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable bigtable = 8; + */ + public Builder setBigtable(com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable value) { + if (bigtableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + storageType_ = value; + onChanged(); + } else { + bigtableBuilder_.setMessage(value); + } + storageTypeCase_ = 8; + return this; + } + /** + * + * + *
+     * Contains settings for the Cloud Bigtable instance that will be created
+     * to serve featureValues for all FeatureViews under this
+     * FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable bigtable = 8; + */ + public Builder setBigtable( + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.Builder builderForValue) { + if (bigtableBuilder_ == null) { + storageType_ = builderForValue.build(); + onChanged(); + } else { + bigtableBuilder_.setMessage(builderForValue.build()); + } + storageTypeCase_ = 8; + return this; + } + /** + * + * + *
+     * Contains settings for the Cloud Bigtable instance that will be created
+     * to serve featureValues for all FeatureViews under this
+     * FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable bigtable = 8; + */ + public Builder mergeBigtable(com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable value) { + if (bigtableBuilder_ == null) { + if (storageTypeCase_ == 8 + && storageType_ + != com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable + .getDefaultInstance()) { + storageType_ = + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.newBuilder( + (com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable) storageType_) + .mergeFrom(value) + .buildPartial(); + } else { + storageType_ = value; + } + onChanged(); + } else { + if (storageTypeCase_ == 8) { + bigtableBuilder_.mergeFrom(value); + } else { + bigtableBuilder_.setMessage(value); + } + } + storageTypeCase_ = 8; + return this; + } + /** + * + * + *
+     * Contains settings for the Cloud Bigtable instance that will be created
+     * to serve featureValues for all FeatureViews under this
+     * FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable bigtable = 8; + */ + public Builder clearBigtable() { + if (bigtableBuilder_ == null) { + if (storageTypeCase_ == 8) { + storageTypeCase_ = 0; + storageType_ = null; + onChanged(); + } + } else { + if (storageTypeCase_ == 8) { + storageTypeCase_ = 0; + storageType_ = null; + } + bigtableBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Contains settings for the Cloud Bigtable instance that will be created
+     * to serve featureValues for all FeatureViews under this
+     * FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable bigtable = 8; + */ + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.Builder getBigtableBuilder() { + return getBigtableFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Contains settings for the Cloud Bigtable instance that will be created
+     * to serve featureValues for all FeatureViews under this
+     * FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable bigtable = 8; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.BigtableOrBuilder + getBigtableOrBuilder() { + if ((storageTypeCase_ == 8) && (bigtableBuilder_ != null)) { + return bigtableBuilder_.getMessageOrBuilder(); + } else { + if (storageTypeCase_ == 8) { + return (com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable) storageType_; + } + return com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.getDefaultInstance(); + } + } + /** + * + * + *
+     * Contains settings for the Cloud Bigtable instance that will be created
+     * to serve featureValues for all FeatureViews under this
+     * FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable bigtable = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.Builder, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.BigtableOrBuilder> + getBigtableFieldBuilder() { + if (bigtableBuilder_ == null) { + if (!(storageTypeCase_ == 8)) { + storageType_ = + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.getDefaultInstance(); + } + bigtableBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.Builder, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.BigtableOrBuilder>( + (com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable) storageType_, + getParentForChildren(), + isClean()); + storageType_ = null; + } + storageTypeCase_ = 8; + onChanged(); + return bigtableBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Name of the FeatureOnlineStore. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`
+     * 
+ * + * 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 FeatureOnlineStore. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`
+     * 
+ * + * 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 FeatureOnlineStore. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`
+     * 
+ * + * 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. Name of the FeatureOnlineStore. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`
+     * 
+ * + * 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. Name of the FeatureOnlineStore. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`
+     * 
+ * + * 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 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. Timestamp when this FeatureOnlineStore was created.
+     * 
+ * + * + * .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. Timestamp when this FeatureOnlineStore was created.
+     * 
+ * + * + * .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. Timestamp when this FeatureOnlineStore was created.
+     * 
+ * + * + * .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. Timestamp when this FeatureOnlineStore was created.
+     * 
+ * + * + * .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. Timestamp when this FeatureOnlineStore was created.
+     * 
+ * + * + * .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); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureOnlineStore was created.
+     * 
+ * + * + * .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. Timestamp when this FeatureOnlineStore was created.
+     * 
+ * + * + * .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. Timestamp when this FeatureOnlineStore was created.
+     * 
+ * + * + * .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. Timestamp when this FeatureOnlineStore was created.
+     * 
+ * + * + * .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. Timestamp when this FeatureOnlineStore was last updated.
+     * 
+ * + * + * .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. Timestamp when this FeatureOnlineStore was last updated.
+     * 
+ * + * + * .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. Timestamp when this FeatureOnlineStore was last updated.
+     * 
+ * + * + * .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. Timestamp when this FeatureOnlineStore was last updated.
+     * 
+ * + * + * .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. Timestamp when this FeatureOnlineStore was last updated.
+     * 
+ * + * + * .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); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureOnlineStore was last updated.
+     * 
+ * + * + * .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. Timestamp when this FeatureOnlineStore was last updated.
+     * 
+ * + * + * .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. Timestamp when this FeatureOnlineStore was last updated.
+     * 
+ * + * + * .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. Timestamp when this FeatureOnlineStore was last updated.
+     * 
+ * + * + * .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_; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set,
+     * a blind "overwrite" update happens.
+     * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set,
+     * a blind "overwrite" update happens.
+     * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set,
+     * a blind "overwrite" update happens.
+     * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set,
+     * a blind "overwrite" update happens.
+     * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set,
+     * a blind "overwrite" update happens.
+     * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000010; + 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 with user-defined metadata to organize your
+     * FeatureOnlineStore.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * 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 with user-defined metadata to organize your
+     * FeatureOnlineStore.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your
+     * FeatureOnlineStore.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * 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 with user-defined metadata to organize your
+     * FeatureOnlineStore.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * 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 with user-defined metadata to organize your
+     * FeatureOnlineStore.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * 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 with user-defined metadata to organize your
+     * FeatureOnlineStore.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * 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 with user-defined metadata to organize your
+     * FeatureOnlineStore.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * 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 int state_ = 0; + /** + * + * + *
+     * Output only. State of the featureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.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. State of the featureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.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. State of the featureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.State getState() { + com.google.cloud.aiplatform.v1.FeatureOnlineStore.State result = + com.google.cloud.aiplatform.v1.FeatureOnlineStore.State.forNumber(state_); + return result == null + ? com.google.cloud.aiplatform.v1.FeatureOnlineStore.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. State of the featureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.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.aiplatform.v1.FeatureOnlineStore.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. State of the featureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.FeatureOnlineStore) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.FeatureOnlineStore) + private static final com.google.cloud.aiplatform.v1.FeatureOnlineStore DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.FeatureOnlineStore(); + } + + public static com.google.cloud.aiplatform.v1.FeatureOnlineStore getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FeatureOnlineStore parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceProto.java new file mode 100644 index 000000000000..6b6f8cfd4eca --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreAdminServiceProto.java @@ -0,0 +1,508 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public final class FeatureOnlineStoreAdminServiceProto { + private FeatureOnlineStoreAdminServiceProto() {} + + 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_aiplatform_v1_CreateFeatureOnlineStoreRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreateFeatureOnlineStoreRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetFeatureOnlineStoreRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetFeatureOnlineStoreRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListFeatureOnlineStoresRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListFeatureOnlineStoresRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListFeatureOnlineStoresResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListFeatureOnlineStoresResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_UpdateFeatureOnlineStoreRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UpdateFeatureOnlineStoreRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DeleteFeatureOnlineStoreRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DeleteFeatureOnlineStoreRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CreateFeatureViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreateFeatureViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetFeatureViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetFeatureViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListFeatureViewsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListFeatureViewsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListFeatureViewsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListFeatureViewsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_UpdateFeatureViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UpdateFeatureViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DeleteFeatureViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DeleteFeatureViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CreateFeatureOnlineStoreOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreateFeatureOnlineStoreOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_UpdateFeatureOnlineStoreOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UpdateFeatureOnlineStoreOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CreateFeatureViewOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreateFeatureViewOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_UpdateFeatureViewOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UpdateFeatureViewOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_SyncFeatureViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_SyncFeatureViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_SyncFeatureViewResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_SyncFeatureViewResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetFeatureViewSyncRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetFeatureViewSyncRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListFeatureViewSyncsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListFeatureViewSyncsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListFeatureViewSyncsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListFeatureViewSyncsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nCgoogle/cloud/aiplatform/v1/feature_onl" + + "ine_store_admin_service.proto\022\032google.cl" + + "oud.aiplatform.v1\032\034google/api/annotation" + + "s.proto\032\027google/api/client.proto\032\037google" + + "/api/field_behavior.proto\032\031google/api/re" + + "source.proto\0325google/cloud/aiplatform/v1" + + "/feature_online_store.proto\032-google/clou" + + "d/aiplatform/v1/feature_view.proto\0322goog" + + "le/cloud/aiplatform/v1/feature_view_sync" + + ".proto\032*google/cloud/aiplatform/v1/opera" + + "tion.proto\032#google/longrunning/operation" + + "s.proto\032\033google/protobuf/empty.proto\032 go" + + "ogle/protobuf/field_mask.proto\"\343\001\n\037Creat" + + "eFeatureOnlineStoreRequest\022E\n\006parent\030\001 \001" + + "(\tB5\342A\001\002\372A.\022,aiplatform.googleapis.com/F" + + "eatureOnlineStore\022R\n\024feature_online_stor" + + "e\030\002 \001(\0132..google.cloud.aiplatform.v1.Fea" + + "tureOnlineStoreB\004\342A\001\002\022%\n\027feature_online_" + + "store_id\030\003 \001(\tB\004\342A\001\002\"c\n\034GetFeatureOnline" + + "StoreRequest\022C\n\004name\030\001 \001(\tB5\342A\001\002\372A.\n,aip" + + "latform.googleapis.com/FeatureOnlineStor" + + "e\"\260\001\n\036ListFeatureOnlineStoresRequest\022E\n\006" + + "parent\030\001 \001(\tB5\342A\001\002\372A.\022,aiplatform.google" + + "apis.com/FeatureOnlineStore\022\016\n\006filter\030\002 " + + "\001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001" + + "(\t\022\020\n\010order_by\030\005 \001(\t\"\211\001\n\037ListFeatureOnli" + + "neStoresResponse\022M\n\025feature_online_store" + + "s\030\001 \003(\0132..google.cloud.aiplatform.v1.Fea" + + "tureOnlineStore\022\027\n\017next_page_token\030\002 \001(\t" + + "\"\246\001\n\037UpdateFeatureOnlineStoreRequest\022R\n\024" + + "feature_online_store\030\001 \001(\0132..google.clou" + + "d.aiplatform.v1.FeatureOnlineStoreB\004\342A\001\002" + + "\022/\n\013update_mask\030\002 \001(\0132\032.google.protobuf." + + "FieldMask\"u\n\037DeleteFeatureOnlineStoreReq" + + "uest\022C\n\004name\030\001 \001(\tB5\342A\001\002\372A.\n,aiplatform." + + "googleapis.com/FeatureOnlineStore\022\r\n\005for" + + "ce\030\002 \001(\010\"\351\001\n\030CreateFeatureViewRequest\022E\n" + + "\006parent\030\001 \001(\tB5\342A\001\002\372A.\n,aiplatform.googl" + + "eapis.com/FeatureOnlineStore\022C\n\014feature_" + + "view\030\002 \001(\0132\'.google.cloud.aiplatform.v1." + + "FeatureViewB\004\342A\001\002\022\035\n\017feature_view_id\030\003 \001" + + "(\tB\004\342A\001\002\022\"\n\024run_sync_immediately\030\004 \001(\010B\004" + + "\342A\001\005\"U\n\025GetFeatureViewRequest\022<\n\004name\030\001 " + + "\001(\tB.\342A\001\002\372A\'\n%aiplatform.googleapis.com/" + + "FeatureView\"\242\001\n\027ListFeatureViewsRequest\022" + + ">\n\006parent\030\001 \001(\tB.\342A\001\002\372A\'\022%aiplatform.goo" + + "gleapis.com/FeatureView\022\016\n\006filter\030\002 \001(\t\022" + + "\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022\020" + + "\n\010order_by\030\005 \001(\t\"s\n\030ListFeatureViewsResp" + + "onse\022>\n\rfeature_views\030\001 \003(\0132\'.google.clo" + + "ud.aiplatform.v1.FeatureView\022\027\n\017next_pag" + + "e_token\030\002 \001(\t\"\220\001\n\030UpdateFeatureViewReque" + + "st\022C\n\014feature_view\030\001 \001(\0132\'.google.cloud." + + "aiplatform.v1.FeatureViewB\004\342A\001\002\022/\n\013updat" + + "e_mask\030\002 \001(\0132\032.google.protobuf.FieldMask" + + "\"X\n\030DeleteFeatureViewRequest\022<\n\004name\030\001 \001" + + "(\tB.\342A\001\002\372A\'\n%aiplatform.googleapis.com/F" + + "eatureView\"{\n)CreateFeatureOnlineStoreOp" + + "erationMetadata\022N\n\020generic_metadata\030\001 \001(" + + "\01324.google.cloud.aiplatform.v1.GenericOp" + + "erationMetadata\"{\n)UpdateFeatureOnlineSt" + + "oreOperationMetadata\022N\n\020generic_metadata" + + "\030\001 \001(\01324.google.cloud.aiplatform.v1.Gene" + + "ricOperationMetadata\"t\n\"CreateFeatureVie" + + "wOperationMetadata\022N\n\020generic_metadata\030\001" + + " \001(\01324.google.cloud.aiplatform.v1.Generi" + + "cOperationMetadata\"t\n\"UpdateFeatureViewO" + + "perationMetadata\022N\n\020generic_metadata\030\001 \001" + + "(\01324.google.cloud.aiplatform.v1.GenericO" + + "perationMetadata\"^\n\026SyncFeatureViewReque" + + "st\022D\n\014feature_view\030\001 \001(\tB.\342A\001\002\372A\'\n%aipla" + + "tform.googleapis.com/FeatureView\"4\n\027Sync" + + "FeatureViewResponse\022\031\n\021feature_view_sync" + + "\030\001 \001(\t\"]\n\031GetFeatureViewSyncRequest\022@\n\004n" + + "ame\030\001 \001(\tB2\342A\001\002\372A+\n)aiplatform.googleapi" + + "s.com/FeatureViewSync\"\246\001\n\033ListFeatureVie" + + "wSyncsRequest\022>\n\006parent\030\001 \001(\tB.\342A\001\002\372A\'\n%" + + "aiplatform.googleapis.com/FeatureView\022\016\n" + + "\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage" + + "_token\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"\200\001\n\034ListF" + + "eatureViewSyncsResponse\022G\n\022feature_view_" + + "syncs\030\001 \003(\0132+.google.cloud.aiplatform.v1" + + ".FeatureViewSync\022\027\n\017next_page_token\030\002 \001(" + + "\t2\320\032\n\036FeatureOnlineStoreAdminService\022\306\002\n" + + "\030CreateFeatureOnlineStore\022;.google.cloud" + + ".aiplatform.v1.CreateFeatureOnlineStoreR" + + "equest\032\035.google.longrunning.Operation\"\315\001" + + "\312A?\n\022FeatureOnlineStore\022)CreateFeatureOn" + + "lineStoreOperationMetadata\332A3parent,feat" + + "ure_online_store,feature_online_store_id" + + "\202\323\344\223\002O\"7/v1/{parent=projects/*/locations" + + "/*}/featureOnlineStores:\024feature_online_" + + "store\022\311\001\n\025GetFeatureOnlineStore\0228.google" + + ".cloud.aiplatform.v1.GetFeatureOnlineSto" + + "reRequest\032..google.cloud.aiplatform.v1.F" + + "eatureOnlineStore\"F\332A\004name\202\323\344\223\0029\0227/v1/{n" + + "ame=projects/*/locations/*/featureOnline" + + "Stores/*}\022\334\001\n\027ListFeatureOnlineStores\022:." + + "google.cloud.aiplatform.v1.ListFeatureOn" + + "lineStoresRequest\032;.google.cloud.aiplatf" + + "orm.v1.ListFeatureOnlineStoresResponse\"H" + + "\332A\006parent\202\323\344\223\0029\0227/v1/{parent=projects/*/" + + "locations/*}/featureOnlineStores\022\310\002\n\030Upd" + + "ateFeatureOnlineStore\022;.google.cloud.aip" + + "latform.v1.UpdateFeatureOnlineStoreReque" + + "st\032\035.google.longrunning.Operation\"\317\001\312A?\n" + + "\022FeatureOnlineStore\022)UpdateFeatureOnline" + + "StoreOperationMetadata\332A feature_online_" + + "store,update_mask\202\323\344\223\002d2L/v1/{feature_on" + + "line_store.name=projects/*/locations/*/f" + + "eatureOnlineStores/*}:\024feature_online_st" + + "ore\022\367\001\n\030DeleteFeatureOnlineStore\022;.googl" + + "e.cloud.aiplatform.v1.DeleteFeatureOnlin" + + "eStoreRequest\032\035.google.longrunning.Opera" + + "tion\"\177\312A0\n\025google.protobuf.Empty\022\027Delete" + + "OperationMetadata\332A\nname,force\202\323\344\223\0029*7/v" + + "1/{name=projects/*/locations/*/featureOn" + + "lineStores/*}\022\241\002\n\021CreateFeatureView\0224.go" + + "ogle.cloud.aiplatform.v1.CreateFeatureVi" + + "ewRequest\032\035.google.longrunning.Operation" + + "\"\266\001\312A1\n\013FeatureView\022\"CreateFeatureViewOp" + + "erationMetadata\332A#parent,feature_view,fe" + + "ature_view_id\202\323\344\223\002V\"F/v1/{parent=project" + + "s/*/locations/*/featureOnlineStores/*}/f" + + "eatureViews:\014feature_view\022\303\001\n\016GetFeature" + + "View\0221.google.cloud.aiplatform.v1.GetFea" + + "tureViewRequest\032\'.google.cloud.aiplatfor" + + "m.v1.FeatureView\"U\332A\004name\202\323\344\223\002H\022F/v1/{na" + + "me=projects/*/locations/*/featureOnlineS" + + "tores/*/featureViews/*}\022\326\001\n\020ListFeatureV" + + "iews\0223.google.cloud.aiplatform.v1.ListFe" + + "atureViewsRequest\0324.google.cloud.aiplatf" + + "orm.v1.ListFeatureViewsResponse\"W\332A\006pare" + + "nt\202\323\344\223\002H\022F/v1/{parent=projects/*/locatio" + + "ns/*/featureOnlineStores/*}/featureViews" + + "\022\243\002\n\021UpdateFeatureView\0224.google.cloud.ai" + + "platform.v1.UpdateFeatureViewRequest\032\035.g" + + "oogle.longrunning.Operation\"\270\001\312A1\n\013Featu" + + "reView\022\"UpdateFeatureViewOperationMetada" + + "ta\332A\030feature_view,update_mask\202\323\344\223\002c2S/v1" + + "/{feature_view.name=projects/*/locations" + + "/*/featureOnlineStores/*/featureViews/*}" + + ":\014feature_view\022\363\001\n\021DeleteFeatureView\0224.g" + + "oogle.cloud.aiplatform.v1.DeleteFeatureV" + + "iewRequest\032\035.google.longrunning.Operatio" + + "n\"\210\001\312A0\n\025google.protobuf.Empty\022\027DeleteOp" + + "erationMetadata\332A\004name\202\323\344\223\002H*F/v1/{name=" + + "projects/*/locations/*/featureOnlineStor" + + "es/*/featureViews/*}\022\351\001\n\017SyncFeatureView" + + "\0222.google.cloud.aiplatform.v1.SyncFeatur" + + "eViewRequest\0323.google.cloud.aiplatform.v" + + "1.SyncFeatureViewResponse\"m\332A\014feature_vi" + + "ew\202\323\344\223\002X\"S/v1/{feature_view=projects/*/l" + + "ocations/*/featureOnlineStores/*/feature" + + "Views/*}:sync:\001*\022\342\001\n\022GetFeatureViewSync\022" + + "5.google.cloud.aiplatform.v1.GetFeatureV" + + "iewSyncRequest\032+.google.cloud.aiplatform" + + ".v1.FeatureViewSync\"h\332A\004name\202\323\344\223\002[\022Y/v1/" + + "{name=projects/*/locations/*/featureOnli" + + "neStores/*/featureViews/*/featureViewSyn" + + "cs/*}\022\365\001\n\024ListFeatureViewSyncs\0227.google." + + "cloud.aiplatform.v1.ListFeatureViewSyncs" + + "Request\0328.google.cloud.aiplatform.v1.Lis" + + "tFeatureViewSyncsResponse\"j\332A\006parent\202\323\344\223" + + "\002[\022Y/v1/{parent=projects/*/locations/*/f" + + "eatureOnlineStores/*/featureViews/*}/fea" + + "tureViewSyncs\032M\312A\031aiplatform.googleapis." + + "com\322A.https://www.googleapis.com/auth/cl" + + "oud-platformB\341\001\n\036com.google.cloud.aiplat" + + "form.v1B#FeatureOnlineStoreAdminServiceP" + + "rotoP\001Z>cloud.google.com/go/aiplatform/a" + + "piv1/aiplatformpb;aiplatformpb\252\002\032Google." + + "Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPla" + + "tform\\V1\352\002\035Google::Cloud::AIPlatform::V1" + + "b\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.aiplatform.v1.FeatureOnlineStoreProto.getDescriptor(), + com.google.cloud.aiplatform.v1.FeatureViewProto.getDescriptor(), + com.google.cloud.aiplatform.v1.FeatureViewSyncProto.getDescriptor(), + com.google.cloud.aiplatform.v1.OperationProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_CreateFeatureOnlineStoreRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_CreateFeatureOnlineStoreRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateFeatureOnlineStoreRequest_descriptor, + new java.lang.String[] { + "Parent", "FeatureOnlineStore", "FeatureOnlineStoreId", + }); + internal_static_google_cloud_aiplatform_v1_GetFeatureOnlineStoreRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_GetFeatureOnlineStoreRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetFeatureOnlineStoreRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ListFeatureOnlineStoresRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_ListFeatureOnlineStoresRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListFeatureOnlineStoresRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "OrderBy", + }); + internal_static_google_cloud_aiplatform_v1_ListFeatureOnlineStoresResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_ListFeatureOnlineStoresResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListFeatureOnlineStoresResponse_descriptor, + new java.lang.String[] { + "FeatureOnlineStores", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1_UpdateFeatureOnlineStoreRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1_UpdateFeatureOnlineStoreRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UpdateFeatureOnlineStoreRequest_descriptor, + new java.lang.String[] { + "FeatureOnlineStore", "UpdateMask", + }); + internal_static_google_cloud_aiplatform_v1_DeleteFeatureOnlineStoreRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_aiplatform_v1_DeleteFeatureOnlineStoreRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeleteFeatureOnlineStoreRequest_descriptor, + new java.lang.String[] { + "Name", "Force", + }); + internal_static_google_cloud_aiplatform_v1_CreateFeatureViewRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_aiplatform_v1_CreateFeatureViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateFeatureViewRequest_descriptor, + new java.lang.String[] { + "Parent", "FeatureView", "FeatureViewId", "RunSyncImmediately", + }); + internal_static_google_cloud_aiplatform_v1_GetFeatureViewRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_aiplatform_v1_GetFeatureViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetFeatureViewRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ListFeatureViewsRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_aiplatform_v1_ListFeatureViewsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListFeatureViewsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "OrderBy", + }); + internal_static_google_cloud_aiplatform_v1_ListFeatureViewsResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_aiplatform_v1_ListFeatureViewsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListFeatureViewsResponse_descriptor, + new java.lang.String[] { + "FeatureViews", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1_UpdateFeatureViewRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_aiplatform_v1_UpdateFeatureViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UpdateFeatureViewRequest_descriptor, + new java.lang.String[] { + "FeatureView", "UpdateMask", + }); + internal_static_google_cloud_aiplatform_v1_DeleteFeatureViewRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_aiplatform_v1_DeleteFeatureViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeleteFeatureViewRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_CreateFeatureOnlineStoreOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_aiplatform_v1_CreateFeatureOnlineStoreOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateFeatureOnlineStoreOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + internal_static_google_cloud_aiplatform_v1_UpdateFeatureOnlineStoreOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_aiplatform_v1_UpdateFeatureOnlineStoreOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UpdateFeatureOnlineStoreOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + internal_static_google_cloud_aiplatform_v1_CreateFeatureViewOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_aiplatform_v1_CreateFeatureViewOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateFeatureViewOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + internal_static_google_cloud_aiplatform_v1_UpdateFeatureViewOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_aiplatform_v1_UpdateFeatureViewOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UpdateFeatureViewOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + internal_static_google_cloud_aiplatform_v1_SyncFeatureViewRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_aiplatform_v1_SyncFeatureViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_SyncFeatureViewRequest_descriptor, + new java.lang.String[] { + "FeatureView", + }); + internal_static_google_cloud_aiplatform_v1_SyncFeatureViewResponse_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_aiplatform_v1_SyncFeatureViewResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_SyncFeatureViewResponse_descriptor, + new java.lang.String[] { + "FeatureViewSync", + }); + internal_static_google_cloud_aiplatform_v1_GetFeatureViewSyncRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_aiplatform_v1_GetFeatureViewSyncRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetFeatureViewSyncRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ListFeatureViewSyncsRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_aiplatform_v1_ListFeatureViewSyncsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListFeatureViewSyncsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "OrderBy", + }); + internal_static_google_cloud_aiplatform_v1_ListFeatureViewSyncsResponse_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_aiplatform_v1_ListFeatureViewSyncsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListFeatureViewSyncsResponse_descriptor, + new java.lang.String[] { + "FeatureViewSyncs", "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.aiplatform.v1.FeatureOnlineStoreProto.getDescriptor(); + com.google.cloud.aiplatform.v1.FeatureViewProto.getDescriptor(); + com.google.cloud.aiplatform.v1.FeatureViewSyncProto.getDescriptor(); + com.google.cloud.aiplatform.v1.OperationProto.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-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreName.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreName.java new file mode 100644 index 000000000000..a3037d6cf3e1 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreName.java @@ -0,0 +1,231 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.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 FeatureOnlineStoreName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_FEATURE_ONLINE_STORE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String featureOnlineStore; + + @Deprecated + protected FeatureOnlineStoreName() { + project = null; + location = null; + featureOnlineStore = null; + } + + private FeatureOnlineStoreName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + featureOnlineStore = Preconditions.checkNotNull(builder.getFeatureOnlineStore()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getFeatureOnlineStore() { + return featureOnlineStore; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static FeatureOnlineStoreName of( + String project, String location, String featureOnlineStore) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setFeatureOnlineStore(featureOnlineStore) + .build(); + } + + public static String format(String project, String location, String featureOnlineStore) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setFeatureOnlineStore(featureOnlineStore) + .build() + .toString(); + } + + public static FeatureOnlineStoreName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_FEATURE_ONLINE_STORE.validatedMatch( + formattedString, "FeatureOnlineStoreName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), matchMap.get("location"), matchMap.get("feature_online_store")); + } + + 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 (FeatureOnlineStoreName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_FEATURE_ONLINE_STORE.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 (featureOnlineStore != null) { + fieldMapBuilder.put("feature_online_store", featureOnlineStore); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_FEATURE_ONLINE_STORE.instantiate( + "project", project, "location", location, "feature_online_store", featureOnlineStore); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + FeatureOnlineStoreName that = ((FeatureOnlineStoreName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.featureOnlineStore, that.featureOnlineStore); + } + 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(featureOnlineStore); + return h; + } + + /** + * Builder for projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}. + */ + public static class Builder { + private String project; + private String location; + private String featureOnlineStore; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getFeatureOnlineStore() { + return featureOnlineStore; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setFeatureOnlineStore(String featureOnlineStore) { + this.featureOnlineStore = featureOnlineStore; + return this; + } + + private Builder(FeatureOnlineStoreName featureOnlineStoreName) { + this.project = featureOnlineStoreName.project; + this.location = featureOnlineStoreName.location; + this.featureOnlineStore = featureOnlineStoreName.featureOnlineStore; + } + + public FeatureOnlineStoreName build() { + return new FeatureOnlineStoreName(this); + } + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreOrBuilder.java new file mode 100644 index 000000000000..5b635b020d0f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreOrBuilder.java @@ -0,0 +1,335 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store.proto + +package com.google.cloud.aiplatform.v1; + +public interface FeatureOnlineStoreOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.FeatureOnlineStore) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Contains settings for the Cloud Bigtable instance that will be created
+   * to serve featureValues for all FeatureViews under this
+   * FeatureOnlineStore.
+   * 
+ * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable bigtable = 8; + * + * @return Whether the bigtable field is set. + */ + boolean hasBigtable(); + /** + * + * + *
+   * Contains settings for the Cloud Bigtable instance that will be created
+   * to serve featureValues for all FeatureViews under this
+   * FeatureOnlineStore.
+   * 
+ * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable bigtable = 8; + * + * @return The bigtable. + */ + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable getBigtable(); + /** + * + * + *
+   * Contains settings for the Cloud Bigtable instance that will be created
+   * to serve featureValues for all FeatureViews under this
+   * FeatureOnlineStore.
+   * 
+ * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable bigtable = 8; + */ + com.google.cloud.aiplatform.v1.FeatureOnlineStore.BigtableOrBuilder getBigtableOrBuilder(); + + /** + * + * + *
+   * Output only. Name of the FeatureOnlineStore. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Name of the FeatureOnlineStore. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Timestamp when this FeatureOnlineStore was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this FeatureOnlineStore was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this FeatureOnlineStore was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this FeatureOnlineStore was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this FeatureOnlineStore was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this FeatureOnlineStore was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set,
+   * a blind "overwrite" update happens.
+   * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set,
+   * a blind "overwrite" update happens.
+   * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your
+   * FeatureOnlineStore.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your
+   * FeatureOnlineStore.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * 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 with user-defined metadata to organize your
+   * FeatureOnlineStore.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your
+   * FeatureOnlineStore.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * 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 with user-defined metadata to organize your
+   * FeatureOnlineStore.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. State of the featureOnlineStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. State of the featureOnlineStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.aiplatform.v1.FeatureOnlineStore.State getState(); + + com.google.cloud.aiplatform.v1.FeatureOnlineStore.StorageTypeCase getStorageTypeCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreProto.java new file mode 100644 index 000000000000..e5f583a996ab --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreProto.java @@ -0,0 +1,154 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store.proto + +package com.google.cloud.aiplatform.v1; + +public final class FeatureOnlineStoreProto { + private FeatureOnlineStoreProto() {} + + 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_aiplatform_v1_FeatureOnlineStore_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_AutoScaling_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_AutoScaling_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_LabelsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n5google/cloud/aiplatform/v1/feature_onl" + + "ine_store.proto\022\032google.cloud.aiplatform" + + ".v1\032\037google/api/field_behavior.proto\032\031go" + + "ogle/api/resource.proto\032\037google/protobuf" + + "/timestamp.proto\"\365\006\n\022FeatureOnlineStore\022" + + "K\n\010bigtable\030\010 \001(\01327.google.cloud.aiplatf" + + "orm.v1.FeatureOnlineStore.BigtableH\000\022\022\n\004" + + "name\030\001 \001(\tB\004\342A\001\003\0225\n\013create_time\030\003 \001(\0132\032." + + "google.protobuf.TimestampB\004\342A\001\003\0225\n\013updat" + + "e_time\030\004 \001(\0132\032.google.protobuf.Timestamp" + + "B\004\342A\001\003\022\022\n\004etag\030\005 \001(\tB\004\342A\001\001\022P\n\006labels\030\006 \003" + + "(\0132:.google.cloud.aiplatform.v1.FeatureO" + + "nlineStore.LabelsEntryB\004\342A\001\001\022I\n\005state\030\007 " + + "\001(\01624.google.cloud.aiplatform.v1.Feature" + + "OnlineStore.StateB\004\342A\001\003\032\334\001\n\010Bigtable\022_\n\014" + + "auto_scaling\030\001 \001(\0132C.google.cloud.aiplat" + + "form.v1.FeatureOnlineStore.Bigtable.Auto" + + "ScalingB\004\342A\001\002\032o\n\013AutoScaling\022\034\n\016min_node" + + "_count\030\001 \001(\005B\004\342A\001\002\022\034\n\016max_node_count\030\002 \001" + + "(\005B\004\342A\001\002\022$\n\026cpu_utilization_target\030\003 \001(\005" + + "B\004\342A\001\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" + + "lue\030\002 \001(\t:\0028\001\"8\n\005State\022\025\n\021STATE_UNSPECIF" + + "IED\020\000\022\n\n\006STABLE\020\001\022\014\n\010UPDATING\020\002:\206\001\352A\202\001\n," + + "aiplatform.googleapis.com/FeatureOnlineS" + + "tore\022Rprojects/{project}/locations/{loca" + + "tion}/featureOnlineStores/{feature_onlin" + + "e_store}B\016\n\014storage_typeB\325\001\n\036com.google." + + "cloud.aiplatform.v1B\027FeatureOnlineStoreP" + + "rotoP\001Z>cloud.google.com/go/aiplatform/a" + + "piv1/aiplatformpb;aiplatformpb\252\002\032Google." + + "Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPla" + + "tform\\V1\352\002\035Google::Cloud::AIPlatform::V1" + + "b\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_aiplatform_v1_FeatureOnlineStore_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_descriptor, + new java.lang.String[] { + "Bigtable", + "Name", + "CreateTime", + "UpdateTime", + "Etag", + "Labels", + "State", + "StorageType", + }); + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_descriptor = + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_descriptor, + new java.lang.String[] { + "AutoScaling", + }); + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_AutoScaling_descriptor = + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_AutoScaling_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_Bigtable_AutoScaling_descriptor, + new java.lang.String[] { + "MinNodeCount", "MaxNodeCount", "CpuUtilizationTarget", + }); + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FeatureOnlineStore_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + 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-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceProto.java new file mode 100644 index 000000000000..0e85e6c5328e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOnlineStoreServiceProto.java @@ -0,0 +1,178 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_service.proto + +package com.google.cloud.aiplatform.v1; + +public final class FeatureOnlineStoreServiceProto { + private FeatureOnlineStoreServiceProto() {} + + 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_aiplatform_v1_FeatureViewDataKey_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FeatureViewDataKey_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair_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/aiplatform/v1/feature_onl" + + "ine_store_service.proto\022\032google.cloud.ai" + + "platform.v1\032\034google/api/annotations.prot" + + "o\032\027google/api/client.proto\032\037google/api/f" + + "ield_behavior.proto\032\031google/api/resource" + + ".proto\032cloud" + + ".google.com/go/aiplatform/apiv1/aiplatfo" + + "rmpb;aiplatformpb\252\002\032Google.Cloud.AIPlatf" + + "orm.V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Go" + + "ogle::Cloud::AIPlatform::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.aiplatform.v1.FeaturestoreOnlineServiceProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_FeatureViewDataKey_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_FeatureViewDataKey_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FeatureViewDataKey_descriptor, + new java.lang.String[] { + "Key", "KeyOneof", + }); + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesRequest_descriptor, + new java.lang.String[] { + "FeatureView", "DataKey", "DataFormat", + }); + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_descriptor, + new java.lang.String[] { + "KeyValues", "ProtoStruct", "Format", + }); + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_descriptor = + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_descriptor, + new java.lang.String[] { + "Features", + }); + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair_descriptor = + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair_descriptor, + new java.lang.String[] { + "Value", "Name", "Data", + }); + 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); + 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.aiplatform.v1.FeaturestoreOnlineServiceProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOrBuilder.java index a988f8e154f6..167c142111e1 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureOrBuilder.java @@ -30,6 +30,7 @@ public interface FeatureOrBuilder * Immutable. Name of the Feature. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * The last part feature is assigned by the client. The feature can be up to * 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, @@ -49,6 +50,7 @@ public interface FeatureOrBuilder * Immutable. Name of the Feature. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * The last part feature is assigned by the client. The feature can be up to * 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, @@ -91,11 +93,12 @@ public interface FeatureOrBuilder * * *
-   * Required. Immutable. Type of Feature value.
+   * Immutable. Only applicable for Vertex AI Feature Store (Legacy).
+   * Type of Feature value.
    * 
* * - * .google.cloud.aiplatform.v1.Feature.ValueType value_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * .google.cloud.aiplatform.v1.Feature.ValueType value_type = 3 [(.google.api.field_behavior) = IMMUTABLE]; * * * @return The enum numeric value on the wire for valueType. @@ -105,11 +108,12 @@ public interface FeatureOrBuilder * * *
-   * Required. Immutable. Type of Feature value.
+   * Immutable. Only applicable for Vertex AI Feature Store (Legacy).
+   * Type of Feature value.
    * 
* * - * .google.cloud.aiplatform.v1.Feature.ValueType value_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * .google.cloud.aiplatform.v1.Feature.ValueType value_type = 3 [(.google.api.field_behavior) = IMMUTABLE]; * * * @return The valueType. @@ -120,7 +124,8 @@ public interface FeatureOrBuilder * * *
-   * Output only. Timestamp when this EntityType was created.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was created.
    * 
* * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -133,7 +138,8 @@ public interface FeatureOrBuilder * * *
-   * Output only. Timestamp when this EntityType was created.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was created.
    * 
* * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -146,7 +152,8 @@ public interface FeatureOrBuilder * * *
-   * Output only. Timestamp when this EntityType was created.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was created.
    * 
* * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -158,7 +165,8 @@ public interface FeatureOrBuilder * * *
-   * Output only. Timestamp when this EntityType was most recently updated.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was most recently updated.
    * 
* * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -171,7 +179,8 @@ public interface FeatureOrBuilder * * *
-   * Output only. Timestamp when this EntityType was most recently updated.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was most recently updated.
    * 
* * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -184,7 +193,8 @@ public interface FeatureOrBuilder * * *
-   * Output only. Timestamp when this EntityType was most recently updated.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was most recently updated.
    * 
* * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -331,8 +341,10 @@ java.lang.String getLabelsOrDefault( * * *
-   * Optional. If not set, use the monitoring_config defined for the EntityType
-   * this Feature belongs to. Only Features with type
+   * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+   * If not set, use the monitoring_config defined for the EntityType this
+   * Feature belongs to.
+   * Only Features with type
    * ([Feature.ValueType][google.cloud.aiplatform.v1.Feature.ValueType]) BOOL,
    * STRING, DOUBLE or INT64 can enable monitoring.
    *
@@ -350,8 +362,8 @@ java.lang.String getLabelsOrDefault(
    *
    *
    * 
-   * Output only. The list of historical stats and anomalies with specified
-   * objectives.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * The list of historical stats and anomalies with specified objectives.
    * 
* * @@ -364,8 +376,8 @@ java.lang.String getLabelsOrDefault( * * *
-   * Output only. The list of historical stats and anomalies with specified
-   * objectives.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * The list of historical stats and anomalies with specified objectives.
    * 
* * @@ -378,8 +390,8 @@ com.google.cloud.aiplatform.v1.Feature.MonitoringStatsAnomaly getMonitoringStats * * *
-   * Output only. The list of historical stats and anomalies with specified
-   * objectives.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * The list of historical stats and anomalies with specified objectives.
    * 
* * @@ -391,8 +403,8 @@ com.google.cloud.aiplatform.v1.Feature.MonitoringStatsAnomaly getMonitoringStats * * *
-   * Output only. The list of historical stats and anomalies with specified
-   * objectives.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * The list of historical stats and anomalies with specified objectives.
    * 
* * @@ -405,8 +417,8 @@ com.google.cloud.aiplatform.v1.Feature.MonitoringStatsAnomaly getMonitoringStats * * *
-   * Output only. The list of historical stats and anomalies with specified
-   * objectives.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * The list of historical stats and anomalies with specified objectives.
    * 
* * @@ -415,4 +427,33 @@ com.google.cloud.aiplatform.v1.Feature.MonitoringStatsAnomaly getMonitoringStats */ com.google.cloud.aiplatform.v1.Feature.MonitoringStatsAnomalyOrBuilder getMonitoringStatsAnomaliesOrBuilder(int index); + + /** + * + * + *
+   * Only applicable for Vertex AI Feature Store.
+   * The name of the BigQuery Table/View columnn hosting data for this version.
+   * If no value is provided, will use feature_id.
+   * 
+ * + * string version_column_name = 106; + * + * @return The versionColumnName. + */ + java.lang.String getVersionColumnName(); + /** + * + * + *
+   * Only applicable for Vertex AI Feature Store.
+   * The name of the BigQuery Table/View columnn hosting data for this version.
+   * If no value is provided, will use feature_id.
+   * 
+ * + * string version_column_name = 106; + * + * @return The bytes for versionColumnName. + */ + com.google.protobuf.ByteString getVersionColumnNameBytes(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureProto.java index bfb1b0f72d9b..364c4e2a0812 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureProto.java @@ -53,41 +53,44 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "pi/field_behavior.proto\032\031google/api/reso" + "urce.proto\0329google/cloud/aiplatform/v1/f" + "eature_monitoring_stats.proto\032\037google/pr" - + "otobuf/timestamp.proto\"\346\010\n\007Feature\022\022\n\004na" - + "me\030\001 \001(\tB\004\342A\001\005\022\023\n\013description\030\002 \001(\t\022H\n\nv" + + "otobuf/timestamp.proto\"\357\t\n\007Feature\022\022\n\004na" + + "me\030\001 \001(\tB\004\342A\001\005\022\023\n\013description\030\002 \001(\t\022G\n\nv" + "alue_type\030\003 \001(\0162-.google.cloud.aiplatfor" - + "m.v1.Feature.ValueTypeB\005\342A\002\002\005\0225\n\013create_" - + "time\030\004 \001(\0132\032.google.protobuf.TimestampB\004" - + "\342A\001\003\0225\n\013update_time\030\005 \001(\0132\032.google.proto" - + "buf.TimestampB\004\342A\001\003\022E\n\006labels\030\006 \003(\0132/.go" - + "ogle.cloud.aiplatform.v1.Feature.LabelsE" - + "ntryB\004\342A\001\001\022\014\n\004etag\030\007 \001(\t\022 \n\022disable_moni" - + "toring\030\014 \001(\010B\004\342A\001\001\022d\n\032monitoring_stats_a" - + "nomalies\030\013 \003(\0132:.google.cloud.aiplatform" - + ".v1.Feature.MonitoringStatsAnomalyB\004\342A\001\003" - + "\032\251\002\n\026MonitoringStatsAnomaly\022]\n\tobjective" - + "\030\001 \001(\0162D.google.cloud.aiplatform.v1.Feat" - + "ure.MonitoringStatsAnomaly.ObjectiveB\004\342A" - + "\001\003\022T\n\025feature_stats_anomaly\030\002 \001(\0132/.goog" - + "le.cloud.aiplatform.v1.FeatureStatsAnoma" - + "lyB\004\342A\001\003\"Z\n\tObjective\022\031\n\025OBJECTIVE_UNSPE" - + "CIFIED\020\000\022\033\n\027IMPORT_FEATURE_ANALYSIS\020\001\022\025\n" - + "\021SNAPSHOT_ANALYSIS\020\002\032-\n\013LabelsEntry\022\013\n\003k" - + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\244\001\n\tValueTyp" - + "e\022\032\n\026VALUE_TYPE_UNSPECIFIED\020\000\022\010\n\004BOOL\020\001\022" - + "\016\n\nBOOL_ARRAY\020\002\022\n\n\006DOUBLE\020\003\022\020\n\014DOUBLE_AR" - + "RAY\020\004\022\t\n\005INT64\020\t\022\017\n\013INT64_ARRAY\020\n\022\n\n\006STR" - + "ING\020\013\022\020\n\014STRING_ARRAY\020\014\022\t\n\005BYTES\020\r:\232\001\352A\226" - + "\001\n!aiplatform.googleapis.com/Feature\022qpr" - + "ojects/{project}/locations/{location}/fe" - + "aturestores/{featurestore}/entityTypes/{" - + "entity_type}/features/{feature}B\312\001\n\036com." - + "google.cloud.aiplatform.v1B\014FeatureProto" - + "P\001Z>cloud.google.com/go/aiplatform/apiv1" - + "/aiplatformpb;aiplatformpb\252\002\032Google.Clou" - + "d.AIPlatform.V1\312\002\032Google\\Cloud\\AIPlatfor" - + "m\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006pr" - + "oto3" + + "m.v1.Feature.ValueTypeB\004\342A\001\005\0225\n\013create_t" + + "ime\030\004 \001(\0132\032.google.protobuf.TimestampB\004\342" + + "A\001\003\0225\n\013update_time\030\005 \001(\0132\032.google.protob" + + "uf.TimestampB\004\342A\001\003\022E\n\006labels\030\006 \003(\0132/.goo" + + "gle.cloud.aiplatform.v1.Feature.LabelsEn" + + "tryB\004\342A\001\001\022\014\n\004etag\030\007 \001(\t\022 \n\022disable_monit" + + "oring\030\014 \001(\010B\004\342A\001\001\022d\n\032monitoring_stats_an" + + "omalies\030\013 \003(\0132:.google.cloud.aiplatform." + + "v1.Feature.MonitoringStatsAnomalyB\004\342A\001\003\022" + + "\033\n\023version_column_name\030j \001(\t\032\251\002\n\026Monitor" + + "ingStatsAnomaly\022]\n\tobjective\030\001 \001(\0162D.goo" + + "gle.cloud.aiplatform.v1.Feature.Monitori" + + "ngStatsAnomaly.ObjectiveB\004\342A\001\003\022T\n\025featur" + + "e_stats_anomaly\030\002 \001(\0132/.google.cloud.aip" + + "latform.v1.FeatureStatsAnomalyB\004\342A\001\003\"Z\n\t" + + "Objective\022\031\n\025OBJECTIVE_UNSPECIFIED\020\000\022\033\n\027" + + "IMPORT_FEATURE_ANALYSIS\020\001\022\025\n\021SNAPSHOT_AN" + + "ALYSIS\020\002\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + + "value\030\002 \001(\t:\0028\001\"\244\001\n\tValueType\022\032\n\026VALUE_T" + + "YPE_UNSPECIFIED\020\000\022\010\n\004BOOL\020\001\022\016\n\nBOOL_ARRA" + + "Y\020\002\022\n\n\006DOUBLE\020\003\022\020\n\014DOUBLE_ARRAY\020\004\022\t\n\005INT" + + "64\020\t\022\017\n\013INT64_ARRAY\020\n\022\n\n\006STRING\020\013\022\020\n\014STR" + + "ING_ARRAY\020\014\022\t\n\005BYTES\020\r:\207\002\352A\203\002\n!aiplatfor" + + "m.googleapis.com/Feature\022qprojects/{proj" + + "ect}/locations/{location}/featurestores/" + + "{featurestore}/entityTypes/{entity_type}" + + "/features/{feature}\022Xprojects/{project}/" + + "locations/{location}/featureGroups/{feat" + + "ure_group}/features/{feature}*\010features2" + + "\007featureB\312\001\n\036com.google.cloud.aiplatform" + + ".v1B\014FeatureProtoP\001Z>cloud.google.com/go" + + "/aiplatform/apiv1/aiplatformpb;aiplatfor" + + "mpb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Googl" + + "e\\Cloud\\AIPlatform\\V1\352\002\035Google::Cloud::A" + + "IPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -113,6 +116,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Etag", "DisableMonitoring", "MonitoringStatsAnomalies", + "VersionColumnName", }); internal_static_google_cloud_aiplatform_v1_Feature_MonitoringStatsAnomaly_descriptor = internal_static_google_cloud_aiplatform_v1_Feature_descriptor.getNestedTypes().get(0); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureRegistryServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureRegistryServiceProto.java new file mode 100644 index 000000000000..41ea460941a0 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureRegistryServiceProto.java @@ -0,0 +1,312 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +public final class FeatureRegistryServiceProto { + private FeatureRegistryServiceProto() {} + + 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_aiplatform_v1_CreateFeatureGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreateFeatureGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetFeatureGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetFeatureGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListFeatureGroupsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListFeatureGroupsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListFeatureGroupsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListFeatureGroupsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_UpdateFeatureGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UpdateFeatureGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DeleteFeatureGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DeleteFeatureGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CreateFeatureGroupOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreateFeatureGroupOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_UpdateFeatureGroupOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UpdateFeatureGroupOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CreateRegistryFeatureOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreateRegistryFeatureOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_UpdateFeatureOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UpdateFeatureOperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n9google/cloud/aiplatform/v1/feature_reg" + + "istry_service.proto\022\032google.cloud.aiplat" + + "form.v1\032\034google/api/annotations.proto\032\027g" + + "oogle/api/client.proto\032\037google/api/field" + + "_behavior.proto\032\031google/api/resource.pro" + + "to\032(google/cloud/aiplatform/v1/feature.p" + + "roto\032.google/cloud/aiplatform/v1/feature" + + "_group.proto\0325google/cloud/aiplatform/v1" + + "/featurestore_service.proto\032*google/clou" + + "d/aiplatform/v1/operation.proto\032#google/" + + "longrunning/operations.proto\032\033google/pro" + + "tobuf/empty.proto\032 google/protobuf/field" + + "_mask.proto\"\303\001\n\031CreateFeatureGroupReques" + + "t\022?\n\006parent\030\001 \001(\tB/\342A\001\002\372A(\022&aiplatform.g" + + "oogleapis.com/FeatureGroup\022E\n\rfeature_gr" + + "oup\030\002 \001(\0132(.google.cloud.aiplatform.v1.F" + + "eatureGroupB\004\342A\001\002\022\036\n\020feature_group_id\030\003 " + + "\001(\tB\004\342A\001\002\"W\n\026GetFeatureGroupRequest\022=\n\004n" + + "ame\030\001 \001(\tB/\342A\001\002\372A(\n&aiplatform.googleapi" + + "s.com/FeatureGroup\"\244\001\n\030ListFeatureGroups" + + "Request\022?\n\006parent\030\001 \001(\tB/\342A\001\002\372A(\022&aiplat" + + "form.googleapis.com/FeatureGroup\022\016\n\006filt" + + "er\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_toke" + + "n\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"v\n\031ListFeature" + + "GroupsResponse\022@\n\016feature_groups\030\001 \003(\0132(" + + ".google.cloud.aiplatform.v1.FeatureGroup" + + "\022\027\n\017next_page_token\030\002 \001(\t\"\223\001\n\031UpdateFeat" + + "ureGroupRequest\022E\n\rfeature_group\030\001 \001(\0132(" + + ".google.cloud.aiplatform.v1.FeatureGroup" + + "B\004\342A\001\002\022/\n\013update_mask\030\002 \001(\0132\032.google.pro" + + "tobuf.FieldMask\"i\n\031DeleteFeatureGroupReq" + + "uest\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A(\n&aiplatform." + + "googleapis.com/FeatureGroup\022\r\n\005force\030\002 \001" + + "(\010\"u\n#CreateFeatureGroupOperationMetadat" + + "a\022N\n\020generic_metadata\030\001 \001(\01324.google.clo" + + "ud.aiplatform.v1.GenericOperationMetadat" + + "a\"u\n#UpdateFeatureGroupOperationMetadata" + + "\022N\n\020generic_metadata\030\001 \001(\01324.google.clou" + + "d.aiplatform.v1.GenericOperationMetadata" + + "\"x\n&CreateRegistryFeatureOperationMetada" + + "ta\022N\n\020generic_metadata\030\001 \001(\01324.google.cl" + + "oud.aiplatform.v1.GenericOperationMetada" + + "ta\"p\n\036UpdateFeatureOperationMetadata\022N\n\020" + + "generic_metadata\030\001 \001(\01324.google.cloud.ai" + + "platform.v1.GenericOperationMetadata2\306\022\n" + + "\026FeatureRegistryService\022\223\002\n\022CreateFeatur" + + "eGroup\0225.google.cloud.aiplatform.v1.Crea" + + "teFeatureGroupRequest\032\035.google.longrunni" + + "ng.Operation\"\246\001\312A3\n\014FeatureGroup\022#Create" + + "FeatureGroupOperationMetadata\332A%parent,f" + + "eature_group,feature_group_id\202\323\344\223\002B\"1/v1" + + "/{parent=projects/*/locations/*}/feature" + + "Groups:\rfeature_group\022\261\001\n\017GetFeatureGrou" + + "p\0222.google.cloud.aiplatform.v1.GetFeatur" + + "eGroupRequest\032(.google.cloud.aiplatform." + + "v1.FeatureGroup\"@\332A\004name\202\323\344\223\0023\0221/v1/{nam" + + "e=projects/*/locations/*/featureGroups/*" + + "}\022\304\001\n\021ListFeatureGroups\0224.google.cloud.a" + + "iplatform.v1.ListFeatureGroupsRequest\0325." + + "google.cloud.aiplatform.v1.ListFeatureGr" + + "oupsResponse\"B\332A\006parent\202\323\344\223\0023\0221/v1/{pare" + + "nt=projects/*/locations/*}/featureGroups" + + "\022\225\002\n\022UpdateFeatureGroup\0225.google.cloud.a" + + "iplatform.v1.UpdateFeatureGroupRequest\032\035" + + ".google.longrunning.Operation\"\250\001\312A3\n\014Fea" + + "tureGroup\022#UpdateFeatureGroupOperationMe" + + "tadata\332A\031feature_group,update_mask\202\323\344\223\002P" + + "2?/v1/{feature_group.name=projects/*/loc" + + "ations/*/featureGroups/*}:\rfeature_group" + + "\022\345\001\n\022DeleteFeatureGroup\0225.google.cloud.a" + + "iplatform.v1.DeleteFeatureGroupRequest\032\035" + + ".google.longrunning.Operation\"y\312A0\n\025goog" + + "le.protobuf.Empty\022\027DeleteOperationMetada" + + "ta\332A\nname,force\202\323\344\223\0023*1/v1/{name=project" + + "s/*/locations/*/featureGroups/*}\022\370\001\n\rCre" + + "ateFeature\0220.google.cloud.aiplatform.v1." + + "CreateFeatureRequest\032\035.google.longrunnin" + + "g.Operation\"\225\001\312A)\n\007Feature\022\036CreateFeatur" + + "eOperationMetadata\332A\031parent,feature,feat" + + "ure_id\202\323\344\223\002G\"\022\022*cloud.google.com/go/aiplatform/apiv1/ai" + + "platformpb;aiplatformpb\252\002\032Google.Cloud.A" + + "IPlatform.V1\312\002\032Google\\Cloud\\AIPlatform\\V" + + "1\352\002\035Google::Cloud::AIPlatform::V1b\006proto" + + "3" + }; + 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.aiplatform.v1.FeatureProto.getDescriptor(), + com.google.cloud.aiplatform.v1.FeatureGroupProto.getDescriptor(), + com.google.cloud.aiplatform.v1.FeaturestoreServiceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.OperationProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_CreateFeatureGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_CreateFeatureGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateFeatureGroupRequest_descriptor, + new java.lang.String[] { + "Parent", "FeatureGroup", "FeatureGroupId", + }); + internal_static_google_cloud_aiplatform_v1_GetFeatureGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_GetFeatureGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetFeatureGroupRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ListFeatureGroupsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_ListFeatureGroupsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListFeatureGroupsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "OrderBy", + }); + internal_static_google_cloud_aiplatform_v1_ListFeatureGroupsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_ListFeatureGroupsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListFeatureGroupsResponse_descriptor, + new java.lang.String[] { + "FeatureGroups", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1_UpdateFeatureGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1_UpdateFeatureGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UpdateFeatureGroupRequest_descriptor, + new java.lang.String[] { + "FeatureGroup", "UpdateMask", + }); + internal_static_google_cloud_aiplatform_v1_DeleteFeatureGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_aiplatform_v1_DeleteFeatureGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeleteFeatureGroupRequest_descriptor, + new java.lang.String[] { + "Name", "Force", + }); + internal_static_google_cloud_aiplatform_v1_CreateFeatureGroupOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_aiplatform_v1_CreateFeatureGroupOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateFeatureGroupOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + internal_static_google_cloud_aiplatform_v1_UpdateFeatureGroupOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_aiplatform_v1_UpdateFeatureGroupOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UpdateFeatureGroupOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + internal_static_google_cloud_aiplatform_v1_CreateRegistryFeatureOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_aiplatform_v1_CreateRegistryFeatureOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateRegistryFeatureOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + internal_static_google_cloud_aiplatform_v1_UpdateFeatureOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_aiplatform_v1_UpdateFeatureOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UpdateFeatureOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + 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.aiplatform.v1.FeatureProto.getDescriptor(); + com.google.cloud.aiplatform.v1.FeatureGroupProto.getDescriptor(); + com.google.cloud.aiplatform.v1.FeaturestoreServiceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.OperationProto.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-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureView.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureView.java new file mode 100644 index 000000000000..4483f84a7374 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureView.java @@ -0,0 +1,6651 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_view.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * FeatureView is representation of values that the FeatureOnlineStore will
+ * serve based on its syncConfig.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FeatureView} + */ +public final class FeatureView extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.FeatureView) + FeatureViewOrBuilder { + private static final long serialVersionUID = 0L; + // Use FeatureView.newBuilder() to construct. + private FeatureView(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FeatureView() { + name_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FeatureView(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 5: + 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.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureView.class, + com.google.cloud.aiplatform.v1.FeatureView.Builder.class); + } + + public interface BigQuerySourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.FeatureView.BigQuerySource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The BigQuery view URI that will be materialized on each sync
+     * trigger based on FeatureView.SyncConfig.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+     * Required. The BigQuery view URI that will be materialized on each sync
+     * trigger based on FeatureView.SyncConfig.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+     * Required. Columns to construct entity_id / row keys. Start by supporting
+     * 1 only.
+     * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the entityIdColumns. + */ + java.util.List getEntityIdColumnsList(); + /** + * + * + *
+     * Required. Columns to construct entity_id / row keys. Start by supporting
+     * 1 only.
+     * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of entityIdColumns. + */ + int getEntityIdColumnsCount(); + /** + * + * + *
+     * Required. Columns to construct entity_id / row keys. Start by supporting
+     * 1 only.
+     * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The entityIdColumns at the given index. + */ + java.lang.String getEntityIdColumns(int index); + /** + * + * + *
+     * Required. Columns to construct entity_id / row keys. Start by supporting
+     * 1 only.
+     * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the entityIdColumns at the given index. + */ + com.google.protobuf.ByteString getEntityIdColumnsBytes(int index); + } + /** Protobuf type {@code google.cloud.aiplatform.v1.FeatureView.BigQuerySource} */ + public static final class BigQuerySource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.FeatureView.BigQuerySource) + BigQuerySourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQuerySource.newBuilder() to construct. + private BigQuerySource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQuerySource() { + uri_ = ""; + entityIdColumns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigQuerySource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_BigQuerySource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_BigQuerySource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource.class, + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+     * Required. The BigQuery view URI that will be materialized on each sync
+     * trigger based on FeatureView.SyncConfig.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The BigQuery view URI that will be materialized on each sync
+     * trigger based on FeatureView.SyncConfig.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 ENTITY_ID_COLUMNS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList entityIdColumns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Required. Columns to construct entity_id / row keys. Start by supporting
+     * 1 only.
+     * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the entityIdColumns. + */ + public com.google.protobuf.ProtocolStringList getEntityIdColumnsList() { + return entityIdColumns_; + } + /** + * + * + *
+     * Required. Columns to construct entity_id / row keys. Start by supporting
+     * 1 only.
+     * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of entityIdColumns. + */ + public int getEntityIdColumnsCount() { + return entityIdColumns_.size(); + } + /** + * + * + *
+     * Required. Columns to construct entity_id / row keys. Start by supporting
+     * 1 only.
+     * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The entityIdColumns at the given index. + */ + public java.lang.String getEntityIdColumns(int index) { + return entityIdColumns_.get(index); + } + /** + * + * + *
+     * Required. Columns to construct entity_id / row keys. Start by supporting
+     * 1 only.
+     * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the entityIdColumns at the given index. + */ + public com.google.protobuf.ByteString getEntityIdColumnsBytes(int index) { + return entityIdColumns_.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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + for (int i = 0; i < entityIdColumns_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, entityIdColumns_.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(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + { + int dataSize = 0; + for (int i = 0; i < entityIdColumns_.size(); i++) { + dataSize += computeStringSizeNoTag(entityIdColumns_.getRaw(i)); + } + size += dataSize; + size += 1 * getEntityIdColumnsList().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.aiplatform.v1.FeatureView.BigQuerySource)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource other = + (com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource) obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getEntityIdColumnsList().equals(other.getEntityIdColumnsList())) return false; + if (!getUnknownFields().equals(other.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 (getEntityIdColumnsCount() > 0) { + hash = (37 * hash) + ENTITY_ID_COLUMNS_FIELD_NUMBER; + hash = (53 * hash) + getEntityIdColumnsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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.aiplatform.v1.FeatureView.BigQuerySource} */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.FeatureView.BigQuerySource) + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_BigQuerySource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_BigQuerySource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource.class, + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + entityIdColumns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_BigQuerySource_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource build() { + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource buildPartial() { + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource result = + new com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + entityIdColumns_.makeImmutable(); + result.entityIdColumns_ = entityIdColumns_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource) { + return mergeFrom((com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource other) { + if (other == com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource.getDefaultInstance()) + return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.entityIdColumns_.isEmpty()) { + if (entityIdColumns_.isEmpty()) { + entityIdColumns_ = other.entityIdColumns_; + bitField0_ |= 0x00000002; + } else { + ensureEntityIdColumnsIsMutable(); + entityIdColumns_.addAll(other.entityIdColumns_); + } + 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: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureEntityIdColumnsIsMutable(); + entityIdColumns_.add(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 bitField0_; + + private java.lang.Object uri_ = ""; + /** + * + * + *
+       * Required. The BigQuery view URI that will be materialized on each sync
+       * trigger based on FeatureView.SyncConfig.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+       * Required. The BigQuery view URI that will be materialized on each sync
+       * trigger based on FeatureView.SyncConfig.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+       * Required. The BigQuery view URI that will be materialized on each sync
+       * trigger based on FeatureView.SyncConfig.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+       * Required. The BigQuery view URI that will be materialized on each sync
+       * trigger based on FeatureView.SyncConfig.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The BigQuery view URI that will be materialized on each sync
+       * trigger based on FeatureView.SyncConfig.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 com.google.protobuf.LazyStringArrayList entityIdColumns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureEntityIdColumnsIsMutable() { + if (!entityIdColumns_.isModifiable()) { + entityIdColumns_ = new com.google.protobuf.LazyStringArrayList(entityIdColumns_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+       * Required. Columns to construct entity_id / row keys. Start by supporting
+       * 1 only.
+       * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the entityIdColumns. + */ + public com.google.protobuf.ProtocolStringList getEntityIdColumnsList() { + entityIdColumns_.makeImmutable(); + return entityIdColumns_; + } + /** + * + * + *
+       * Required. Columns to construct entity_id / row keys. Start by supporting
+       * 1 only.
+       * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of entityIdColumns. + */ + public int getEntityIdColumnsCount() { + return entityIdColumns_.size(); + } + /** + * + * + *
+       * Required. Columns to construct entity_id / row keys. Start by supporting
+       * 1 only.
+       * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The entityIdColumns at the given index. + */ + public java.lang.String getEntityIdColumns(int index) { + return entityIdColumns_.get(index); + } + /** + * + * + *
+       * Required. Columns to construct entity_id / row keys. Start by supporting
+       * 1 only.
+       * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The bytes of the entityIdColumns at the given index. + */ + public com.google.protobuf.ByteString getEntityIdColumnsBytes(int index) { + return entityIdColumns_.getByteString(index); + } + /** + * + * + *
+       * Required. Columns to construct entity_id / row keys. Start by supporting
+       * 1 only.
+       * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The entityIdColumns to set. + * @return This builder for chaining. + */ + public Builder setEntityIdColumns(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityIdColumnsIsMutable(); + entityIdColumns_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Columns to construct entity_id / row keys. Start by supporting
+       * 1 only.
+       * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The entityIdColumns to add. + * @return This builder for chaining. + */ + public Builder addEntityIdColumns(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityIdColumnsIsMutable(); + entityIdColumns_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Columns to construct entity_id / row keys. Start by supporting
+       * 1 only.
+       * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The entityIdColumns to add. + * @return This builder for chaining. + */ + public Builder addAllEntityIdColumns(java.lang.Iterable values) { + ensureEntityIdColumnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entityIdColumns_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Columns to construct entity_id / row keys. Start by supporting
+       * 1 only.
+       * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearEntityIdColumns() { + entityIdColumns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Columns to construct entity_id / row keys. Start by supporting
+       * 1 only.
+       * 
+ * + * repeated string entity_id_columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes of the entityIdColumns to add. + * @return This builder for chaining. + */ + public Builder addEntityIdColumnsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureEntityIdColumnsIsMutable(); + entityIdColumns_.add(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.aiplatform.v1.FeatureView.BigQuerySource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.FeatureView.BigQuerySource) + private static final com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource(); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQuerySource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SyncConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.FeatureView.SyncConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled
+     * runs. To explicitly set a timezone to the cron tab, apply a prefix in
+     * the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}".
+     * The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
+     * database. For example, "CRON_TZ=America/New_York 1 * * * *", or
+     * "TZ=America/New_York 1 * * * *".
+     * 
+ * + * string cron = 1; + * + * @return The cron. + */ + java.lang.String getCron(); + /** + * + * + *
+     * Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled
+     * runs. To explicitly set a timezone to the cron tab, apply a prefix in
+     * the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}".
+     * The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
+     * database. For example, "CRON_TZ=America/New_York 1 * * * *", or
+     * "TZ=America/New_York 1 * * * *".
+     * 
+ * + * string cron = 1; + * + * @return The bytes for cron. + */ + com.google.protobuf.ByteString getCronBytes(); + } + /** Protobuf type {@code google.cloud.aiplatform.v1.FeatureView.SyncConfig} */ + public static final class SyncConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.FeatureView.SyncConfig) + SyncConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use SyncConfig.newBuilder() to construct. + private SyncConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SyncConfig() { + cron_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SyncConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_SyncConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_SyncConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureView.SyncConfig.class, + com.google.cloud.aiplatform.v1.FeatureView.SyncConfig.Builder.class); + } + + public static final int CRON_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object cron_ = ""; + /** + * + * + *
+     * Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled
+     * runs. To explicitly set a timezone to the cron tab, apply a prefix in
+     * the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}".
+     * The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
+     * database. For example, "CRON_TZ=America/New_York 1 * * * *", or
+     * "TZ=America/New_York 1 * * * *".
+     * 
+ * + * string cron = 1; + * + * @return The cron. + */ + @java.lang.Override + public java.lang.String getCron() { + java.lang.Object ref = cron_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cron_ = s; + return s; + } + } + /** + * + * + *
+     * Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled
+     * runs. To explicitly set a timezone to the cron tab, apply a prefix in
+     * the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}".
+     * The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
+     * database. For example, "CRON_TZ=America/New_York 1 * * * *", or
+     * "TZ=America/New_York 1 * * * *".
+     * 
+ * + * string cron = 1; + * + * @return The bytes for cron. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCronBytes() { + java.lang.Object ref = cron_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cron_ = 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(cron_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cron_); + } + 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(cron_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cron_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.FeatureView.SyncConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.FeatureView.SyncConfig other = + (com.google.cloud.aiplatform.v1.FeatureView.SyncConfig) obj; + + if (!getCron().equals(other.getCron())) return false; + if (!getUnknownFields().equals(other.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) + CRON_FIELD_NUMBER; + hash = (53 * hash) + getCron().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.FeatureView.SyncConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.SyncConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.SyncConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.SyncConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.SyncConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.SyncConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.SyncConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.SyncConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.SyncConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.SyncConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.SyncConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.SyncConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.FeatureView.SyncConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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.aiplatform.v1.FeatureView.SyncConfig} */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.FeatureView.SyncConfig) + com.google.cloud.aiplatform.v1.FeatureView.SyncConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_SyncConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_SyncConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureView.SyncConfig.class, + com.google.cloud.aiplatform.v1.FeatureView.SyncConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.FeatureView.SyncConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cron_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_SyncConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.SyncConfig getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.FeatureView.SyncConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.SyncConfig build() { + com.google.cloud.aiplatform.v1.FeatureView.SyncConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.SyncConfig buildPartial() { + com.google.cloud.aiplatform.v1.FeatureView.SyncConfig result = + new com.google.cloud.aiplatform.v1.FeatureView.SyncConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.FeatureView.SyncConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cron_ = cron_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.FeatureView.SyncConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1.FeatureView.SyncConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.FeatureView.SyncConfig other) { + if (other == com.google.cloud.aiplatform.v1.FeatureView.SyncConfig.getDefaultInstance()) + return this; + if (!other.getCron().isEmpty()) { + cron_ = other.cron_; + 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: + { + cron_ = 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 cron_ = ""; + /** + * + * + *
+       * Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled
+       * runs. To explicitly set a timezone to the cron tab, apply a prefix in
+       * the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}".
+       * The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
+       * database. For example, "CRON_TZ=America/New_York 1 * * * *", or
+       * "TZ=America/New_York 1 * * * *".
+       * 
+ * + * string cron = 1; + * + * @return The cron. + */ + public java.lang.String getCron() { + java.lang.Object ref = cron_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cron_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled
+       * runs. To explicitly set a timezone to the cron tab, apply a prefix in
+       * the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}".
+       * The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
+       * database. For example, "CRON_TZ=America/New_York 1 * * * *", or
+       * "TZ=America/New_York 1 * * * *".
+       * 
+ * + * string cron = 1; + * + * @return The bytes for cron. + */ + public com.google.protobuf.ByteString getCronBytes() { + java.lang.Object ref = cron_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cron_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled
+       * runs. To explicitly set a timezone to the cron tab, apply a prefix in
+       * the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}".
+       * The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
+       * database. For example, "CRON_TZ=America/New_York 1 * * * *", or
+       * "TZ=America/New_York 1 * * * *".
+       * 
+ * + * string cron = 1; + * + * @param value The cron to set. + * @return This builder for chaining. + */ + public Builder setCron(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cron_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled
+       * runs. To explicitly set a timezone to the cron tab, apply a prefix in
+       * the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}".
+       * The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
+       * database. For example, "CRON_TZ=America/New_York 1 * * * *", or
+       * "TZ=America/New_York 1 * * * *".
+       * 
+ * + * string cron = 1; + * + * @return This builder for chaining. + */ + public Builder clearCron() { + cron_ = getDefaultInstance().getCron(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled
+       * runs. To explicitly set a timezone to the cron tab, apply a prefix in
+       * the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}".
+       * The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
+       * database. For example, "CRON_TZ=America/New_York 1 * * * *", or
+       * "TZ=America/New_York 1 * * * *".
+       * 
+ * + * string cron = 1; + * + * @param value The bytes for cron to set. + * @return This builder for chaining. + */ + public Builder setCronBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cron_ = 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.aiplatform.v1.FeatureView.SyncConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.FeatureView.SyncConfig) + private static final com.google.cloud.aiplatform.v1.FeatureView.SyncConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.FeatureView.SyncConfig(); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.SyncConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SyncConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.SyncConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface FeatureRegistrySourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. List of features that need to be synced to Online Store.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getFeatureGroupsList(); + /** + * + * + *
+     * Required. List of features that need to be synced to Online Store.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup getFeatureGroups( + int index); + /** + * + * + *
+     * Required. List of features that need to be synced to Online Store.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getFeatureGroupsCount(); + /** + * + * + *
+     * Required. List of features that need to be synced to Online Store.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List< + ? extends + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + .FeatureGroupOrBuilder> + getFeatureGroupsOrBuilderList(); + /** + * + * + *
+     * Required. List of features that need to be synced to Online Store.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroupOrBuilder + getFeatureGroupsOrBuilder(int index); + } + /** + * + * + *
+   * A Feature Registry source for features that need to be synced to Online
+   * Store.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource} + */ + public static final class FeatureRegistrySource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource) + FeatureRegistrySourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use FeatureRegistrySource.newBuilder() to construct. + private FeatureRegistrySource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FeatureRegistrySource() { + featureGroups_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FeatureRegistrySource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.class, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.Builder.class); + } + + public interface FeatureGroupOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. Identifier of the feature group.
+       * 
+ * + * string feature_group_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The featureGroupId. + */ + java.lang.String getFeatureGroupId(); + /** + * + * + *
+       * Required. Identifier of the feature group.
+       * 
+ * + * string feature_group_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for featureGroupId. + */ + com.google.protobuf.ByteString getFeatureGroupIdBytes(); + + /** + * + * + *
+       * Required. Identifiers of features under the feature group.
+       * 
+ * + * repeated string feature_ids = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the featureIds. + */ + java.util.List getFeatureIdsList(); + /** + * + * + *
+       * Required. Identifiers of features under the feature group.
+       * 
+ * + * repeated string feature_ids = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of featureIds. + */ + int getFeatureIdsCount(); + /** + * + * + *
+       * Required. Identifiers of features under the feature group.
+       * 
+ * + * repeated string feature_ids = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The featureIds at the given index. + */ + java.lang.String getFeatureIds(int index); + /** + * + * + *
+       * Required. Identifiers of features under the feature group.
+       * 
+ * + * repeated string feature_ids = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the featureIds at the given index. + */ + com.google.protobuf.ByteString getFeatureIdsBytes(int index); + } + /** + * + * + *
+     * Features belonging to a single feature group that will be
+     * synced to Online Store.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup} + */ + public static final class FeatureGroup extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup) + FeatureGroupOrBuilder { + private static final long serialVersionUID = 0L; + // Use FeatureGroup.newBuilder() to construct. + private FeatureGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FeatureGroup() { + featureGroupId_ = ""; + featureIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FeatureGroup(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_FeatureGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_FeatureGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup.class, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + .Builder.class); + } + + public static final int FEATURE_GROUP_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object featureGroupId_ = ""; + /** + * + * + *
+       * Required. Identifier of the feature group.
+       * 
+ * + * string feature_group_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The featureGroupId. + */ + @java.lang.Override + public java.lang.String getFeatureGroupId() { + java.lang.Object ref = featureGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + featureGroupId_ = s; + return s; + } + } + /** + * + * + *
+       * Required. Identifier of the feature group.
+       * 
+ * + * string feature_group_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for featureGroupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFeatureGroupIdBytes() { + java.lang.Object ref = featureGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + featureGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEATURE_IDS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList featureIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+       * Required. Identifiers of features under the feature group.
+       * 
+ * + * repeated string feature_ids = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the featureIds. + */ + public com.google.protobuf.ProtocolStringList getFeatureIdsList() { + return featureIds_; + } + /** + * + * + *
+       * Required. Identifiers of features under the feature group.
+       * 
+ * + * repeated string feature_ids = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of featureIds. + */ + public int getFeatureIdsCount() { + return featureIds_.size(); + } + /** + * + * + *
+       * Required. Identifiers of features under the feature group.
+       * 
+ * + * repeated string feature_ids = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The featureIds at the given index. + */ + public java.lang.String getFeatureIds(int index) { + return featureIds_.get(index); + } + /** + * + * + *
+       * Required. Identifiers of features under the feature group.
+       * 
+ * + * repeated string feature_ids = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the featureIds at the given index. + */ + public com.google.protobuf.ByteString getFeatureIdsBytes(int index) { + return featureIds_.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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(featureGroupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, featureGroupId_); + } + for (int i = 0; i < featureIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, featureIds_.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(featureGroupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, featureGroupId_); + } + { + int dataSize = 0; + for (int i = 0; i < featureIds_.size(); i++) { + dataSize += computeStringSizeNoTag(featureIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getFeatureIdsList().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.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup other = + (com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup) obj; + + if (!getFeatureGroupId().equals(other.getFeatureGroupId())) return false; + if (!getFeatureIdsList().equals(other.getFeatureIdsList())) return false; + if (!getUnknownFields().equals(other.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) + FEATURE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getFeatureGroupId().hashCode(); + if (getFeatureIdsCount() > 0) { + hash = (37 * hash) + FEATURE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getFeatureIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Features belonging to a single feature group that will be
+       * synced to Online Store.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup) + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_FeatureGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_FeatureGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + .class, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + featureGroupId_ = ""; + featureIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_FeatureGroup_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + build() { + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + buildPartial() { + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup result = + new com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.featureGroupId_ = featureGroupId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + featureIds_.makeImmutable(); + result.featureIds_ = featureIds_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup other) { + if (other + == com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + .getDefaultInstance()) return this; + if (!other.getFeatureGroupId().isEmpty()) { + featureGroupId_ = other.featureGroupId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.featureIds_.isEmpty()) { + if (featureIds_.isEmpty()) { + featureIds_ = other.featureIds_; + bitField0_ |= 0x00000002; + } else { + ensureFeatureIdsIsMutable(); + featureIds_.addAll(other.featureIds_); + } + 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: + { + featureGroupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFeatureIdsIsMutable(); + featureIds_.add(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 bitField0_; + + private java.lang.Object featureGroupId_ = ""; + /** + * + * + *
+         * Required. Identifier of the feature group.
+         * 
+ * + * string feature_group_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The featureGroupId. + */ + public java.lang.String getFeatureGroupId() { + java.lang.Object ref = featureGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + featureGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Required. Identifier of the feature group.
+         * 
+ * + * string feature_group_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for featureGroupId. + */ + public com.google.protobuf.ByteString getFeatureGroupIdBytes() { + java.lang.Object ref = featureGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + featureGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Required. Identifier of the feature group.
+         * 
+ * + * string feature_group_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The featureGroupId to set. + * @return This builder for chaining. + */ + public Builder setFeatureGroupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + featureGroupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Identifier of the feature group.
+         * 
+ * + * string feature_group_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFeatureGroupId() { + featureGroupId_ = getDefaultInstance().getFeatureGroupId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Identifier of the feature group.
+         * 
+ * + * string feature_group_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for featureGroupId to set. + * @return This builder for chaining. + */ + public Builder setFeatureGroupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + featureGroupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList featureIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureFeatureIdsIsMutable() { + if (!featureIds_.isModifiable()) { + featureIds_ = new com.google.protobuf.LazyStringArrayList(featureIds_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+         * Required. Identifiers of features under the feature group.
+         * 
+ * + * repeated string feature_ids = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the featureIds. + */ + public com.google.protobuf.ProtocolStringList getFeatureIdsList() { + featureIds_.makeImmutable(); + return featureIds_; + } + /** + * + * + *
+         * Required. Identifiers of features under the feature group.
+         * 
+ * + * repeated string feature_ids = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of featureIds. + */ + public int getFeatureIdsCount() { + return featureIds_.size(); + } + /** + * + * + *
+         * Required. Identifiers of features under the feature group.
+         * 
+ * + * repeated string feature_ids = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The featureIds at the given index. + */ + public java.lang.String getFeatureIds(int index) { + return featureIds_.get(index); + } + /** + * + * + *
+         * Required. Identifiers of features under the feature group.
+         * 
+ * + * repeated string feature_ids = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the featureIds at the given index. + */ + public com.google.protobuf.ByteString getFeatureIdsBytes(int index) { + return featureIds_.getByteString(index); + } + /** + * + * + *
+         * Required. Identifiers of features under the feature group.
+         * 
+ * + * repeated string feature_ids = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The featureIds to set. + * @return This builder for chaining. + */ + public Builder setFeatureIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeatureIdsIsMutable(); + featureIds_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Identifiers of features under the feature group.
+         * 
+ * + * repeated string feature_ids = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The featureIds to add. + * @return This builder for chaining. + */ + public Builder addFeatureIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeatureIdsIsMutable(); + featureIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Identifiers of features under the feature group.
+         * 
+ * + * repeated string feature_ids = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The featureIds to add. + * @return This builder for chaining. + */ + public Builder addAllFeatureIds(java.lang.Iterable values) { + ensureFeatureIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, featureIds_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Identifiers of features under the feature group.
+         * 
+ * + * repeated string feature_ids = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFeatureIds() { + featureIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Identifiers of features under the feature group.
+         * 
+ * + * repeated string feature_ids = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the featureIds to add. + * @return This builder for chaining. + */ + public Builder addFeatureIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFeatureIdsIsMutable(); + featureIds_.add(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.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup) + private static final com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + .FeatureGroup + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup(); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FeatureGroup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int FEATURE_GROUPS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup> + featureGroups_; + /** + * + * + *
+     * Required. List of features that need to be synced to Online Store.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup> + getFeatureGroupsList() { + return featureGroups_; + } + /** + * + * + *
+     * Required. List of features that need to be synced to Online Store.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + .FeatureGroupOrBuilder> + getFeatureGroupsOrBuilderList() { + return featureGroups_; + } + /** + * + * + *
+     * Required. List of features that need to be synced to Online Store.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getFeatureGroupsCount() { + return featureGroups_.size(); + } + /** + * + * + *
+     * Required. List of features that need to be synced to Online Store.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + getFeatureGroups(int index) { + return featureGroups_.get(index); + } + /** + * + * + *
+     * Required. List of features that need to be synced to Online Store.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroupOrBuilder + getFeatureGroupsOrBuilder(int index) { + return featureGroups_.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 < featureGroups_.size(); i++) { + output.writeMessage(1, featureGroups_.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 < featureGroups_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, featureGroups_.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.aiplatform.v1.FeatureView.FeatureRegistrySource)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource other = + (com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource) obj; + + if (!getFeatureGroupsList().equals(other.getFeatureGroupsList())) return false; + if (!getUnknownFields().equals(other.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 (getFeatureGroupsCount() > 0) { + hash = (37 * hash) + FEATURE_GROUPS_FIELD_NUMBER; + hash = (53 * hash) + getFeatureGroupsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 Feature Registry source for features that need to be synced to Online
+     * Store.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource) + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.class, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (featureGroupsBuilder_ == null) { + featureGroups_ = java.util.Collections.emptyList(); + } else { + featureGroups_ = null; + featureGroupsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource build() { + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource buildPartial() { + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource result = + new com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource result) { + if (featureGroupsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + featureGroups_ = java.util.Collections.unmodifiableList(featureGroups_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.featureGroups_ = featureGroups_; + } else { + result.featureGroups_ = featureGroupsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource 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.aiplatform.v1.FeatureView.FeatureRegistrySource) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource other) { + if (other + == com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + .getDefaultInstance()) return this; + if (featureGroupsBuilder_ == null) { + if (!other.featureGroups_.isEmpty()) { + if (featureGroups_.isEmpty()) { + featureGroups_ = other.featureGroups_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeatureGroupsIsMutable(); + featureGroups_.addAll(other.featureGroups_); + } + onChanged(); + } + } else { + if (!other.featureGroups_.isEmpty()) { + if (featureGroupsBuilder_.isEmpty()) { + featureGroupsBuilder_.dispose(); + featureGroupsBuilder_ = null; + featureGroups_ = other.featureGroups_; + bitField0_ = (bitField0_ & ~0x00000001); + featureGroupsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFeatureGroupsFieldBuilder() + : null; + } else { + featureGroupsBuilder_.addAllMessages(other.featureGroups_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup m = + input.readMessage( + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + .FeatureGroup.parser(), + extensionRegistry); + if (featureGroupsBuilder_ == null) { + ensureFeatureGroupsIsMutable(); + featureGroups_.add(m); + } else { + featureGroupsBuilder_.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< + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup> + featureGroups_ = java.util.Collections.emptyList(); + + private void ensureFeatureGroupsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + featureGroups_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup>( + featureGroups_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup.Builder, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + .FeatureGroupOrBuilder> + featureGroupsBuilder_; + + /** + * + * + *
+       * Required. List of features that need to be synced to Online Store.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup> + getFeatureGroupsList() { + if (featureGroupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(featureGroups_); + } else { + return featureGroupsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Required. List of features that need to be synced to Online Store.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getFeatureGroupsCount() { + if (featureGroupsBuilder_ == null) { + return featureGroups_.size(); + } else { + return featureGroupsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Required. List of features that need to be synced to Online Store.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + getFeatureGroups(int index) { + if (featureGroupsBuilder_ == null) { + return featureGroups_.get(index); + } else { + return featureGroupsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Required. List of features that need to be synced to Online Store.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFeatureGroups( + int index, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup value) { + if (featureGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeatureGroupsIsMutable(); + featureGroups_.set(index, value); + onChanged(); + } else { + featureGroupsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Required. List of features that need to be synced to Online Store.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFeatureGroups( + int index, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup.Builder + builderForValue) { + if (featureGroupsBuilder_ == null) { + ensureFeatureGroupsIsMutable(); + featureGroups_.set(index, builderForValue.build()); + onChanged(); + } else { + featureGroupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. List of features that need to be synced to Online Store.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addFeatureGroups( + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup value) { + if (featureGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeatureGroupsIsMutable(); + featureGroups_.add(value); + onChanged(); + } else { + featureGroupsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Required. List of features that need to be synced to Online Store.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addFeatureGroups( + int index, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup value) { + if (featureGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeatureGroupsIsMutable(); + featureGroups_.add(index, value); + onChanged(); + } else { + featureGroupsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Required. List of features that need to be synced to Online Store.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addFeatureGroups( + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup.Builder + builderForValue) { + if (featureGroupsBuilder_ == null) { + ensureFeatureGroupsIsMutable(); + featureGroups_.add(builderForValue.build()); + onChanged(); + } else { + featureGroupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. List of features that need to be synced to Online Store.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addFeatureGroups( + int index, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup.Builder + builderForValue) { + if (featureGroupsBuilder_ == null) { + ensureFeatureGroupsIsMutable(); + featureGroups_.add(index, builderForValue.build()); + onChanged(); + } else { + featureGroupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. List of features that need to be synced to Online Store.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllFeatureGroups( + java.lang.Iterable< + ? extends + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup> + values) { + if (featureGroupsBuilder_ == null) { + ensureFeatureGroupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, featureGroups_); + onChanged(); + } else { + featureGroupsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Required. List of features that need to be synced to Online Store.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFeatureGroups() { + if (featureGroupsBuilder_ == null) { + featureGroups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + featureGroupsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Required. List of features that need to be synced to Online Store.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeFeatureGroups(int index) { + if (featureGroupsBuilder_ == null) { + ensureFeatureGroupsIsMutable(); + featureGroups_.remove(index); + onChanged(); + } else { + featureGroupsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Required. List of features that need to be synced to Online Store.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup.Builder + getFeatureGroupsBuilder(int index) { + return getFeatureGroupsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Required. List of features that need to be synced to Online Store.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroupOrBuilder + getFeatureGroupsOrBuilder(int index) { + if (featureGroupsBuilder_ == null) { + return featureGroups_.get(index); + } else { + return featureGroupsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Required. List of features that need to be synced to Online Store.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + .FeatureGroupOrBuilder> + getFeatureGroupsOrBuilderList() { + if (featureGroupsBuilder_ != null) { + return featureGroupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(featureGroups_); + } + } + /** + * + * + *
+       * Required. List of features that need to be synced to Online Store.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup.Builder + addFeatureGroupsBuilder() { + return getFeatureGroupsFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + .getDefaultInstance()); + } + /** + * + * + *
+       * Required. List of features that need to be synced to Online Store.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup.Builder + addFeatureGroupsBuilder(int index) { + return getFeatureGroupsFieldBuilder() + .addBuilder( + index, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + .getDefaultInstance()); + } + /** + * + * + *
+       * Required. List of features that need to be synced to Online Store.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup.Builder> + getFeatureGroupsBuilderList() { + return getFeatureGroupsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup.Builder, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + .FeatureGroupOrBuilder> + getFeatureGroupsFieldBuilder() { + if (featureGroupsBuilder_ == null) { + featureGroupsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup + .Builder, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + .FeatureGroupOrBuilder>( + featureGroups_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + featureGroups_ = null; + } + return featureGroupsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource) + private static final com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource(); + } + + public static com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FeatureRegistrySource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + 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 { + BIG_QUERY_SOURCE(6), + FEATURE_REGISTRY_SOURCE(9), + 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 6: + return BIG_QUERY_SOURCE; + case 9: + return FEATURE_REGISTRY_SOURCE; + 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 BIG_QUERY_SOURCE_FIELD_NUMBER = 6; + /** + * + * + *
+   * Optional. Configures how data is supposed to be extracted from a BigQuery
+   * source to be loaded onto the FeatureOnlineStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.BigQuerySource big_query_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the bigQuerySource field is set. + */ + @java.lang.Override + public boolean hasBigQuerySource() { + return sourceCase_ == 6; + } + /** + * + * + *
+   * Optional. Configures how data is supposed to be extracted from a BigQuery
+   * source to be loaded onto the FeatureOnlineStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.BigQuerySource big_query_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bigQuerySource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource getBigQuerySource() { + if (sourceCase_ == 6) { + return (com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource) source_; + } + return com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource.getDefaultInstance(); + } + /** + * + * + *
+   * Optional. Configures how data is supposed to be extracted from a BigQuery
+   * source to be loaded onto the FeatureOnlineStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.BigQuerySource big_query_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.BigQuerySourceOrBuilder + getBigQuerySourceOrBuilder() { + if (sourceCase_ == 6) { + return (com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource) source_; + } + return com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource.getDefaultInstance(); + } + + public static final int FEATURE_REGISTRY_SOURCE_FIELD_NUMBER = 9; + /** + * + * + *
+   * Optional. Configures the features from a Feature Registry source that
+   * need to be loaded onto the FeatureOnlineStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource feature_registry_source = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the featureRegistrySource field is set. + */ + @java.lang.Override + public boolean hasFeatureRegistrySource() { + return sourceCase_ == 9; + } + /** + * + * + *
+   * Optional. Configures the features from a Feature Registry source that
+   * need to be loaded onto the FeatureOnlineStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource feature_registry_source = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The featureRegistrySource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + getFeatureRegistrySource() { + if (sourceCase_ == 9) { + return (com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource) source_; + } + return com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.getDefaultInstance(); + } + /** + * + * + *
+   * Optional. Configures the features from a Feature Registry source that
+   * need to be loaded onto the FeatureOnlineStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource feature_registry_source = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySourceOrBuilder + getFeatureRegistrySourceOrBuilder() { + if (sourceCase_ == 9) { + return (com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource) source_; + } + return com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Name of the FeatureView. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * 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 FeatureView. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * 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. Timestamp when this FeatureView was created.
+   * 
+ * + * .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 createTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this FeatureView was created.
+   * 
+ * + * .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. Timestamp when this FeatureView was created.
+   * 
+ * + * .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. Timestamp when this FeatureView was last updated.
+   * 
+ * + * .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 updateTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this FeatureView was last updated.
+   * 
+ * + * .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. Timestamp when this FeatureView was last updated.
+   * 
+ * + * .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 ETAG_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set,
+   * a blind "overwrite" update happens.
+   * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set,
+   * a blind "overwrite" update happens.
+   * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 5; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_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 with user-defined metadata to organize your
+   * FeatureViews.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 5 [(.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 with user-defined metadata to organize your
+   * FeatureViews.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your
+   * FeatureViews.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 5 [(.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 with user-defined metadata to organize your
+   * FeatureViews.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 5 [(.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 SYNC_CONFIG_FIELD_NUMBER = 7; + private com.google.cloud.aiplatform.v1.FeatureView.SyncConfig syncConfig_; + /** + * + * + *
+   * Configures when data is to be synced/updated for this FeatureView. At the
+   * end of the sync the latest featureValues for each entityId of this
+   * FeatureView are made ready for online serving.
+   * 
+ * + * .google.cloud.aiplatform.v1.FeatureView.SyncConfig sync_config = 7; + * + * @return Whether the syncConfig field is set. + */ + @java.lang.Override + public boolean hasSyncConfig() { + return syncConfig_ != null; + } + /** + * + * + *
+   * Configures when data is to be synced/updated for this FeatureView. At the
+   * end of the sync the latest featureValues for each entityId of this
+   * FeatureView are made ready for online serving.
+   * 
+ * + * .google.cloud.aiplatform.v1.FeatureView.SyncConfig sync_config = 7; + * + * @return The syncConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.SyncConfig getSyncConfig() { + return syncConfig_ == null + ? com.google.cloud.aiplatform.v1.FeatureView.SyncConfig.getDefaultInstance() + : syncConfig_; + } + /** + * + * + *
+   * Configures when data is to be synced/updated for this FeatureView. At the
+   * end of the sync the latest featureValues for each entityId of this
+   * FeatureView are made ready for online serving.
+   * 
+ * + * .google.cloud.aiplatform.v1.FeatureView.SyncConfig sync_config = 7; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.SyncConfigOrBuilder getSyncConfigOrBuilder() { + return syncConfig_ == null + ? com.google.cloud.aiplatform.v1.FeatureView.SyncConfig.getDefaultInstance() + : syncConfig_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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 (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, etag_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 5); + if (sourceCase_ == 6) { + output.writeMessage(6, (com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource) source_); + } + if (syncConfig_ != null) { + output.writeMessage(7, getSyncConfig()); + } + if (sourceCase_ == 9) { + output.writeMessage( + 9, (com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource) 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, etag_); + } + 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(5, labels__); + } + if (sourceCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource) source_); + } + if (syncConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getSyncConfig()); + } + if (sourceCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource) 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.aiplatform.v1.FeatureView)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.FeatureView other = + (com.google.cloud.aiplatform.v1.FeatureView) 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 (!getEtag().equals(other.getEtag())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasSyncConfig() != other.hasSyncConfig()) return false; + if (hasSyncConfig()) { + if (!getSyncConfig().equals(other.getSyncConfig())) return false; + } + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 6: + if (!getBigQuerySource().equals(other.getBigQuerySource())) return false; + break; + case 9: + if (!getFeatureRegistrySource().equals(other.getFeatureRegistrySource())) 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(); + 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) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasSyncConfig()) { + hash = (37 * hash) + SYNC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSyncConfig().hashCode(); + } + switch (sourceCase_) { + case 6: + hash = (37 * hash) + BIG_QUERY_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getBigQuerySource().hashCode(); + break; + case 9: + hash = (37 * hash) + FEATURE_REGISTRY_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getFeatureRegistrySource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.FeatureView parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureView parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureView parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureView parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureView parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureView parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureView parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureView parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.FeatureView prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * FeatureView is representation of values that the FeatureOnlineStore will
+   * serve based on its syncConfig.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FeatureView} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.FeatureView) + com.google.cloud.aiplatform.v1.FeatureViewOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 5: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 5: + 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.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureView.class, + com.google.cloud.aiplatform.v1.FeatureView.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.FeatureView.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bigQuerySourceBuilder_ != null) { + bigQuerySourceBuilder_.clear(); + } + if (featureRegistrySourceBuilder_ != null) { + featureRegistrySourceBuilder_.clear(); + } + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + etag_ = ""; + internalGetMutableLabels().clear(); + syncConfig_ = null; + if (syncConfigBuilder_ != null) { + syncConfigBuilder_.dispose(); + syncConfigBuilder_ = null; + } + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1_FeatureView_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.FeatureView.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView build() { + com.google.cloud.aiplatform.v1.FeatureView result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView buildPartial() { + com.google.cloud.aiplatform.v1.FeatureView result = + new com.google.cloud.aiplatform.v1.FeatureView(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.FeatureView result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.syncConfig_ = syncConfigBuilder_ == null ? syncConfig_ : syncConfigBuilder_.build(); + } + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1.FeatureView result) { + result.sourceCase_ = sourceCase_; + result.source_ = this.source_; + if (sourceCase_ == 6 && bigQuerySourceBuilder_ != null) { + result.source_ = bigQuerySourceBuilder_.build(); + } + if (sourceCase_ == 9 && featureRegistrySourceBuilder_ != null) { + result.source_ = featureRegistrySourceBuilder_.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.aiplatform.v1.FeatureView) { + return mergeFrom((com.google.cloud.aiplatform.v1.FeatureView) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.FeatureView other) { + if (other == com.google.cloud.aiplatform.v1.FeatureView.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000020; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000040; + if (other.hasSyncConfig()) { + mergeSyncConfig(other.getSyncConfig()); + } + switch (other.getSourceCase()) { + case BIG_QUERY_SOURCE: + { + mergeBigQuerySource(other.getBigQuerySource()); + break; + } + case FEATURE_REGISTRY_SOURCE: + { + mergeFeatureRegistrySource(other.getFeatureRegistrySource()); + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 42 + case 50: + { + input.readMessage(getBigQuerySourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage(getSyncConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 58 + case 74: + { + input.readMessage( + getFeatureRegistrySourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 9; + 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 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_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource, + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource.Builder, + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySourceOrBuilder> + bigQuerySourceBuilder_; + /** + * + * + *
+     * Optional. Configures how data is supposed to be extracted from a BigQuery
+     * source to be loaded onto the FeatureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.BigQuerySource big_query_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the bigQuerySource field is set. + */ + @java.lang.Override + public boolean hasBigQuerySource() { + return sourceCase_ == 6; + } + /** + * + * + *
+     * Optional. Configures how data is supposed to be extracted from a BigQuery
+     * source to be loaded onto the FeatureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.BigQuerySource big_query_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bigQuerySource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource getBigQuerySource() { + if (bigQuerySourceBuilder_ == null) { + if (sourceCase_ == 6) { + return (com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource) source_; + } + return com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource.getDefaultInstance(); + } else { + if (sourceCase_ == 6) { + return bigQuerySourceBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Configures how data is supposed to be extracted from a BigQuery
+     * source to be loaded onto the FeatureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.BigQuerySource big_query_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBigQuerySource( + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource value) { + if (bigQuerySourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + bigQuerySourceBuilder_.setMessage(value); + } + sourceCase_ = 6; + return this; + } + /** + * + * + *
+     * Optional. Configures how data is supposed to be extracted from a BigQuery
+     * source to be loaded onto the FeatureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.BigQuerySource big_query_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBigQuerySource( + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource.Builder builderForValue) { + if (bigQuerySourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + bigQuerySourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 6; + return this; + } + /** + * + * + *
+     * Optional. Configures how data is supposed to be extracted from a BigQuery
+     * source to be loaded onto the FeatureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.BigQuerySource big_query_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeBigQuerySource( + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource value) { + if (bigQuerySourceBuilder_ == null) { + if (sourceCase_ == 6 + && source_ + != com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource.getDefaultInstance()) { + source_ = + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource.newBuilder( + (com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 6) { + bigQuerySourceBuilder_.mergeFrom(value); + } else { + bigQuerySourceBuilder_.setMessage(value); + } + } + sourceCase_ = 6; + return this; + } + /** + * + * + *
+     * Optional. Configures how data is supposed to be extracted from a BigQuery
+     * source to be loaded onto the FeatureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.BigQuerySource big_query_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearBigQuerySource() { + if (bigQuerySourceBuilder_ == null) { + if (sourceCase_ == 6) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 6) { + sourceCase_ = 0; + source_ = null; + } + bigQuerySourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Configures how data is supposed to be extracted from a BigQuery
+     * source to be loaded onto the FeatureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.BigQuerySource big_query_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource.Builder + getBigQuerySourceBuilder() { + return getBigQuerySourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Configures how data is supposed to be extracted from a BigQuery
+     * source to be loaded onto the FeatureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.BigQuerySource big_query_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.BigQuerySourceOrBuilder + getBigQuerySourceOrBuilder() { + if ((sourceCase_ == 6) && (bigQuerySourceBuilder_ != null)) { + return bigQuerySourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 6) { + return (com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource) source_; + } + return com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Configures how data is supposed to be extracted from a BigQuery
+     * source to be loaded onto the FeatureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.BigQuerySource big_query_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource, + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource.Builder, + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySourceOrBuilder> + getBigQuerySourceFieldBuilder() { + if (bigQuerySourceBuilder_ == null) { + if (!(sourceCase_ == 6)) { + source_ = com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource.getDefaultInstance(); + } + bigQuerySourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource, + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource.Builder, + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySourceOrBuilder>( + (com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 6; + onChanged(); + return bigQuerySourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.Builder, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySourceOrBuilder> + featureRegistrySourceBuilder_; + /** + * + * + *
+     * Optional. Configures the features from a Feature Registry source that
+     * need to be loaded onto the FeatureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource feature_registry_source = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the featureRegistrySource field is set. + */ + @java.lang.Override + public boolean hasFeatureRegistrySource() { + return sourceCase_ == 9; + } + /** + * + * + *
+     * Optional. Configures the features from a Feature Registry source that
+     * need to be loaded onto the FeatureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource feature_registry_source = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The featureRegistrySource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + getFeatureRegistrySource() { + if (featureRegistrySourceBuilder_ == null) { + if (sourceCase_ == 9) { + return (com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource) source_; + } + return com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + .getDefaultInstance(); + } else { + if (sourceCase_ == 9) { + return featureRegistrySourceBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Configures the features from a Feature Registry source that
+     * need to be loaded onto the FeatureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource feature_registry_source = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFeatureRegistrySource( + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource value) { + if (featureRegistrySourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + featureRegistrySourceBuilder_.setMessage(value); + } + sourceCase_ = 9; + return this; + } + /** + * + * + *
+     * Optional. Configures the features from a Feature Registry source that
+     * need to be loaded onto the FeatureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource feature_registry_source = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFeatureRegistrySource( + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.Builder builderForValue) { + if (featureRegistrySourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + featureRegistrySourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 9; + return this; + } + /** + * + * + *
+     * Optional. Configures the features from a Feature Registry source that
+     * need to be loaded onto the FeatureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource feature_registry_source = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeFeatureRegistrySource( + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource value) { + if (featureRegistrySourceBuilder_ == null) { + if (sourceCase_ == 9 + && source_ + != com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + .getDefaultInstance()) { + source_ = + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.newBuilder( + (com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 9) { + featureRegistrySourceBuilder_.mergeFrom(value); + } else { + featureRegistrySourceBuilder_.setMessage(value); + } + } + sourceCase_ = 9; + return this; + } + /** + * + * + *
+     * Optional. Configures the features from a Feature Registry source that
+     * need to be loaded onto the FeatureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource feature_registry_source = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFeatureRegistrySource() { + if (featureRegistrySourceBuilder_ == null) { + if (sourceCase_ == 9) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 9) { + sourceCase_ = 0; + source_ = null; + } + featureRegistrySourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Configures the features from a Feature Registry source that
+     * need to be loaded onto the FeatureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource feature_registry_source = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.Builder + getFeatureRegistrySourceBuilder() { + return getFeatureRegistrySourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Configures the features from a Feature Registry source that
+     * need to be loaded onto the FeatureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource feature_registry_source = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySourceOrBuilder + getFeatureRegistrySourceOrBuilder() { + if ((sourceCase_ == 9) && (featureRegistrySourceBuilder_ != null)) { + return featureRegistrySourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 9) { + return (com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource) source_; + } + return com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Configures the features from a Feature Registry source that
+     * need to be loaded onto the FeatureOnlineStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource feature_registry_source = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.Builder, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySourceOrBuilder> + getFeatureRegistrySourceFieldBuilder() { + if (featureRegistrySourceBuilder_ == null) { + if (!(sourceCase_ == 9)) { + source_ = + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.getDefaultInstance(); + } + featureRegistrySourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.Builder, + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySourceOrBuilder>( + (com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 9; + onChanged(); + return featureRegistrySourceBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Name of the FeatureView. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * 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 FeatureView. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * 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 FeatureView. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * 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_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the FeatureView. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the FeatureView. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * 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_ |= 0x00000004; + 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. Timestamp when this FeatureView was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureView was created.
+     * 
+ * + * + * .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. Timestamp when this FeatureView was created.
+     * 
+ * + * + * .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_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureView was created.
+     * 
+ * + * + * .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_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureView was created.
+     * 
+ * + * + * .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_ & 0x00000008) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureView was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureView was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureView was created.
+     * 
+ * + * + * .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. Timestamp when this FeatureView was created.
+     * 
+ * + * + * .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. Timestamp when this FeatureView was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureView was last updated.
+     * 
+ * + * + * .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. Timestamp when this FeatureView was last updated.
+     * 
+ * + * + * .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_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureView was last updated.
+     * 
+ * + * + * .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_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureView was last updated.
+     * 
+ * + * + * .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_ & 0x00000010) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureView was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureView was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this FeatureView was last updated.
+     * 
+ * + * + * .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. Timestamp when this FeatureView was last updated.
+     * 
+ * + * + * .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 etag_ = ""; + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set,
+     * a blind "overwrite" update happens.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set,
+     * a blind "overwrite" update happens.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set,
+     * a blind "overwrite" update happens.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set,
+     * a blind "overwrite" update happens.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set,
+     * a blind "overwrite" update happens.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000020; + 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_ |= 0x00000040; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your
+     * FeatureViews.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * map<string, string> labels = 5 [(.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 with user-defined metadata to organize your
+     * FeatureViews.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your
+     * FeatureViews.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * map<string, string> labels = 5 [(.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 with user-defined metadata to organize your
+     * FeatureViews.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * map<string, string> labels = 5 [(.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_ & ~0x00000040); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your
+     * FeatureViews.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * map<string, string> labels = 5 [(.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_ |= 0x00000040; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your
+     * FeatureViews.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * map<string, string> labels = 5 [(.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_ |= 0x00000040; + return this; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your
+     * FeatureViews.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information on and examples of labels.
+     * No more than 64 user labels can be associated with one
+     * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+     * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + private com.google.cloud.aiplatform.v1.FeatureView.SyncConfig syncConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView.SyncConfig, + com.google.cloud.aiplatform.v1.FeatureView.SyncConfig.Builder, + com.google.cloud.aiplatform.v1.FeatureView.SyncConfigOrBuilder> + syncConfigBuilder_; + /** + * + * + *
+     * Configures when data is to be synced/updated for this FeatureView. At the
+     * end of the sync the latest featureValues for each entityId of this
+     * FeatureView are made ready for online serving.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureView.SyncConfig sync_config = 7; + * + * @return Whether the syncConfig field is set. + */ + public boolean hasSyncConfig() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Configures when data is to be synced/updated for this FeatureView. At the
+     * end of the sync the latest featureValues for each entityId of this
+     * FeatureView are made ready for online serving.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureView.SyncConfig sync_config = 7; + * + * @return The syncConfig. + */ + public com.google.cloud.aiplatform.v1.FeatureView.SyncConfig getSyncConfig() { + if (syncConfigBuilder_ == null) { + return syncConfig_ == null + ? com.google.cloud.aiplatform.v1.FeatureView.SyncConfig.getDefaultInstance() + : syncConfig_; + } else { + return syncConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Configures when data is to be synced/updated for this FeatureView. At the
+     * end of the sync the latest featureValues for each entityId of this
+     * FeatureView are made ready for online serving.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureView.SyncConfig sync_config = 7; + */ + public Builder setSyncConfig(com.google.cloud.aiplatform.v1.FeatureView.SyncConfig value) { + if (syncConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + syncConfig_ = value; + } else { + syncConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Configures when data is to be synced/updated for this FeatureView. At the
+     * end of the sync the latest featureValues for each entityId of this
+     * FeatureView are made ready for online serving.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureView.SyncConfig sync_config = 7; + */ + public Builder setSyncConfig( + com.google.cloud.aiplatform.v1.FeatureView.SyncConfig.Builder builderForValue) { + if (syncConfigBuilder_ == null) { + syncConfig_ = builderForValue.build(); + } else { + syncConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Configures when data is to be synced/updated for this FeatureView. At the
+     * end of the sync the latest featureValues for each entityId of this
+     * FeatureView are made ready for online serving.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureView.SyncConfig sync_config = 7; + */ + public Builder mergeSyncConfig(com.google.cloud.aiplatform.v1.FeatureView.SyncConfig value) { + if (syncConfigBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && syncConfig_ != null + && syncConfig_ + != com.google.cloud.aiplatform.v1.FeatureView.SyncConfig.getDefaultInstance()) { + getSyncConfigBuilder().mergeFrom(value); + } else { + syncConfig_ = value; + } + } else { + syncConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Configures when data is to be synced/updated for this FeatureView. At the
+     * end of the sync the latest featureValues for each entityId of this
+     * FeatureView are made ready for online serving.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureView.SyncConfig sync_config = 7; + */ + public Builder clearSyncConfig() { + bitField0_ = (bitField0_ & ~0x00000080); + syncConfig_ = null; + if (syncConfigBuilder_ != null) { + syncConfigBuilder_.dispose(); + syncConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Configures when data is to be synced/updated for this FeatureView. At the
+     * end of the sync the latest featureValues for each entityId of this
+     * FeatureView are made ready for online serving.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureView.SyncConfig sync_config = 7; + */ + public com.google.cloud.aiplatform.v1.FeatureView.SyncConfig.Builder getSyncConfigBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getSyncConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configures when data is to be synced/updated for this FeatureView. At the
+     * end of the sync the latest featureValues for each entityId of this
+     * FeatureView are made ready for online serving.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureView.SyncConfig sync_config = 7; + */ + public com.google.cloud.aiplatform.v1.FeatureView.SyncConfigOrBuilder getSyncConfigOrBuilder() { + if (syncConfigBuilder_ != null) { + return syncConfigBuilder_.getMessageOrBuilder(); + } else { + return syncConfig_ == null + ? com.google.cloud.aiplatform.v1.FeatureView.SyncConfig.getDefaultInstance() + : syncConfig_; + } + } + /** + * + * + *
+     * Configures when data is to be synced/updated for this FeatureView. At the
+     * end of the sync the latest featureValues for each entityId of this
+     * FeatureView are made ready for online serving.
+     * 
+ * + * .google.cloud.aiplatform.v1.FeatureView.SyncConfig sync_config = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView.SyncConfig, + com.google.cloud.aiplatform.v1.FeatureView.SyncConfig.Builder, + com.google.cloud.aiplatform.v1.FeatureView.SyncConfigOrBuilder> + getSyncConfigFieldBuilder() { + if (syncConfigBuilder_ == null) { + syncConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView.SyncConfig, + com.google.cloud.aiplatform.v1.FeatureView.SyncConfig.Builder, + com.google.cloud.aiplatform.v1.FeatureView.SyncConfigOrBuilder>( + getSyncConfig(), getParentForChildren(), isClean()); + syncConfig_ = null; + } + return syncConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.FeatureView) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.FeatureView) + private static final com.google.cloud.aiplatform.v1.FeatureView DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.FeatureView(); + } + + public static com.google.cloud.aiplatform.v1.FeatureView getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FeatureView parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewDataFormat.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewDataFormat.java new file mode 100644 index 000000000000..8b243d2629a2 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewDataFormat.java @@ -0,0 +1,181 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Format of the data in the Feature View.
+ * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.FeatureViewDataFormat} + */ +public enum FeatureViewDataFormat implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not set. Will be treated as the KeyValue format.
+   * 
+ * + * FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED = 0; + */ + FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED(0), + /** + * + * + *
+   * Return response data in key-value format.
+   * 
+ * + * KEY_VALUE = 1; + */ + KEY_VALUE(1), + /** + * + * + *
+   * Return response data in proto Struct format.
+   * 
+ * + * PROTO_STRUCT = 2; + */ + PROTO_STRUCT(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not set. Will be treated as the KeyValue format.
+   * 
+ * + * FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED = 0; + */ + public static final int FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Return response data in key-value format.
+   * 
+ * + * KEY_VALUE = 1; + */ + public static final int KEY_VALUE_VALUE = 1; + /** + * + * + *
+   * Return response data in proto Struct format.
+   * 
+ * + * PROTO_STRUCT = 2; + */ + public static final int PROTO_STRUCT_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 FeatureViewDataFormat 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 FeatureViewDataFormat forNumber(int value) { + switch (value) { + case 0: + return FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED; + case 1: + return KEY_VALUE; + case 2: + return PROTO_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 FeatureViewDataFormat findValueByNumber(int number) { + return FeatureViewDataFormat.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.aiplatform.v1.FeatureOnlineStoreServiceProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final FeatureViewDataFormat[] VALUES = values(); + + public static FeatureViewDataFormat 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 FeatureViewDataFormat(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.FeatureViewDataFormat) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewDataKey.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewDataKey.java new file mode 100644 index 000000000000..4c846ca1a591 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewDataKey.java @@ -0,0 +1,755 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Lookup key for a feature view.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FeatureViewDataKey} + */ +public final class FeatureViewDataKey extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.FeatureViewDataKey) + FeatureViewDataKeyOrBuilder { + private static final long serialVersionUID = 0L; + // Use FeatureViewDataKey.newBuilder() to construct. + private FeatureViewDataKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FeatureViewDataKey() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FeatureViewDataKey(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FeatureViewDataKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FeatureViewDataKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureViewDataKey.class, + com.google.cloud.aiplatform.v1.FeatureViewDataKey.Builder.class); + } + + private int keyOneofCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object keyOneof_; + + public enum KeyOneofCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + KEY(1), + KEYONEOF_NOT_SET(0); + private final int value; + + private KeyOneofCase(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 KeyOneofCase valueOf(int value) { + return forNumber(value); + } + + public static KeyOneofCase forNumber(int value) { + switch (value) { + case 1: + return KEY; + case 0: + return KEYONEOF_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public KeyOneofCase getKeyOneofCase() { + return KeyOneofCase.forNumber(keyOneofCase_); + } + + public static final int KEY_FIELD_NUMBER = 1; + /** + * + * + *
+   * String key to use for lookup.
+   * 
+ * + * string key = 1; + * + * @return Whether the key field is set. + */ + public boolean hasKey() { + return keyOneofCase_ == 1; + } + /** + * + * + *
+   * String key to use for lookup.
+   * 
+ * + * string key = 1; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = ""; + if (keyOneofCase_ == 1) { + ref = keyOneof_; + } + if (ref instanceof java.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 (keyOneofCase_ == 1) { + keyOneof_ = s; + } + return s; + } + } + /** + * + * + *
+   * String key to use for lookup.
+   * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = ""; + if (keyOneofCase_ == 1) { + ref = keyOneof_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (keyOneofCase_ == 1) { + keyOneof_ = 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 (keyOneofCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, keyOneof_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (keyOneofCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, keyOneof_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.FeatureViewDataKey)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.FeatureViewDataKey other = + (com.google.cloud.aiplatform.v1.FeatureViewDataKey) obj; + + if (!getKeyOneofCase().equals(other.getKeyOneofCase())) return false; + switch (keyOneofCase_) { + case 1: + if (!getKey().equals(other.getKey())) 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 (keyOneofCase_) { + case 1: + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.FeatureViewDataKey parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewDataKey parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewDataKey parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewDataKey parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewDataKey parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewDataKey parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewDataKey parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewDataKey parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewDataKey parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewDataKey parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewDataKey parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewDataKey parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.FeatureViewDataKey prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Lookup key for a feature view.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FeatureViewDataKey} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.FeatureViewDataKey) + com.google.cloud.aiplatform.v1.FeatureViewDataKeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FeatureViewDataKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FeatureViewDataKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureViewDataKey.class, + com.google.cloud.aiplatform.v1.FeatureViewDataKey.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.FeatureViewDataKey.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keyOneofCase_ = 0; + keyOneof_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FeatureViewDataKey_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureViewDataKey getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.FeatureViewDataKey.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureViewDataKey build() { + com.google.cloud.aiplatform.v1.FeatureViewDataKey result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureViewDataKey buildPartial() { + com.google.cloud.aiplatform.v1.FeatureViewDataKey result = + new com.google.cloud.aiplatform.v1.FeatureViewDataKey(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.FeatureViewDataKey result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1.FeatureViewDataKey result) { + result.keyOneofCase_ = keyOneofCase_; + result.keyOneof_ = this.keyOneof_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.FeatureViewDataKey) { + return mergeFrom((com.google.cloud.aiplatform.v1.FeatureViewDataKey) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.FeatureViewDataKey other) { + if (other == com.google.cloud.aiplatform.v1.FeatureViewDataKey.getDefaultInstance()) + return this; + switch (other.getKeyOneofCase()) { + case KEY: + { + keyOneofCase_ = 1; + keyOneof_ = other.keyOneof_; + onChanged(); + break; + } + case KEYONEOF_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(); + keyOneofCase_ = 1; + keyOneof_ = 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 keyOneofCase_ = 0; + private java.lang.Object keyOneof_; + + public KeyOneofCase getKeyOneofCase() { + return KeyOneofCase.forNumber(keyOneofCase_); + } + + public Builder clearKeyOneof() { + keyOneofCase_ = 0; + keyOneof_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * String key to use for lookup.
+     * 
+ * + * string key = 1; + * + * @return Whether the key field is set. + */ + @java.lang.Override + public boolean hasKey() { + return keyOneofCase_ == 1; + } + /** + * + * + *
+     * String key to use for lookup.
+     * 
+ * + * string key = 1; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = ""; + if (keyOneofCase_ == 1) { + ref = keyOneof_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (keyOneofCase_ == 1) { + keyOneof_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * String key to use for lookup.
+     * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = ""; + if (keyOneofCase_ == 1) { + ref = keyOneof_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (keyOneofCase_ == 1) { + keyOneof_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * String key to use for lookup.
+     * 
+ * + * string key = 1; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + keyOneofCase_ = 1; + keyOneof_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * String key to use for lookup.
+     * 
+ * + * string key = 1; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + if (keyOneofCase_ == 1) { + keyOneofCase_ = 0; + keyOneof_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * String key to use for lookup.
+     * 
+ * + * string key = 1; + * + * @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); + keyOneofCase_ = 1; + keyOneof_ = 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.aiplatform.v1.FeatureViewDataKey) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.FeatureViewDataKey) + private static final com.google.cloud.aiplatform.v1.FeatureViewDataKey DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.FeatureViewDataKey(); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewDataKey getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FeatureViewDataKey parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureViewDataKey getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewDataKeyOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewDataKeyOrBuilder.java new file mode 100644 index 000000000000..9750d4fef448 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewDataKeyOrBuilder.java @@ -0,0 +1,64 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface FeatureViewDataKeyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.FeatureViewDataKey) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * String key to use for lookup.
+   * 
+ * + * string key = 1; + * + * @return Whether the key field is set. + */ + boolean hasKey(); + /** + * + * + *
+   * String key to use for lookup.
+   * 
+ * + * string key = 1; + * + * @return The key. + */ + java.lang.String getKey(); + /** + * + * + *
+   * String key to use for lookup.
+   * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + com.google.cloud.aiplatform.v1.FeatureViewDataKey.KeyOneofCase getKeyOneofCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewName.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewName.java new file mode 100644 index 000000000000..ce84c5e0978d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.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 FeatureViewName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_FEATURE_ONLINE_STORE_FEATURE_VIEW = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String featureOnlineStore; + private final String featureView; + + @Deprecated + protected FeatureViewName() { + project = null; + location = null; + featureOnlineStore = null; + featureView = null; + } + + private FeatureViewName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + featureOnlineStore = Preconditions.checkNotNull(builder.getFeatureOnlineStore()); + featureView = Preconditions.checkNotNull(builder.getFeatureView()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getFeatureOnlineStore() { + return featureOnlineStore; + } + + public String getFeatureView() { + return featureView; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static FeatureViewName of( + String project, String location, String featureOnlineStore, String featureView) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setFeatureOnlineStore(featureOnlineStore) + .setFeatureView(featureView) + .build(); + } + + public static String format( + String project, String location, String featureOnlineStore, String featureView) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setFeatureOnlineStore(featureOnlineStore) + .setFeatureView(featureView) + .build() + .toString(); + } + + public static FeatureViewName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_FEATURE_ONLINE_STORE_FEATURE_VIEW.validatedMatch( + formattedString, "FeatureViewName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("feature_online_store"), + matchMap.get("feature_view")); + } + + 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 (FeatureViewName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_FEATURE_ONLINE_STORE_FEATURE_VIEW.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 (featureOnlineStore != null) { + fieldMapBuilder.put("feature_online_store", featureOnlineStore); + } + if (featureView != null) { + fieldMapBuilder.put("feature_view", featureView); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_FEATURE_ONLINE_STORE_FEATURE_VIEW.instantiate( + "project", + project, + "location", + location, + "feature_online_store", + featureOnlineStore, + "feature_view", + featureView); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + FeatureViewName that = ((FeatureViewName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.featureOnlineStore, that.featureOnlineStore) + && Objects.equals(this.featureView, that.featureView); + } + 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(featureOnlineStore); + h *= 1000003; + h ^= Objects.hashCode(featureView); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}. + */ + public static class Builder { + private String project; + private String location; + private String featureOnlineStore; + private String featureView; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getFeatureOnlineStore() { + return featureOnlineStore; + } + + public String getFeatureView() { + return featureView; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setFeatureOnlineStore(String featureOnlineStore) { + this.featureOnlineStore = featureOnlineStore; + return this; + } + + public Builder setFeatureView(String featureView) { + this.featureView = featureView; + return this; + } + + private Builder(FeatureViewName featureViewName) { + this.project = featureViewName.project; + this.location = featureViewName.location; + this.featureOnlineStore = featureViewName.featureOnlineStore; + this.featureView = featureViewName.featureView; + } + + public FeatureViewName build() { + return new FeatureViewName(this); + } + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewOrBuilder.java new file mode 100644 index 000000000000..a10856558864 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewOrBuilder.java @@ -0,0 +1,395 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_view.proto + +package com.google.cloud.aiplatform.v1; + +public interface FeatureViewOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.FeatureView) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Configures how data is supposed to be extracted from a BigQuery
+   * source to be loaded onto the FeatureOnlineStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.BigQuerySource big_query_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the bigQuerySource field is set. + */ + boolean hasBigQuerySource(); + /** + * + * + *
+   * Optional. Configures how data is supposed to be extracted from a BigQuery
+   * source to be loaded onto the FeatureOnlineStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.BigQuerySource big_query_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bigQuerySource. + */ + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySource getBigQuerySource(); + /** + * + * + *
+   * Optional. Configures how data is supposed to be extracted from a BigQuery
+   * source to be loaded onto the FeatureOnlineStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.BigQuerySource big_query_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.FeatureView.BigQuerySourceOrBuilder getBigQuerySourceOrBuilder(); + + /** + * + * + *
+   * Optional. Configures the features from a Feature Registry source that
+   * need to be loaded onto the FeatureOnlineStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource feature_registry_source = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the featureRegistrySource field is set. + */ + boolean hasFeatureRegistrySource(); + /** + * + * + *
+   * Optional. Configures the features from a Feature Registry source that
+   * need to be loaded onto the FeatureOnlineStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource feature_registry_source = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The featureRegistrySource. + */ + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource getFeatureRegistrySource(); + /** + * + * + *
+   * Optional. Configures the features from a Feature Registry source that
+   * need to be loaded onto the FeatureOnlineStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource feature_registry_source = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySourceOrBuilder + getFeatureRegistrySourceOrBuilder(); + + /** + * + * + *
+   * Output only. Name of the FeatureView. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Name of the FeatureView. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Timestamp when this FeatureView was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this FeatureView was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this FeatureView was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this FeatureView was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this FeatureView was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this FeatureView was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set,
+   * a blind "overwrite" update happens.
+   * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set,
+   * a blind "overwrite" update happens.
+   * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your
+   * FeatureViews.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your
+   * FeatureViews.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 5 [(.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 with user-defined metadata to organize your
+   * FeatureViews.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your
+   * FeatureViews.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your
+   * FeatureViews.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information on and examples of labels.
+   * No more than 64 user labels can be associated with one
+   * FeatureOnlineStore(System labels are excluded)." System reserved label keys
+   * are prefixed with "aiplatform.googleapis.com/" and are immutable.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Configures when data is to be synced/updated for this FeatureView. At the
+   * end of the sync the latest featureValues for each entityId of this
+   * FeatureView are made ready for online serving.
+   * 
+ * + * .google.cloud.aiplatform.v1.FeatureView.SyncConfig sync_config = 7; + * + * @return Whether the syncConfig field is set. + */ + boolean hasSyncConfig(); + /** + * + * + *
+   * Configures when data is to be synced/updated for this FeatureView. At the
+   * end of the sync the latest featureValues for each entityId of this
+   * FeatureView are made ready for online serving.
+   * 
+ * + * .google.cloud.aiplatform.v1.FeatureView.SyncConfig sync_config = 7; + * + * @return The syncConfig. + */ + com.google.cloud.aiplatform.v1.FeatureView.SyncConfig getSyncConfig(); + /** + * + * + *
+   * Configures when data is to be synced/updated for this FeatureView. At the
+   * end of the sync the latest featureValues for each entityId of this
+   * FeatureView are made ready for online serving.
+   * 
+ * + * .google.cloud.aiplatform.v1.FeatureView.SyncConfig sync_config = 7; + */ + com.google.cloud.aiplatform.v1.FeatureView.SyncConfigOrBuilder getSyncConfigOrBuilder(); + + com.google.cloud.aiplatform.v1.FeatureView.SourceCase getSourceCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewProto.java new file mode 100644 index 000000000000..df601862fd10 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewProto.java @@ -0,0 +1,178 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_view.proto + +package com.google.cloud.aiplatform.v1; + +public final class FeatureViewProto { + private FeatureViewProto() {} + + 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_aiplatform_v1_FeatureView_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FeatureView_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_FeatureView_BigQuerySource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FeatureView_BigQuerySource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_FeatureView_SyncConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FeatureView_SyncConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_FeatureGroup_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_FeatureGroup_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_FeatureView_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FeatureView_LabelsEntry_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/aiplatform/v1/feature_vie" + + "w.proto\022\032google.cloud.aiplatform.v1\032\037goo" + + "gle/api/field_behavior.proto\032\031google/api" + + "/resource.proto\032\037google/protobuf/timesta" + + "mp.proto\"\201\010\n\013FeatureView\022X\n\020big_query_so" + + "urce\030\006 \001(\01326.google.cloud.aiplatform.v1." + + "FeatureView.BigQuerySourceB\004\342A\001\001H\000\022f\n\027fe" + + "ature_registry_source\030\t \001(\0132=.google.clo" + + "ud.aiplatform.v1.FeatureView.FeatureRegi" + + "strySourceB\004\342A\001\001H\000\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\0225" + + "\n\013create_time\030\002 \001(\0132\032.google.protobuf.Ti" + + "mestampB\004\342A\001\003\0225\n\013update_time\030\003 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\004\342A\001\003\022\022\n\004etag\030\004 \001" + + "(\tB\004\342A\001\001\022I\n\006labels\030\005 \003(\01323.google.cloud." + + "aiplatform.v1.FeatureView.LabelsEntryB\004\342" + + "A\001\001\022G\n\013sync_config\030\007 \001(\01322.google.cloud." + + "aiplatform.v1.FeatureView.SyncConfig\032D\n\016" + + "BigQuerySource\022\021\n\003uri\030\001 \001(\tB\004\342A\001\002\022\037\n\021ent" + + "ity_id_columns\030\002 \003(\tB\004\342A\001\002\032\032\n\nSyncConfig" + + "\022\014\n\004cron\030\001 \001(\t\032\314\001\n\025FeatureRegistrySource" + + "\022h\n\016feature_groups\030\001 \003(\0132J.google.cloud." + + "aiplatform.v1.FeatureView.FeatureRegistr" + + "ySource.FeatureGroupB\004\342A\001\002\032I\n\014FeatureGro" + + "up\022\036\n\020feature_group_id\030\001 \001(\tB\004\342A\001\002\022\031\n\013fe" + + "ature_ids\030\002 \003(\tB\004\342A\001\002\032-\n\013LabelsEntry\022\013\n\003" + + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\233\001\352A\227\001\n%aip" + + "latform.googleapis.com/FeatureView\022nproj" + + "ects/{project}/locations/{location}/feat" + + "ureOnlineStores/{feature_online_store}/f" + + "eatureViews/{feature_view}B\010\n\006sourceB\316\001\n" + + "\036com.google.cloud.aiplatform.v1B\020Feature" + + "ViewProtoP\001Z>cloud.google.com/go/aiplatf" + + "orm/apiv1/aiplatformpb;aiplatformpb\252\002\032Go" + + "ogle.Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\" + + "AIPlatform\\V1\352\002\035Google::Cloud::AIPlatfor" + + "m::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_aiplatform_v1_FeatureView_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_FeatureView_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FeatureView_descriptor, + new java.lang.String[] { + "BigQuerySource", + "FeatureRegistrySource", + "Name", + "CreateTime", + "UpdateTime", + "Etag", + "Labels", + "SyncConfig", + "Source", + }); + internal_static_google_cloud_aiplatform_v1_FeatureView_BigQuerySource_descriptor = + internal_static_google_cloud_aiplatform_v1_FeatureView_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_aiplatform_v1_FeatureView_BigQuerySource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FeatureView_BigQuerySource_descriptor, + new java.lang.String[] { + "Uri", "EntityIdColumns", + }); + internal_static_google_cloud_aiplatform_v1_FeatureView_SyncConfig_descriptor = + internal_static_google_cloud_aiplatform_v1_FeatureView_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_aiplatform_v1_FeatureView_SyncConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FeatureView_SyncConfig_descriptor, + new java.lang.String[] { + "Cron", + }); + internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_descriptor = + internal_static_google_cloud_aiplatform_v1_FeatureView_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_descriptor, + new java.lang.String[] { + "FeatureGroups", + }); + internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_FeatureGroup_descriptor = + internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_FeatureGroup_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FeatureView_FeatureRegistrySource_FeatureGroup_descriptor, + new java.lang.String[] { + "FeatureGroupId", "FeatureIds", + }); + internal_static_google_cloud_aiplatform_v1_FeatureView_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_FeatureView_descriptor.getNestedTypes().get(3); + internal_static_google_cloud_aiplatform_v1_FeatureView_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FeatureView_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + 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-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewSync.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewSync.java new file mode 100644 index 000000000000..492d91f9031b --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewSync.java @@ -0,0 +1,1454 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_view_sync.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * FeatureViewSync is a representation of sync operation which copies data from
+ * data source to Feature View in Online Store.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FeatureViewSync} + */ +public final class FeatureViewSync extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.FeatureViewSync) + FeatureViewSyncOrBuilder { + private static final long serialVersionUID = 0L; + // Use FeatureViewSync.newBuilder() to construct. + private FeatureViewSync(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FeatureViewSync() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FeatureViewSync(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureViewSyncProto + .internal_static_google_cloud_aiplatform_v1_FeatureViewSync_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureViewSyncProto + .internal_static_google_cloud_aiplatform_v1_FeatureViewSync_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureViewSync.class, + com.google.cloud.aiplatform.v1.FeatureViewSync.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Name of the FeatureViewSync. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+   * 
+ * + * 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 FeatureViewSync. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+   * 
+ * + * 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. Time when this FeatureViewSync is created. Creation of a
+   * FeatureViewSync means that the job is pending / waiting for sufficient
+   * resources but may not have started the actual data transfer yet.
+   * 
+ * + * .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 createTime_ != null; + } + /** + * + * + *
+   * Output only. Time when this FeatureViewSync is created. Creation of a
+   * FeatureViewSync means that the job is pending / waiting for sufficient
+   * resources but may not have started the actual data transfer yet.
+   * 
+ * + * .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. Time when this FeatureViewSync is created. Creation of a
+   * FeatureViewSync means that the job is pending / waiting for sufficient
+   * resources but may not have started the actual data transfer yet.
+   * 
+ * + * .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 RUN_TIME_FIELD_NUMBER = 5; + private com.google.type.Interval runTime_; + /** + * + * + *
+   * Output only. Time when this FeatureViewSync is finished.
+   * 
+ * + * .google.type.Interval run_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the runTime field is set. + */ + @java.lang.Override + public boolean hasRunTime() { + return runTime_ != null; + } + /** + * + * + *
+   * Output only. Time when this FeatureViewSync is finished.
+   * 
+ * + * .google.type.Interval run_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The runTime. + */ + @java.lang.Override + public com.google.type.Interval getRunTime() { + return runTime_ == null ? com.google.type.Interval.getDefaultInstance() : runTime_; + } + /** + * + * + *
+   * Output only. Time when this FeatureViewSync is finished.
+   * 
+ * + * .google.type.Interval run_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.type.IntervalOrBuilder getRunTimeOrBuilder() { + return runTime_ == null ? com.google.type.Interval.getDefaultInstance() : runTime_; + } + + public static final int FINAL_STATUS_FIELD_NUMBER = 4; + private com.google.rpc.Status finalStatus_; + /** + * + * + *
+   * Output only. Final status of the FeatureViewSync.
+   * 
+ * + * .google.rpc.Status final_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the finalStatus field is set. + */ + @java.lang.Override + public boolean hasFinalStatus() { + return finalStatus_ != null; + } + /** + * + * + *
+   * Output only. Final status of the FeatureViewSync.
+   * 
+ * + * .google.rpc.Status final_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The finalStatus. + */ + @java.lang.Override + public com.google.rpc.Status getFinalStatus() { + return finalStatus_ == null ? com.google.rpc.Status.getDefaultInstance() : finalStatus_; + } + /** + * + * + *
+   * Output only. Final status of the FeatureViewSync.
+   * 
+ * + * .google.rpc.Status final_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getFinalStatusOrBuilder() { + return finalStatus_ == null ? com.google.rpc.Status.getDefaultInstance() : finalStatus_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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 (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (finalStatus_ != null) { + output.writeMessage(4, getFinalStatus()); + } + if (runTime_ != null) { + output.writeMessage(5, getRunTime()); + } + 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 (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (finalStatus_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getFinalStatus()); + } + if (runTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRunTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.FeatureViewSync)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.FeatureViewSync other = + (com.google.cloud.aiplatform.v1.FeatureViewSync) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasRunTime() != other.hasRunTime()) return false; + if (hasRunTime()) { + if (!getRunTime().equals(other.getRunTime())) return false; + } + if (hasFinalStatus() != other.hasFinalStatus()) return false; + if (hasFinalStatus()) { + if (!getFinalStatus().equals(other.getFinalStatus())) return false; + } + if (!getUnknownFields().equals(other.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 (hasRunTime()) { + hash = (37 * hash) + RUN_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRunTime().hashCode(); + } + if (hasFinalStatus()) { + hash = (37 * hash) + FINAL_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getFinalStatus().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.FeatureViewSync parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewSync parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewSync parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewSync parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewSync parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewSync parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewSync parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewSync parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewSync parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewSync parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewSync parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewSync parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.FeatureViewSync prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * FeatureViewSync is a representation of sync operation which copies data from
+   * data source to Feature View in Online Store.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FeatureViewSync} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.FeatureViewSync) + com.google.cloud.aiplatform.v1.FeatureViewSyncOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureViewSyncProto + .internal_static_google_cloud_aiplatform_v1_FeatureViewSync_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureViewSyncProto + .internal_static_google_cloud_aiplatform_v1_FeatureViewSync_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FeatureViewSync.class, + com.google.cloud.aiplatform.v1.FeatureViewSync.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.FeatureViewSync.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + runTime_ = null; + if (runTimeBuilder_ != null) { + runTimeBuilder_.dispose(); + runTimeBuilder_ = null; + } + finalStatus_ = null; + if (finalStatusBuilder_ != null) { + finalStatusBuilder_.dispose(); + finalStatusBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureViewSyncProto + .internal_static_google_cloud_aiplatform_v1_FeatureViewSync_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureViewSync getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.FeatureViewSync.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureViewSync build() { + com.google.cloud.aiplatform.v1.FeatureViewSync result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureViewSync buildPartial() { + com.google.cloud.aiplatform.v1.FeatureViewSync result = + new com.google.cloud.aiplatform.v1.FeatureViewSync(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.FeatureViewSync result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.runTime_ = runTimeBuilder_ == null ? runTime_ : runTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.finalStatus_ = + finalStatusBuilder_ == null ? finalStatus_ : finalStatusBuilder_.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.aiplatform.v1.FeatureViewSync) { + return mergeFrom((com.google.cloud.aiplatform.v1.FeatureViewSync) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.FeatureViewSync other) { + if (other == com.google.cloud.aiplatform.v1.FeatureViewSync.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasRunTime()) { + mergeRunTime(other.getRunTime()); + } + if (other.hasFinalStatus()) { + mergeFinalStatus(other.getFinalStatus()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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 34: + { + input.readMessage(getFinalStatusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getRunTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + 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_ = ""; + /** + * + * + *
+     * Output only. Name of the FeatureViewSync. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+     * 
+ * + * 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 FeatureViewSync. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+     * 
+ * + * 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 FeatureViewSync. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+     * 
+ * + * 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 FeatureViewSync. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+     * 
+ * + * 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 FeatureViewSync. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+     * 
+ * + * 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. Time when this FeatureViewSync is created. Creation of a
+     * FeatureViewSync means that the job is pending / waiting for sufficient
+     * resources but may not have started the actual data transfer yet.
+     * 
+ * + * + * .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. Time when this FeatureViewSync is created. Creation of a
+     * FeatureViewSync means that the job is pending / waiting for sufficient
+     * resources but may not have started the actual data transfer yet.
+     * 
+ * + * + * .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. Time when this FeatureViewSync is created. Creation of a
+     * FeatureViewSync means that the job is pending / waiting for sufficient
+     * resources but may not have started the actual data transfer yet.
+     * 
+ * + * + * .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. Time when this FeatureViewSync is created. Creation of a
+     * FeatureViewSync means that the job is pending / waiting for sufficient
+     * resources but may not have started the actual data transfer yet.
+     * 
+ * + * + * .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. Time when this FeatureViewSync is created. Creation of a
+     * FeatureViewSync means that the job is pending / waiting for sufficient
+     * resources but may not have started the actual data transfer yet.
+     * 
+ * + * + * .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); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this FeatureViewSync is created. Creation of a
+     * FeatureViewSync means that the job is pending / waiting for sufficient
+     * resources but may not have started the actual data transfer yet.
+     * 
+ * + * + * .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. Time when this FeatureViewSync is created. Creation of a
+     * FeatureViewSync means that the job is pending / waiting for sufficient
+     * resources but may not have started the actual data transfer yet.
+     * 
+ * + * + * .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. Time when this FeatureViewSync is created. Creation of a
+     * FeatureViewSync means that the job is pending / waiting for sufficient
+     * resources but may not have started the actual data transfer yet.
+     * 
+ * + * + * .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. Time when this FeatureViewSync is created. Creation of a
+     * FeatureViewSync means that the job is pending / waiting for sufficient
+     * resources but may not have started the actual data transfer yet.
+     * 
+ * + * + * .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.type.Interval runTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Interval, + com.google.type.Interval.Builder, + com.google.type.IntervalOrBuilder> + runTimeBuilder_; + /** + * + * + *
+     * Output only. Time when this FeatureViewSync is finished.
+     * 
+ * + * .google.type.Interval run_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the runTime field is set. + */ + public boolean hasRunTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. Time when this FeatureViewSync is finished.
+     * 
+ * + * .google.type.Interval run_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The runTime. + */ + public com.google.type.Interval getRunTime() { + if (runTimeBuilder_ == null) { + return runTime_ == null ? com.google.type.Interval.getDefaultInstance() : runTime_; + } else { + return runTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this FeatureViewSync is finished.
+     * 
+ * + * .google.type.Interval run_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setRunTime(com.google.type.Interval value) { + if (runTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + runTime_ = value; + } else { + runTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this FeatureViewSync is finished.
+     * 
+ * + * .google.type.Interval run_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setRunTime(com.google.type.Interval.Builder builderForValue) { + if (runTimeBuilder_ == null) { + runTime_ = builderForValue.build(); + } else { + runTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this FeatureViewSync is finished.
+     * 
+ * + * .google.type.Interval run_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeRunTime(com.google.type.Interval value) { + if (runTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && runTime_ != null + && runTime_ != com.google.type.Interval.getDefaultInstance()) { + getRunTimeBuilder().mergeFrom(value); + } else { + runTime_ = value; + } + } else { + runTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this FeatureViewSync is finished.
+     * 
+ * + * .google.type.Interval run_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearRunTime() { + bitField0_ = (bitField0_ & ~0x00000004); + runTime_ = null; + if (runTimeBuilder_ != null) { + runTimeBuilder_.dispose(); + runTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this FeatureViewSync is finished.
+     * 
+ * + * .google.type.Interval run_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.type.Interval.Builder getRunTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getRunTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when this FeatureViewSync is finished.
+     * 
+ * + * .google.type.Interval run_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.type.IntervalOrBuilder getRunTimeOrBuilder() { + if (runTimeBuilder_ != null) { + return runTimeBuilder_.getMessageOrBuilder(); + } else { + return runTime_ == null ? com.google.type.Interval.getDefaultInstance() : runTime_; + } + } + /** + * + * + *
+     * Output only. Time when this FeatureViewSync is finished.
+     * 
+ * + * .google.type.Interval run_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Interval, + com.google.type.Interval.Builder, + com.google.type.IntervalOrBuilder> + getRunTimeFieldBuilder() { + if (runTimeBuilder_ == null) { + runTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Interval, + com.google.type.Interval.Builder, + com.google.type.IntervalOrBuilder>(getRunTime(), getParentForChildren(), isClean()); + runTime_ = null; + } + return runTimeBuilder_; + } + + private com.google.rpc.Status finalStatus_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + finalStatusBuilder_; + /** + * + * + *
+     * Output only. Final status of the FeatureViewSync.
+     * 
+ * + * .google.rpc.Status final_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the finalStatus field is set. + */ + public boolean hasFinalStatus() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Final status of the FeatureViewSync.
+     * 
+ * + * .google.rpc.Status final_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The finalStatus. + */ + public com.google.rpc.Status getFinalStatus() { + if (finalStatusBuilder_ == null) { + return finalStatus_ == null ? com.google.rpc.Status.getDefaultInstance() : finalStatus_; + } else { + return finalStatusBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Final status of the FeatureViewSync.
+     * 
+ * + * .google.rpc.Status final_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setFinalStatus(com.google.rpc.Status value) { + if (finalStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + finalStatus_ = value; + } else { + finalStatusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Final status of the FeatureViewSync.
+     * 
+ * + * .google.rpc.Status final_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setFinalStatus(com.google.rpc.Status.Builder builderForValue) { + if (finalStatusBuilder_ == null) { + finalStatus_ = builderForValue.build(); + } else { + finalStatusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Final status of the FeatureViewSync.
+     * 
+ * + * .google.rpc.Status final_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeFinalStatus(com.google.rpc.Status value) { + if (finalStatusBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && finalStatus_ != null + && finalStatus_ != com.google.rpc.Status.getDefaultInstance()) { + getFinalStatusBuilder().mergeFrom(value); + } else { + finalStatus_ = value; + } + } else { + finalStatusBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Final status of the FeatureViewSync.
+     * 
+ * + * .google.rpc.Status final_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearFinalStatus() { + bitField0_ = (bitField0_ & ~0x00000008); + finalStatus_ = null; + if (finalStatusBuilder_ != null) { + finalStatusBuilder_.dispose(); + finalStatusBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Final status of the FeatureViewSync.
+     * 
+ * + * .google.rpc.Status final_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.Status.Builder getFinalStatusBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getFinalStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Final status of the FeatureViewSync.
+     * 
+ * + * .google.rpc.Status final_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.StatusOrBuilder getFinalStatusOrBuilder() { + if (finalStatusBuilder_ != null) { + return finalStatusBuilder_.getMessageOrBuilder(); + } else { + return finalStatus_ == null ? com.google.rpc.Status.getDefaultInstance() : finalStatus_; + } + } + /** + * + * + *
+     * Output only. Final status of the FeatureViewSync.
+     * 
+ * + * .google.rpc.Status final_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getFinalStatusFieldBuilder() { + if (finalStatusBuilder_ == null) { + finalStatusBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + getFinalStatus(), getParentForChildren(), isClean()); + finalStatus_ = null; + } + return finalStatusBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.FeatureViewSync) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.FeatureViewSync) + private static final com.google.cloud.aiplatform.v1.FeatureViewSync DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.FeatureViewSync(); + } + + public static com.google.cloud.aiplatform.v1.FeatureViewSync getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FeatureViewSync parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureViewSync getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewSyncName.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewSyncName.java new file mode 100644 index 000000000000..43adc0c5b6ef --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewSyncName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.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 FeatureViewSyncName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_FEATURE_ONLINE_STORE_FEATURE_VIEW = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/feature_view_sync"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String featureOnlineStore; + private final String featureView; + + @Deprecated + protected FeatureViewSyncName() { + project = null; + location = null; + featureOnlineStore = null; + featureView = null; + } + + private FeatureViewSyncName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + featureOnlineStore = Preconditions.checkNotNull(builder.getFeatureOnlineStore()); + featureView = Preconditions.checkNotNull(builder.getFeatureView()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getFeatureOnlineStore() { + return featureOnlineStore; + } + + public String getFeatureView() { + return featureView; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static FeatureViewSyncName of( + String project, String location, String featureOnlineStore, String featureView) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setFeatureOnlineStore(featureOnlineStore) + .setFeatureView(featureView) + .build(); + } + + public static String format( + String project, String location, String featureOnlineStore, String featureView) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setFeatureOnlineStore(featureOnlineStore) + .setFeatureView(featureView) + .build() + .toString(); + } + + public static FeatureViewSyncName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_FEATURE_ONLINE_STORE_FEATURE_VIEW.validatedMatch( + formattedString, "FeatureViewSyncName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("feature_online_store"), + matchMap.get("feature_view")); + } + + 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 (FeatureViewSyncName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_FEATURE_ONLINE_STORE_FEATURE_VIEW.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 (featureOnlineStore != null) { + fieldMapBuilder.put("feature_online_store", featureOnlineStore); + } + if (featureView != null) { + fieldMapBuilder.put("feature_view", featureView); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_FEATURE_ONLINE_STORE_FEATURE_VIEW.instantiate( + "project", + project, + "location", + location, + "feature_online_store", + featureOnlineStore, + "feature_view", + featureView); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + FeatureViewSyncName that = ((FeatureViewSyncName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.featureOnlineStore, that.featureOnlineStore) + && Objects.equals(this.featureView, that.featureView); + } + 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(featureOnlineStore); + h *= 1000003; + h ^= Objects.hashCode(featureView); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/feature_view_sync. + */ + public static class Builder { + private String project; + private String location; + private String featureOnlineStore; + private String featureView; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getFeatureOnlineStore() { + return featureOnlineStore; + } + + public String getFeatureView() { + return featureView; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setFeatureOnlineStore(String featureOnlineStore) { + this.featureOnlineStore = featureOnlineStore; + return this; + } + + public Builder setFeatureView(String featureView) { + this.featureView = featureView; + return this; + } + + private Builder(FeatureViewSyncName featureViewSyncName) { + this.project = featureViewSyncName.project; + this.location = featureViewSyncName.location; + this.featureOnlineStore = featureViewSyncName.featureOnlineStore; + this.featureView = featureViewSyncName.featureView; + } + + public FeatureViewSyncName build() { + return new FeatureViewSyncName(this); + } + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewSyncOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewSyncOrBuilder.java new file mode 100644 index 000000000000..89993a72ab98 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewSyncOrBuilder.java @@ -0,0 +1,166 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_view_sync.proto + +package com.google.cloud.aiplatform.v1; + +public interface FeatureViewSyncOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.FeatureViewSync) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Name of the FeatureViewSync. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Name of the FeatureViewSync. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Time when this FeatureViewSync is created. Creation of a
+   * FeatureViewSync means that the job is pending / waiting for sufficient
+   * resources but may not have started the actual data transfer yet.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when this FeatureViewSync is created. Creation of a
+   * FeatureViewSync means that the job is pending / waiting for sufficient
+   * resources but may not have started the actual data transfer yet.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when this FeatureViewSync is created. Creation of a
+   * FeatureViewSync means that the job is pending / waiting for sufficient
+   * resources but may not have started the actual data transfer yet.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when this FeatureViewSync is finished.
+   * 
+ * + * .google.type.Interval run_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the runTime field is set. + */ + boolean hasRunTime(); + /** + * + * + *
+   * Output only. Time when this FeatureViewSync is finished.
+   * 
+ * + * .google.type.Interval run_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The runTime. + */ + com.google.type.Interval getRunTime(); + /** + * + * + *
+   * Output only. Time when this FeatureViewSync is finished.
+   * 
+ * + * .google.type.Interval run_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.type.IntervalOrBuilder getRunTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Final status of the FeatureViewSync.
+   * 
+ * + * .google.rpc.Status final_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the finalStatus field is set. + */ + boolean hasFinalStatus(); + /** + * + * + *
+   * Output only. Final status of the FeatureViewSync.
+   * 
+ * + * .google.rpc.Status final_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The finalStatus. + */ + com.google.rpc.Status getFinalStatus(); + /** + * + * + *
+   * Output only. Final status of the FeatureViewSync.
+   * 
+ * + * .google.rpc.Status final_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.rpc.StatusOrBuilder getFinalStatusOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewSyncProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewSyncProto.java new file mode 100644 index 000000000000..9d4d1ac7f69c --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FeatureViewSyncProto.java @@ -0,0 +1,97 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_view_sync.proto + +package com.google.cloud.aiplatform.v1; + +public final class FeatureViewSyncProto { + private FeatureViewSyncProto() {} + + 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_aiplatform_v1_FeatureViewSync_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FeatureViewSync_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n2google/cloud/aiplatform/v1/feature_vie" + + "w_sync.proto\022\032google.cloud.aiplatform.v1" + + "\032\037google/api/field_behavior.proto\032\031googl" + + "e/api/resource.proto\032\037google/protobuf/ti" + + "mestamp.proto\032\027google/rpc/status.proto\032\032" + + "google/type/interval.proto\"\201\003\n\017FeatureVi" + + "ewSync\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\0225\n\013create_tim" + + "e\030\002 \001(\0132\032.google.protobuf.TimestampB\004\342A\001" + + "\003\022-\n\010run_time\030\005 \001(\0132\025.google.type.Interv" + + "alB\004\342A\001\003\022.\n\014final_status\030\004 \001(\0132\022.google." + + "rpc.StatusB\004\342A\001\003:\303\001\352A\277\001\n)aiplatform.goog" + + "leapis.com/FeatureViewSync\022\221\001projects/{p" + + "roject}/locations/{location}/featureOnli" + + "neStores/{feature_online_store}/featureV" + + "iews/{feature_view}/featureViewSyncs/fea" + + "ture_view_syncB\322\001\n\036com.google.cloud.aipl" + + "atform.v1B\024FeatureViewSyncProtoP\001Z>cloud" + + ".google.com/go/aiplatform/apiv1/aiplatfo" + + "rmpb;aiplatformpb\252\002\032Google.Cloud.AIPlatf" + + "orm.V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Go" + + "ogle::Cloud::Aiplatform::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(), + com.google.rpc.StatusProto.getDescriptor(), + com.google.type.IntervalProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_FeatureViewSync_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_FeatureViewSync_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FeatureViewSync_descriptor, + new java.lang.String[] { + "Name", "CreateTime", "RunTime", "FinalStatus", + }); + 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(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.type.IntervalProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FetchFeatureValuesRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FetchFeatureValuesRequest.java new file mode 100644 index 000000000000..ae027eb483df --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FetchFeatureValuesRequest.java @@ -0,0 +1,1123 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [FeatureOnlineStoreService.FetchFeatureValues][google.cloud.aiplatform.v1.FeatureOnlineStoreService.FetchFeatureValues].
+ * All the features under the requested feature view will be returned.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FetchFeatureValuesRequest} + */ +public final class FetchFeatureValuesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.FetchFeatureValuesRequest) + FetchFeatureValuesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use FetchFeatureValuesRequest.newBuilder() to construct. + private FetchFeatureValuesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FetchFeatureValuesRequest() { + featureView_ = ""; + dataFormat_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FetchFeatureValuesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest.class, + com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest.Builder.class); + } + + public static final int FEATURE_VIEW_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object featureView_ = ""; + /** + * + * + *
+   * Required. FeatureView resource format
+   * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
+   * 
+ * + * + * string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The featureView. + */ + @java.lang.Override + public java.lang.String getFeatureView() { + java.lang.Object ref = featureView_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + featureView_ = s; + return s; + } + } + /** + * + * + *
+   * Required. FeatureView resource format
+   * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
+   * 
+ * + * + * string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for featureView. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFeatureViewBytes() { + java.lang.Object ref = featureView_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + featureView_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_KEY_FIELD_NUMBER = 6; + private com.google.cloud.aiplatform.v1.FeatureViewDataKey dataKey_; + /** + * + * + *
+   * Optional. The request key to fetch feature values for.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataKey field is set. + */ + @java.lang.Override + public boolean hasDataKey() { + return dataKey_ != null; + } + /** + * + * + *
+   * Optional. The request key to fetch feature values for.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataKey. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureViewDataKey getDataKey() { + return dataKey_ == null + ? com.google.cloud.aiplatform.v1.FeatureViewDataKey.getDefaultInstance() + : dataKey_; + } + /** + * + * + *
+   * Optional. The request key to fetch feature values for.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureViewDataKeyOrBuilder getDataKeyOrBuilder() { + return dataKey_ == null + ? com.google.cloud.aiplatform.v1.FeatureViewDataKey.getDefaultInstance() + : dataKey_; + } + + public static final int DATA_FORMAT_FIELD_NUMBER = 7; + private int dataFormat_ = 0; + /** + * + * + *
+   * Optional. Response data format. If not set,
+   * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1.FeatureViewDataFormat.KEY_VALUE]
+   * will be used.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + @java.lang.Override + public int getDataFormatValue() { + return dataFormat_; + } + /** + * + * + *
+   * Optional. Response data format. If not set,
+   * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1.FeatureViewDataFormat.KEY_VALUE]
+   * will be used.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureViewDataFormat getDataFormat() { + com.google.cloud.aiplatform.v1.FeatureViewDataFormat result = + com.google.cloud.aiplatform.v1.FeatureViewDataFormat.forNumber(dataFormat_); + return result == null + ? com.google.cloud.aiplatform.v1.FeatureViewDataFormat.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(featureView_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, featureView_); + } + if (dataKey_ != null) { + output.writeMessage(6, getDataKey()); + } + if (dataFormat_ + != com.google.cloud.aiplatform.v1.FeatureViewDataFormat.FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, dataFormat_); + } + 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(featureView_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, featureView_); + } + if (dataKey_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getDataKey()); + } + if (dataFormat_ + != com.google.cloud.aiplatform.v1.FeatureViewDataFormat.FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, dataFormat_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest other = + (com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest) obj; + + if (!getFeatureView().equals(other.getFeatureView())) return false; + if (hasDataKey() != other.hasDataKey()) return false; + if (hasDataKey()) { + if (!getDataKey().equals(other.getDataKey())) return false; + } + if (dataFormat_ != other.dataFormat_) return false; + if (!getUnknownFields().equals(other.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) + FEATURE_VIEW_FIELD_NUMBER; + hash = (53 * hash) + getFeatureView().hashCode(); + if (hasDataKey()) { + hash = (37 * hash) + DATA_KEY_FIELD_NUMBER; + hash = (53 * hash) + getDataKey().hashCode(); + } + hash = (37 * hash) + DATA_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + dataFormat_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureOnlineStoreService.FetchFeatureValues][google.cloud.aiplatform.v1.FeatureOnlineStoreService.FetchFeatureValues].
+   * All the features under the requested feature view will be returned.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FetchFeatureValuesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.FetchFeatureValuesRequest) + com.google.cloud.aiplatform.v1.FetchFeatureValuesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest.class, + com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + featureView_ = ""; + dataKey_ = null; + if (dataKeyBuilder_ != null) { + dataKeyBuilder_.dispose(); + dataKeyBuilder_ = null; + } + dataFormat_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest build() { + com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest buildPartial() { + com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest result = + new com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.featureView_ = featureView_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataKey_ = dataKeyBuilder_ == null ? dataKey_ : dataKeyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dataFormat_ = dataFormat_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest other) { + if (other == com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest.getDefaultInstance()) + return this; + if (!other.getFeatureView().isEmpty()) { + featureView_ = other.featureView_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasDataKey()) { + mergeDataKey(other.getDataKey()); + } + if (other.dataFormat_ != 0) { + setDataFormatValue(other.getDataFormatValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + featureView_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 50: + { + input.readMessage(getDataKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 50 + case 56: + { + dataFormat_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 56 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + 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 featureView_ = ""; + /** + * + * + *
+     * Required. FeatureView resource format
+     * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
+     * 
+ * + * + * string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The featureView. + */ + public java.lang.String getFeatureView() { + java.lang.Object ref = featureView_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + featureView_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. FeatureView resource format
+     * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
+     * 
+ * + * + * string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for featureView. + */ + public com.google.protobuf.ByteString getFeatureViewBytes() { + java.lang.Object ref = featureView_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + featureView_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. FeatureView resource format
+     * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
+     * 
+ * + * + * string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The featureView to set. + * @return This builder for chaining. + */ + public Builder setFeatureView(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + featureView_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. FeatureView resource format
+     * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
+     * 
+ * + * + * string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearFeatureView() { + featureView_ = getDefaultInstance().getFeatureView(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. FeatureView resource format
+     * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
+     * 
+ * + * + * string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for featureView to set. + * @return This builder for chaining. + */ + public Builder setFeatureViewBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + featureView_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.FeatureViewDataKey dataKey_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureViewDataKey, + com.google.cloud.aiplatform.v1.FeatureViewDataKey.Builder, + com.google.cloud.aiplatform.v1.FeatureViewDataKeyOrBuilder> + dataKeyBuilder_; + /** + * + * + *
+     * Optional. The request key to fetch feature values for.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataKey field is set. + */ + public boolean hasDataKey() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. The request key to fetch feature values for.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataKey. + */ + public com.google.cloud.aiplatform.v1.FeatureViewDataKey getDataKey() { + if (dataKeyBuilder_ == null) { + return dataKey_ == null + ? com.google.cloud.aiplatform.v1.FeatureViewDataKey.getDefaultInstance() + : dataKey_; + } else { + return dataKeyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The request key to fetch feature values for.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataKey(com.google.cloud.aiplatform.v1.FeatureViewDataKey value) { + if (dataKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataKey_ = value; + } else { + dataKeyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The request key to fetch feature values for.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataKey( + com.google.cloud.aiplatform.v1.FeatureViewDataKey.Builder builderForValue) { + if (dataKeyBuilder_ == null) { + dataKey_ = builderForValue.build(); + } else { + dataKeyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The request key to fetch feature values for.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDataKey(com.google.cloud.aiplatform.v1.FeatureViewDataKey value) { + if (dataKeyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && dataKey_ != null + && dataKey_ != com.google.cloud.aiplatform.v1.FeatureViewDataKey.getDefaultInstance()) { + getDataKeyBuilder().mergeFrom(value); + } else { + dataKey_ = value; + } + } else { + dataKeyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The request key to fetch feature values for.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDataKey() { + bitField0_ = (bitField0_ & ~0x00000002); + dataKey_ = null; + if (dataKeyBuilder_ != null) { + dataKeyBuilder_.dispose(); + dataKeyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The request key to fetch feature values for.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureViewDataKey.Builder getDataKeyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDataKeyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The request key to fetch feature values for.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureViewDataKeyOrBuilder getDataKeyOrBuilder() { + if (dataKeyBuilder_ != null) { + return dataKeyBuilder_.getMessageOrBuilder(); + } else { + return dataKey_ == null + ? com.google.cloud.aiplatform.v1.FeatureViewDataKey.getDefaultInstance() + : dataKey_; + } + } + /** + * + * + *
+     * Optional. The request key to fetch feature values for.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureViewDataKey, + com.google.cloud.aiplatform.v1.FeatureViewDataKey.Builder, + com.google.cloud.aiplatform.v1.FeatureViewDataKeyOrBuilder> + getDataKeyFieldBuilder() { + if (dataKeyBuilder_ == null) { + dataKeyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureViewDataKey, + com.google.cloud.aiplatform.v1.FeatureViewDataKey.Builder, + com.google.cloud.aiplatform.v1.FeatureViewDataKeyOrBuilder>( + getDataKey(), getParentForChildren(), isClean()); + dataKey_ = null; + } + return dataKeyBuilder_; + } + + private int dataFormat_ = 0; + /** + * + * + *
+     * Optional. Response data format. If not set,
+     * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1.FeatureViewDataFormat.KEY_VALUE]
+     * will be used.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + @java.lang.Override + public int getDataFormatValue() { + return dataFormat_; + } + /** + * + * + *
+     * Optional. Response data format. If not set,
+     * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1.FeatureViewDataFormat.KEY_VALUE]
+     * will be used.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for dataFormat to set. + * @return This builder for chaining. + */ + public Builder setDataFormatValue(int value) { + dataFormat_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Response data format. If not set,
+     * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1.FeatureViewDataFormat.KEY_VALUE]
+     * will be used.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureViewDataFormat getDataFormat() { + com.google.cloud.aiplatform.v1.FeatureViewDataFormat result = + com.google.cloud.aiplatform.v1.FeatureViewDataFormat.forNumber(dataFormat_); + return result == null + ? com.google.cloud.aiplatform.v1.FeatureViewDataFormat.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Response data format. If not set,
+     * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1.FeatureViewDataFormat.KEY_VALUE]
+     * will be used.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The dataFormat to set. + * @return This builder for chaining. + */ + public Builder setDataFormat(com.google.cloud.aiplatform.v1.FeatureViewDataFormat value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + dataFormat_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Response data format. If not set,
+     * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1.FeatureViewDataFormat.KEY_VALUE]
+     * will be used.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDataFormat() { + bitField0_ = (bitField0_ & ~0x00000004); + dataFormat_ = 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.aiplatform.v1.FetchFeatureValuesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.FetchFeatureValuesRequest) + private static final com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest(); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FetchFeatureValuesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FetchFeatureValuesRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FetchFeatureValuesRequestOrBuilder.java new file mode 100644 index 000000000000..7fbb49544ffb --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FetchFeatureValuesRequestOrBuilder.java @@ -0,0 +1,130 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface FetchFeatureValuesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.FetchFeatureValuesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. FeatureView resource format
+   * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
+   * 
+ * + * + * string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The featureView. + */ + java.lang.String getFeatureView(); + /** + * + * + *
+   * Required. FeatureView resource format
+   * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
+   * 
+ * + * + * string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for featureView. + */ + com.google.protobuf.ByteString getFeatureViewBytes(); + + /** + * + * + *
+   * Optional. The request key to fetch feature values for.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataKey field is set. + */ + boolean hasDataKey(); + /** + * + * + *
+   * Optional. The request key to fetch feature values for.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataKey. + */ + com.google.cloud.aiplatform.v1.FeatureViewDataKey getDataKey(); + /** + * + * + *
+   * Optional. The request key to fetch feature values for.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.FeatureViewDataKeyOrBuilder getDataKeyOrBuilder(); + + /** + * + * + *
+   * Optional. Response data format. If not set,
+   * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1.FeatureViewDataFormat.KEY_VALUE]
+   * will be used.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + int getDataFormatValue(); + /** + * + * + *
+   * Optional. Response data format. If not set,
+   * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1.FeatureViewDataFormat.KEY_VALUE]
+   * will be used.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + com.google.cloud.aiplatform.v1.FeatureViewDataFormat getDataFormat(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FetchFeatureValuesResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FetchFeatureValuesResponse.java new file mode 100644 index 000000000000..f55283bd6172 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FetchFeatureValuesResponse.java @@ -0,0 +1,3467 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for
+ * [FeatureOnlineStoreService.FetchFeatureValues][google.cloud.aiplatform.v1.FeatureOnlineStoreService.FetchFeatureValues]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FetchFeatureValuesResponse} + */ +public final class FetchFeatureValuesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.FetchFeatureValuesResponse) + FetchFeatureValuesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use FetchFeatureValuesResponse.newBuilder() to construct. + private FetchFeatureValuesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FetchFeatureValuesResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FetchFeatureValuesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.class, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.Builder.class); + } + + public interface FeatureNameValuePairListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * List of feature names and values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + java.util.List< + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair> + getFeaturesList(); + /** + * + * + *
+     * List of feature names and values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair + getFeatures(int index); + /** + * + * + *
+     * List of feature names and values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + int getFeaturesCount(); + /** + * + * + *
+     * List of feature names and values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePairOrBuilder> + getFeaturesOrBuilderList(); + /** + * + * + *
+     * List of feature names and values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePairOrBuilder + getFeaturesOrBuilder(int index); + } + /** + * + * + *
+   * Response structure in the format of key (feature name) and (feature) value
+   * pair.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList} + */ + public static final class FeatureNameValuePairList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList) + FeatureNameValuePairListOrBuilder { + private static final long serialVersionUID = 0L; + // Use FeatureNameValuePairList.newBuilder() to construct. + private FeatureNameValuePairList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FeatureNameValuePairList() { + features_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FeatureNameValuePairList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .class, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .Builder.class); + } + + public interface FeatureNameValuePairOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Feature value.
+       * 
+ * + * .google.cloud.aiplatform.v1.FeatureValue value = 2; + * + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + * + * + *
+       * Feature value.
+       * 
+ * + * .google.cloud.aiplatform.v1.FeatureValue value = 2; + * + * @return The value. + */ + com.google.cloud.aiplatform.v1.FeatureValue getValue(); + /** + * + * + *
+       * Feature value.
+       * 
+ * + * .google.cloud.aiplatform.v1.FeatureValue value = 2; + */ + com.google.cloud.aiplatform.v1.FeatureValueOrBuilder getValueOrBuilder(); + + /** + * + * + *
+       * Feature short name.
+       * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+       * Feature short name.
+       * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair.DataCase + getDataCase(); + } + /** + * + * + *
+     * Feature name & value pair.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair} + */ + public static final class FeatureNameValuePair extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair) + FeatureNameValuePairOrBuilder { + private static final long serialVersionUID = 0L; + // Use FeatureNameValuePair.newBuilder() to construct. + private FeatureNameValuePair(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FeatureNameValuePair() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FeatureNameValuePair(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair.class, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair.Builder.class); + } + + private int dataCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object data_; + + public enum DataCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VALUE(2), + DATA_NOT_SET(0); + private final int value; + + private DataCase(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 DataCase valueOf(int value) { + return forNumber(value); + } + + public static DataCase forNumber(int value) { + switch (value) { + case 2: + return VALUE; + case 0: + return DATA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DataCase getDataCase() { + return DataCase.forNumber(dataCase_); + } + + public static final int VALUE_FIELD_NUMBER = 2; + /** + * + * + *
+       * Feature value.
+       * 
+ * + * .google.cloud.aiplatform.v1.FeatureValue value = 2; + * + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return dataCase_ == 2; + } + /** + * + * + *
+       * Feature value.
+       * 
+ * + * .google.cloud.aiplatform.v1.FeatureValue value = 2; + * + * @return The value. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureValue getValue() { + if (dataCase_ == 2) { + return (com.google.cloud.aiplatform.v1.FeatureValue) data_; + } + return com.google.cloud.aiplatform.v1.FeatureValue.getDefaultInstance(); + } + /** + * + * + *
+       * Feature value.
+       * 
+ * + * .google.cloud.aiplatform.v1.FeatureValue value = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureValueOrBuilder getValueOrBuilder() { + if (dataCase_ == 2) { + return (com.google.cloud.aiplatform.v1.FeatureValue) data_; + } + return com.google.cloud.aiplatform.v1.FeatureValue.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+       * Feature short name.
+       * 
+ * + * 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; + } + } + /** + * + * + *
+       * Feature short name.
+       * 
+ * + * 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 (dataCase_ == 2) { + output.writeMessage(2, (com.google.cloud.aiplatform.v1.FeatureValue) data_); + } + 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 (dataCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.aiplatform.v1.FeatureValue) data_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair + other = + (com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair) + obj; + + if (!getName().equals(other.getName())) return false; + if (!getDataCase().equals(other.getDataCase())) return false; + switch (dataCase_) { + case 2: + if (!getValue().equals(other.getValue())) 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 (dataCase_) { + case 2: + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList.FeatureNameValuePair + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList.FeatureNameValuePair + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList.FeatureNameValuePair + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList.FeatureNameValuePair + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList.FeatureNameValuePair + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList.FeatureNameValuePair + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList.FeatureNameValuePair + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList.FeatureNameValuePair + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList.FeatureNameValuePair + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList.FeatureNameValuePair + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList.FeatureNameValuePair + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList.FeatureNameValuePair + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Feature name & value pair.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair) + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePairOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair.class, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair.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(); + } + name_ = ""; + dataCase_ = 0; + data_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair + build() { + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair + buildPartial() { + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair + result = + new com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList.FeatureNameValuePair(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + } + + private void buildPartialOneofs( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair + result) { + result.dataCase_ = dataCase_; + result.data_ = this.data_; + if (dataCase_ == 2 && valueBuilder_ != null) { + result.data_ = valueBuilder_.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.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair + other) { + if (other + == com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getDataCase()) { + case VALUE: + { + mergeValue(other.getValue()); + break; + } + case DATA_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: + { + input.readMessage(getValueFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 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 dataCase_ = 0; + private java.lang.Object data_; + + public DataCase getDataCase() { + return DataCase.forNumber(dataCase_); + } + + public Builder clearData() { + dataCase_ = 0; + data_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureValue, + com.google.cloud.aiplatform.v1.FeatureValue.Builder, + com.google.cloud.aiplatform.v1.FeatureValueOrBuilder> + valueBuilder_; + /** + * + * + *
+         * Feature value.
+         * 
+ * + * .google.cloud.aiplatform.v1.FeatureValue value = 2; + * + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return dataCase_ == 2; + } + /** + * + * + *
+         * Feature value.
+         * 
+ * + * .google.cloud.aiplatform.v1.FeatureValue value = 2; + * + * @return The value. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureValue getValue() { + if (valueBuilder_ == null) { + if (dataCase_ == 2) { + return (com.google.cloud.aiplatform.v1.FeatureValue) data_; + } + return com.google.cloud.aiplatform.v1.FeatureValue.getDefaultInstance(); + } else { + if (dataCase_ == 2) { + return valueBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.FeatureValue.getDefaultInstance(); + } + } + /** + * + * + *
+         * Feature value.
+         * 
+ * + * .google.cloud.aiplatform.v1.FeatureValue value = 2; + */ + public Builder setValue(com.google.cloud.aiplatform.v1.FeatureValue value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + valueBuilder_.setMessage(value); + } + dataCase_ = 2; + return this; + } + /** + * + * + *
+         * Feature value.
+         * 
+ * + * .google.cloud.aiplatform.v1.FeatureValue value = 2; + */ + public Builder setValue( + com.google.cloud.aiplatform.v1.FeatureValue.Builder builderForValue) { + if (valueBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 2; + return this; + } + /** + * + * + *
+         * Feature value.
+         * 
+ * + * .google.cloud.aiplatform.v1.FeatureValue value = 2; + */ + public Builder mergeValue(com.google.cloud.aiplatform.v1.FeatureValue value) { + if (valueBuilder_ == null) { + if (dataCase_ == 2 + && data_ != com.google.cloud.aiplatform.v1.FeatureValue.getDefaultInstance()) { + data_ = + com.google.cloud.aiplatform.v1.FeatureValue.newBuilder( + (com.google.cloud.aiplatform.v1.FeatureValue) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 2) { + valueBuilder_.mergeFrom(value); + } else { + valueBuilder_.setMessage(value); + } + } + dataCase_ = 2; + return this; + } + /** + * + * + *
+         * Feature value.
+         * 
+ * + * .google.cloud.aiplatform.v1.FeatureValue value = 2; + */ + public Builder clearValue() { + if (valueBuilder_ == null) { + if (dataCase_ == 2) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 2) { + dataCase_ = 0; + data_ = null; + } + valueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Feature value.
+         * 
+ * + * .google.cloud.aiplatform.v1.FeatureValue value = 2; + */ + public com.google.cloud.aiplatform.v1.FeatureValue.Builder getValueBuilder() { + return getValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Feature value.
+         * 
+ * + * .google.cloud.aiplatform.v1.FeatureValue value = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureValueOrBuilder getValueOrBuilder() { + if ((dataCase_ == 2) && (valueBuilder_ != null)) { + return valueBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 2) { + return (com.google.cloud.aiplatform.v1.FeatureValue) data_; + } + return com.google.cloud.aiplatform.v1.FeatureValue.getDefaultInstance(); + } + } + /** + * + * + *
+         * Feature value.
+         * 
+ * + * .google.cloud.aiplatform.v1.FeatureValue value = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureValue, + com.google.cloud.aiplatform.v1.FeatureValue.Builder, + com.google.cloud.aiplatform.v1.FeatureValueOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + if (!(dataCase_ == 2)) { + data_ = com.google.cloud.aiplatform.v1.FeatureValue.getDefaultInstance(); + } + valueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureValue, + com.google.cloud.aiplatform.v1.FeatureValue.Builder, + com.google.cloud.aiplatform.v1.FeatureValueOrBuilder>( + (com.google.cloud.aiplatform.v1.FeatureValue) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 2; + onChanged(); + return valueBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+         * Feature short name.
+         * 
+ * + * 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; + } + } + /** + * + * + *
+         * Feature short name.
+         * 
+ * + * 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; + } + } + /** + * + * + *
+         * Feature short name.
+         * 
+ * + * 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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Feature short name.
+         * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * Feature short name.
+         * 
+ * + * 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_ |= 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.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair) + private static final com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList.FeatureNameValuePair + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair(); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList.FeatureNameValuePair + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FeatureNameValuePair parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int FEATURES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair> + features_; + /** + * + * + *
+     * List of feature names and values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair> + getFeaturesList() { + return features_; + } + /** + * + * + *
+     * List of feature names and values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePairOrBuilder> + getFeaturesOrBuilderList() { + return features_; + } + /** + * + * + *
+     * List of feature names and values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + @java.lang.Override + public int getFeaturesCount() { + return features_.size(); + } + /** + * + * + *
+     * List of feature names and values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair + getFeatures(int index) { + return features_.get(index); + } + /** + * + * + *
+     * List of feature names and values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePairOrBuilder + getFeaturesOrBuilder(int index) { + return features_.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 < features_.size(); i++) { + output.writeMessage(1, features_.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 < features_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, features_.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.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList other = + (com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList) obj; + + if (!getFeaturesList().equals(other.getFeaturesList())) return false; + if (!getUnknownFields().equals(other.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 (getFeaturesCount() > 0) { + hash = (37 * hash) + FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getFeaturesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 structure in the format of key (feature name) and (feature) value
+     * pair.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList) + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .class, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + } else { + features_ = null; + featuresBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_FeatureNameValuePairList_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + build() { + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + buildPartial() { + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList result = + new com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList( + this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + result) { + if (featuresBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.features_ = features_; + } else { + result.features_ = featuresBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + 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.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + other) { + if (other + == com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .getDefaultInstance()) return this; + if (featuresBuilder_ == null) { + if (!other.features_.isEmpty()) { + if (features_.isEmpty()) { + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeaturesIsMutable(); + features_.addAll(other.features_); + } + onChanged(); + } + } else { + if (!other.features_.isEmpty()) { + if (featuresBuilder_.isEmpty()) { + featuresBuilder_.dispose(); + featuresBuilder_ = null; + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + featuresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFeaturesFieldBuilder() + : null; + } else { + featuresBuilder_.addAllMessages(other.features_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair + m = + input.readMessage( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList.FeatureNameValuePair.parser(), + extensionRegistry); + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(m); + } else { + featuresBuilder_.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< + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair> + features_ = java.util.Collections.emptyList(); + + private void ensureFeaturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + features_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair>(features_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair.Builder, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePairOrBuilder> + featuresBuilder_; + + /** + * + * + *
+       * List of feature names and values.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair> + getFeaturesList() { + if (featuresBuilder_ == null) { + return java.util.Collections.unmodifiableList(features_); + } else { + return featuresBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * List of feature names and values.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + public int getFeaturesCount() { + if (featuresBuilder_ == null) { + return features_.size(); + } else { + return featuresBuilder_.getCount(); + } + } + /** + * + * + *
+       * List of feature names and values.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair + getFeatures(int index) { + if (featuresBuilder_ == null) { + return features_.get(index); + } else { + return featuresBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * List of feature names and values.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + public Builder setFeatures( + int index, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair + value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.set(index, value); + onChanged(); + } else { + featuresBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * List of feature names and values.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + public Builder setFeatures( + int index, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair.Builder + builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.set(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of feature names and values.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + public Builder addFeatures( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair + value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(value); + onChanged(); + } else { + featuresBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * List of feature names and values.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + public Builder addFeatures( + int index, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair + value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(index, value); + onChanged(); + } else { + featuresBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * List of feature names and values.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + public Builder addFeatures( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair.Builder + builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of feature names and values.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + public Builder addFeatures( + int index, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair.Builder + builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of feature names and values.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + public Builder addAllFeatures( + java.lang.Iterable< + ? extends + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList.FeatureNameValuePair> + values) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, features_); + onChanged(); + } else { + featuresBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * List of feature names and values.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + public Builder clearFeatures() { + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + featuresBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * List of feature names and values.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + public Builder removeFeatures(int index) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.remove(index); + onChanged(); + } else { + featuresBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * List of feature names and values.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair.Builder + getFeaturesBuilder(int index) { + return getFeaturesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * List of feature names and values.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePairOrBuilder + getFeaturesOrBuilder(int index) { + if (featuresBuilder_ == null) { + return features_.get(index); + } else { + return featuresBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * List of feature names and values.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePairOrBuilder> + getFeaturesOrBuilderList() { + if (featuresBuilder_ != null) { + return featuresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(features_); + } + } + /** + * + * + *
+       * List of feature names and values.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair.Builder + addFeaturesBuilder() { + return getFeaturesFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair.getDefaultInstance()); + } + /** + * + * + *
+       * List of feature names and values.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair.Builder + addFeaturesBuilder(int index) { + return getFeaturesFieldBuilder() + .addBuilder( + index, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair.getDefaultInstance()); + } + /** + * + * + *
+       * List of feature names and values.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair features = 1; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair.Builder> + getFeaturesBuilderList() { + return getFeaturesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair.Builder, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePairOrBuilder> + getFeaturesFieldBuilder() { + if (featuresBuilder_ == null) { + featuresBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePair.Builder, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .FeatureNameValuePairOrBuilder>( + features_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + features_ = null; + } + return featuresBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList) + private static final com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList(); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FeatureNameValuePairList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int formatCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object format_; + + public enum FormatCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + KEY_VALUES(3), + PROTO_STRUCT(2), + FORMAT_NOT_SET(0); + private final int value; + + private FormatCase(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 FormatCase valueOf(int value) { + return forNumber(value); + } + + public static FormatCase forNumber(int value) { + switch (value) { + case 3: + return KEY_VALUES; + case 2: + return PROTO_STRUCT; + case 0: + return FORMAT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public FormatCase getFormatCase() { + return FormatCase.forNumber(formatCase_); + } + + public static final int KEY_VALUES_FIELD_NUMBER = 3; + /** + * + * + *
+   * Feature values in KeyValue format.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList key_values = 3; + * + * + * @return Whether the keyValues field is set. + */ + @java.lang.Override + public boolean hasKeyValues() { + return formatCase_ == 3; + } + /** + * + * + *
+   * Feature values in KeyValue format.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList key_values = 3; + * + * + * @return The keyValues. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + getKeyValues() { + if (formatCase_ == 3) { + return (com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList) + format_; + } + return com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .getDefaultInstance(); + } + /** + * + * + *
+   * Feature values in KeyValue format.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList key_values = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairListOrBuilder + getKeyValuesOrBuilder() { + if (formatCase_ == 3) { + return (com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList) + format_; + } + return com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .getDefaultInstance(); + } + + public static final int PROTO_STRUCT_FIELD_NUMBER = 2; + /** + * + * + *
+   * Feature values in proto Struct format.
+   * 
+ * + * .google.protobuf.Struct proto_struct = 2; + * + * @return Whether the protoStruct field is set. + */ + @java.lang.Override + public boolean hasProtoStruct() { + return formatCase_ == 2; + } + /** + * + * + *
+   * Feature values in proto Struct format.
+   * 
+ * + * .google.protobuf.Struct proto_struct = 2; + * + * @return The protoStruct. + */ + @java.lang.Override + public com.google.protobuf.Struct getProtoStruct() { + if (formatCase_ == 2) { + return (com.google.protobuf.Struct) format_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + /** + * + * + *
+   * Feature values in proto Struct format.
+   * 
+ * + * .google.protobuf.Struct proto_struct = 2; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getProtoStructOrBuilder() { + if (formatCase_ == 2) { + return (com.google.protobuf.Struct) format_; + } + return com.google.protobuf.Struct.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 (formatCase_ == 2) { + output.writeMessage(2, (com.google.protobuf.Struct) format_); + } + if (formatCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList) + format_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (formatCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.protobuf.Struct) format_); + } + if (formatCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList) + format_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse other = + (com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse) obj; + + if (!getFormatCase().equals(other.getFormatCase())) return false; + switch (formatCase_) { + case 3: + if (!getKeyValues().equals(other.getKeyValues())) return false; + break; + case 2: + if (!getProtoStruct().equals(other.getProtoStruct())) 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 (formatCase_) { + case 3: + hash = (37 * hash) + KEY_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getKeyValues().hashCode(); + break; + case 2: + hash = (37 * hash) + PROTO_STRUCT_FIELD_NUMBER; + hash = (53 * hash) + getProtoStruct().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureOnlineStoreService.FetchFeatureValues][google.cloud.aiplatform.v1.FeatureOnlineStoreService.FetchFeatureValues]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FetchFeatureValuesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.FetchFeatureValuesResponse) + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.class, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (keyValuesBuilder_ != null) { + keyValuesBuilder_.clear(); + } + if (protoStructBuilder_ != null) { + protoStructBuilder_.clear(); + } + formatCase_ = 0; + format_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1_FetchFeatureValuesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse build() { + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse buildPartial() { + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse result = + new com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse result) { + result.formatCase_ = formatCase_; + result.format_ = this.format_; + if (formatCase_ == 3 && keyValuesBuilder_ != null) { + result.format_ = keyValuesBuilder_.build(); + } + if (formatCase_ == 2 && protoStructBuilder_ != null) { + result.format_ = protoStructBuilder_.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.aiplatform.v1.FetchFeatureValuesResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse other) { + if (other == com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.getDefaultInstance()) + return this; + switch (other.getFormatCase()) { + case KEY_VALUES: + { + mergeKeyValues(other.getKeyValues()); + break; + } + case PROTO_STRUCT: + { + mergeProtoStruct(other.getProtoStruct()); + break; + } + case FORMAT_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(getProtoStructFieldBuilder().getBuilder(), extensionRegistry); + formatCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getKeyValuesFieldBuilder().getBuilder(), extensionRegistry); + formatCase_ = 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 formatCase_ = 0; + private java.lang.Object format_; + + public FormatCase getFormatCase() { + return FormatCase.forNumber(formatCase_); + } + + public Builder clearFormat() { + formatCase_ = 0; + format_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .Builder, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairListOrBuilder> + keyValuesBuilder_; + /** + * + * + *
+     * Feature values in KeyValue format.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList key_values = 3; + * + * + * @return Whether the keyValues field is set. + */ + @java.lang.Override + public boolean hasKeyValues() { + return formatCase_ == 3; + } + /** + * + * + *
+     * Feature values in KeyValue format.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList key_values = 3; + * + * + * @return The keyValues. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + getKeyValues() { + if (keyValuesBuilder_ == null) { + if (formatCase_ == 3) { + return (com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList) + format_; + } + return com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .getDefaultInstance(); + } else { + if (formatCase_ == 3) { + return keyValuesBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Feature values in KeyValue format.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList key_values = 3; + * + */ + public Builder setKeyValues( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList value) { + if (keyValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + format_ = value; + onChanged(); + } else { + keyValuesBuilder_.setMessage(value); + } + formatCase_ = 3; + return this; + } + /** + * + * + *
+     * Feature values in KeyValue format.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList key_values = 3; + * + */ + public Builder setKeyValues( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.Builder + builderForValue) { + if (keyValuesBuilder_ == null) { + format_ = builderForValue.build(); + onChanged(); + } else { + keyValuesBuilder_.setMessage(builderForValue.build()); + } + formatCase_ = 3; + return this; + } + /** + * + * + *
+     * Feature values in KeyValue format.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList key_values = 3; + * + */ + public Builder mergeKeyValues( + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList value) { + if (keyValuesBuilder_ == null) { + if (formatCase_ == 3 + && format_ + != com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList.getDefaultInstance()) { + format_ = + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .newBuilder( + (com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList) + format_) + .mergeFrom(value) + .buildPartial(); + } else { + format_ = value; + } + onChanged(); + } else { + if (formatCase_ == 3) { + keyValuesBuilder_.mergeFrom(value); + } else { + keyValuesBuilder_.setMessage(value); + } + } + formatCase_ = 3; + return this; + } + /** + * + * + *
+     * Feature values in KeyValue format.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList key_values = 3; + * + */ + public Builder clearKeyValues() { + if (keyValuesBuilder_ == null) { + if (formatCase_ == 3) { + formatCase_ = 0; + format_ = null; + onChanged(); + } + } else { + if (formatCase_ == 3) { + formatCase_ = 0; + format_ = null; + } + keyValuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Feature values in KeyValue format.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList key_values = 3; + * + */ + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .Builder + getKeyValuesBuilder() { + return getKeyValuesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Feature values in KeyValue format.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList key_values = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairListOrBuilder + getKeyValuesOrBuilder() { + if ((formatCase_ == 3) && (keyValuesBuilder_ != null)) { + return keyValuesBuilder_.getMessageOrBuilder(); + } else { + if (formatCase_ == 3) { + return (com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairList) + format_; + } + return com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Feature values in KeyValue format.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList key_values = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .Builder, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairListOrBuilder> + getKeyValuesFieldBuilder() { + if (keyValuesBuilder_ == null) { + if (!(formatCase_ == 3)) { + format_ = + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .getDefaultInstance(); + } + keyValuesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList + .Builder, + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse + .FeatureNameValuePairListOrBuilder>( + (com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList) + format_, + getParentForChildren(), + isClean()); + format_ = null; + } + formatCase_ = 3; + onChanged(); + return keyValuesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + protoStructBuilder_; + /** + * + * + *
+     * Feature values in proto Struct format.
+     * 
+ * + * .google.protobuf.Struct proto_struct = 2; + * + * @return Whether the protoStruct field is set. + */ + @java.lang.Override + public boolean hasProtoStruct() { + return formatCase_ == 2; + } + /** + * + * + *
+     * Feature values in proto Struct format.
+     * 
+ * + * .google.protobuf.Struct proto_struct = 2; + * + * @return The protoStruct. + */ + @java.lang.Override + public com.google.protobuf.Struct getProtoStruct() { + if (protoStructBuilder_ == null) { + if (formatCase_ == 2) { + return (com.google.protobuf.Struct) format_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } else { + if (formatCase_ == 2) { + return protoStructBuilder_.getMessage(); + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + } + /** + * + * + *
+     * Feature values in proto Struct format.
+     * 
+ * + * .google.protobuf.Struct proto_struct = 2; + */ + public Builder setProtoStruct(com.google.protobuf.Struct value) { + if (protoStructBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + format_ = value; + onChanged(); + } else { + protoStructBuilder_.setMessage(value); + } + formatCase_ = 2; + return this; + } + /** + * + * + *
+     * Feature values in proto Struct format.
+     * 
+ * + * .google.protobuf.Struct proto_struct = 2; + */ + public Builder setProtoStruct(com.google.protobuf.Struct.Builder builderForValue) { + if (protoStructBuilder_ == null) { + format_ = builderForValue.build(); + onChanged(); + } else { + protoStructBuilder_.setMessage(builderForValue.build()); + } + formatCase_ = 2; + return this; + } + /** + * + * + *
+     * Feature values in proto Struct format.
+     * 
+ * + * .google.protobuf.Struct proto_struct = 2; + */ + public Builder mergeProtoStruct(com.google.protobuf.Struct value) { + if (protoStructBuilder_ == null) { + if (formatCase_ == 2 && format_ != com.google.protobuf.Struct.getDefaultInstance()) { + format_ = + com.google.protobuf.Struct.newBuilder((com.google.protobuf.Struct) format_) + .mergeFrom(value) + .buildPartial(); + } else { + format_ = value; + } + onChanged(); + } else { + if (formatCase_ == 2) { + protoStructBuilder_.mergeFrom(value); + } else { + protoStructBuilder_.setMessage(value); + } + } + formatCase_ = 2; + return this; + } + /** + * + * + *
+     * Feature values in proto Struct format.
+     * 
+ * + * .google.protobuf.Struct proto_struct = 2; + */ + public Builder clearProtoStruct() { + if (protoStructBuilder_ == null) { + if (formatCase_ == 2) { + formatCase_ = 0; + format_ = null; + onChanged(); + } + } else { + if (formatCase_ == 2) { + formatCase_ = 0; + format_ = null; + } + protoStructBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Feature values in proto Struct format.
+     * 
+ * + * .google.protobuf.Struct proto_struct = 2; + */ + public com.google.protobuf.Struct.Builder getProtoStructBuilder() { + return getProtoStructFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Feature values in proto Struct format.
+     * 
+ * + * .google.protobuf.Struct proto_struct = 2; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getProtoStructOrBuilder() { + if ((formatCase_ == 2) && (protoStructBuilder_ != null)) { + return protoStructBuilder_.getMessageOrBuilder(); + } else { + if (formatCase_ == 2) { + return (com.google.protobuf.Struct) format_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + } + /** + * + * + *
+     * Feature values in proto Struct format.
+     * 
+ * + * .google.protobuf.Struct proto_struct = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getProtoStructFieldBuilder() { + if (protoStructBuilder_ == null) { + if (!(formatCase_ == 2)) { + format_ = com.google.protobuf.Struct.getDefaultInstance(); + } + protoStructBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + (com.google.protobuf.Struct) format_, getParentForChildren(), isClean()); + format_ = null; + } + formatCase_ = 2; + onChanged(); + return protoStructBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.FetchFeatureValuesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.FetchFeatureValuesResponse) + private static final com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse(); + } + + public static com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FetchFeatureValuesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FetchFeatureValuesResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FetchFeatureValuesResponseOrBuilder.java new file mode 100644 index 000000000000..3521aeab80c4 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FetchFeatureValuesResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface FetchFeatureValuesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.FetchFeatureValuesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Feature values in KeyValue format.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList key_values = 3; + * + * + * @return Whether the keyValues field is set. + */ + boolean hasKeyValues(); + /** + * + * + *
+   * Feature values in KeyValue format.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList key_values = 3; + * + * + * @return The keyValues. + */ + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList getKeyValues(); + /** + * + * + *
+   * Feature values in KeyValue format.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList key_values = 3; + * + */ + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairListOrBuilder + getKeyValuesOrBuilder(); + + /** + * + * + *
+   * Feature values in proto Struct format.
+   * 
+ * + * .google.protobuf.Struct proto_struct = 2; + * + * @return Whether the protoStruct field is set. + */ + boolean hasProtoStruct(); + /** + * + * + *
+   * Feature values in proto Struct format.
+   * 
+ * + * .google.protobuf.Struct proto_struct = 2; + * + * @return The protoStruct. + */ + com.google.protobuf.Struct getProtoStruct(); + /** + * + * + *
+   * Feature values in proto Struct format.
+   * 
+ * + * .google.protobuf.Struct proto_struct = 2; + */ + com.google.protobuf.StructOrBuilder getProtoStructOrBuilder(); + + com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FormatCase getFormatCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureGroupRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureGroupRequest.java new file mode 100644 index 000000000000..026a2783498d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureGroupRequest.java @@ -0,0 +1,641 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [FeatureRegistryService.GetFeatureGroup][google.cloud.aiplatform.v1.FeatureRegistryService.GetFeatureGroup].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetFeatureGroupRequest} + */ +public final class GetFeatureGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetFeatureGroupRequest) + GetFeatureGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetFeatureGroupRequest.newBuilder() to construct. + private GetFeatureGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetFeatureGroupRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetFeatureGroupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_GetFeatureGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_GetFeatureGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetFeatureGroupRequest.class, + com.google.cloud.aiplatform.v1.GetFeatureGroupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the FeatureGroup 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. The name of the FeatureGroup 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.aiplatform.v1.GetFeatureGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetFeatureGroupRequest other = + (com.google.cloud.aiplatform.v1.GetFeatureGroupRequest) 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.aiplatform.v1.GetFeatureGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureGroupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureGroupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.GetFeatureGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureRegistryService.GetFeatureGroup][google.cloud.aiplatform.v1.FeatureRegistryService.GetFeatureGroup].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetFeatureGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetFeatureGroupRequest) + com.google.cloud.aiplatform.v1.GetFeatureGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_GetFeatureGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_GetFeatureGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetFeatureGroupRequest.class, + com.google.cloud.aiplatform.v1.GetFeatureGroupRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetFeatureGroupRequest.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.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_GetFeatureGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetFeatureGroupRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetFeatureGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetFeatureGroupRequest build() { + com.google.cloud.aiplatform.v1.GetFeatureGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetFeatureGroupRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetFeatureGroupRequest result = + new com.google.cloud.aiplatform.v1.GetFeatureGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.GetFeatureGroupRequest 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.aiplatform.v1.GetFeatureGroupRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetFeatureGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GetFeatureGroupRequest other) { + if (other == com.google.cloud.aiplatform.v1.GetFeatureGroupRequest.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 FeatureGroup 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. The name of the FeatureGroup 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. The name of the FeatureGroup 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. The name of the FeatureGroup 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. The name of the FeatureGroup 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.aiplatform.v1.GetFeatureGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetFeatureGroupRequest) + private static final com.google.cloud.aiplatform.v1.GetFeatureGroupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetFeatureGroupRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetFeatureGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetFeatureGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureGroupRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureGroupRequestOrBuilder.java new file mode 100644 index 000000000000..64655be8fabe --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureGroupRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface GetFeatureGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetFeatureGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the FeatureGroup resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the FeatureGroup 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-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureOnlineStoreRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureOnlineStoreRequest.java new file mode 100644 index 000000000000..db8fb479b18e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureOnlineStoreRequest.java @@ -0,0 +1,641 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [FeatureOnlineStoreAdminService.GetFeatureOnlineStore][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.GetFeatureOnlineStore].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest} + */ +public final class GetFeatureOnlineStoreRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest) + GetFeatureOnlineStoreRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetFeatureOnlineStoreRequest.newBuilder() to construct. + private GetFeatureOnlineStoreRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetFeatureOnlineStoreRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetFeatureOnlineStoreRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_GetFeatureOnlineStoreRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_GetFeatureOnlineStoreRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest.class, + com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the FeatureOnlineStore 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. The name of the FeatureOnlineStore 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.aiplatform.v1.GetFeatureOnlineStoreRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest other = + (com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest) 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.aiplatform.v1.GetFeatureOnlineStoreRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureOnlineStoreAdminService.GetFeatureOnlineStore][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.GetFeatureOnlineStore].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest) + com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_GetFeatureOnlineStoreRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_GetFeatureOnlineStoreRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest.class, + com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest.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.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_GetFeatureOnlineStoreRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest build() { + com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest result = + new com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest 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.aiplatform.v1.GetFeatureOnlineStoreRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest other) { + if (other == com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest.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 FeatureOnlineStore 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. The name of the FeatureOnlineStore 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. The name of the FeatureOnlineStore 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. The name of the FeatureOnlineStore 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. The name of the FeatureOnlineStore 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.aiplatform.v1.GetFeatureOnlineStoreRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest) + private static final com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetFeatureOnlineStoreRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureOnlineStoreRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureOnlineStoreRequestOrBuilder.java new file mode 100644 index 000000000000..26ca4bc0bd47 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureOnlineStoreRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface GetFeatureOnlineStoreRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the FeatureOnlineStore resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the FeatureOnlineStore 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-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureRequest.java index 48d82889bf0c..ba1f4b309867 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureRequest.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureRequest.java @@ -24,6 +24,8 @@ *
  * Request message for
  * [FeaturestoreService.GetFeature][google.cloud.aiplatform.v1.FeaturestoreService.GetFeature].
+ * Request message for
+ * [FeatureRegistryService.GetFeature][google.cloud.aiplatform.v1.FeatureRegistryService.GetFeature].
  * 
* * Protobuf type {@code google.cloud.aiplatform.v1.GetFeatureRequest} @@ -72,8 +74,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The name of the Feature resource.
-   * Format:
+   * Format for entity_type as parent:
    * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
    * 
* * @@ -99,8 +103,10 @@ public java.lang.String getName() { * *
    * Required. The name of the Feature resource.
-   * Format:
+   * Format for entity_type as parent:
    * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
    * 
* * @@ -287,6 +293,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * Request message for
    * [FeaturestoreService.GetFeature][google.cloud.aiplatform.v1.FeaturestoreService.GetFeature].
+   * Request message for
+   * [FeatureRegistryService.GetFeature][google.cloud.aiplatform.v1.FeatureRegistryService.GetFeature].
    * 
* * Protobuf type {@code google.cloud.aiplatform.v1.GetFeatureRequest} @@ -471,8 +479,10 @@ public Builder mergeFrom( * *
      * Required. The name of the Feature resource.
-     * Format:
+     * Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* * @@ -497,8 +507,10 @@ public java.lang.String getName() { * *
      * Required. The name of the Feature resource.
-     * Format:
+     * Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* * @@ -523,8 +535,10 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. The name of the Feature resource.
-     * Format:
+     * Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* * @@ -548,8 +562,10 @@ public Builder setName(java.lang.String value) { * *
      * Required. The name of the Feature resource.
-     * Format:
+     * Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* * @@ -569,8 +585,10 @@ public Builder clearName() { * *
      * Required. The name of the Feature resource.
-     * Format:
+     * Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureRequestOrBuilder.java index 9c46564ad6b6..92927ca77144 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureRequestOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureRequestOrBuilder.java @@ -28,8 +28,10 @@ public interface GetFeatureRequestOrBuilder * *
    * Required. The name of the Feature resource.
-   * Format:
+   * Format for entity_type as parent:
    * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
    * 
* * @@ -44,8 +46,10 @@ public interface GetFeatureRequestOrBuilder * *
    * Required. The name of the Feature resource.
-   * Format:
+   * Format for entity_type as parent:
    * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
    * 
* * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureViewRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureViewRequest.java new file mode 100644 index 000000000000..46208dbd3080 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureViewRequest.java @@ -0,0 +1,654 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [FeatureOnlineStoreAdminService.GetFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.GetFeatureView].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetFeatureViewRequest} + */ +public final class GetFeatureViewRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetFeatureViewRequest) + GetFeatureViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetFeatureViewRequest.newBuilder() to construct. + private GetFeatureViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetFeatureViewRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetFeatureViewRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_GetFeatureViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_GetFeatureViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetFeatureViewRequest.class, + com.google.cloud.aiplatform.v1.GetFeatureViewRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the FeatureView resource.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * 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 FeatureView resource.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * 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.aiplatform.v1.GetFeatureViewRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetFeatureViewRequest other = + (com.google.cloud.aiplatform.v1.GetFeatureViewRequest) 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.aiplatform.v1.GetFeatureViewRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.GetFeatureViewRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureOnlineStoreAdminService.GetFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.GetFeatureView].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetFeatureViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetFeatureViewRequest) + com.google.cloud.aiplatform.v1.GetFeatureViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_GetFeatureViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_GetFeatureViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetFeatureViewRequest.class, + com.google.cloud.aiplatform.v1.GetFeatureViewRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetFeatureViewRequest.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.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_GetFeatureViewRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetFeatureViewRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetFeatureViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetFeatureViewRequest build() { + com.google.cloud.aiplatform.v1.GetFeatureViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetFeatureViewRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetFeatureViewRequest result = + new com.google.cloud.aiplatform.v1.GetFeatureViewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.GetFeatureViewRequest 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.aiplatform.v1.GetFeatureViewRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetFeatureViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GetFeatureViewRequest other) { + if (other == com.google.cloud.aiplatform.v1.GetFeatureViewRequest.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 FeatureView resource.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * 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 FeatureView resource.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * 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 FeatureView resource.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * 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 FeatureView resource.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * 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 FeatureView resource.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * 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.aiplatform.v1.GetFeatureViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetFeatureViewRequest) + private static final com.google.cloud.aiplatform.v1.GetFeatureViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetFeatureViewRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetFeatureViewRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetFeatureViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureViewRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureViewRequestOrBuilder.java new file mode 100644 index 000000000000..caad3c476215 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureViewRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface GetFeatureViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetFeatureViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the FeatureView resource.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the FeatureView resource.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * 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-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureViewSyncRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureViewSyncRequest.java new file mode 100644 index 000000000000..8de214f5bd60 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureViewSyncRequest.java @@ -0,0 +1,655 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [FeatureOnlineStoreAdminService.GetFeatureViewSync][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.GetFeatureViewSync].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetFeatureViewSyncRequest} + */ +public final class GetFeatureViewSyncRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetFeatureViewSyncRequest) + GetFeatureViewSyncRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetFeatureViewSyncRequest.newBuilder() to construct. + private GetFeatureViewSyncRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetFeatureViewSyncRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetFeatureViewSyncRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_GetFeatureViewSyncRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_GetFeatureViewSyncRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest.class, + com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the FeatureViewSync resource.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+   * 
+ * + * + * 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 FeatureViewSync resource.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+   * 
+ * + * + * 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.aiplatform.v1.GetFeatureViewSyncRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest other = + (com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest) 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.aiplatform.v1.GetFeatureViewSyncRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureOnlineStoreAdminService.GetFeatureViewSync][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.GetFeatureViewSync].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetFeatureViewSyncRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetFeatureViewSyncRequest) + com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_GetFeatureViewSyncRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_GetFeatureViewSyncRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest.class, + com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest.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.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_GetFeatureViewSyncRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest build() { + com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest result = + new com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest 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.aiplatform.v1.GetFeatureViewSyncRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest other) { + if (other == com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest.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 FeatureViewSync resource.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+     * 
+ * + * + * 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 FeatureViewSync resource.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+     * 
+ * + * + * 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 FeatureViewSync resource.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+     * 
+ * + * + * 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 FeatureViewSync resource.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+     * 
+ * + * + * 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 FeatureViewSync resource.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+     * 
+ * + * + * 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.aiplatform.v1.GetFeatureViewSyncRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetFeatureViewSyncRequest) + private static final com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetFeatureViewSyncRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureViewSyncRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureViewSyncRequestOrBuilder.java new file mode 100644 index 000000000000..acfb24dfa11a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetFeatureViewSyncRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface GetFeatureViewSyncRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetFeatureViewSyncRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the FeatureViewSync resource.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the FeatureViewSync resource.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+   * 
+ * + * + * 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-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexDatapoint.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexDatapoint.java index f01ebbe09a85..382ef265c022 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexDatapoint.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexDatapoint.java @@ -41,6 +41,7 @@ private IndexDatapoint() { datapointId_ = ""; featureVector_ = emptyFloatList(); restricts_ = java.util.Collections.emptyList(); + numericRestricts_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -1364,165 +1365,693 @@ public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction getDefaultInsta } } - public interface CrowdingTagOrBuilder + public interface NumericRestrictionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction) com.google.protobuf.MessageOrBuilder { /** * * *
-     * The attribute value used for crowding.  The maximum number of neighbors
-     * to return per crowding attribute value
-     * (per_crowding_attribute_num_neighbors) is configured per-query. This
-     * field is ignored if per_crowding_attribute_num_neighbors is larger than
-     * the total number of neighbors to return for a given query.
+     * Represents 64 bit integer.
      * 
* - * string crowding_attribute = 1; + * int64 value_int = 2; * - * @return The crowdingAttribute. + * @return Whether the valueInt field is set. */ - java.lang.String getCrowdingAttribute(); + boolean hasValueInt(); /** * * *
-     * The attribute value used for crowding.  The maximum number of neighbors
-     * to return per crowding attribute value
-     * (per_crowding_attribute_num_neighbors) is configured per-query. This
-     * field is ignored if per_crowding_attribute_num_neighbors is larger than
-     * the total number of neighbors to return for a given query.
+     * Represents 64 bit integer.
      * 
* - * string crowding_attribute = 1; + * int64 value_int = 2; * - * @return The bytes for crowdingAttribute. + * @return The valueInt. */ - com.google.protobuf.ByteString getCrowdingAttributeBytes(); + long getValueInt(); + + /** + * + * + *
+     * Represents 32 bit float.
+     * 
+ * + * float value_float = 3; + * + * @return Whether the valueFloat field is set. + */ + boolean hasValueFloat(); + /** + * + * + *
+     * Represents 32 bit float.
+     * 
+ * + * float value_float = 3; + * + * @return The valueFloat. + */ + float getValueFloat(); + + /** + * + * + *
+     * Represents 64 bit float.
+     * 
+ * + * double value_double = 4; + * + * @return Whether the valueDouble field is set. + */ + boolean hasValueDouble(); + /** + * + * + *
+     * Represents 64 bit float.
+     * 
+ * + * double value_double = 4; + * + * @return The valueDouble. + */ + double getValueDouble(); + + /** + * + * + *
+     * The namespace of this restriction. e.g.: cost.
+     * 
+ * + * string namespace = 1; + * + * @return The namespace. + */ + java.lang.String getNamespace(); + /** + * + * + *
+     * The namespace of this restriction. e.g.: cost.
+     * 
+ * + * string namespace = 1; + * + * @return The bytes for namespace. + */ + com.google.protobuf.ByteString getNamespaceBytes(); + + /** + * + * + *
+     * This MUST be specified for queries and must NOT be specified for
+     * datapoints.
+     * 
+ * + * .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator op = 5; + * + * @return The enum numeric value on the wire for op. + */ + int getOpValue(); + /** + * + * + *
+     * This MUST be specified for queries and must NOT be specified for
+     * datapoints.
+     * 
+ * + * .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator op = 5; + * + * @return The op. + */ + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator getOp(); + + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.ValueCase getValueCase(); } /** * * *
-   * Crowding tag is a constraint on a neighbor list produced by nearest
-   * neighbor search requiring that no more than some value k' of the k
-   * neighbors returned have the same value of crowding_attribute.
+   * This field allows restricts to be based on numeric comparisons rather
+   * than categorical tokens.
    * 
* - * Protobuf type {@code google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag} + * Protobuf type {@code google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction} */ - public static final class CrowdingTag extends com.google.protobuf.GeneratedMessageV3 + public static final class NumericRestriction extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) - CrowdingTagOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction) + NumericRestrictionOrBuilder { private static final long serialVersionUID = 0L; - // Use CrowdingTag.newBuilder() to construct. - private CrowdingTag(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use NumericRestriction.newBuilder() to construct. + private NumericRestriction(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private CrowdingTag() { - crowdingAttribute_ = ""; + private NumericRestriction() { + namespace_ = ""; + op_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CrowdingTag(); + return new NumericRestriction(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.aiplatform.v1.IndexProto - .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_descriptor; + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_NumericRestriction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.aiplatform.v1.IndexProto - .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_fieldAccessorTable + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_NumericRestriction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.class, - com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.Builder.class); + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.class, + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Builder.class); } - public static final int CROWDING_ATTRIBUTE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object crowdingAttribute_ = ""; /** * * *
-     * The attribute value used for crowding.  The maximum number of neighbors
-     * to return per crowding attribute value
-     * (per_crowding_attribute_num_neighbors) is configured per-query. This
-     * field is ignored if per_crowding_attribute_num_neighbors is larger than
-     * the total number of neighbors to return for a given query.
-     * 
- * - * string crowding_attribute = 1; - * - * @return The crowdingAttribute. - */ - @java.lang.Override - public java.lang.String getCrowdingAttribute() { - java.lang.Object ref = crowdingAttribute_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - crowdingAttribute_ = s; - return s; - } - } - /** + * Which comparison operator to use. Should be specified for queries only; + * specifying this for a datapoint is an error. * - * - *
-     * The attribute value used for crowding.  The maximum number of neighbors
-     * to return per crowding attribute value
-     * (per_crowding_attribute_num_neighbors) is configured per-query. This
-     * field is ignored if per_crowding_attribute_num_neighbors is larger than
-     * the total number of neighbors to return for a given query.
+     * Datapoints for which Operator is true relative to the query's Value
+     * field will be allowlisted.
      * 
* - * string crowding_attribute = 1; - * - * @return The bytes for crowdingAttribute. + * Protobuf enum {@code google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator} */ - @java.lang.Override - public com.google.protobuf.ByteString getCrowdingAttributeBytes() { - java.lang.Object ref = crowdingAttribute_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - crowdingAttribute_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; + public enum Operator implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Default value of the enum.
+       * 
+ * + * OPERATOR_UNSPECIFIED = 0; + */ + OPERATOR_UNSPECIFIED(0), + /** + * + * + *
+       * Datapoints are eligible iff their value is < the query's.
+       * 
+ * + * LESS = 1; + */ + LESS(1), + /** + * + * + *
+       * Datapoints are eligible iff their value is <= the query's.
+       * 
+ * + * LESS_EQUAL = 2; + */ + LESS_EQUAL(2), + /** + * + * + *
+       * Datapoints are eligible iff their value is == the query's.
+       * 
+ * + * EQUAL = 3; + */ + EQUAL(3), + /** + * + * + *
+       * Datapoints are eligible iff their value is >= the query's.
+       * 
+ * + * GREATER_EQUAL = 4; + */ + GREATER_EQUAL(4), + /** + * + * + *
+       * Datapoints are eligible iff their value is > the query's.
+       * 
+ * + * GREATER = 5; + */ + GREATER(5), + UNRECOGNIZED(-1), + ; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * + * + *
+       * Default value of the enum.
+       * 
+ * + * OPERATOR_UNSPECIFIED = 0; + */ + public static final int OPERATOR_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Datapoints are eligible iff their value is < the query's.
+       * 
+ * + * LESS = 1; + */ + public static final int LESS_VALUE = 1; + /** + * + * + *
+       * Datapoints are eligible iff their value is <= the query's.
+       * 
+ * + * LESS_EQUAL = 2; + */ + public static final int LESS_EQUAL_VALUE = 2; + /** + * + * + *
+       * Datapoints are eligible iff their value is == the query's.
+       * 
+ * + * EQUAL = 3; + */ + public static final int EQUAL_VALUE = 3; + /** + * + * + *
+       * Datapoints are eligible iff their value is >= the query's.
+       * 
+ * + * GREATER_EQUAL = 4; + */ + public static final int GREATER_EQUAL_VALUE = 4; + /** + * + * + *
+       * Datapoints are eligible iff their value is > the query's.
+       * 
+ * + * GREATER = 5; + */ + public static final int GREATER_VALUE = 5; - memoizedIsInitialized = 1; - return true; - } + 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 Operator 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 Operator forNumber(int value) { + switch (value) { + case 0: + return OPERATOR_UNSPECIFIED; + case 1: + return LESS; + case 2: + return LESS_EQUAL; + case 3: + return EQUAL; + case 4: + return GREATER_EQUAL; + case 5: + return GREATER; + 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 Operator findValueByNumber(int number) { + return Operator.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.aiplatform.v1.IndexDatapoint.NumericRestriction.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Operator[] VALUES = values(); + + public static Operator 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 Operator(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator) + } + + 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 { + VALUE_INT(2), + VALUE_FLOAT(3), + VALUE_DOUBLE(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 2: + return VALUE_INT; + case 3: + return VALUE_FLOAT; + case 4: + return VALUE_DOUBLE; + 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 VALUE_INT_FIELD_NUMBER = 2; + /** + * + * + *
+     * Represents 64 bit integer.
+     * 
+ * + * int64 value_int = 2; + * + * @return Whether the valueInt field is set. + */ + @java.lang.Override + public boolean hasValueInt() { + return valueCase_ == 2; + } + /** + * + * + *
+     * Represents 64 bit integer.
+     * 
+ * + * int64 value_int = 2; + * + * @return The valueInt. + */ + @java.lang.Override + public long getValueInt() { + if (valueCase_ == 2) { + return (java.lang.Long) value_; + } + return 0L; + } + + public static final int VALUE_FLOAT_FIELD_NUMBER = 3; + /** + * + * + *
+     * Represents 32 bit float.
+     * 
+ * + * float value_float = 3; + * + * @return Whether the valueFloat field is set. + */ + @java.lang.Override + public boolean hasValueFloat() { + return valueCase_ == 3; + } + /** + * + * + *
+     * Represents 32 bit float.
+     * 
+ * + * float value_float = 3; + * + * @return The valueFloat. + */ + @java.lang.Override + public float getValueFloat() { + if (valueCase_ == 3) { + return (java.lang.Float) value_; + } + return 0F; + } + + public static final int VALUE_DOUBLE_FIELD_NUMBER = 4; + /** + * + * + *
+     * Represents 64 bit float.
+     * 
+ * + * double value_double = 4; + * + * @return Whether the valueDouble field is set. + */ + @java.lang.Override + public boolean hasValueDouble() { + return valueCase_ == 4; + } + /** + * + * + *
+     * Represents 64 bit float.
+     * 
+ * + * double value_double = 4; + * + * @return The valueDouble. + */ + @java.lang.Override + public double getValueDouble() { + if (valueCase_ == 4) { + return (java.lang.Double) value_; + } + return 0D; + } + + public static final int NAMESPACE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object namespace_ = ""; + /** + * + * + *
+     * The namespace of this restriction. e.g.: cost.
+     * 
+ * + * string namespace = 1; + * + * @return The namespace. + */ + @java.lang.Override + public java.lang.String getNamespace() { + java.lang.Object ref = namespace_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespace_ = s; + return s; + } + } + /** + * + * + *
+     * The namespace of this restriction. e.g.: cost.
+     * 
+ * + * string namespace = 1; + * + * @return The bytes for namespace. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNamespaceBytes() { + java.lang.Object ref = namespace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + namespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OP_FIELD_NUMBER = 5; + private int op_ = 0; + /** + * + * + *
+     * This MUST be specified for queries and must NOT be specified for
+     * datapoints.
+     * 
+ * + * .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator op = 5; + * + * @return The enum numeric value on the wire for op. + */ + @java.lang.Override + public int getOpValue() { + return op_; + } + /** + * + * + *
+     * This MUST be specified for queries and must NOT be specified for
+     * datapoints.
+     * 
+ * + * .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator op = 5; + * + * @return The op. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator getOp() { + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator result = + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator.forNumber(op_); + return result == null + ? com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator.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(crowdingAttribute_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, crowdingAttribute_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namespace_); + } + if (valueCase_ == 2) { + output.writeInt64(2, (long) ((java.lang.Long) value_)); + } + if (valueCase_ == 3) { + output.writeFloat(3, (float) ((java.lang.Float) value_)); + } + if (valueCase_ == 4) { + output.writeDouble(4, (double) ((java.lang.Double) value_)); + } + if (op_ + != com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator + .OPERATOR_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, op_); } getUnknownFields().writeTo(output); } @@ -1533,8 +2062,29 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(crowdingAttribute_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, crowdingAttribute_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namespace_); + } + if (valueCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 2, (long) ((java.lang.Long) value_)); + } + if (valueCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeFloatSize( + 3, (float) ((java.lang.Float) value_)); + } + if (valueCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 4, (double) ((java.lang.Double) value_)); + } + if (op_ + != com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator + .OPERATOR_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, op_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -1546,13 +2096,30 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag)) { + if (!(obj instanceof com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction)) { return super.equals(obj); } - com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag other = - (com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) obj; + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction other = + (com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction) obj; - if (!getCrowdingAttribute().equals(other.getCrowdingAttribute())) return false; + if (!getNamespace().equals(other.getNamespace())) return false; + if (op_ != other.op_) return false; + if (!getValueCase().equals(other.getValueCase())) return false; + switch (valueCase_) { + case 2: + if (getValueInt() != other.getValueInt()) return false; + break; + case 3: + if (java.lang.Float.floatToIntBits(getValueFloat()) + != java.lang.Float.floatToIntBits(other.getValueFloat())) return false; + break; + case 4: + if (java.lang.Double.doubleToLongBits(getValueDouble()) + != java.lang.Double.doubleToLongBits(other.getValueDouble())) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1564,78 +2131,100 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CROWDING_ATTRIBUTE_FIELD_NUMBER; - hash = (53 * hash) + getCrowdingAttribute().hashCode(); + hash = (37 * hash) + NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getNamespace().hashCode(); + hash = (37 * hash) + OP_FIELD_NUMBER; + hash = (53 * hash) + op_; + switch (valueCase_) { + case 2: + hash = (37 * hash) + VALUE_INT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getValueInt()); + break; + case 3: + hash = (37 * hash) + VALUE_FLOAT_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getValueFloat()); + break; + case 4: + hash = (37 * hash) + VALUE_DOUBLE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getValueDouble())); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom( + public static com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom( + public static com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom( + public static com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom( + public static com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom( + public static com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom( + public static com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom( + public static com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom( + public static com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom( + public static com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1653,7 +2242,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag prototype) { + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -1672,34 +2261,34 @@ protected Builder newBuilderForType( * * *
-     * Crowding tag is a constraint on a neighbor list produced by nearest
-     * neighbor search requiring that no more than some value k' of the k
-     * neighbors returned have the same value of crowding_attribute.
+     * This field allows restricts to be based on numeric comparisons rather
+     * than categorical tokens.
      * 
* - * Protobuf type {@code google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag} + * Protobuf type {@code google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) - com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTagOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction) + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestrictionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.aiplatform.v1.IndexProto - .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_descriptor; + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_NumericRestriction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.aiplatform.v1.IndexProto - .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_fieldAccessorTable + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_NumericRestriction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.class, - com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.Builder.class); + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.class, + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Builder.class); } - // Construct using com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.newBuilder() + // Construct using + // com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -1710,24 +2299,29 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - crowdingAttribute_ = ""; + namespace_ = ""; + op_ = 0; + valueCase_ = 0; + value_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.aiplatform.v1.IndexProto - .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_descriptor; + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_NumericRestriction_descriptor; } @java.lang.Override - public com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag getDefaultInstanceForType() { - return com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.getDefaultInstance(); + public com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction + .getDefaultInstance(); } @java.lang.Override - public com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag build() { - com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag result = buildPartial(); + public com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction build() { + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -1735,21 +2329,32 @@ public com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag build() { } @java.lang.Override - public com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag buildPartial() { - com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag result = - new com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag(this); + public com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction buildPartial() { + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction result = + new com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction(this); if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } - private void buildPartial0(com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag result) { + private void buildPartial0( + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.crowdingAttribute_ = crowdingAttribute_; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.namespace_ = namespace_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.op_ = op_; + } + } + + private void buildPartialOneofs( + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction result) { + result.valueCase_ = valueCase_; + result.value_ = this.value_; } @java.lang.Override @@ -1789,22 +2394,49 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) { - return mergeFrom((com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) other); + if (other instanceof com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag other) { - if (other == com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.getDefaultInstance()) - return this; - if (!other.getCrowdingAttribute().isEmpty()) { - crowdingAttribute_ = other.crowdingAttribute_; - bitField0_ |= 0x00000001; + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction other) { + if (other + == com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction + .getDefaultInstance()) return this; + if (!other.getNamespace().isEmpty()) { + namespace_ = other.namespace_; + bitField0_ |= 0x00000008; onChanged(); } + if (other.op_ != 0) { + setOpValue(other.getOpValue()); + } + switch (other.getValueCase()) { + case VALUE_INT: + { + setValueInt(other.getValueInt()); + break; + } + case VALUE_FLOAT: + { + setValueFloat(other.getValueFloat()); + break; + } + case VALUE_DOUBLE: + { + setValueDouble(other.getValueDouble()); + break; + } + case VALUE_NOT_SET: + { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1833,10 +2465,34 @@ public Builder mergeFrom( break; case 10: { - crowdingAttribute_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; + namespace_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; break; } // case 10 + case 16: + { + value_ = input.readInt64(); + valueCase_ = 2; + break; + } // case 16 + case 29: + { + value_ = input.readFloat(); + valueCase_ = 3; + break; + } // case 29 + case 33: + { + value_ = input.readDouble(); + valueCase_ = 4; + break; + } // case 33 + case 40: + { + op_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1854,30 +2510,250 @@ public Builder mergeFrom( 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 java.lang.Object crowdingAttribute_ = ""; /** * * *
-       * The attribute value used for crowding.  The maximum number of neighbors
-       * to return per crowding attribute value
-       * (per_crowding_attribute_num_neighbors) is configured per-query. This
-       * field is ignored if per_crowding_attribute_num_neighbors is larger than
-       * the total number of neighbors to return for a given query.
+       * Represents 64 bit integer.
        * 
* - * string crowding_attribute = 1; + * int64 value_int = 2; * - * @return The crowdingAttribute. + * @return Whether the valueInt field is set. */ - public java.lang.String getCrowdingAttribute() { - java.lang.Object ref = crowdingAttribute_; + public boolean hasValueInt() { + return valueCase_ == 2; + } + /** + * + * + *
+       * Represents 64 bit integer.
+       * 
+ * + * int64 value_int = 2; + * + * @return The valueInt. + */ + public long getValueInt() { + if (valueCase_ == 2) { + return (java.lang.Long) value_; + } + return 0L; + } + /** + * + * + *
+       * Represents 64 bit integer.
+       * 
+ * + * int64 value_int = 2; + * + * @param value The valueInt to set. + * @return This builder for chaining. + */ + public Builder setValueInt(long value) { + + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Represents 64 bit integer.
+       * 
+ * + * int64 value_int = 2; + * + * @return This builder for chaining. + */ + public Builder clearValueInt() { + if (valueCase_ == 2) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Represents 32 bit float.
+       * 
+ * + * float value_float = 3; + * + * @return Whether the valueFloat field is set. + */ + public boolean hasValueFloat() { + return valueCase_ == 3; + } + /** + * + * + *
+       * Represents 32 bit float.
+       * 
+ * + * float value_float = 3; + * + * @return The valueFloat. + */ + public float getValueFloat() { + if (valueCase_ == 3) { + return (java.lang.Float) value_; + } + return 0F; + } + /** + * + * + *
+       * Represents 32 bit float.
+       * 
+ * + * float value_float = 3; + * + * @param value The valueFloat to set. + * @return This builder for chaining. + */ + public Builder setValueFloat(float value) { + + valueCase_ = 3; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Represents 32 bit float.
+       * 
+ * + * float value_float = 3; + * + * @return This builder for chaining. + */ + public Builder clearValueFloat() { + if (valueCase_ == 3) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Represents 64 bit float.
+       * 
+ * + * double value_double = 4; + * + * @return Whether the valueDouble field is set. + */ + public boolean hasValueDouble() { + return valueCase_ == 4; + } + /** + * + * + *
+       * Represents 64 bit float.
+       * 
+ * + * double value_double = 4; + * + * @return The valueDouble. + */ + public double getValueDouble() { + if (valueCase_ == 4) { + return (java.lang.Double) value_; + } + return 0D; + } + /** + * + * + *
+       * Represents 64 bit float.
+       * 
+ * + * double value_double = 4; + * + * @param value The valueDouble to set. + * @return This builder for chaining. + */ + public Builder setValueDouble(double value) { + + valueCase_ = 4; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Represents 64 bit float.
+       * 
+ * + * double value_double = 4; + * + * @return This builder for chaining. + */ + public Builder clearValueDouble() { + if (valueCase_ == 4) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + private java.lang.Object namespace_ = ""; + /** + * + * + *
+       * The namespace of this restriction. e.g.: cost.
+       * 
+ * + * string namespace = 1; + * + * @return The namespace. + */ + public java.lang.String getNamespace() { + java.lang.Object ref = namespace_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - crowdingAttribute_ = s; + namespace_ = s; return s; } else { return (java.lang.String) ref; @@ -1887,23 +2763,19 @@ public java.lang.String getCrowdingAttribute() { * * *
-       * The attribute value used for crowding.  The maximum number of neighbors
-       * to return per crowding attribute value
-       * (per_crowding_attribute_num_neighbors) is configured per-query. This
-       * field is ignored if per_crowding_attribute_num_neighbors is larger than
-       * the total number of neighbors to return for a given query.
+       * The namespace of this restriction. e.g.: cost.
        * 
* - * string crowding_attribute = 1; + * string namespace = 1; * - * @return The bytes for crowdingAttribute. + * @return The bytes for namespace. */ - public com.google.protobuf.ByteString getCrowdingAttributeBytes() { - java.lang.Object ref = crowdingAttribute_; + public com.google.protobuf.ByteString getNamespaceBytes() { + java.lang.Object ref = namespace_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - crowdingAttribute_ = b; + namespace_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -1913,24 +2785,20 @@ public com.google.protobuf.ByteString getCrowdingAttributeBytes() { * * *
-       * The attribute value used for crowding.  The maximum number of neighbors
-       * to return per crowding attribute value
-       * (per_crowding_attribute_num_neighbors) is configured per-query. This
-       * field is ignored if per_crowding_attribute_num_neighbors is larger than
-       * the total number of neighbors to return for a given query.
+       * The namespace of this restriction. e.g.: cost.
        * 
* - * string crowding_attribute = 1; + * string namespace = 1; * - * @param value The crowdingAttribute to set. + * @param value The namespace to set. * @return This builder for chaining. */ - public Builder setCrowdingAttribute(java.lang.String value) { + public Builder setNamespace(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - crowdingAttribute_ = value; - bitField0_ |= 0x00000001; + namespace_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1938,20 +2806,16 @@ public Builder setCrowdingAttribute(java.lang.String value) { * * *
-       * The attribute value used for crowding.  The maximum number of neighbors
-       * to return per crowding attribute value
-       * (per_crowding_attribute_num_neighbors) is configured per-query. This
-       * field is ignored if per_crowding_attribute_num_neighbors is larger than
-       * the total number of neighbors to return for a given query.
+       * The namespace of this restriction. e.g.: cost.
        * 
* - * string crowding_attribute = 1; + * string namespace = 1; * * @return This builder for chaining. */ - public Builder clearCrowdingAttribute() { - crowdingAttribute_ = getDefaultInstance().getCrowdingAttribute(); - bitField0_ = (bitField0_ & ~0x00000001); + public Builder clearNamespace() { + namespace_ = getDefaultInstance().getNamespace(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -1959,25 +2823,120 @@ public Builder clearCrowdingAttribute() { * * *
-       * The attribute value used for crowding.  The maximum number of neighbors
-       * to return per crowding attribute value
-       * (per_crowding_attribute_num_neighbors) is configured per-query. This
-       * field is ignored if per_crowding_attribute_num_neighbors is larger than
-       * the total number of neighbors to return for a given query.
+       * The namespace of this restriction. e.g.: cost.
        * 
* - * string crowding_attribute = 1; + * string namespace = 1; * - * @param value The bytes for crowdingAttribute to set. + * @param value The bytes for namespace to set. * @return This builder for chaining. */ - public Builder setCrowdingAttributeBytes(com.google.protobuf.ByteString value) { + public Builder setNamespaceBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - crowdingAttribute_ = value; - bitField0_ |= 0x00000001; + namespace_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int op_ = 0; + /** + * + * + *
+       * This MUST be specified for queries and must NOT be specified for
+       * datapoints.
+       * 
+ * + * .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator op = 5; + * + * @return The enum numeric value on the wire for op. + */ + @java.lang.Override + public int getOpValue() { + return op_; + } + /** + * + * + *
+       * This MUST be specified for queries and must NOT be specified for
+       * datapoints.
+       * 
+ * + * .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator op = 5; + * + * @param value The enum numeric value on the wire for op to set. + * @return This builder for chaining. + */ + public Builder setOpValue(int value) { + op_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * This MUST be specified for queries and must NOT be specified for
+       * datapoints.
+       * 
+ * + * .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator op = 5; + * + * @return The op. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator getOp() { + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator result = + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator.forNumber( + op_); + return result == null + ? com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * This MUST be specified for queries and must NOT be specified for
+       * datapoints.
+       * 
+ * + * .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator op = 5; + * + * @param value The op to set. + * @return This builder for chaining. + */ + public Builder setOp( + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + op_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * This MUST be specified for queries and must NOT be specified for
+       * datapoints.
+       * 
+ * + * .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator op = 5; + * + * @return This builder for chaining. + */ + public Builder clearOp() { + bitField0_ = (bitField0_ & ~0x00000010); + op_ = 0; onChanged(); return this; } @@ -1994,24 +2953,26 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction) } - // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) - private static final com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction) + private static final com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction + DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag(); + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction(); } - public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag getDefaultInstance() { + public static com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction + getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public CrowdingTag parsePartialFrom( + public NumericRestriction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -2031,150 +2992,833 @@ public CrowdingTag parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag getDefaultInstanceForType() { + public com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction + getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public static final int DATAPOINT_ID_FIELD_NUMBER = 1; + public interface CrowdingTagOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) + com.google.protobuf.MessageOrBuilder { - @SuppressWarnings("serial") - private volatile java.lang.Object datapointId_ = ""; - /** - * - * - *
-   * Required. Unique identifier of the datapoint.
-   * 
- * - * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The datapointId. - */ - @java.lang.Override - public java.lang.String getDatapointId() { - java.lang.Object ref = datapointId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - datapointId_ = s; - return s; - } + /** + * + * + *
+     * The attribute value used for crowding.  The maximum number of neighbors
+     * to return per crowding attribute value
+     * (per_crowding_attribute_num_neighbors) is configured per-query. This
+     * field is ignored if per_crowding_attribute_num_neighbors is larger than
+     * the total number of neighbors to return for a given query.
+     * 
+ * + * string crowding_attribute = 1; + * + * @return The crowdingAttribute. + */ + java.lang.String getCrowdingAttribute(); + /** + * + * + *
+     * The attribute value used for crowding.  The maximum number of neighbors
+     * to return per crowding attribute value
+     * (per_crowding_attribute_num_neighbors) is configured per-query. This
+     * field is ignored if per_crowding_attribute_num_neighbors is larger than
+     * the total number of neighbors to return for a given query.
+     * 
+ * + * string crowding_attribute = 1; + * + * @return The bytes for crowdingAttribute. + */ + com.google.protobuf.ByteString getCrowdingAttributeBytes(); } /** * * *
-   * Required. Unique identifier of the datapoint.
+   * Crowding tag is a constraint on a neighbor list produced by nearest
+   * neighbor search requiring that no more than some value k' of the k
+   * neighbors returned have the same value of crowding_attribute.
    * 
* - * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for datapointId. + * Protobuf type {@code google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag} */ - @java.lang.Override - public com.google.protobuf.ByteString getDatapointIdBytes() { - java.lang.Object ref = datapointId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - datapointId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final class CrowdingTag extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) + CrowdingTagOrBuilder { + private static final long serialVersionUID = 0L; + // Use CrowdingTag.newBuilder() to construct. + private CrowdingTag(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - } - public static final int FEATURE_VECTOR_FIELD_NUMBER = 2; + private CrowdingTag() { + crowdingAttribute_ = ""; + } - @SuppressWarnings("serial") - private com.google.protobuf.Internal.FloatList featureVector_; - /** - * - * - *
-   * Required. Feature embedding vector. An array of numbers with the length of
-   * [NearestNeighborSearchConfig.dimensions].
-   * 
- * - * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the featureVector. - */ - @java.lang.Override - public java.util.List getFeatureVectorList() { - return featureVector_; - } - /** - * - * - *
-   * Required. Feature embedding vector. An array of numbers with the length of
-   * [NearestNeighborSearchConfig.dimensions].
-   * 
- * - * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of featureVector. - */ - public int getFeatureVectorCount() { - return featureVector_.size(); - } - /** - * - * - *
-   * Required. Feature embedding vector. An array of numbers with the length of
-   * [NearestNeighborSearchConfig.dimensions].
-   * 
- * - * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the element to return. - * @return The featureVector at the given index. - */ - public float getFeatureVector(int index) { - return featureVector_.getFloat(index); - } + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CrowdingTag(); + } - private int featureVectorMemoizedSerializedSize = -1; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_descriptor; + } - public static final int RESTRICTS_FIELD_NUMBER = 4; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.class, + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.Builder.class); + } - @SuppressWarnings("serial") - private java.util.List restricts_; - /** - * - * - *
-   * Optional. List of Restrict of the datapoint, used to perform "restricted
-   * searches" where boolean rule are used to filter the subset of the database
-   * eligible for matching. This uses categorical tokens. See:
-   * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
-   * 
- * - * - * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getRestrictsList() { - return restricts_; - } - /** + public static final int CROWDING_ATTRIBUTE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object crowdingAttribute_ = ""; + /** + * + * + *
+     * The attribute value used for crowding.  The maximum number of neighbors
+     * to return per crowding attribute value
+     * (per_crowding_attribute_num_neighbors) is configured per-query. This
+     * field is ignored if per_crowding_attribute_num_neighbors is larger than
+     * the total number of neighbors to return for a given query.
+     * 
+ * + * string crowding_attribute = 1; + * + * @return The crowdingAttribute. + */ + @java.lang.Override + public java.lang.String getCrowdingAttribute() { + java.lang.Object ref = crowdingAttribute_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + crowdingAttribute_ = s; + return s; + } + } + /** + * + * + *
+     * The attribute value used for crowding.  The maximum number of neighbors
+     * to return per crowding attribute value
+     * (per_crowding_attribute_num_neighbors) is configured per-query. This
+     * field is ignored if per_crowding_attribute_num_neighbors is larger than
+     * the total number of neighbors to return for a given query.
+     * 
+ * + * string crowding_attribute = 1; + * + * @return The bytes for crowdingAttribute. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCrowdingAttributeBytes() { + java.lang.Object ref = crowdingAttribute_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + crowdingAttribute_ = 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(crowdingAttribute_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, crowdingAttribute_); + } + 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(crowdingAttribute_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, crowdingAttribute_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag other = + (com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) obj; + + if (!getCrowdingAttribute().equals(other.getCrowdingAttribute())) return false; + if (!getUnknownFields().equals(other.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) + CROWDING_ATTRIBUTE_FIELD_NUMBER; + hash = (53 * hash) + getCrowdingAttribute().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Crowding tag is a constraint on a neighbor list produced by nearest
+     * neighbor search requiring that no more than some value k' of the k
+     * neighbors returned have the same value of crowding_attribute.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTagOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.class, + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + crowdingAttribute_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag build() { + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag buildPartial() { + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag result = + new com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.crowdingAttribute_ = crowdingAttribute_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) { + return mergeFrom((com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag other) { + if (other == com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.getDefaultInstance()) + return this; + if (!other.getCrowdingAttribute().isEmpty()) { + crowdingAttribute_ = other.crowdingAttribute_; + 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: + { + crowdingAttribute_ = 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 crowdingAttribute_ = ""; + /** + * + * + *
+       * The attribute value used for crowding.  The maximum number of neighbors
+       * to return per crowding attribute value
+       * (per_crowding_attribute_num_neighbors) is configured per-query. This
+       * field is ignored if per_crowding_attribute_num_neighbors is larger than
+       * the total number of neighbors to return for a given query.
+       * 
+ * + * string crowding_attribute = 1; + * + * @return The crowdingAttribute. + */ + public java.lang.String getCrowdingAttribute() { + java.lang.Object ref = crowdingAttribute_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + crowdingAttribute_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The attribute value used for crowding.  The maximum number of neighbors
+       * to return per crowding attribute value
+       * (per_crowding_attribute_num_neighbors) is configured per-query. This
+       * field is ignored if per_crowding_attribute_num_neighbors is larger than
+       * the total number of neighbors to return for a given query.
+       * 
+ * + * string crowding_attribute = 1; + * + * @return The bytes for crowdingAttribute. + */ + public com.google.protobuf.ByteString getCrowdingAttributeBytes() { + java.lang.Object ref = crowdingAttribute_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + crowdingAttribute_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The attribute value used for crowding.  The maximum number of neighbors
+       * to return per crowding attribute value
+       * (per_crowding_attribute_num_neighbors) is configured per-query. This
+       * field is ignored if per_crowding_attribute_num_neighbors is larger than
+       * the total number of neighbors to return for a given query.
+       * 
+ * + * string crowding_attribute = 1; + * + * @param value The crowdingAttribute to set. + * @return This builder for chaining. + */ + public Builder setCrowdingAttribute(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + crowdingAttribute_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The attribute value used for crowding.  The maximum number of neighbors
+       * to return per crowding attribute value
+       * (per_crowding_attribute_num_neighbors) is configured per-query. This
+       * field is ignored if per_crowding_attribute_num_neighbors is larger than
+       * the total number of neighbors to return for a given query.
+       * 
+ * + * string crowding_attribute = 1; + * + * @return This builder for chaining. + */ + public Builder clearCrowdingAttribute() { + crowdingAttribute_ = getDefaultInstance().getCrowdingAttribute(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The attribute value used for crowding.  The maximum number of neighbors
+       * to return per crowding attribute value
+       * (per_crowding_attribute_num_neighbors) is configured per-query. This
+       * field is ignored if per_crowding_attribute_num_neighbors is larger than
+       * the total number of neighbors to return for a given query.
+       * 
+ * + * string crowding_attribute = 1; + * + * @param value The bytes for crowdingAttribute to set. + * @return This builder for chaining. + */ + public Builder setCrowdingAttributeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + crowdingAttribute_ = 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.aiplatform.v1.IndexDatapoint.CrowdingTag) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) + private static final com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag(); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CrowdingTag parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int DATAPOINT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object datapointId_ = ""; + /** + * + * + *
+   * Required. Unique identifier of the datapoint.
+   * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datapointId. + */ + @java.lang.Override + public java.lang.String getDatapointId() { + java.lang.Object ref = datapointId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datapointId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Unique identifier of the datapoint.
+   * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datapointId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatapointIdBytes() { + java.lang.Object ref = datapointId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datapointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEATURE_VECTOR_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.FloatList featureVector_; + /** + * + * + *
+   * Required. Feature embedding vector. An array of numbers with the length of
+   * [NearestNeighborSearchConfig.dimensions].
+   * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the featureVector. + */ + @java.lang.Override + public java.util.List getFeatureVectorList() { + return featureVector_; + } + /** + * + * + *
+   * Required. Feature embedding vector. An array of numbers with the length of
+   * [NearestNeighborSearchConfig.dimensions].
+   * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of featureVector. + */ + public int getFeatureVectorCount() { + return featureVector_.size(); + } + /** + * + * + *
+   * Required. Feature embedding vector. An array of numbers with the length of
+   * [NearestNeighborSearchConfig.dimensions].
+   * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The featureVector at the given index. + */ + public float getFeatureVector(int index) { + return featureVector_.getFloat(index); + } + + private int featureVectorMemoizedSerializedSize = -1; + + public static final int RESTRICTS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List restricts_; + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses categorical tokens. See:
+   * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getRestrictsList() { + return restricts_; + } + /** * * *
@@ -2250,6 +3894,102 @@ public com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder getRes
     return restricts_.get(index);
   }
 
+  public static final int NUMERIC_RESTRICTS_FIELD_NUMBER = 6;
+
+  @SuppressWarnings("serial")
+  private java.util.List
+      numericRestricts_;
+  /**
+   *
+   *
+   * 
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses numeric comparisons.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getNumericRestrictsList() { + return numericRestricts_; + } + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses numeric comparisons.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestrictionOrBuilder> + getNumericRestrictsOrBuilderList() { + return numericRestricts_; + } + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses numeric comparisons.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getNumericRestrictsCount() { + return numericRestricts_.size(); + } + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses numeric comparisons.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction getNumericRestricts( + int index) { + return numericRestricts_.get(index); + } + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses numeric comparisons.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestrictionOrBuilder + getNumericRestrictsOrBuilder(int index) { + return numericRestricts_.get(index); + } + public static final int CROWDING_TAG_FIELD_NUMBER = 5; private com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag crowdingTag_; /** @@ -2341,6 +4081,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (crowdingTag_ != null) { output.writeMessage(5, getCrowdingTag()); } + for (int i = 0; i < numericRestricts_.size(); i++) { + output.writeMessage(6, numericRestricts_.get(i)); + } getUnknownFields().writeTo(output); } @@ -2369,6 +4112,9 @@ public int getSerializedSize() { if (crowdingTag_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCrowdingTag()); } + for (int i = 0; i < numericRestricts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, numericRestricts_.get(i)); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2388,6 +4134,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDatapointId().equals(other.getDatapointId())) return false; if (!getFeatureVectorList().equals(other.getFeatureVectorList())) return false; if (!getRestrictsList().equals(other.getRestrictsList())) return false; + if (!getNumericRestrictsList().equals(other.getNumericRestrictsList())) return false; if (hasCrowdingTag() != other.hasCrowdingTag()) return false; if (hasCrowdingTag()) { if (!getCrowdingTag().equals(other.getCrowdingTag())) return false; @@ -2413,6 +4160,10 @@ public int hashCode() { hash = (37 * hash) + RESTRICTS_FIELD_NUMBER; hash = (53 * hash) + getRestrictsList().hashCode(); } + if (getNumericRestrictsCount() > 0) { + hash = (37 * hash) + NUMERIC_RESTRICTS_FIELD_NUMBER; + hash = (53 * hash) + getNumericRestrictsList().hashCode(); + } if (hasCrowdingTag()) { hash = (37 * hash) + CROWDING_TAG_FIELD_NUMBER; hash = (53 * hash) + getCrowdingTag().hashCode(); @@ -2503,573 +4254,1086 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.aiplatform.v1.IndexDatapoint prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + public static Builder newBuilder(com.google.cloud.aiplatform.v1.IndexDatapoint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 datapoint of Index.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.IndexDatapoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.IndexDatapoint) + com.google.cloud.aiplatform.v1.IndexDatapointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.IndexDatapoint.class, + com.google.cloud.aiplatform.v1.IndexDatapoint.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.IndexDatapoint.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + datapointId_ = ""; + featureVector_ = emptyFloatList(); + if (restrictsBuilder_ == null) { + restricts_ = java.util.Collections.emptyList(); + } else { + restricts_ = null; + restrictsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (numericRestrictsBuilder_ == null) { + numericRestricts_ = java.util.Collections.emptyList(); + } else { + numericRestricts_ = null; + numericRestrictsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + crowdingTag_ = null; + if (crowdingTagBuilder_ != null) { + crowdingTagBuilder_.dispose(); + crowdingTagBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.IndexDatapoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint build() { + com.google.cloud.aiplatform.v1.IndexDatapoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint buildPartial() { + com.google.cloud.aiplatform.v1.IndexDatapoint result = + new com.google.cloud.aiplatform.v1.IndexDatapoint(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.aiplatform.v1.IndexDatapoint result) { + if (((bitField0_ & 0x00000002) != 0)) { + featureVector_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.featureVector_ = featureVector_; + if (restrictsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + restricts_ = java.util.Collections.unmodifiableList(restricts_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.restricts_ = restricts_; + } else { + result.restricts_ = restrictsBuilder_.build(); + } + if (numericRestrictsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + numericRestricts_ = java.util.Collections.unmodifiableList(numericRestricts_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.numericRestricts_ = numericRestricts_; + } else { + result.numericRestricts_ = numericRestrictsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.IndexDatapoint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.datapointId_ = datapointId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.crowdingTag_ = + crowdingTagBuilder_ == null ? crowdingTag_ : crowdingTagBuilder_.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 toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A datapoint of Index.
-   * 
- * - * Protobuf type {@code google.cloud.aiplatform.v1.IndexDatapoint} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.IndexDatapoint) - com.google.cloud.aiplatform.v1.IndexDatapointOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.aiplatform.v1.IndexProto - .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_descriptor; + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.aiplatform.v1.IndexProto - .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1.IndexDatapoint.class, - com.google.cloud.aiplatform.v1.IndexDatapoint.Builder.class); + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.IndexDatapoint) { + return mergeFrom((com.google.cloud.aiplatform.v1.IndexDatapoint) other); + } else { + super.mergeFrom(other); + return this; + } } - // Construct using com.google.cloud.aiplatform.v1.IndexDatapoint.newBuilder() - private Builder() {} + public Builder mergeFrom(com.google.cloud.aiplatform.v1.IndexDatapoint other) { + if (other == com.google.cloud.aiplatform.v1.IndexDatapoint.getDefaultInstance()) return this; + if (!other.getDatapointId().isEmpty()) { + datapointId_ = other.datapointId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.featureVector_.isEmpty()) { + if (featureVector_.isEmpty()) { + featureVector_ = other.featureVector_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureFeatureVectorIsMutable(); + featureVector_.addAll(other.featureVector_); + } + onChanged(); + } + if (restrictsBuilder_ == null) { + if (!other.restricts_.isEmpty()) { + if (restricts_.isEmpty()) { + restricts_ = other.restricts_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRestrictsIsMutable(); + restricts_.addAll(other.restricts_); + } + onChanged(); + } + } else { + if (!other.restricts_.isEmpty()) { + if (restrictsBuilder_.isEmpty()) { + restrictsBuilder_.dispose(); + restrictsBuilder_ = null; + restricts_ = other.restricts_; + bitField0_ = (bitField0_ & ~0x00000004); + restrictsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRestrictsFieldBuilder() + : null; + } else { + restrictsBuilder_.addAllMessages(other.restricts_); + } + } + } + if (numericRestrictsBuilder_ == null) { + if (!other.numericRestricts_.isEmpty()) { + if (numericRestricts_.isEmpty()) { + numericRestricts_ = other.numericRestricts_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureNumericRestrictsIsMutable(); + numericRestricts_.addAll(other.numericRestricts_); + } + onChanged(); + } + } else { + if (!other.numericRestricts_.isEmpty()) { + if (numericRestrictsBuilder_.isEmpty()) { + numericRestrictsBuilder_.dispose(); + numericRestrictsBuilder_ = null; + numericRestricts_ = other.numericRestricts_; + bitField0_ = (bitField0_ & ~0x00000008); + numericRestrictsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNumericRestrictsFieldBuilder() + : null; + } else { + numericRestrictsBuilder_.addAllMessages(other.numericRestricts_); + } + } + } + if (other.hasCrowdingTag()) { + mergeCrowdingTag(other.getCrowdingTag()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); + @java.lang.Override + public final boolean isInitialized() { + return true; } @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - datapointId_ = ""; - featureVector_ = emptyFloatList(); - if (restrictsBuilder_ == null) { - restricts_ = java.util.Collections.emptyList(); + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + datapointId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: + { + float v = input.readFloat(); + ensureFeatureVectorIsMutable(); + featureVector_.addFloat(v); + break; + } // case 21 + case 18: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureFeatureVectorIsMutable(); + while (input.getBytesUntilLimit() > 0) { + featureVector_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } // case 18 + case 34: + { + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction m = + input.readMessage( + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.parser(), + extensionRegistry); + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + restricts_.add(m); + } else { + restrictsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + input.readMessage(getCrowdingTagFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction m = + input.readMessage( + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.parser(), + extensionRegistry); + if (numericRestrictsBuilder_ == null) { + ensureNumericRestrictsIsMutable(); + numericRestricts_.add(m); + } else { + numericRestrictsBuilder_.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.lang.Object datapointId_ = ""; + /** + * + * + *
+     * Required. Unique identifier of the datapoint.
+     * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datapointId. + */ + public java.lang.String getDatapointId() { + java.lang.Object ref = datapointId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datapointId_ = s; + return s; } else { - restricts_ = null; - restrictsBuilder_.clear(); + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Unique identifier of the datapoint.
+     * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datapointId. + */ + public com.google.protobuf.ByteString getDatapointIdBytes() { + java.lang.Object ref = datapointId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datapointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - bitField0_ = (bitField0_ & ~0x00000004); - crowdingTag_ = null; - if (crowdingTagBuilder_ != null) { - crowdingTagBuilder_.dispose(); - crowdingTagBuilder_ = null; + } + /** + * + * + *
+     * Required. Unique identifier of the datapoint.
+     * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The datapointId to set. + * @return This builder for chaining. + */ + public Builder setDatapointId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + datapointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); return this; } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.aiplatform.v1.IndexProto - .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_descriptor; - } - - @java.lang.Override - public com.google.cloud.aiplatform.v1.IndexDatapoint getDefaultInstanceForType() { - return com.google.cloud.aiplatform.v1.IndexDatapoint.getDefaultInstance(); + /** + * + * + *
+     * Required. Unique identifier of the datapoint.
+     * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDatapointId() { + datapointId_ = getDefaultInstance().getDatapointId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; } - - @java.lang.Override - public com.google.cloud.aiplatform.v1.IndexDatapoint build() { - com.google.cloud.aiplatform.v1.IndexDatapoint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + /** + * + * + *
+     * Required. Unique identifier of the datapoint.
+     * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for datapointId to set. + * @return This builder for chaining. + */ + public Builder setDatapointIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - return result; + checkByteStringIsUtf8(value); + datapointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - @java.lang.Override - public com.google.cloud.aiplatform.v1.IndexDatapoint buildPartial() { - com.google.cloud.aiplatform.v1.IndexDatapoint result = - new com.google.cloud.aiplatform.v1.IndexDatapoint(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + private com.google.protobuf.Internal.FloatList featureVector_ = emptyFloatList(); - private void buildPartialRepeatedFields(com.google.cloud.aiplatform.v1.IndexDatapoint result) { - if (((bitField0_ & 0x00000002) != 0)) { - featureVector_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.featureVector_ = featureVector_; - if (restrictsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - restricts_ = java.util.Collections.unmodifiableList(restricts_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.restricts_ = restricts_; - } else { - result.restricts_ = restrictsBuilder_.build(); + private void ensureFeatureVectorIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + featureVector_ = mutableCopy(featureVector_); + bitField0_ |= 0x00000002; } } - - private void buildPartial0(com.google.cloud.aiplatform.v1.IndexDatapoint result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.datapointId_ = datapointId_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.crowdingTag_ = - crowdingTagBuilder_ == null ? crowdingTag_ : crowdingTagBuilder_.build(); - } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the featureVector. + */ + public java.util.List getFeatureVectorList() { + return ((bitField0_ & 0x00000002) != 0) + ? java.util.Collections.unmodifiableList(featureVector_) + : featureVector_; } - - @java.lang.Override - public Builder clone() { - return super.clone(); + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of featureVector. + */ + public int getFeatureVectorCount() { + return featureVector_.size(); } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The featureVector at the given index. + */ + public float getFeatureVector(int index) { + return featureVector_.getFloat(index); } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The featureVector to set. + * @return This builder for chaining. + */ + public Builder setFeatureVector(int index, float value) { - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + ensureFeatureVectorIsMutable(); + featureVector_.setFloat(index, value); + onChanged(); + return this; } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The featureVector to add. + * @return This builder for chaining. + */ + public Builder addFeatureVector(float value) { - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + ensureFeatureVectorIsMutable(); + featureVector_.addFloat(value); + onChanged(); + return this; } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The featureVector to add. + * @return This builder for chaining. + */ + public Builder addAllFeatureVector(java.lang.Iterable values) { + ensureFeatureVectorIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, featureVector_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFeatureVector() { + featureVector_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private java.util.List restricts_ = + java.util.Collections.emptyList(); + + private void ensureRestrictsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + restricts_ = + new java.util.ArrayList( + restricts_); + bitField0_ |= 0x00000004; + } } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.aiplatform.v1.IndexDatapoint) { - return mergeFrom((com.google.cloud.aiplatform.v1.IndexDatapoint) other); + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction, + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder, + com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder> + restrictsBuilder_; + + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getRestrictsList() { + if (restrictsBuilder_ == null) { + return java.util.Collections.unmodifiableList(restricts_); } else { - super.mergeFrom(other); - return this; + return restrictsBuilder_.getMessageList(); } } - - public Builder mergeFrom(com.google.cloud.aiplatform.v1.IndexDatapoint other) { - if (other == com.google.cloud.aiplatform.v1.IndexDatapoint.getDefaultInstance()) return this; - if (!other.getDatapointId().isEmpty()) { - datapointId_ = other.datapointId_; - bitField0_ |= 0x00000001; - onChanged(); + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getRestrictsCount() { + if (restrictsBuilder_ == null) { + return restricts_.size(); + } else { + return restrictsBuilder_.getCount(); } - if (!other.featureVector_.isEmpty()) { - if (featureVector_.isEmpty()) { - featureVector_ = other.featureVector_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureFeatureVectorIsMutable(); - featureVector_.addAll(other.featureVector_); - } - onChanged(); + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction getRestricts(int index) { + if (restrictsBuilder_ == null) { + return restricts_.get(index); + } else { + return restrictsBuilder_.getMessage(index); } + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRestricts( + int index, com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction value) { if (restrictsBuilder_ == null) { - if (!other.restricts_.isEmpty()) { - if (restricts_.isEmpty()) { - restricts_ = other.restricts_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureRestrictsIsMutable(); - restricts_.addAll(other.restricts_); - } - onChanged(); + if (value == null) { + throw new NullPointerException(); } + ensureRestrictsIsMutable(); + restricts_.set(index, value); + onChanged(); } else { - if (!other.restricts_.isEmpty()) { - if (restrictsBuilder_.isEmpty()) { - restrictsBuilder_.dispose(); - restrictsBuilder_ = null; - restricts_ = other.restricts_; - bitField0_ = (bitField0_ & ~0x00000004); - restrictsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRestrictsFieldBuilder() - : null; - } else { - restrictsBuilder_.addAllMessages(other.restricts_); - } - } - } - if (other.hasCrowdingTag()) { - mergeCrowdingTag(other.getCrowdingTag()); + restrictsBuilder_.setMessage(index, value); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); return this; } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRestricts( + int index, + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder builderForValue) { + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + restricts_.set(index, builderForValue.build()); + onChanged(); + } else { + restrictsBuilder_.setMessage(index, builderForValue.build()); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - datapointId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 21: - { - float v = input.readFloat(); - ensureFeatureVectorIsMutable(); - featureVector_.addFloat(v); - break; - } // case 21 - case 18: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureFeatureVectorIsMutable(); - while (input.getBytesUntilLimit() > 0) { - featureVector_.addFloat(input.readFloat()); - } - input.popLimit(limit); - break; - } // case 18 - case 34: - { - com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction m = - input.readMessage( - com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.parser(), - extensionRegistry); - if (restrictsBuilder_ == null) { - ensureRestrictsIsMutable(); - restricts_.add(m); - } else { - restrictsBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: - { - input.readMessage(getCrowdingTagFieldBuilder().getBuilder(), extensionRegistry); - 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 { + return this; + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addRestricts(com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction value) { + if (restrictsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestrictsIsMutable(); + restricts_.add(value); onChanged(); - } // finally + } else { + restrictsBuilder_.addMessage(value); + } return this; } - - private int bitField0_; - - private java.lang.Object datapointId_ = ""; /** * * *
-     * Required. Unique identifier of the datapoint.
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The datapointId. + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public java.lang.String getDatapointId() { - java.lang.Object ref = datapointId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - datapointId_ = s; - return s; + public Builder addRestricts( + int index, com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction value) { + if (restrictsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestrictsIsMutable(); + restricts_.add(index, value); + onChanged(); } else { - return (java.lang.String) ref; + restrictsBuilder_.addMessage(index, value); } + return this; } /** * * *
-     * Required. Unique identifier of the datapoint.
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for datapointId. + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.protobuf.ByteString getDatapointIdBytes() { - java.lang.Object ref = datapointId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - datapointId_ = b; - return b; + public Builder addRestricts( + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder builderForValue) { + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + restricts_.add(builderForValue.build()); + onChanged(); } else { - return (com.google.protobuf.ByteString) ref; + restrictsBuilder_.addMessage(builderForValue.build()); } + return this; } /** * * *
-     * Required. Unique identifier of the datapoint.
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The datapointId to set. - * @return This builder for chaining. + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setDatapointId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder addRestricts( + int index, + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder builderForValue) { + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + restricts_.add(index, builderForValue.build()); + onChanged(); + } else { + restrictsBuilder_.addMessage(index, builderForValue.build()); } - datapointId_ = value; - bitField0_ |= 0x00000001; - onChanged(); return this; } /** * * *
-     * Required. Unique identifier of the datapoint.
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearDatapointId() { - datapointId_ = getDefaultInstance().getDatapointId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); + public Builder addAllRestricts( + java.lang.Iterable + values) { + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, restricts_); + onChanged(); + } else { + restrictsBuilder_.addAllMessages(values); + } return this; } /** * * *
-     * Required. Unique identifier of the datapoint.
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for datapointId to set. - * @return This builder for chaining. + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setDatapointIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearRestricts() { + if (restrictsBuilder_ == null) { + restricts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + restrictsBuilder_.clear(); } - checkByteStringIsUtf8(value); - datapointId_ = value; - bitField0_ |= 0x00000001; - onChanged(); return this; } - - private com.google.protobuf.Internal.FloatList featureVector_ = emptyFloatList(); - - private void ensureFeatureVectorIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - featureVector_ = mutableCopy(featureVector_); - bitField0_ |= 0x00000002; - } - } /** * * *
-     * Required. Feature embedding vector. An array of numbers with the length of
-     * [NearestNeighborSearchConfig.dimensions].
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the featureVector. + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public java.util.List getFeatureVectorList() { - return ((bitField0_ & 0x00000002) != 0) - ? java.util.Collections.unmodifiableList(featureVector_) - : featureVector_; + public Builder removeRestricts(int index) { + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + restricts_.remove(index); + onChanged(); + } else { + restrictsBuilder_.remove(index); + } + return this; } /** * * *
-     * Required. Feature embedding vector. An array of numbers with the length of
-     * [NearestNeighborSearchConfig.dimensions].
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of featureVector. + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public int getFeatureVectorCount() { - return featureVector_.size(); + public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder getRestrictsBuilder( + int index) { + return getRestrictsFieldBuilder().getBuilder(index); } /** * * *
-     * Required. Feature embedding vector. An array of numbers with the length of
-     * [NearestNeighborSearchConfig.dimensions].
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the element to return. - * @return The featureVector at the given index. + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public float getFeatureVector(int index) { - return featureVector_.getFloat(index); + public com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder getRestrictsOrBuilder( + int index) { + if (restrictsBuilder_ == null) { + return restricts_.get(index); + } else { + return restrictsBuilder_.getMessageOrBuilder(index); + } } /** * * *
-     * Required. Feature embedding vector. An array of numbers with the length of
-     * [NearestNeighborSearchConfig.dimensions].
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index to set the value at. - * @param value The featureVector to set. - * @return This builder for chaining. + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setFeatureVector(int index, float value) { - - ensureFeatureVectorIsMutable(); - featureVector_.setFloat(index, value); - onChanged(); - return this; + public java.util.List< + ? extends com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder> + getRestrictsOrBuilderList() { + if (restrictsBuilder_ != null) { + return restrictsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(restricts_); + } } /** * * *
-     * Required. Feature embedding vector. An array of numbers with the length of
-     * [NearestNeighborSearchConfig.dimensions].
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The featureVector to add. - * @return This builder for chaining. + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder addFeatureVector(float value) { - - ensureFeatureVectorIsMutable(); - featureVector_.addFloat(value); - onChanged(); - return this; + public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder addRestrictsBuilder() { + return getRestrictsFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.getDefaultInstance()); } /** * * *
-     * Required. Feature embedding vector. An array of numbers with the length of
-     * [NearestNeighborSearchConfig.dimensions].
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param values The featureVector to add. - * @return This builder for chaining. + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder addAllFeatureVector(java.lang.Iterable values) { - ensureFeatureVectorIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, featureVector_); - onChanged(); - return this; + public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder addRestrictsBuilder( + int index) { + return getRestrictsFieldBuilder() + .addBuilder( + index, + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.getDefaultInstance()); } /** * * *
-     * Required. Feature embedding vector. An array of numbers with the length of
-     * [NearestNeighborSearchConfig.dimensions].
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearFeatureVector() { - featureVector_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; + public java.util.List + getRestrictsBuilderList() { + return getRestrictsFieldBuilder().getBuilderList(); } - private java.util.List restricts_ = - java.util.Collections.emptyList(); + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction, + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder, + com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder> + getRestrictsFieldBuilder() { + if (restrictsBuilder_ == null) { + restrictsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction, + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder, + com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder>( + restricts_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + restricts_ = null; + } + return restrictsBuilder_; + } - private void ensureRestrictsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - restricts_ = - new java.util.ArrayList( - restricts_); - bitField0_ |= 0x00000004; + private java.util.List + numericRestricts_ = java.util.Collections.emptyList(); + + private void ensureNumericRestrictsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + numericRestricts_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction>( + numericRestricts_); + bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction, - com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder, - com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder> - restrictsBuilder_; + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction, + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Builder, + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestrictionOrBuilder> + numericRestrictsBuilder_; /** * @@ -3077,20 +5341,19 @@ private void ensureRestrictsIsMutable() { *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List - getRestrictsList() { - if (restrictsBuilder_ == null) { - return java.util.Collections.unmodifiableList(restricts_); + public java.util.List + getNumericRestrictsList() { + if (numericRestrictsBuilder_ == null) { + return java.util.Collections.unmodifiableList(numericRestricts_); } else { - return restrictsBuilder_.getMessageList(); + return numericRestrictsBuilder_.getMessageList(); } } /** @@ -3099,19 +5362,18 @@ private void ensureRestrictsIsMutable() { *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public int getRestrictsCount() { - if (restrictsBuilder_ == null) { - return restricts_.size(); + public int getNumericRestrictsCount() { + if (numericRestrictsBuilder_ == null) { + return numericRestricts_.size(); } else { - return restrictsBuilder_.getCount(); + return numericRestrictsBuilder_.getCount(); } } /** @@ -3120,19 +5382,19 @@ public int getRestrictsCount() { *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction getRestricts(int index) { - if (restrictsBuilder_ == null) { - return restricts_.get(index); + public com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction getNumericRestricts( + int index) { + if (numericRestrictsBuilder_ == null) { + return numericRestricts_.get(index); } else { - return restrictsBuilder_.getMessage(index); + return numericRestrictsBuilder_.getMessage(index); } } /** @@ -3141,25 +5403,24 @@ public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction getRestricts(in *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setRestricts( - int index, com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction value) { - if (restrictsBuilder_ == null) { + public Builder setNumericRestricts( + int index, com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction value) { + if (numericRestrictsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureRestrictsIsMutable(); - restricts_.set(index, value); + ensureNumericRestrictsIsMutable(); + numericRestricts_.set(index, value); onChanged(); } else { - restrictsBuilder_.setMessage(index, value); + numericRestrictsBuilder_.setMessage(index, value); } return this; } @@ -3169,23 +5430,22 @@ public Builder setRestricts( *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setRestricts( + public Builder setNumericRestricts( int index, - com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder builderForValue) { - if (restrictsBuilder_ == null) { - ensureRestrictsIsMutable(); - restricts_.set(index, builderForValue.build()); + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Builder builderForValue) { + if (numericRestrictsBuilder_ == null) { + ensureNumericRestrictsIsMutable(); + numericRestricts_.set(index, builderForValue.build()); onChanged(); } else { - restrictsBuilder_.setMessage(index, builderForValue.build()); + numericRestrictsBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -3195,24 +5455,24 @@ public Builder setRestricts( *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addRestricts(com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction value) { - if (restrictsBuilder_ == null) { + public Builder addNumericRestricts( + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction value) { + if (numericRestrictsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureRestrictsIsMutable(); - restricts_.add(value); + ensureNumericRestrictsIsMutable(); + numericRestricts_.add(value); onChanged(); } else { - restrictsBuilder_.addMessage(value); + numericRestrictsBuilder_.addMessage(value); } return this; } @@ -3222,25 +5482,24 @@ public Builder addRestricts(com.google.cloud.aiplatform.v1.IndexDatapoint.Restri *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addRestricts( - int index, com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction value) { - if (restrictsBuilder_ == null) { + public Builder addNumericRestricts( + int index, com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction value) { + if (numericRestrictsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureRestrictsIsMutable(); - restricts_.add(index, value); + ensureNumericRestrictsIsMutable(); + numericRestricts_.add(index, value); onChanged(); } else { - restrictsBuilder_.addMessage(index, value); + numericRestrictsBuilder_.addMessage(index, value); } return this; } @@ -3250,22 +5509,21 @@ public Builder addRestricts( *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addRestricts( - com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder builderForValue) { - if (restrictsBuilder_ == null) { - ensureRestrictsIsMutable(); - restricts_.add(builderForValue.build()); + public Builder addNumericRestricts( + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Builder builderForValue) { + if (numericRestrictsBuilder_ == null) { + ensureNumericRestrictsIsMutable(); + numericRestricts_.add(builderForValue.build()); onChanged(); } else { - restrictsBuilder_.addMessage(builderForValue.build()); + numericRestrictsBuilder_.addMessage(builderForValue.build()); } return this; } @@ -3275,23 +5533,22 @@ public Builder addRestricts( *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addRestricts( + public Builder addNumericRestricts( int index, - com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder builderForValue) { - if (restrictsBuilder_ == null) { - ensureRestrictsIsMutable(); - restricts_.add(index, builderForValue.build()); + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Builder builderForValue) { + if (numericRestrictsBuilder_ == null) { + ensureNumericRestrictsIsMutable(); + numericRestricts_.add(index, builderForValue.build()); onChanged(); } else { - restrictsBuilder_.addMessage(index, builderForValue.build()); + numericRestrictsBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -3301,23 +5558,23 @@ public Builder addRestricts( *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addAllRestricts( - java.lang.Iterable + public Builder addAllNumericRestricts( + java.lang.Iterable< + ? extends com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction> values) { - if (restrictsBuilder_ == null) { - ensureRestrictsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, restricts_); + if (numericRestrictsBuilder_ == null) { + ensureNumericRestrictsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, numericRestricts_); onChanged(); } else { - restrictsBuilder_.addAllMessages(values); + numericRestrictsBuilder_.addAllMessages(values); } return this; } @@ -3327,21 +5584,20 @@ public Builder addAllRestricts( *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearRestricts() { - if (restrictsBuilder_ == null) { - restricts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + public Builder clearNumericRestricts() { + if (numericRestrictsBuilder_ == null) { + numericRestricts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { - restrictsBuilder_.clear(); + numericRestrictsBuilder_.clear(); } return this; } @@ -3351,21 +5607,20 @@ public Builder clearRestricts() { *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder removeRestricts(int index) { - if (restrictsBuilder_ == null) { - ensureRestrictsIsMutable(); - restricts_.remove(index); + public Builder removeNumericRestricts(int index) { + if (numericRestrictsBuilder_ == null) { + ensureNumericRestrictsIsMutable(); + numericRestricts_.remove(index); onChanged(); } else { - restrictsBuilder_.remove(index); + numericRestrictsBuilder_.remove(index); } return this; } @@ -3375,17 +5630,16 @@ public Builder removeRestricts(int index) { *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder getRestrictsBuilder( - int index) { - return getRestrictsFieldBuilder().getBuilder(index); + public com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Builder + getNumericRestrictsBuilder(int index) { + return getNumericRestrictsFieldBuilder().getBuilder(index); } /** * @@ -3393,20 +5647,19 @@ public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder getRest *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder getRestrictsOrBuilder( - int index) { - if (restrictsBuilder_ == null) { - return restricts_.get(index); + public com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestrictionOrBuilder + getNumericRestrictsOrBuilder(int index) { + if (numericRestrictsBuilder_ == null) { + return numericRestricts_.get(index); } else { - return restrictsBuilder_.getMessageOrBuilder(index); + return numericRestrictsBuilder_.getMessageOrBuilder(index); } } /** @@ -3415,21 +5668,20 @@ public com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder getRes *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List< - ? extends com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder> - getRestrictsOrBuilderList() { - if (restrictsBuilder_ != null) { - return restrictsBuilder_.getMessageOrBuilderList(); + ? extends com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestrictionOrBuilder> + getNumericRestrictsOrBuilderList() { + if (numericRestrictsBuilder_ != null) { + return numericRestrictsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(restricts_); + return java.util.Collections.unmodifiableList(numericRestricts_); } } /** @@ -3438,18 +5690,19 @@ public com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder getRes *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder addRestrictsBuilder() { - return getRestrictsFieldBuilder() + public com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Builder + addNumericRestrictsBuilder() { + return getNumericRestrictsFieldBuilder() .addBuilder( - com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.getDefaultInstance()); + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction + .getDefaultInstance()); } /** * @@ -3457,20 +5710,20 @@ public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder addRest *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder addRestrictsBuilder( - int index) { - return getRestrictsFieldBuilder() + public com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Builder + addNumericRestrictsBuilder(int index) { + return getNumericRestrictsFieldBuilder() .addBuilder( index, - com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.getDefaultInstance()); + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction + .getDefaultInstance()); } /** * @@ -3478,34 +5731,36 @@ public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder addRest *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List - getRestrictsBuilderList() { - return getRestrictsFieldBuilder().getBuilderList(); + public java.util.List + getNumericRestrictsBuilderList() { + return getNumericRestrictsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction, - com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder, - com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder> - getRestrictsFieldBuilder() { - if (restrictsBuilder_ == null) { - restrictsBuilder_ = + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction, + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Builder, + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestrictionOrBuilder> + getNumericRestrictsFieldBuilder() { + if (numericRestrictsBuilder_ == null) { + numericRestrictsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction, - com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder, - com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder>( - restricts_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); - restricts_ = null; + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction, + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Builder, + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestrictionOrBuilder>( + numericRestricts_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + numericRestricts_ = null; } - return restrictsBuilder_; + return numericRestrictsBuilder_; } private com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag crowdingTag_; @@ -3529,7 +5784,7 @@ public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder addRest * @return Whether the crowdingTag field is set. */ public boolean hasCrowdingTag() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -3575,7 +5830,7 @@ public Builder setCrowdingTag(com.google.cloud.aiplatform.v1.IndexDatapoint.Crow } else { crowdingTagBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -3598,7 +5853,7 @@ public Builder setCrowdingTag( } else { crowdingTagBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -3617,7 +5872,7 @@ public Builder setCrowdingTag( public Builder mergeCrowdingTag( com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag value) { if (crowdingTagBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) + if (((bitField0_ & 0x00000010) != 0) && crowdingTag_ != null && crowdingTag_ != com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.getDefaultInstance()) { @@ -3628,7 +5883,7 @@ public Builder mergeCrowdingTag( } else { crowdingTagBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -3645,7 +5900,7 @@ public Builder mergeCrowdingTag( *
*/ public Builder clearCrowdingTag() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); crowdingTag_ = null; if (crowdingTagBuilder_ != null) { crowdingTagBuilder_.dispose(); @@ -3668,7 +5923,7 @@ public Builder clearCrowdingTag() { */ public com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.Builder getCrowdingTagBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return getCrowdingTagFieldBuilder().getBuilder(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexDatapointOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexDatapointOrBuilder.java index aeb8eb18e2a2..3b3b7ad01f24 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexDatapointOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexDatapointOrBuilder.java @@ -167,6 +167,81 @@ public interface IndexDatapointOrBuilder com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder getRestrictsOrBuilder( int index); + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses numeric comparisons.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getNumericRestrictsList(); + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses numeric comparisons.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction getNumericRestricts(int index); + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses numeric comparisons.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getNumericRestrictsCount(); + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses numeric comparisons.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + ? extends com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestrictionOrBuilder> + getNumericRestrictsOrBuilderList(); + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses numeric comparisons.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestrictionOrBuilder + getNumericRestrictsOrBuilder(int index); + /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexProto.java index cf6b10d8f2d9..a61856331730 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexProto.java @@ -43,6 +43,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1_IndexDatapoint_Restriction_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1_IndexDatapoint_Restriction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_NumericRestriction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_NumericRestriction_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -89,23 +93,33 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "PECIFIED\020\000\022\020\n\014BATCH_UPDATE\020\001\022\021\n\rSTREAM_U" + "PDATE\020\002:]\352AZ\n\037aiplatform.googleapis.com/" + "Index\0227projects/{project}/locations/{loc" - + "ation}/indexes/{index}\"\343\002\n\016IndexDatapoin" + + "ation}/indexes/{index}\"\371\005\n\016IndexDatapoin" + "t\022\032\n\014datapoint_id\030\001 \001(\tB\004\342A\001\002\022\034\n\016feature" + "_vector\030\002 \003(\002B\004\342A\001\002\022O\n\trestricts\030\004 \003(\01326" + ".google.cloud.aiplatform.v1.IndexDatapoi" - + "nt.RestrictionB\004\342A\001\001\022R\n\014crowding_tag\030\005 \001" - + "(\01326.google.cloud.aiplatform.v1.IndexDat" - + "apoint.CrowdingTagB\004\342A\001\001\032G\n\013Restriction\022" - + "\021\n\tnamespace\030\001 \001(\t\022\022\n\nallow_list\030\002 \003(\t\022\021" - + "\n\tdeny_list\030\003 \003(\t\032)\n\013CrowdingTag\022\032\n\022crow" - + "ding_attribute\030\001 \001(\t\"E\n\nIndexStats\022\033\n\rve" - + "ctors_count\030\001 \001(\003B\004\342A\001\003\022\032\n\014shards_count\030" - + "\002 \001(\005B\004\342A\001\003B\310\001\n\036com.google.cloud.aiplatf" - + "orm.v1B\nIndexProtoP\001Z>cloud.google.com/g" - + "o/aiplatform/apiv1/aiplatformpb;aiplatfo" - + "rmpb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Goog" - + "le\\Cloud\\AIPlatform\\V1\352\002\035Google::Cloud::" - + "AIPlatform::V1b\006proto3" + + "nt.RestrictionB\004\342A\001\001\022^\n\021numeric_restrict" + + "s\030\006 \003(\0132=.google.cloud.aiplatform.v1.Ind" + + "exDatapoint.NumericRestrictionB\004\342A\001\001\022R\n\014" + + "crowding_tag\030\005 \001(\01326.google.cloud.aiplat" + + "form.v1.IndexDatapoint.CrowdingTagB\004\342A\001\001" + + "\032G\n\013Restriction\022\021\n\tnamespace\030\001 \001(\t\022\022\n\nal" + + "low_list\030\002 \003(\t\022\021\n\tdeny_list\030\003 \003(\t\032\263\002\n\022Nu" + + "mericRestriction\022\023\n\tvalue_int\030\002 \001(\003H\000\022\025\n" + + "\013value_float\030\003 \001(\002H\000\022\026\n\014value_double\030\004 \001" + + "(\001H\000\022\021\n\tnamespace\030\001 \001(\t\022R\n\002op\030\005 \001(\0162F.go" + + "ogle.cloud.aiplatform.v1.IndexDatapoint." + + "NumericRestriction.Operator\"i\n\010Operator\022" + + "\030\n\024OPERATOR_UNSPECIFIED\020\000\022\010\n\004LESS\020\001\022\016\n\nL" + + "ESS_EQUAL\020\002\022\t\n\005EQUAL\020\003\022\021\n\rGREATER_EQUAL\020" + + "\004\022\013\n\007GREATER\020\005B\007\n\005Value\032)\n\013CrowdingTag\022\032" + + "\n\022crowding_attribute\030\001 \001(\t\"E\n\nIndexStats" + + "\022\033\n\rvectors_count\030\001 \001(\003B\004\342A\001\003\022\032\n\014shards_" + + "count\030\002 \001(\005B\004\342A\001\003B\310\001\n\036com.google.cloud.a" + + "iplatform.v1B\nIndexProtoP\001Z>cloud.google" + + ".com/go/aiplatform/apiv1/aiplatformpb;ai" + + "platformpb\252\002\032Google.Cloud.AIPlatform.V1\312" + + "\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Google::C" + + "loud::AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -152,7 +166,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_IndexDatapoint_descriptor, new java.lang.String[] { - "DatapointId", "FeatureVector", "Restricts", "CrowdingTag", + "DatapointId", "FeatureVector", "Restricts", "NumericRestricts", "CrowdingTag", }); internal_static_google_cloud_aiplatform_v1_IndexDatapoint_Restriction_descriptor = internal_static_google_cloud_aiplatform_v1_IndexDatapoint_descriptor @@ -164,10 +178,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Namespace", "AllowList", "DenyList", }); - internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_descriptor = + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_NumericRestriction_descriptor = internal_static_google_cloud_aiplatform_v1_IndexDatapoint_descriptor .getNestedTypes() .get(1); + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_NumericRestriction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_NumericRestriction_descriptor, + new java.lang.String[] { + "ValueInt", "ValueFloat", "ValueDouble", "Namespace", "Op", "Value", + }); + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_descriptor = + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_descriptor + .getNestedTypes() + .get(2); internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_descriptor, diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureGroupsRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureGroupsRequest.java new file mode 100644 index 000000000000..18c3d22f1c6a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureGroupsRequest.java @@ -0,0 +1,1495 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [FeatureRegistryService.ListFeatureGroups][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatureGroups].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListFeatureGroupsRequest} + */ +public final class ListFeatureGroupsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListFeatureGroupsRequest) + ListFeatureGroupsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListFeatureGroupsRequest.newBuilder() to construct. + private ListFeatureGroupsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListFeatureGroupsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListFeatureGroupsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureGroupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest.class, + com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location to list FeatureGroups.
+   * 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. The resource name of the Location to list FeatureGroups.
+   * 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 FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Lists the FeatureGroups that match the filter expression. The
+   * following fields are supported:
+   *
+   * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+   * Values must be
+   *   in RFC 3339 format.
+   * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+   * Values must be
+   *   in RFC 3339 format.
+   * * `labels`: Supports key-value equality and key presence.
+   *
+   * Examples:
+   *
+   * * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
+   *    FeatureGroups created or updated after 2020-01-01.
+   * * `labels.env = "prod"`
+   *    FeatureGroups with label "env" set to "prod".
+   * 
+ * + * string filter = 2; + * + * @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; + } + } + /** + * + * + *
+   * Lists the FeatureGroups that match the filter expression. The
+   * following fields are supported:
+   *
+   * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+   * Values must be
+   *   in RFC 3339 format.
+   * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+   * Values must be
+   *   in RFC 3339 format.
+   * * `labels`: Supports key-value equality and key presence.
+   *
+   * Examples:
+   *
+   * * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
+   *    FeatureGroups created or updated after 2020-01-01.
+   * * `labels.env = "prod"`
+   *    FeatureGroups with label "env" set to "prod".
+   * 
+ * + * string filter = 2; + * + * @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 PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of FeatureGroups to return. The service may return
+   * fewer than this value. If unspecified, at most 100 FeatureGroups will
+   * be returned. The maximum value is 100; any value greater than 100 will be
+   * coerced to 100.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A page token, received from a previous
+   * [FeatureGroupAdminService.ListFeatureGroups][] call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [FeatureGroupAdminService.ListFeatureGroups][] must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 4; + * + * @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
+   * [FeatureGroupAdminService.ListFeatureGroups][] call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [FeatureGroupAdminService.ListFeatureGroups][] must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 4; + * + * @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 ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported Fields:
+   *
+   *   * `create_time`
+   *   * `update_time`
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported Fields:
+   *
+   *   * `create_time`
+   *   * `update_time`
+   * 
+ * + * 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + 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.aiplatform.v1.ListFeatureGroupsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest other = + (com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().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) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureRegistryService.ListFeatureGroups][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatureGroups].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListFeatureGroupsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListFeatureGroupsRequest) + com.google.cloud.aiplatform.v1.ListFeatureGroupsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureGroupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest.class, + com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureGroupsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest build() { + com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest result = + new com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + 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.aiplatform.v1.ListFeatureGroupsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest other) { + if (other == com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + 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 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + pageToken_ = 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. The resource name of the Location to list FeatureGroups.
+     * 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. The resource name of the Location to list FeatureGroups.
+     * 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. The resource name of the Location to list FeatureGroups.
+     * 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. The resource name of the Location to list FeatureGroups.
+     * 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. The resource name of the Location to list FeatureGroups.
+     * 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 filter_ = ""; + /** + * + * + *
+     * Lists the FeatureGroups that match the filter expression. The
+     * following fields are supported:
+     *
+     * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+     * Values must be
+     *   in RFC 3339 format.
+     * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+     * Values must be
+     *   in RFC 3339 format.
+     * * `labels`: Supports key-value equality and key presence.
+     *
+     * Examples:
+     *
+     * * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
+     *    FeatureGroups created or updated after 2020-01-01.
+     * * `labels.env = "prod"`
+     *    FeatureGroups with label "env" set to "prod".
+     * 
+ * + * string filter = 2; + * + * @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; + } + } + /** + * + * + *
+     * Lists the FeatureGroups that match the filter expression. The
+     * following fields are supported:
+     *
+     * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+     * Values must be
+     *   in RFC 3339 format.
+     * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+     * Values must be
+     *   in RFC 3339 format.
+     * * `labels`: Supports key-value equality and key presence.
+     *
+     * Examples:
+     *
+     * * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
+     *    FeatureGroups created or updated after 2020-01-01.
+     * * `labels.env = "prod"`
+     *    FeatureGroups with label "env" set to "prod".
+     * 
+ * + * string filter = 2; + * + * @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; + } + } + /** + * + * + *
+     * Lists the FeatureGroups that match the filter expression. The
+     * following fields are supported:
+     *
+     * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+     * Values must be
+     *   in RFC 3339 format.
+     * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+     * Values must be
+     *   in RFC 3339 format.
+     * * `labels`: Supports key-value equality and key presence.
+     *
+     * Examples:
+     *
+     * * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
+     *    FeatureGroups created or updated after 2020-01-01.
+     * * `labels.env = "prod"`
+     *    FeatureGroups with label "env" set to "prod".
+     * 
+ * + * string filter = 2; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Lists the FeatureGroups that match the filter expression. The
+     * following fields are supported:
+     *
+     * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+     * Values must be
+     *   in RFC 3339 format.
+     * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+     * Values must be
+     *   in RFC 3339 format.
+     * * `labels`: Supports key-value equality and key presence.
+     *
+     * Examples:
+     *
+     * * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
+     *    FeatureGroups created or updated after 2020-01-01.
+     * * `labels.env = "prod"`
+     *    FeatureGroups with label "env" set to "prod".
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Lists the FeatureGroups that match the filter expression. The
+     * following fields are supported:
+     *
+     * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+     * Values must be
+     *   in RFC 3339 format.
+     * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+     * Values must be
+     *   in RFC 3339 format.
+     * * `labels`: Supports key-value equality and key presence.
+     *
+     * Examples:
+     *
+     * * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
+     *    FeatureGroups created or updated after 2020-01-01.
+     * * `labels.env = "prod"`
+     *    FeatureGroups with label "env" set to "prod".
+     * 
+ * + * string filter = 2; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of FeatureGroups to return. The service may return
+     * fewer than this value. If unspecified, at most 100 FeatureGroups will
+     * be returned. The maximum value is 100; any value greater than 100 will be
+     * coerced to 100.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of FeatureGroups to return. The service may return
+     * fewer than this value. If unspecified, at most 100 FeatureGroups will
+     * be returned. The maximum value is 100; any value greater than 100 will be
+     * coerced to 100.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of FeatureGroups to return. The service may return
+     * fewer than this value. If unspecified, at most 100 FeatureGroups will
+     * be returned. The maximum value is 100; any value greater than 100 will be
+     * coerced to 100.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous
+     * [FeatureGroupAdminService.ListFeatureGroups][] call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [FeatureGroupAdminService.ListFeatureGroups][] must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 4; + * + * @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
+     * [FeatureGroupAdminService.ListFeatureGroups][] call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [FeatureGroupAdminService.ListFeatureGroups][] must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 4; + * + * @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
+     * [FeatureGroupAdminService.ListFeatureGroups][] call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [FeatureGroupAdminService.ListFeatureGroups][] must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 4; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous
+     * [FeatureGroupAdminService.ListFeatureGroups][] call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [FeatureGroupAdminService.ListFeatureGroups][] must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous
+     * [FeatureGroupAdminService.ListFeatureGroups][] call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [FeatureGroupAdminService.ListFeatureGroups][] must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 4; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported Fields:
+     *
+     *   * `create_time`
+     *   * `update_time`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported Fields:
+     *
+     *   * `create_time`
+     *   * `update_time`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported Fields:
+     *
+     *   * `create_time`
+     *   * `update_time`
+     * 
+ * + * 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; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported Fields:
+     *
+     *   * `create_time`
+     *   * `update_time`
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported Fields:
+     *
+     *   * `create_time`
+     *   * `update_time`
+     * 
+ * + * 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.aiplatform.v1.ListFeatureGroupsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListFeatureGroupsRequest) + private static final com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFeatureGroupsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureGroupsRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureGroupsRequestOrBuilder.java new file mode 100644 index 000000000000..36c12ac860c8 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureGroupsRequestOrBuilder.java @@ -0,0 +1,203 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListFeatureGroupsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListFeatureGroupsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to list FeatureGroups.
+   * 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. The resource name of the Location to list FeatureGroups.
+   * 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(); + + /** + * + * + *
+   * Lists the FeatureGroups that match the filter expression. The
+   * following fields are supported:
+   *
+   * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+   * Values must be
+   *   in RFC 3339 format.
+   * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+   * Values must be
+   *   in RFC 3339 format.
+   * * `labels`: Supports key-value equality and key presence.
+   *
+   * Examples:
+   *
+   * * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
+   *    FeatureGroups created or updated after 2020-01-01.
+   * * `labels.env = "prod"`
+   *    FeatureGroups with label "env" set to "prod".
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Lists the FeatureGroups that match the filter expression. The
+   * following fields are supported:
+   *
+   * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+   * Values must be
+   *   in RFC 3339 format.
+   * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+   * Values must be
+   *   in RFC 3339 format.
+   * * `labels`: Supports key-value equality and key presence.
+   *
+   * Examples:
+   *
+   * * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
+   *    FeatureGroups created or updated after 2020-01-01.
+   * * `labels.env = "prod"`
+   *    FeatureGroups with label "env" set to "prod".
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The maximum number of FeatureGroups to return. The service may return
+   * fewer than this value. If unspecified, at most 100 FeatureGroups will
+   * be returned. The maximum value is 100; any value greater than 100 will be
+   * coerced to 100.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous
+   * [FeatureGroupAdminService.ListFeatureGroups][] call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [FeatureGroupAdminService.ListFeatureGroups][] must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous
+   * [FeatureGroupAdminService.ListFeatureGroups][] call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [FeatureGroupAdminService.ListFeatureGroups][] must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported Fields:
+   *
+   *   * `create_time`
+   *   * `update_time`
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported Fields:
+   *
+   *   * `create_time`
+   *   * `update_time`
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureGroupsResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureGroupsResponse.java new file mode 100644 index 000000000000..a0bc4842e2ed --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureGroupsResponse.java @@ -0,0 +1,1147 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for
+ * [FeatureRegistryService.ListFeatureGroups][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatureGroups].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListFeatureGroupsResponse} + */ +public final class ListFeatureGroupsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListFeatureGroupsResponse) + ListFeatureGroupsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListFeatureGroupsResponse.newBuilder() to construct. + private ListFeatureGroupsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListFeatureGroupsResponse() { + featureGroups_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListFeatureGroupsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureGroupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureGroupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse.class, + com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse.Builder.class); + } + + public static final int FEATURE_GROUPS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List featureGroups_; + /** + * + * + *
+   * The FeatureGroups matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + @java.lang.Override + public java.util.List getFeatureGroupsList() { + return featureGroups_; + } + /** + * + * + *
+   * The FeatureGroups matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + @java.lang.Override + public java.util.List + getFeatureGroupsOrBuilderList() { + return featureGroups_; + } + /** + * + * + *
+   * The FeatureGroups matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + @java.lang.Override + public int getFeatureGroupsCount() { + return featureGroups_.size(); + } + /** + * + * + *
+   * The FeatureGroups matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureGroup getFeatureGroups(int index) { + return featureGroups_.get(index); + } + /** + * + * + *
+   * The FeatureGroups matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureGroupOrBuilder getFeatureGroupsOrBuilder(int index) { + return featureGroups_.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
+   * [ListFeatureGroupsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureGroupsRequest.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
+   * [ListFeatureGroupsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureGroupsRequest.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 < featureGroups_.size(); i++) { + output.writeMessage(1, featureGroups_.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 < featureGroups_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, featureGroups_.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.aiplatform.v1.ListFeatureGroupsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse other = + (com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse) obj; + + if (!getFeatureGroupsList().equals(other.getFeatureGroupsList())) 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 (getFeatureGroupsCount() > 0) { + hash = (37 * hash) + FEATURE_GROUPS_FIELD_NUMBER; + hash = (53 * hash) + getFeatureGroupsList().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.aiplatform.v1.ListFeatureGroupsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureRegistryService.ListFeatureGroups][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatureGroups].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListFeatureGroupsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListFeatureGroupsResponse) + com.google.cloud.aiplatform.v1.ListFeatureGroupsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureGroupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureGroupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse.class, + com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (featureGroupsBuilder_ == null) { + featureGroups_ = java.util.Collections.emptyList(); + } else { + featureGroups_ = null; + featureGroupsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureGroupsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse build() { + com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse result = + new com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse result) { + if (featureGroupsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + featureGroups_ = java.util.Collections.unmodifiableList(featureGroups_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.featureGroups_ = featureGroups_; + } else { + result.featureGroups_ = featureGroupsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse 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.aiplatform.v1.ListFeatureGroupsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse other) { + if (other == com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse.getDefaultInstance()) + return this; + if (featureGroupsBuilder_ == null) { + if (!other.featureGroups_.isEmpty()) { + if (featureGroups_.isEmpty()) { + featureGroups_ = other.featureGroups_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeatureGroupsIsMutable(); + featureGroups_.addAll(other.featureGroups_); + } + onChanged(); + } + } else { + if (!other.featureGroups_.isEmpty()) { + if (featureGroupsBuilder_.isEmpty()) { + featureGroupsBuilder_.dispose(); + featureGroupsBuilder_ = null; + featureGroups_ = other.featureGroups_; + bitField0_ = (bitField0_ & ~0x00000001); + featureGroupsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFeatureGroupsFieldBuilder() + : null; + } else { + featureGroupsBuilder_.addAllMessages(other.featureGroups_); + } + } + } + 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.aiplatform.v1.FeatureGroup m = + input.readMessage( + com.google.cloud.aiplatform.v1.FeatureGroup.parser(), extensionRegistry); + if (featureGroupsBuilder_ == null) { + ensureFeatureGroupsIsMutable(); + featureGroups_.add(m); + } else { + featureGroupsBuilder_.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 featureGroups_ = + java.util.Collections.emptyList(); + + private void ensureFeatureGroupsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + featureGroups_ = + new java.util.ArrayList(featureGroups_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureGroup, + com.google.cloud.aiplatform.v1.FeatureGroup.Builder, + com.google.cloud.aiplatform.v1.FeatureGroupOrBuilder> + featureGroupsBuilder_; + + /** + * + * + *
+     * The FeatureGroups matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + public java.util.List getFeatureGroupsList() { + if (featureGroupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(featureGroups_); + } else { + return featureGroupsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The FeatureGroups matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + public int getFeatureGroupsCount() { + if (featureGroupsBuilder_ == null) { + return featureGroups_.size(); + } else { + return featureGroupsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The FeatureGroups matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + public com.google.cloud.aiplatform.v1.FeatureGroup getFeatureGroups(int index) { + if (featureGroupsBuilder_ == null) { + return featureGroups_.get(index); + } else { + return featureGroupsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The FeatureGroups matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + public Builder setFeatureGroups(int index, com.google.cloud.aiplatform.v1.FeatureGroup value) { + if (featureGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeatureGroupsIsMutable(); + featureGroups_.set(index, value); + onChanged(); + } else { + featureGroupsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The FeatureGroups matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + public Builder setFeatureGroups( + int index, com.google.cloud.aiplatform.v1.FeatureGroup.Builder builderForValue) { + if (featureGroupsBuilder_ == null) { + ensureFeatureGroupsIsMutable(); + featureGroups_.set(index, builderForValue.build()); + onChanged(); + } else { + featureGroupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The FeatureGroups matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + public Builder addFeatureGroups(com.google.cloud.aiplatform.v1.FeatureGroup value) { + if (featureGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeatureGroupsIsMutable(); + featureGroups_.add(value); + onChanged(); + } else { + featureGroupsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The FeatureGroups matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + public Builder addFeatureGroups(int index, com.google.cloud.aiplatform.v1.FeatureGroup value) { + if (featureGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeatureGroupsIsMutable(); + featureGroups_.add(index, value); + onChanged(); + } else { + featureGroupsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The FeatureGroups matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + public Builder addFeatureGroups( + com.google.cloud.aiplatform.v1.FeatureGroup.Builder builderForValue) { + if (featureGroupsBuilder_ == null) { + ensureFeatureGroupsIsMutable(); + featureGroups_.add(builderForValue.build()); + onChanged(); + } else { + featureGroupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The FeatureGroups matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + public Builder addFeatureGroups( + int index, com.google.cloud.aiplatform.v1.FeatureGroup.Builder builderForValue) { + if (featureGroupsBuilder_ == null) { + ensureFeatureGroupsIsMutable(); + featureGroups_.add(index, builderForValue.build()); + onChanged(); + } else { + featureGroupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The FeatureGroups matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + public Builder addAllFeatureGroups( + java.lang.Iterable values) { + if (featureGroupsBuilder_ == null) { + ensureFeatureGroupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, featureGroups_); + onChanged(); + } else { + featureGroupsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The FeatureGroups matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + public Builder clearFeatureGroups() { + if (featureGroupsBuilder_ == null) { + featureGroups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + featureGroupsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The FeatureGroups matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + public Builder removeFeatureGroups(int index) { + if (featureGroupsBuilder_ == null) { + ensureFeatureGroupsIsMutable(); + featureGroups_.remove(index); + onChanged(); + } else { + featureGroupsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The FeatureGroups matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + public com.google.cloud.aiplatform.v1.FeatureGroup.Builder getFeatureGroupsBuilder(int index) { + return getFeatureGroupsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The FeatureGroups matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + public com.google.cloud.aiplatform.v1.FeatureGroupOrBuilder getFeatureGroupsOrBuilder( + int index) { + if (featureGroupsBuilder_ == null) { + return featureGroups_.get(index); + } else { + return featureGroupsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The FeatureGroups matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + public java.util.List + getFeatureGroupsOrBuilderList() { + if (featureGroupsBuilder_ != null) { + return featureGroupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(featureGroups_); + } + } + /** + * + * + *
+     * The FeatureGroups matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + public com.google.cloud.aiplatform.v1.FeatureGroup.Builder addFeatureGroupsBuilder() { + return getFeatureGroupsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.FeatureGroup.getDefaultInstance()); + } + /** + * + * + *
+     * The FeatureGroups matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + public com.google.cloud.aiplatform.v1.FeatureGroup.Builder addFeatureGroupsBuilder(int index) { + return getFeatureGroupsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.FeatureGroup.getDefaultInstance()); + } + /** + * + * + *
+     * The FeatureGroups matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + public java.util.List + getFeatureGroupsBuilderList() { + return getFeatureGroupsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureGroup, + com.google.cloud.aiplatform.v1.FeatureGroup.Builder, + com.google.cloud.aiplatform.v1.FeatureGroupOrBuilder> + getFeatureGroupsFieldBuilder() { + if (featureGroupsBuilder_ == null) { + featureGroupsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureGroup, + com.google.cloud.aiplatform.v1.FeatureGroup.Builder, + com.google.cloud.aiplatform.v1.FeatureGroupOrBuilder>( + featureGroups_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + featureGroups_ = null; + } + return featureGroupsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as
+     * [ListFeatureGroupsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureGroupsRequest.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
+     * [ListFeatureGroupsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureGroupsRequest.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
+     * [ListFeatureGroupsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureGroupsRequest.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
+     * [ListFeatureGroupsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureGroupsRequest.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
+     * [ListFeatureGroupsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureGroupsRequest.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.aiplatform.v1.ListFeatureGroupsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListFeatureGroupsResponse) + private static final com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFeatureGroupsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureGroupsResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureGroupsResponseOrBuilder.java new file mode 100644 index 000000000000..a6eafb35df87 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureGroupsResponseOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListFeatureGroupsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListFeatureGroupsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The FeatureGroups matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + java.util.List getFeatureGroupsList(); + /** + * + * + *
+   * The FeatureGroups matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + com.google.cloud.aiplatform.v1.FeatureGroup getFeatureGroups(int index); + /** + * + * + *
+   * The FeatureGroups matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + int getFeatureGroupsCount(); + /** + * + * + *
+   * The FeatureGroups matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + java.util.List + getFeatureGroupsOrBuilderList(); + /** + * + * + *
+   * The FeatureGroups matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureGroup feature_groups = 1; + */ + com.google.cloud.aiplatform.v1.FeatureGroupOrBuilder getFeatureGroupsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as
+   * [ListFeatureGroupsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureGroupsRequest.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
+   * [ListFeatureGroupsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureGroupsRequest.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-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureOnlineStoresRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureOnlineStoresRequest.java new file mode 100644 index 000000000000..59675d829d9d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureOnlineStoresRequest.java @@ -0,0 +1,1500 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest} + */ +public final class ListFeatureOnlineStoresRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest) + ListFeatureOnlineStoresRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListFeatureOnlineStoresRequest.newBuilder() to construct. + private ListFeatureOnlineStoresRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListFeatureOnlineStoresRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListFeatureOnlineStoresRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureOnlineStoresRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureOnlineStoresRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest.class, + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location to list FeatureOnlineStores.
+   * 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. The resource name of the Location to list FeatureOnlineStores.
+   * 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 FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Lists the FeatureOnlineStores that match the filter expression. The
+   * following fields are supported:
+   *
+   * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+   * Values must be
+   *   in RFC 3339 format.
+   * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+   * Values must be
+   *   in RFC 3339 format.
+   * * `labels`: Supports key-value equality and key presence.
+   *
+   * Examples:
+   *
+   * * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
+   *    FeatureOnlineStores created or updated after 2020-01-01.
+   * * `labels.env = "prod"`
+   *    FeatureOnlineStores with label "env" set to "prod".
+   * 
+ * + * string filter = 2; + * + * @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; + } + } + /** + * + * + *
+   * Lists the FeatureOnlineStores that match the filter expression. The
+   * following fields are supported:
+   *
+   * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+   * Values must be
+   *   in RFC 3339 format.
+   * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+   * Values must be
+   *   in RFC 3339 format.
+   * * `labels`: Supports key-value equality and key presence.
+   *
+   * Examples:
+   *
+   * * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
+   *    FeatureOnlineStores created or updated after 2020-01-01.
+   * * `labels.env = "prod"`
+   *    FeatureOnlineStores with label "env" set to "prod".
+   * 
+ * + * string filter = 2; + * + * @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 PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of FeatureOnlineStores to return. The service may return
+   * fewer than this value. If unspecified, at most 100 FeatureOnlineStores will
+   * be returned. The maximum value is 100; any value greater than 100 will be
+   * coerced to 100.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A page token, received from a previous
+   * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 4; + * + * @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
+   * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 4; + * + * @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 ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported Fields:
+   *
+   *   * `create_time`
+   *   * `update_time`
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported Fields:
+   *
+   *   * `create_time`
+   *   * `update_time`
+   * 
+ * + * 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + 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.aiplatform.v1.ListFeatureOnlineStoresRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest other = + (com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().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) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest) + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureOnlineStoresRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureOnlineStoresRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest.class, + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureOnlineStoresRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest build() { + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest result = + new com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + 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.aiplatform.v1.ListFeatureOnlineStoresRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest other) { + if (other + == com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + 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 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + pageToken_ = 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. The resource name of the Location to list FeatureOnlineStores.
+     * 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. The resource name of the Location to list FeatureOnlineStores.
+     * 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. The resource name of the Location to list FeatureOnlineStores.
+     * 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. The resource name of the Location to list FeatureOnlineStores.
+     * 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. The resource name of the Location to list FeatureOnlineStores.
+     * 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 filter_ = ""; + /** + * + * + *
+     * Lists the FeatureOnlineStores that match the filter expression. The
+     * following fields are supported:
+     *
+     * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+     * Values must be
+     *   in RFC 3339 format.
+     * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+     * Values must be
+     *   in RFC 3339 format.
+     * * `labels`: Supports key-value equality and key presence.
+     *
+     * Examples:
+     *
+     * * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
+     *    FeatureOnlineStores created or updated after 2020-01-01.
+     * * `labels.env = "prod"`
+     *    FeatureOnlineStores with label "env" set to "prod".
+     * 
+ * + * string filter = 2; + * + * @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; + } + } + /** + * + * + *
+     * Lists the FeatureOnlineStores that match the filter expression. The
+     * following fields are supported:
+     *
+     * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+     * Values must be
+     *   in RFC 3339 format.
+     * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+     * Values must be
+     *   in RFC 3339 format.
+     * * `labels`: Supports key-value equality and key presence.
+     *
+     * Examples:
+     *
+     * * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
+     *    FeatureOnlineStores created or updated after 2020-01-01.
+     * * `labels.env = "prod"`
+     *    FeatureOnlineStores with label "env" set to "prod".
+     * 
+ * + * string filter = 2; + * + * @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; + } + } + /** + * + * + *
+     * Lists the FeatureOnlineStores that match the filter expression. The
+     * following fields are supported:
+     *
+     * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+     * Values must be
+     *   in RFC 3339 format.
+     * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+     * Values must be
+     *   in RFC 3339 format.
+     * * `labels`: Supports key-value equality and key presence.
+     *
+     * Examples:
+     *
+     * * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
+     *    FeatureOnlineStores created or updated after 2020-01-01.
+     * * `labels.env = "prod"`
+     *    FeatureOnlineStores with label "env" set to "prod".
+     * 
+ * + * string filter = 2; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Lists the FeatureOnlineStores that match the filter expression. The
+     * following fields are supported:
+     *
+     * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+     * Values must be
+     *   in RFC 3339 format.
+     * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+     * Values must be
+     *   in RFC 3339 format.
+     * * `labels`: Supports key-value equality and key presence.
+     *
+     * Examples:
+     *
+     * * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
+     *    FeatureOnlineStores created or updated after 2020-01-01.
+     * * `labels.env = "prod"`
+     *    FeatureOnlineStores with label "env" set to "prod".
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Lists the FeatureOnlineStores that match the filter expression. The
+     * following fields are supported:
+     *
+     * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+     * Values must be
+     *   in RFC 3339 format.
+     * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+     * Values must be
+     *   in RFC 3339 format.
+     * * `labels`: Supports key-value equality and key presence.
+     *
+     * Examples:
+     *
+     * * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
+     *    FeatureOnlineStores created or updated after 2020-01-01.
+     * * `labels.env = "prod"`
+     *    FeatureOnlineStores with label "env" set to "prod".
+     * 
+ * + * string filter = 2; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of FeatureOnlineStores to return. The service may return
+     * fewer than this value. If unspecified, at most 100 FeatureOnlineStores will
+     * be returned. The maximum value is 100; any value greater than 100 will be
+     * coerced to 100.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of FeatureOnlineStores to return. The service may return
+     * fewer than this value. If unspecified, at most 100 FeatureOnlineStores will
+     * be returned. The maximum value is 100; any value greater than 100 will be
+     * coerced to 100.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of FeatureOnlineStores to return. The service may return
+     * fewer than this value. If unspecified, at most 100 FeatureOnlineStores will
+     * be returned. The maximum value is 100; any value greater than 100 will be
+     * coerced to 100.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous
+     * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 4; + * + * @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
+     * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 4; + * + * @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
+     * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 4; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous
+     * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous
+     * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 4; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported Fields:
+     *
+     *   * `create_time`
+     *   * `update_time`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported Fields:
+     *
+     *   * `create_time`
+     *   * `update_time`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported Fields:
+     *
+     *   * `create_time`
+     *   * `update_time`
+     * 
+ * + * 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; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported Fields:
+     *
+     *   * `create_time`
+     *   * `update_time`
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported Fields:
+     *
+     *   * `create_time`
+     *   * `update_time`
+     * 
+ * + * 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.aiplatform.v1.ListFeatureOnlineStoresRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest) + private static final com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFeatureOnlineStoresRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureOnlineStoresRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureOnlineStoresRequestOrBuilder.java new file mode 100644 index 000000000000..9b667b297c2b --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureOnlineStoresRequestOrBuilder.java @@ -0,0 +1,203 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListFeatureOnlineStoresRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to list FeatureOnlineStores.
+   * 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. The resource name of the Location to list FeatureOnlineStores.
+   * 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(); + + /** + * + * + *
+   * Lists the FeatureOnlineStores that match the filter expression. The
+   * following fields are supported:
+   *
+   * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+   * Values must be
+   *   in RFC 3339 format.
+   * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+   * Values must be
+   *   in RFC 3339 format.
+   * * `labels`: Supports key-value equality and key presence.
+   *
+   * Examples:
+   *
+   * * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
+   *    FeatureOnlineStores created or updated after 2020-01-01.
+   * * `labels.env = "prod"`
+   *    FeatureOnlineStores with label "env" set to "prod".
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Lists the FeatureOnlineStores that match the filter expression. The
+   * following fields are supported:
+   *
+   * * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+   * Values must be
+   *   in RFC 3339 format.
+   * * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
+   * Values must be
+   *   in RFC 3339 format.
+   * * `labels`: Supports key-value equality and key presence.
+   *
+   * Examples:
+   *
+   * * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
+   *    FeatureOnlineStores created or updated after 2020-01-01.
+   * * `labels.env = "prod"`
+   *    FeatureOnlineStores with label "env" set to "prod".
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The maximum number of FeatureOnlineStores to return. The service may return
+   * fewer than this value. If unspecified, at most 100 FeatureOnlineStores will
+   * be returned. The maximum value is 100; any value greater than 100 will be
+   * coerced to 100.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous
+   * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous
+   * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported Fields:
+   *
+   *   * `create_time`
+   *   * `update_time`
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported Fields:
+   *
+   *   * `create_time`
+   *   * `update_time`
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureOnlineStoresResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureOnlineStoresResponse.java new file mode 100644 index 000000000000..4eb4afb080d4 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureOnlineStoresResponse.java @@ -0,0 +1,1184 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for
+ * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse} + */ +public final class ListFeatureOnlineStoresResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse) + ListFeatureOnlineStoresResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListFeatureOnlineStoresResponse.newBuilder() to construct. + private ListFeatureOnlineStoresResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListFeatureOnlineStoresResponse() { + featureOnlineStores_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListFeatureOnlineStoresResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureOnlineStoresResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureOnlineStoresResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse.class, + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse.Builder.class); + } + + public static final int FEATURE_ONLINE_STORES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List featureOnlineStores_; + /** + * + * + *
+   * The FeatureOnlineStores matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + */ + @java.lang.Override + public java.util.List + getFeatureOnlineStoresList() { + return featureOnlineStores_; + } + /** + * + * + *
+   * The FeatureOnlineStores matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + */ + @java.lang.Override + public java.util.List + getFeatureOnlineStoresOrBuilderList() { + return featureOnlineStores_; + } + /** + * + * + *
+   * The FeatureOnlineStores matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + */ + @java.lang.Override + public int getFeatureOnlineStoresCount() { + return featureOnlineStores_.size(); + } + /** + * + * + *
+   * The FeatureOnlineStores matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore getFeatureOnlineStores(int index) { + return featureOnlineStores_.get(index); + } + /** + * + * + *
+   * The FeatureOnlineStores matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStoreOrBuilder getFeatureOnlineStoresOrBuilder( + int index) { + return featureOnlineStores_.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
+   * [ListFeatureOnlineStoresRequest.page_token][google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest.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
+   * [ListFeatureOnlineStoresRequest.page_token][google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest.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 < featureOnlineStores_.size(); i++) { + output.writeMessage(1, featureOnlineStores_.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 < featureOnlineStores_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, featureOnlineStores_.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.aiplatform.v1.ListFeatureOnlineStoresResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse other = + (com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse) obj; + + if (!getFeatureOnlineStoresList().equals(other.getFeatureOnlineStoresList())) 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 (getFeatureOnlineStoresCount() > 0) { + hash = (37 * hash) + FEATURE_ONLINE_STORES_FIELD_NUMBER; + hash = (53 * hash) + getFeatureOnlineStoresList().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.aiplatform.v1.ListFeatureOnlineStoresResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse) + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureOnlineStoresResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureOnlineStoresResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse.class, + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (featureOnlineStoresBuilder_ == null) { + featureOnlineStores_ = java.util.Collections.emptyList(); + } else { + featureOnlineStores_ = null; + featureOnlineStoresBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureOnlineStoresResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse build() { + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse result = + new com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse result) { + if (featureOnlineStoresBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + featureOnlineStores_ = java.util.Collections.unmodifiableList(featureOnlineStores_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.featureOnlineStores_ = featureOnlineStores_; + } else { + result.featureOnlineStores_ = featureOnlineStoresBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse 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.aiplatform.v1.ListFeatureOnlineStoresResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse other) { + if (other + == com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse.getDefaultInstance()) + return this; + if (featureOnlineStoresBuilder_ == null) { + if (!other.featureOnlineStores_.isEmpty()) { + if (featureOnlineStores_.isEmpty()) { + featureOnlineStores_ = other.featureOnlineStores_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeatureOnlineStoresIsMutable(); + featureOnlineStores_.addAll(other.featureOnlineStores_); + } + onChanged(); + } + } else { + if (!other.featureOnlineStores_.isEmpty()) { + if (featureOnlineStoresBuilder_.isEmpty()) { + featureOnlineStoresBuilder_.dispose(); + featureOnlineStoresBuilder_ = null; + featureOnlineStores_ = other.featureOnlineStores_; + bitField0_ = (bitField0_ & ~0x00000001); + featureOnlineStoresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFeatureOnlineStoresFieldBuilder() + : null; + } else { + featureOnlineStoresBuilder_.addAllMessages(other.featureOnlineStores_); + } + } + } + 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.aiplatform.v1.FeatureOnlineStore m = + input.readMessage( + com.google.cloud.aiplatform.v1.FeatureOnlineStore.parser(), + extensionRegistry); + if (featureOnlineStoresBuilder_ == null) { + ensureFeatureOnlineStoresIsMutable(); + featureOnlineStores_.add(m); + } else { + featureOnlineStoresBuilder_.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 featureOnlineStores_ = + java.util.Collections.emptyList(); + + private void ensureFeatureOnlineStoresIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + featureOnlineStores_ = + new java.util.ArrayList( + featureOnlineStores_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureOnlineStore, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder, + com.google.cloud.aiplatform.v1.FeatureOnlineStoreOrBuilder> + featureOnlineStoresBuilder_; + + /** + * + * + *
+     * The FeatureOnlineStores matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + * + */ + public java.util.List + getFeatureOnlineStoresList() { + if (featureOnlineStoresBuilder_ == null) { + return java.util.Collections.unmodifiableList(featureOnlineStores_); + } else { + return featureOnlineStoresBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The FeatureOnlineStores matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + * + */ + public int getFeatureOnlineStoresCount() { + if (featureOnlineStoresBuilder_ == null) { + return featureOnlineStores_.size(); + } else { + return featureOnlineStoresBuilder_.getCount(); + } + } + /** + * + * + *
+     * The FeatureOnlineStores matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + * + */ + public com.google.cloud.aiplatform.v1.FeatureOnlineStore getFeatureOnlineStores(int index) { + if (featureOnlineStoresBuilder_ == null) { + return featureOnlineStores_.get(index); + } else { + return featureOnlineStoresBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The FeatureOnlineStores matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + * + */ + public Builder setFeatureOnlineStores( + int index, com.google.cloud.aiplatform.v1.FeatureOnlineStore value) { + if (featureOnlineStoresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeatureOnlineStoresIsMutable(); + featureOnlineStores_.set(index, value); + onChanged(); + } else { + featureOnlineStoresBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The FeatureOnlineStores matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + * + */ + public Builder setFeatureOnlineStores( + int index, com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder builderForValue) { + if (featureOnlineStoresBuilder_ == null) { + ensureFeatureOnlineStoresIsMutable(); + featureOnlineStores_.set(index, builderForValue.build()); + onChanged(); + } else { + featureOnlineStoresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The FeatureOnlineStores matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + * + */ + public Builder addFeatureOnlineStores(com.google.cloud.aiplatform.v1.FeatureOnlineStore value) { + if (featureOnlineStoresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeatureOnlineStoresIsMutable(); + featureOnlineStores_.add(value); + onChanged(); + } else { + featureOnlineStoresBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The FeatureOnlineStores matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + * + */ + public Builder addFeatureOnlineStores( + int index, com.google.cloud.aiplatform.v1.FeatureOnlineStore value) { + if (featureOnlineStoresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeatureOnlineStoresIsMutable(); + featureOnlineStores_.add(index, value); + onChanged(); + } else { + featureOnlineStoresBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The FeatureOnlineStores matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + * + */ + public Builder addFeatureOnlineStores( + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder builderForValue) { + if (featureOnlineStoresBuilder_ == null) { + ensureFeatureOnlineStoresIsMutable(); + featureOnlineStores_.add(builderForValue.build()); + onChanged(); + } else { + featureOnlineStoresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The FeatureOnlineStores matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + * + */ + public Builder addFeatureOnlineStores( + int index, com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder builderForValue) { + if (featureOnlineStoresBuilder_ == null) { + ensureFeatureOnlineStoresIsMutable(); + featureOnlineStores_.add(index, builderForValue.build()); + onChanged(); + } else { + featureOnlineStoresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The FeatureOnlineStores matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + * + */ + public Builder addAllFeatureOnlineStores( + java.lang.Iterable values) { + if (featureOnlineStoresBuilder_ == null) { + ensureFeatureOnlineStoresIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, featureOnlineStores_); + onChanged(); + } else { + featureOnlineStoresBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The FeatureOnlineStores matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + * + */ + public Builder clearFeatureOnlineStores() { + if (featureOnlineStoresBuilder_ == null) { + featureOnlineStores_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + featureOnlineStoresBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The FeatureOnlineStores matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + * + */ + public Builder removeFeatureOnlineStores(int index) { + if (featureOnlineStoresBuilder_ == null) { + ensureFeatureOnlineStoresIsMutable(); + featureOnlineStores_.remove(index); + onChanged(); + } else { + featureOnlineStoresBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The FeatureOnlineStores matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + * + */ + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder getFeatureOnlineStoresBuilder( + int index) { + return getFeatureOnlineStoresFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The FeatureOnlineStores matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + * + */ + public com.google.cloud.aiplatform.v1.FeatureOnlineStoreOrBuilder + getFeatureOnlineStoresOrBuilder(int index) { + if (featureOnlineStoresBuilder_ == null) { + return featureOnlineStores_.get(index); + } else { + return featureOnlineStoresBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The FeatureOnlineStores matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + * + */ + public java.util.List + getFeatureOnlineStoresOrBuilderList() { + if (featureOnlineStoresBuilder_ != null) { + return featureOnlineStoresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(featureOnlineStores_); + } + } + /** + * + * + *
+     * The FeatureOnlineStores matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + * + */ + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder + addFeatureOnlineStoresBuilder() { + return getFeatureOnlineStoresFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.FeatureOnlineStore.getDefaultInstance()); + } + /** + * + * + *
+     * The FeatureOnlineStores matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + * + */ + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder addFeatureOnlineStoresBuilder( + int index) { + return getFeatureOnlineStoresFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1.FeatureOnlineStore.getDefaultInstance()); + } + /** + * + * + *
+     * The FeatureOnlineStores matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + * + */ + public java.util.List + getFeatureOnlineStoresBuilderList() { + return getFeatureOnlineStoresFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureOnlineStore, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder, + com.google.cloud.aiplatform.v1.FeatureOnlineStoreOrBuilder> + getFeatureOnlineStoresFieldBuilder() { + if (featureOnlineStoresBuilder_ == null) { + featureOnlineStoresBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureOnlineStore, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder, + com.google.cloud.aiplatform.v1.FeatureOnlineStoreOrBuilder>( + featureOnlineStores_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + featureOnlineStores_ = null; + } + return featureOnlineStoresBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as
+     * [ListFeatureOnlineStoresRequest.page_token][google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest.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
+     * [ListFeatureOnlineStoresRequest.page_token][google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest.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
+     * [ListFeatureOnlineStoresRequest.page_token][google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest.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
+     * [ListFeatureOnlineStoresRequest.page_token][google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest.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
+     * [ListFeatureOnlineStoresRequest.page_token][google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest.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.aiplatform.v1.ListFeatureOnlineStoresResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse) + private static final com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFeatureOnlineStoresResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureOnlineStoresResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureOnlineStoresResponseOrBuilder.java new file mode 100644 index 000000000000..417c6f0295ef --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureOnlineStoresResponseOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListFeatureOnlineStoresResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The FeatureOnlineStores matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + */ + java.util.List getFeatureOnlineStoresList(); + /** + * + * + *
+   * The FeatureOnlineStores matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + */ + com.google.cloud.aiplatform.v1.FeatureOnlineStore getFeatureOnlineStores(int index); + /** + * + * + *
+   * The FeatureOnlineStores matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + */ + int getFeatureOnlineStoresCount(); + /** + * + * + *
+   * The FeatureOnlineStores matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + */ + java.util.List + getFeatureOnlineStoresOrBuilderList(); + /** + * + * + *
+   * The FeatureOnlineStores matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_stores = 1; + */ + com.google.cloud.aiplatform.v1.FeatureOnlineStoreOrBuilder getFeatureOnlineStoresOrBuilder( + int index); + + /** + * + * + *
+   * A token, which can be sent as
+   * [ListFeatureOnlineStoresRequest.page_token][google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest.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
+   * [ListFeatureOnlineStoresRequest.page_token][google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest.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-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewSyncsRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewSyncsRequest.java new file mode 100644 index 000000000000..e2e340bb94ad --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewSyncsRequest.java @@ -0,0 +1,1446 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest} + */ +public final class ListFeatureViewSyncsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest) + ListFeatureViewSyncsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListFeatureViewSyncsRequest.newBuilder() to construct. + private ListFeatureViewSyncsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListFeatureViewSyncsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListFeatureViewSyncsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureViewSyncsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureViewSyncsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest.class, + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the FeatureView to list FeatureViewSyncs.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * 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 resource name of the FeatureView to list FeatureViewSyncs.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * 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 FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Lists the FeatureViewSyncs that match the filter expression. The following
+   * filters are supported:
+   *
+   * * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+   * Values must be in RFC 3339 format.
+   *
+   * Examples:
+   *
+   * * `create_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViewSyncs
+   *      created after 2020-01-31T15:30:00.000000Z.
+   * 
+ * + * string filter = 2; + * + * @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; + } + } + /** + * + * + *
+   * Lists the FeatureViewSyncs that match the filter expression. The following
+   * filters are supported:
+   *
+   * * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+   * Values must be in RFC 3339 format.
+   *
+   * Examples:
+   *
+   * * `create_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViewSyncs
+   *      created after 2020-01-31T15:30:00.000000Z.
+   * 
+ * + * string filter = 2; + * + * @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 PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of FeatureViewSyncs to return. The service may return
+   * fewer than this value. If unspecified, at most 1000 FeatureViewSyncs will
+   * be returned. The maximum value is 1000; any value greater than 1000 will be
+   * coerced to 1000.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A page token, received from a previous
+   * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 4; + * + * @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
+   * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 4; + * + * @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 ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   *
+   *   * `create_time`
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   *
+   *   * `create_time`
+   * 
+ * + * 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + 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.aiplatform.v1.ListFeatureViewSyncsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest other = + (com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().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) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest) + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureViewSyncsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureViewSyncsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest.class, + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureViewSyncsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest build() { + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest result = + new com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + 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.aiplatform.v1.ListFeatureViewSyncsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest other) { + if (other == com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + 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 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + pageToken_ = 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. The resource name of the FeatureView to list FeatureViewSyncs.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * 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 resource name of the FeatureView to list FeatureViewSyncs.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * 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 resource name of the FeatureView to list FeatureViewSyncs.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * 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 resource name of the FeatureView to list FeatureViewSyncs.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * 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 resource name of the FeatureView to list FeatureViewSyncs.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * 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 filter_ = ""; + /** + * + * + *
+     * Lists the FeatureViewSyncs that match the filter expression. The following
+     * filters are supported:
+     *
+     * * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+     * Values must be in RFC 3339 format.
+     *
+     * Examples:
+     *
+     * * `create_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViewSyncs
+     *      created after 2020-01-31T15:30:00.000000Z.
+     * 
+ * + * string filter = 2; + * + * @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; + } + } + /** + * + * + *
+     * Lists the FeatureViewSyncs that match the filter expression. The following
+     * filters are supported:
+     *
+     * * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+     * Values must be in RFC 3339 format.
+     *
+     * Examples:
+     *
+     * * `create_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViewSyncs
+     *      created after 2020-01-31T15:30:00.000000Z.
+     * 
+ * + * string filter = 2; + * + * @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; + } + } + /** + * + * + *
+     * Lists the FeatureViewSyncs that match the filter expression. The following
+     * filters are supported:
+     *
+     * * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+     * Values must be in RFC 3339 format.
+     *
+     * Examples:
+     *
+     * * `create_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViewSyncs
+     *      created after 2020-01-31T15:30:00.000000Z.
+     * 
+ * + * string filter = 2; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Lists the FeatureViewSyncs that match the filter expression. The following
+     * filters are supported:
+     *
+     * * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+     * Values must be in RFC 3339 format.
+     *
+     * Examples:
+     *
+     * * `create_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViewSyncs
+     *      created after 2020-01-31T15:30:00.000000Z.
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Lists the FeatureViewSyncs that match the filter expression. The following
+     * filters are supported:
+     *
+     * * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+     * Values must be in RFC 3339 format.
+     *
+     * Examples:
+     *
+     * * `create_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViewSyncs
+     *      created after 2020-01-31T15:30:00.000000Z.
+     * 
+ * + * string filter = 2; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of FeatureViewSyncs to return. The service may return
+     * fewer than this value. If unspecified, at most 1000 FeatureViewSyncs will
+     * be returned. The maximum value is 1000; any value greater than 1000 will be
+     * coerced to 1000.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of FeatureViewSyncs to return. The service may return
+     * fewer than this value. If unspecified, at most 1000 FeatureViewSyncs will
+     * be returned. The maximum value is 1000; any value greater than 1000 will be
+     * coerced to 1000.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of FeatureViewSyncs to return. The service may return
+     * fewer than this value. If unspecified, at most 1000 FeatureViewSyncs will
+     * be returned. The maximum value is 1000; any value greater than 1000 will be
+     * coerced to 1000.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous
+     * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 4; + * + * @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
+     * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 4; + * + * @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
+     * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 4; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous
+     * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous
+     * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 4; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     *
+     *   * `create_time`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     *
+     *   * `create_time`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     *
+     *   * `create_time`
+     * 
+ * + * 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; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     *
+     *   * `create_time`
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     *
+     *   * `create_time`
+     * 
+ * + * 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.aiplatform.v1.ListFeatureViewSyncsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest) + private static final com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFeatureViewSyncsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewSyncsRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewSyncsRequestOrBuilder.java new file mode 100644 index 000000000000..f57bb37c4aca --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewSyncsRequestOrBuilder.java @@ -0,0 +1,189 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListFeatureViewSyncsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the FeatureView to list FeatureViewSyncs.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the FeatureView to list FeatureViewSyncs.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Lists the FeatureViewSyncs that match the filter expression. The following
+   * filters are supported:
+   *
+   * * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+   * Values must be in RFC 3339 format.
+   *
+   * Examples:
+   *
+   * * `create_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViewSyncs
+   *      created after 2020-01-31T15:30:00.000000Z.
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Lists the FeatureViewSyncs that match the filter expression. The following
+   * filters are supported:
+   *
+   * * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+   * Values must be in RFC 3339 format.
+   *
+   * Examples:
+   *
+   * * `create_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViewSyncs
+   *      created after 2020-01-31T15:30:00.000000Z.
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The maximum number of FeatureViewSyncs to return. The service may return
+   * fewer than this value. If unspecified, at most 1000 FeatureViewSyncs will
+   * be returned. The maximum value is 1000; any value greater than 1000 will be
+   * coerced to 1000.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous
+   * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous
+   * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   *
+   *   * `create_time`
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   *
+   *   * `create_time`
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewSyncsResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewSyncsResponse.java new file mode 100644 index 000000000000..239ca0fd9997 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewSyncsResponse.java @@ -0,0 +1,1154 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for
+ * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse} + */ +public final class ListFeatureViewSyncsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse) + ListFeatureViewSyncsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListFeatureViewSyncsResponse.newBuilder() to construct. + private ListFeatureViewSyncsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListFeatureViewSyncsResponse() { + featureViewSyncs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListFeatureViewSyncsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureViewSyncsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureViewSyncsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse.class, + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse.Builder.class); + } + + public static final int FEATURE_VIEW_SYNCS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List featureViewSyncs_; + /** + * + * + *
+   * The FeatureViewSyncs matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + @java.lang.Override + public java.util.List getFeatureViewSyncsList() { + return featureViewSyncs_; + } + /** + * + * + *
+   * The FeatureViewSyncs matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + @java.lang.Override + public java.util.List + getFeatureViewSyncsOrBuilderList() { + return featureViewSyncs_; + } + /** + * + * + *
+   * The FeatureViewSyncs matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + @java.lang.Override + public int getFeatureViewSyncsCount() { + return featureViewSyncs_.size(); + } + /** + * + * + *
+   * The FeatureViewSyncs matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureViewSync getFeatureViewSyncs(int index) { + return featureViewSyncs_.get(index); + } + /** + * + * + *
+   * The FeatureViewSyncs matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureViewSyncOrBuilder getFeatureViewSyncsOrBuilder( + int index) { + return featureViewSyncs_.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
+   * [ListFeatureViewSyncsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest.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
+   * [ListFeatureViewSyncsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest.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 < featureViewSyncs_.size(); i++) { + output.writeMessage(1, featureViewSyncs_.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 < featureViewSyncs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, featureViewSyncs_.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.aiplatform.v1.ListFeatureViewSyncsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse other = + (com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse) obj; + + if (!getFeatureViewSyncsList().equals(other.getFeatureViewSyncsList())) 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 (getFeatureViewSyncsCount() > 0) { + hash = (37 * hash) + FEATURE_VIEW_SYNCS_FIELD_NUMBER; + hash = (53 * hash) + getFeatureViewSyncsList().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.aiplatform.v1.ListFeatureViewSyncsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse) + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureViewSyncsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureViewSyncsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse.class, + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (featureViewSyncsBuilder_ == null) { + featureViewSyncs_ = java.util.Collections.emptyList(); + } else { + featureViewSyncs_ = null; + featureViewSyncsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureViewSyncsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse build() { + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse result = + new com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse result) { + if (featureViewSyncsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + featureViewSyncs_ = java.util.Collections.unmodifiableList(featureViewSyncs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.featureViewSyncs_ = featureViewSyncs_; + } else { + result.featureViewSyncs_ = featureViewSyncsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse 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.aiplatform.v1.ListFeatureViewSyncsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse other) { + if (other == com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse.getDefaultInstance()) + return this; + if (featureViewSyncsBuilder_ == null) { + if (!other.featureViewSyncs_.isEmpty()) { + if (featureViewSyncs_.isEmpty()) { + featureViewSyncs_ = other.featureViewSyncs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeatureViewSyncsIsMutable(); + featureViewSyncs_.addAll(other.featureViewSyncs_); + } + onChanged(); + } + } else { + if (!other.featureViewSyncs_.isEmpty()) { + if (featureViewSyncsBuilder_.isEmpty()) { + featureViewSyncsBuilder_.dispose(); + featureViewSyncsBuilder_ = null; + featureViewSyncs_ = other.featureViewSyncs_; + bitField0_ = (bitField0_ & ~0x00000001); + featureViewSyncsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFeatureViewSyncsFieldBuilder() + : null; + } else { + featureViewSyncsBuilder_.addAllMessages(other.featureViewSyncs_); + } + } + } + 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.aiplatform.v1.FeatureViewSync m = + input.readMessage( + com.google.cloud.aiplatform.v1.FeatureViewSync.parser(), extensionRegistry); + if (featureViewSyncsBuilder_ == null) { + ensureFeatureViewSyncsIsMutable(); + featureViewSyncs_.add(m); + } else { + featureViewSyncsBuilder_.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 featureViewSyncs_ = + java.util.Collections.emptyList(); + + private void ensureFeatureViewSyncsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + featureViewSyncs_ = + new java.util.ArrayList( + featureViewSyncs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureViewSync, + com.google.cloud.aiplatform.v1.FeatureViewSync.Builder, + com.google.cloud.aiplatform.v1.FeatureViewSyncOrBuilder> + featureViewSyncsBuilder_; + + /** + * + * + *
+     * The FeatureViewSyncs matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + public java.util.List + getFeatureViewSyncsList() { + if (featureViewSyncsBuilder_ == null) { + return java.util.Collections.unmodifiableList(featureViewSyncs_); + } else { + return featureViewSyncsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The FeatureViewSyncs matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + public int getFeatureViewSyncsCount() { + if (featureViewSyncsBuilder_ == null) { + return featureViewSyncs_.size(); + } else { + return featureViewSyncsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The FeatureViewSyncs matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + public com.google.cloud.aiplatform.v1.FeatureViewSync getFeatureViewSyncs(int index) { + if (featureViewSyncsBuilder_ == null) { + return featureViewSyncs_.get(index); + } else { + return featureViewSyncsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The FeatureViewSyncs matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + public Builder setFeatureViewSyncs( + int index, com.google.cloud.aiplatform.v1.FeatureViewSync value) { + if (featureViewSyncsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeatureViewSyncsIsMutable(); + featureViewSyncs_.set(index, value); + onChanged(); + } else { + featureViewSyncsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The FeatureViewSyncs matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + public Builder setFeatureViewSyncs( + int index, com.google.cloud.aiplatform.v1.FeatureViewSync.Builder builderForValue) { + if (featureViewSyncsBuilder_ == null) { + ensureFeatureViewSyncsIsMutable(); + featureViewSyncs_.set(index, builderForValue.build()); + onChanged(); + } else { + featureViewSyncsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The FeatureViewSyncs matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + public Builder addFeatureViewSyncs(com.google.cloud.aiplatform.v1.FeatureViewSync value) { + if (featureViewSyncsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeatureViewSyncsIsMutable(); + featureViewSyncs_.add(value); + onChanged(); + } else { + featureViewSyncsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The FeatureViewSyncs matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + public Builder addFeatureViewSyncs( + int index, com.google.cloud.aiplatform.v1.FeatureViewSync value) { + if (featureViewSyncsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeatureViewSyncsIsMutable(); + featureViewSyncs_.add(index, value); + onChanged(); + } else { + featureViewSyncsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The FeatureViewSyncs matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + public Builder addFeatureViewSyncs( + com.google.cloud.aiplatform.v1.FeatureViewSync.Builder builderForValue) { + if (featureViewSyncsBuilder_ == null) { + ensureFeatureViewSyncsIsMutable(); + featureViewSyncs_.add(builderForValue.build()); + onChanged(); + } else { + featureViewSyncsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The FeatureViewSyncs matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + public Builder addFeatureViewSyncs( + int index, com.google.cloud.aiplatform.v1.FeatureViewSync.Builder builderForValue) { + if (featureViewSyncsBuilder_ == null) { + ensureFeatureViewSyncsIsMutable(); + featureViewSyncs_.add(index, builderForValue.build()); + onChanged(); + } else { + featureViewSyncsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The FeatureViewSyncs matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + public Builder addAllFeatureViewSyncs( + java.lang.Iterable values) { + if (featureViewSyncsBuilder_ == null) { + ensureFeatureViewSyncsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, featureViewSyncs_); + onChanged(); + } else { + featureViewSyncsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The FeatureViewSyncs matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + public Builder clearFeatureViewSyncs() { + if (featureViewSyncsBuilder_ == null) { + featureViewSyncs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + featureViewSyncsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The FeatureViewSyncs matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + public Builder removeFeatureViewSyncs(int index) { + if (featureViewSyncsBuilder_ == null) { + ensureFeatureViewSyncsIsMutable(); + featureViewSyncs_.remove(index); + onChanged(); + } else { + featureViewSyncsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The FeatureViewSyncs matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + public com.google.cloud.aiplatform.v1.FeatureViewSync.Builder getFeatureViewSyncsBuilder( + int index) { + return getFeatureViewSyncsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The FeatureViewSyncs matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + public com.google.cloud.aiplatform.v1.FeatureViewSyncOrBuilder getFeatureViewSyncsOrBuilder( + int index) { + if (featureViewSyncsBuilder_ == null) { + return featureViewSyncs_.get(index); + } else { + return featureViewSyncsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The FeatureViewSyncs matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + public java.util.List + getFeatureViewSyncsOrBuilderList() { + if (featureViewSyncsBuilder_ != null) { + return featureViewSyncsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(featureViewSyncs_); + } + } + /** + * + * + *
+     * The FeatureViewSyncs matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + public com.google.cloud.aiplatform.v1.FeatureViewSync.Builder addFeatureViewSyncsBuilder() { + return getFeatureViewSyncsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.FeatureViewSync.getDefaultInstance()); + } + /** + * + * + *
+     * The FeatureViewSyncs matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + public com.google.cloud.aiplatform.v1.FeatureViewSync.Builder addFeatureViewSyncsBuilder( + int index) { + return getFeatureViewSyncsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.FeatureViewSync.getDefaultInstance()); + } + /** + * + * + *
+     * The FeatureViewSyncs matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + public java.util.List + getFeatureViewSyncsBuilderList() { + return getFeatureViewSyncsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureViewSync, + com.google.cloud.aiplatform.v1.FeatureViewSync.Builder, + com.google.cloud.aiplatform.v1.FeatureViewSyncOrBuilder> + getFeatureViewSyncsFieldBuilder() { + if (featureViewSyncsBuilder_ == null) { + featureViewSyncsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureViewSync, + com.google.cloud.aiplatform.v1.FeatureViewSync.Builder, + com.google.cloud.aiplatform.v1.FeatureViewSyncOrBuilder>( + featureViewSyncs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + featureViewSyncs_ = null; + } + return featureViewSyncsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as
+     * [ListFeatureViewSyncsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest.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
+     * [ListFeatureViewSyncsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest.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
+     * [ListFeatureViewSyncsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest.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
+     * [ListFeatureViewSyncsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest.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
+     * [ListFeatureViewSyncsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest.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.aiplatform.v1.ListFeatureViewSyncsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse) + private static final com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFeatureViewSyncsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewSyncsResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewSyncsResponseOrBuilder.java new file mode 100644 index 000000000000..c58991e9ee6a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewSyncsResponseOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListFeatureViewSyncsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The FeatureViewSyncs matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + java.util.List getFeatureViewSyncsList(); + /** + * + * + *
+   * The FeatureViewSyncs matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + com.google.cloud.aiplatform.v1.FeatureViewSync getFeatureViewSyncs(int index); + /** + * + * + *
+   * The FeatureViewSyncs matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + int getFeatureViewSyncsCount(); + /** + * + * + *
+   * The FeatureViewSyncs matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + java.util.List + getFeatureViewSyncsOrBuilderList(); + /** + * + * + *
+   * The FeatureViewSyncs matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureViewSync feature_view_syncs = 1; + */ + com.google.cloud.aiplatform.v1.FeatureViewSyncOrBuilder getFeatureViewSyncsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as
+   * [ListFeatureViewSyncsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest.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
+   * [ListFeatureViewSyncsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest.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-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewsRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewsRequest.java new file mode 100644 index 000000000000..dc043f95d0a8 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewsRequest.java @@ -0,0 +1,1516 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListFeatureViewsRequest} + */ +public final class ListFeatureViewsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListFeatureViewsRequest) + ListFeatureViewsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListFeatureViewsRequest.newBuilder() to construct. + private ListFeatureViewsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListFeatureViewsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListFeatureViewsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureViewsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureViewsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListFeatureViewsRequest.class, + com.google.cloud.aiplatform.v1.ListFeatureViewsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the FeatureOnlineStore to list FeatureViews.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+   * 
+ * + * + * 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 resource name of the FeatureOnlineStore to list FeatureViews.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+   * 
+ * + * + * 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 FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Lists the FeatureViews that match the filter expression. The following
+   * filters are supported:
+   *
+   * * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+   * Values must be in RFC 3339 format.
+   * * `update_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+   * Values must be in RFC 3339 format.
+   * * `labels`: Supports key-value equality as well as key presence.
+   *
+   * Examples:
+   *
+   * * `create_time > \"2020-01-31T15:30:00.000000Z\" OR
+   *      update_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViews
+   *      created or updated after 2020-01-31T15:30:00.000000Z.
+   * * `labels.active = yes AND labels.env = prod` --> FeatureViews having both
+   *     (active: yes) and (env: prod) labels.
+   * * `labels.env: *` --> Any FeatureView which has a label with 'env' as the
+   *   key.
+   * 
+ * + * string filter = 2; + * + * @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; + } + } + /** + * + * + *
+   * Lists the FeatureViews that match the filter expression. The following
+   * filters are supported:
+   *
+   * * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+   * Values must be in RFC 3339 format.
+   * * `update_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+   * Values must be in RFC 3339 format.
+   * * `labels`: Supports key-value equality as well as key presence.
+   *
+   * Examples:
+   *
+   * * `create_time > \"2020-01-31T15:30:00.000000Z\" OR
+   *      update_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViews
+   *      created or updated after 2020-01-31T15:30:00.000000Z.
+   * * `labels.active = yes AND labels.env = prod` --> FeatureViews having both
+   *     (active: yes) and (env: prod) labels.
+   * * `labels.env: *` --> Any FeatureView which has a label with 'env' as the
+   *   key.
+   * 
+ * + * string filter = 2; + * + * @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 PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of FeatureViews to return. The service may return fewer
+   * than this value. If unspecified, at most 1000 FeatureViews will be
+   * returned. The maximum value is 1000; any value greater than 1000 will be
+   * coerced to 1000.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A page token, received from a previous
+   * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 4; + * + * @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
+   * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 4; + * + * @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 ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   *
+   *   * `feature_view_id`
+   *   * `create_time`
+   *   * `update_time`
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   *
+   *   * `feature_view_id`
+   *   * `create_time`
+   *   * `update_time`
+   * 
+ * + * 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + 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.aiplatform.v1.ListFeatureViewsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListFeatureViewsRequest other = + (com.google.cloud.aiplatform.v1.ListFeatureViewsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().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) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.ListFeatureViewsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListFeatureViewsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListFeatureViewsRequest) + com.google.cloud.aiplatform.v1.ListFeatureViewsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureViewsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureViewsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListFeatureViewsRequest.class, + com.google.cloud.aiplatform.v1.ListFeatureViewsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListFeatureViewsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureViewsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureViewsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListFeatureViewsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureViewsRequest build() { + com.google.cloud.aiplatform.v1.ListFeatureViewsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureViewsRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListFeatureViewsRequest result = + new com.google.cloud.aiplatform.v1.ListFeatureViewsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ListFeatureViewsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + 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.aiplatform.v1.ListFeatureViewsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListFeatureViewsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListFeatureViewsRequest other) { + if (other == com.google.cloud.aiplatform.v1.ListFeatureViewsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + 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 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + pageToken_ = 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. The resource name of the FeatureOnlineStore to list FeatureViews.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * 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 resource name of the FeatureOnlineStore to list FeatureViews.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * 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 resource name of the FeatureOnlineStore to list FeatureViews.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * 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 resource name of the FeatureOnlineStore to list FeatureViews.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * 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 resource name of the FeatureOnlineStore to list FeatureViews.
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * 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 filter_ = ""; + /** + * + * + *
+     * Lists the FeatureViews that match the filter expression. The following
+     * filters are supported:
+     *
+     * * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+     * Values must be in RFC 3339 format.
+     * * `update_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+     * Values must be in RFC 3339 format.
+     * * `labels`: Supports key-value equality as well as key presence.
+     *
+     * Examples:
+     *
+     * * `create_time > \"2020-01-31T15:30:00.000000Z\" OR
+     *      update_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViews
+     *      created or updated after 2020-01-31T15:30:00.000000Z.
+     * * `labels.active = yes AND labels.env = prod` --> FeatureViews having both
+     *     (active: yes) and (env: prod) labels.
+     * * `labels.env: *` --> Any FeatureView which has a label with 'env' as the
+     *   key.
+     * 
+ * + * string filter = 2; + * + * @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; + } + } + /** + * + * + *
+     * Lists the FeatureViews that match the filter expression. The following
+     * filters are supported:
+     *
+     * * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+     * Values must be in RFC 3339 format.
+     * * `update_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+     * Values must be in RFC 3339 format.
+     * * `labels`: Supports key-value equality as well as key presence.
+     *
+     * Examples:
+     *
+     * * `create_time > \"2020-01-31T15:30:00.000000Z\" OR
+     *      update_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViews
+     *      created or updated after 2020-01-31T15:30:00.000000Z.
+     * * `labels.active = yes AND labels.env = prod` --> FeatureViews having both
+     *     (active: yes) and (env: prod) labels.
+     * * `labels.env: *` --> Any FeatureView which has a label with 'env' as the
+     *   key.
+     * 
+ * + * string filter = 2; + * + * @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; + } + } + /** + * + * + *
+     * Lists the FeatureViews that match the filter expression. The following
+     * filters are supported:
+     *
+     * * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+     * Values must be in RFC 3339 format.
+     * * `update_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+     * Values must be in RFC 3339 format.
+     * * `labels`: Supports key-value equality as well as key presence.
+     *
+     * Examples:
+     *
+     * * `create_time > \"2020-01-31T15:30:00.000000Z\" OR
+     *      update_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViews
+     *      created or updated after 2020-01-31T15:30:00.000000Z.
+     * * `labels.active = yes AND labels.env = prod` --> FeatureViews having both
+     *     (active: yes) and (env: prod) labels.
+     * * `labels.env: *` --> Any FeatureView which has a label with 'env' as the
+     *   key.
+     * 
+ * + * string filter = 2; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Lists the FeatureViews that match the filter expression. The following
+     * filters are supported:
+     *
+     * * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+     * Values must be in RFC 3339 format.
+     * * `update_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+     * Values must be in RFC 3339 format.
+     * * `labels`: Supports key-value equality as well as key presence.
+     *
+     * Examples:
+     *
+     * * `create_time > \"2020-01-31T15:30:00.000000Z\" OR
+     *      update_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViews
+     *      created or updated after 2020-01-31T15:30:00.000000Z.
+     * * `labels.active = yes AND labels.env = prod` --> FeatureViews having both
+     *     (active: yes) and (env: prod) labels.
+     * * `labels.env: *` --> Any FeatureView which has a label with 'env' as the
+     *   key.
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Lists the FeatureViews that match the filter expression. The following
+     * filters are supported:
+     *
+     * * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+     * Values must be in RFC 3339 format.
+     * * `update_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+     * Values must be in RFC 3339 format.
+     * * `labels`: Supports key-value equality as well as key presence.
+     *
+     * Examples:
+     *
+     * * `create_time > \"2020-01-31T15:30:00.000000Z\" OR
+     *      update_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViews
+     *      created or updated after 2020-01-31T15:30:00.000000Z.
+     * * `labels.active = yes AND labels.env = prod` --> FeatureViews having both
+     *     (active: yes) and (env: prod) labels.
+     * * `labels.env: *` --> Any FeatureView which has a label with 'env' as the
+     *   key.
+     * 
+ * + * string filter = 2; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of FeatureViews to return. The service may return fewer
+     * than this value. If unspecified, at most 1000 FeatureViews will be
+     * returned. The maximum value is 1000; any value greater than 1000 will be
+     * coerced to 1000.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of FeatureViews to return. The service may return fewer
+     * than this value. If unspecified, at most 1000 FeatureViews will be
+     * returned. The maximum value is 1000; any value greater than 1000 will be
+     * coerced to 1000.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of FeatureViews to return. The service may return fewer
+     * than this value. If unspecified, at most 1000 FeatureViews will be
+     * returned. The maximum value is 1000; any value greater than 1000 will be
+     * coerced to 1000.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous
+     * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 4; + * + * @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
+     * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 4; + * + * @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
+     * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 4; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous
+     * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous
+     * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 4; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     *
+     *   * `feature_view_id`
+     *   * `create_time`
+     *   * `update_time`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     *
+     *   * `feature_view_id`
+     *   * `create_time`
+     *   * `update_time`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     *
+     *   * `feature_view_id`
+     *   * `create_time`
+     *   * `update_time`
+     * 
+ * + * 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; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     *
+     *   * `feature_view_id`
+     *   * `create_time`
+     *   * `update_time`
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     *
+     *   * `feature_view_id`
+     *   * `create_time`
+     *   * `update_time`
+     * 
+ * + * 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.aiplatform.v1.ListFeatureViewsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListFeatureViewsRequest) + private static final com.google.cloud.aiplatform.v1.ListFeatureViewsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListFeatureViewsRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFeatureViewsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureViewsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewsRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewsRequestOrBuilder.java new file mode 100644 index 000000000000..71c3fad95509 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewsRequestOrBuilder.java @@ -0,0 +1,209 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListFeatureViewsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListFeatureViewsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the FeatureOnlineStore to list FeatureViews.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the FeatureOnlineStore to list FeatureViews.
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Lists the FeatureViews that match the filter expression. The following
+   * filters are supported:
+   *
+   * * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+   * Values must be in RFC 3339 format.
+   * * `update_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+   * Values must be in RFC 3339 format.
+   * * `labels`: Supports key-value equality as well as key presence.
+   *
+   * Examples:
+   *
+   * * `create_time > \"2020-01-31T15:30:00.000000Z\" OR
+   *      update_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViews
+   *      created or updated after 2020-01-31T15:30:00.000000Z.
+   * * `labels.active = yes AND labels.env = prod` --> FeatureViews having both
+   *     (active: yes) and (env: prod) labels.
+   * * `labels.env: *` --> Any FeatureView which has a label with 'env' as the
+   *   key.
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Lists the FeatureViews that match the filter expression. The following
+   * filters are supported:
+   *
+   * * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+   * Values must be in RFC 3339 format.
+   * * `update_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
+   * Values must be in RFC 3339 format.
+   * * `labels`: Supports key-value equality as well as key presence.
+   *
+   * Examples:
+   *
+   * * `create_time > \"2020-01-31T15:30:00.000000Z\" OR
+   *      update_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViews
+   *      created or updated after 2020-01-31T15:30:00.000000Z.
+   * * `labels.active = yes AND labels.env = prod` --> FeatureViews having both
+   *     (active: yes) and (env: prod) labels.
+   * * `labels.env: *` --> Any FeatureView which has a label with 'env' as the
+   *   key.
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The maximum number of FeatureViews to return. The service may return fewer
+   * than this value. If unspecified, at most 1000 FeatureViews will be
+   * returned. The maximum value is 1000; any value greater than 1000 will be
+   * coerced to 1000.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous
+   * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous
+   * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   *
+   *   * `feature_view_id`
+   *   * `create_time`
+   *   * `update_time`
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   *
+   *   * `feature_view_id`
+   *   * `create_time`
+   *   * `update_time`
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewsResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewsResponse.java new file mode 100644 index 000000000000..f8100deb7ea8 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewsResponse.java @@ -0,0 +1,1143 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for
+ * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListFeatureViewsResponse} + */ +public final class ListFeatureViewsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListFeatureViewsResponse) + ListFeatureViewsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListFeatureViewsResponse.newBuilder() to construct. + private ListFeatureViewsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListFeatureViewsResponse() { + featureViews_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListFeatureViewsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureViewsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureViewsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListFeatureViewsResponse.class, + com.google.cloud.aiplatform.v1.ListFeatureViewsResponse.Builder.class); + } + + public static final int FEATURE_VIEWS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List featureViews_; + /** + * + * + *
+   * The FeatureViews matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + @java.lang.Override + public java.util.List getFeatureViewsList() { + return featureViews_; + } + /** + * + * + *
+   * The FeatureViews matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + @java.lang.Override + public java.util.List + getFeatureViewsOrBuilderList() { + return featureViews_; + } + /** + * + * + *
+   * The FeatureViews matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + @java.lang.Override + public int getFeatureViewsCount() { + return featureViews_.size(); + } + /** + * + * + *
+   * The FeatureViews matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView getFeatureViews(int index) { + return featureViews_.get(index); + } + /** + * + * + *
+   * The FeatureViews matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureViewOrBuilder getFeatureViewsOrBuilder(int index) { + return featureViews_.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
+   * [ListFeatureViewsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewsRequest.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
+   * [ListFeatureViewsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewsRequest.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 < featureViews_.size(); i++) { + output.writeMessage(1, featureViews_.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 < featureViews_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, featureViews_.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.aiplatform.v1.ListFeatureViewsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListFeatureViewsResponse other = + (com.google.cloud.aiplatform.v1.ListFeatureViewsResponse) obj; + + if (!getFeatureViewsList().equals(other.getFeatureViewsList())) 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 (getFeatureViewsCount() > 0) { + hash = (37 * hash) + FEATURE_VIEWS_FIELD_NUMBER; + hash = (53 * hash) + getFeatureViewsList().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.aiplatform.v1.ListFeatureViewsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.ListFeatureViewsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListFeatureViewsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListFeatureViewsResponse) + com.google.cloud.aiplatform.v1.ListFeatureViewsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureViewsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureViewsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListFeatureViewsResponse.class, + com.google.cloud.aiplatform.v1.ListFeatureViewsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListFeatureViewsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (featureViewsBuilder_ == null) { + featureViews_ = java.util.Collections.emptyList(); + } else { + featureViews_ = null; + featureViewsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_ListFeatureViewsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureViewsResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListFeatureViewsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureViewsResponse build() { + com.google.cloud.aiplatform.v1.ListFeatureViewsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureViewsResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListFeatureViewsResponse result = + new com.google.cloud.aiplatform.v1.ListFeatureViewsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.ListFeatureViewsResponse result) { + if (featureViewsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + featureViews_ = java.util.Collections.unmodifiableList(featureViews_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.featureViews_ = featureViews_; + } else { + result.featureViews_ = featureViewsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ListFeatureViewsResponse 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.aiplatform.v1.ListFeatureViewsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListFeatureViewsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListFeatureViewsResponse other) { + if (other == com.google.cloud.aiplatform.v1.ListFeatureViewsResponse.getDefaultInstance()) + return this; + if (featureViewsBuilder_ == null) { + if (!other.featureViews_.isEmpty()) { + if (featureViews_.isEmpty()) { + featureViews_ = other.featureViews_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeatureViewsIsMutable(); + featureViews_.addAll(other.featureViews_); + } + onChanged(); + } + } else { + if (!other.featureViews_.isEmpty()) { + if (featureViewsBuilder_.isEmpty()) { + featureViewsBuilder_.dispose(); + featureViewsBuilder_ = null; + featureViews_ = other.featureViews_; + bitField0_ = (bitField0_ & ~0x00000001); + featureViewsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFeatureViewsFieldBuilder() + : null; + } else { + featureViewsBuilder_.addAllMessages(other.featureViews_); + } + } + } + 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.aiplatform.v1.FeatureView m = + input.readMessage( + com.google.cloud.aiplatform.v1.FeatureView.parser(), extensionRegistry); + if (featureViewsBuilder_ == null) { + ensureFeatureViewsIsMutable(); + featureViews_.add(m); + } else { + featureViewsBuilder_.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 featureViews_ = + java.util.Collections.emptyList(); + + private void ensureFeatureViewsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + featureViews_ = + new java.util.ArrayList(featureViews_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView, + com.google.cloud.aiplatform.v1.FeatureView.Builder, + com.google.cloud.aiplatform.v1.FeatureViewOrBuilder> + featureViewsBuilder_; + + /** + * + * + *
+     * The FeatureViews matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + public java.util.List getFeatureViewsList() { + if (featureViewsBuilder_ == null) { + return java.util.Collections.unmodifiableList(featureViews_); + } else { + return featureViewsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The FeatureViews matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + public int getFeatureViewsCount() { + if (featureViewsBuilder_ == null) { + return featureViews_.size(); + } else { + return featureViewsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The FeatureViews matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + public com.google.cloud.aiplatform.v1.FeatureView getFeatureViews(int index) { + if (featureViewsBuilder_ == null) { + return featureViews_.get(index); + } else { + return featureViewsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The FeatureViews matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + public Builder setFeatureViews(int index, com.google.cloud.aiplatform.v1.FeatureView value) { + if (featureViewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeatureViewsIsMutable(); + featureViews_.set(index, value); + onChanged(); + } else { + featureViewsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The FeatureViews matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + public Builder setFeatureViews( + int index, com.google.cloud.aiplatform.v1.FeatureView.Builder builderForValue) { + if (featureViewsBuilder_ == null) { + ensureFeatureViewsIsMutable(); + featureViews_.set(index, builderForValue.build()); + onChanged(); + } else { + featureViewsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The FeatureViews matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + public Builder addFeatureViews(com.google.cloud.aiplatform.v1.FeatureView value) { + if (featureViewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeatureViewsIsMutable(); + featureViews_.add(value); + onChanged(); + } else { + featureViewsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The FeatureViews matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + public Builder addFeatureViews(int index, com.google.cloud.aiplatform.v1.FeatureView value) { + if (featureViewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeatureViewsIsMutable(); + featureViews_.add(index, value); + onChanged(); + } else { + featureViewsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The FeatureViews matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + public Builder addFeatureViews( + com.google.cloud.aiplatform.v1.FeatureView.Builder builderForValue) { + if (featureViewsBuilder_ == null) { + ensureFeatureViewsIsMutable(); + featureViews_.add(builderForValue.build()); + onChanged(); + } else { + featureViewsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The FeatureViews matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + public Builder addFeatureViews( + int index, com.google.cloud.aiplatform.v1.FeatureView.Builder builderForValue) { + if (featureViewsBuilder_ == null) { + ensureFeatureViewsIsMutable(); + featureViews_.add(index, builderForValue.build()); + onChanged(); + } else { + featureViewsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The FeatureViews matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + public Builder addAllFeatureViews( + java.lang.Iterable values) { + if (featureViewsBuilder_ == null) { + ensureFeatureViewsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, featureViews_); + onChanged(); + } else { + featureViewsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The FeatureViews matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + public Builder clearFeatureViews() { + if (featureViewsBuilder_ == null) { + featureViews_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + featureViewsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The FeatureViews matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + public Builder removeFeatureViews(int index) { + if (featureViewsBuilder_ == null) { + ensureFeatureViewsIsMutable(); + featureViews_.remove(index); + onChanged(); + } else { + featureViewsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The FeatureViews matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + public com.google.cloud.aiplatform.v1.FeatureView.Builder getFeatureViewsBuilder(int index) { + return getFeatureViewsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The FeatureViews matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + public com.google.cloud.aiplatform.v1.FeatureViewOrBuilder getFeatureViewsOrBuilder(int index) { + if (featureViewsBuilder_ == null) { + return featureViews_.get(index); + } else { + return featureViewsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The FeatureViews matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + public java.util.List + getFeatureViewsOrBuilderList() { + if (featureViewsBuilder_ != null) { + return featureViewsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(featureViews_); + } + } + /** + * + * + *
+     * The FeatureViews matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + public com.google.cloud.aiplatform.v1.FeatureView.Builder addFeatureViewsBuilder() { + return getFeatureViewsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.FeatureView.getDefaultInstance()); + } + /** + * + * + *
+     * The FeatureViews matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + public com.google.cloud.aiplatform.v1.FeatureView.Builder addFeatureViewsBuilder(int index) { + return getFeatureViewsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.FeatureView.getDefaultInstance()); + } + /** + * + * + *
+     * The FeatureViews matching the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + public java.util.List + getFeatureViewsBuilderList() { + return getFeatureViewsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView, + com.google.cloud.aiplatform.v1.FeatureView.Builder, + com.google.cloud.aiplatform.v1.FeatureViewOrBuilder> + getFeatureViewsFieldBuilder() { + if (featureViewsBuilder_ == null) { + featureViewsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView, + com.google.cloud.aiplatform.v1.FeatureView.Builder, + com.google.cloud.aiplatform.v1.FeatureViewOrBuilder>( + featureViews_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + featureViews_ = null; + } + return featureViewsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as
+     * [ListFeatureViewsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewsRequest.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
+     * [ListFeatureViewsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewsRequest.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
+     * [ListFeatureViewsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewsRequest.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
+     * [ListFeatureViewsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewsRequest.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
+     * [ListFeatureViewsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewsRequest.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.aiplatform.v1.ListFeatureViewsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListFeatureViewsResponse) + private static final com.google.cloud.aiplatform.v1.ListFeatureViewsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListFeatureViewsResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListFeatureViewsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFeatureViewsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListFeatureViewsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewsResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewsResponseOrBuilder.java new file mode 100644 index 000000000000..e353bd9f88eb --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeatureViewsResponseOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListFeatureViewsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListFeatureViewsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The FeatureViews matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + java.util.List getFeatureViewsList(); + /** + * + * + *
+   * The FeatureViews matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + com.google.cloud.aiplatform.v1.FeatureView getFeatureViews(int index); + /** + * + * + *
+   * The FeatureViews matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + int getFeatureViewsCount(); + /** + * + * + *
+   * The FeatureViews matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + java.util.List + getFeatureViewsOrBuilderList(); + /** + * + * + *
+   * The FeatureViews matching the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.FeatureView feature_views = 1; + */ + com.google.cloud.aiplatform.v1.FeatureViewOrBuilder getFeatureViewsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as
+   * [ListFeatureViewsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewsRequest.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
+   * [ListFeatureViewsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewsRequest.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-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeaturesRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeaturesRequest.java index c1e20e77a45d..0ed0af6f111e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeaturesRequest.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeaturesRequest.java @@ -24,6 +24,8 @@ *
  * Request message for
  * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures].
+ * Request message for
+ * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures].
  * 
* * Protobuf type {@code google.cloud.aiplatform.v1.ListFeaturesRequest} @@ -75,8 +77,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The resource name of the Location to list Features.
-   * Format:
+   * Format for entity_type as parent:
    * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
    * 
* * @@ -102,8 +106,10 @@ public java.lang.String getParent() { * *
    * Required. The resource name of the Location to list Features.
-   * Format:
+   * Format for entity_type as parent:
    * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
    * 
* * @@ -245,10 +251,14 @@ public int getPageSize() { *
    * A page token, received from a previous
    * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]
+   * call or
+   * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]
    * call. Provide this to retrieve the subsequent page.
    *
    * When paginating, all other parameters provided to
    * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]
+   * or or
+   * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]
    * must match the call that provided the page token.
    * 
* @@ -274,10 +284,14 @@ public java.lang.String getPageToken() { *
    * A page token, received from a previous
    * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]
+   * call or
+   * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]
    * call. Provide this to retrieve the subsequent page.
    *
    * When paginating, all other parameters provided to
    * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]
+   * or or
+   * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]
    * must match the call that provided the page token.
    * 
* @@ -311,7 +325,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * Supported fields: * * * `feature_id` - * * `value_type` + * * `value_type` (Not supported for FeatureRegistry Feature) * * `create_time` * * `update_time` *
@@ -341,7 +355,7 @@ public java.lang.String getOrderBy() { * Supported fields: * * * `feature_id` - * * `value_type` + * * `value_type` (Not supported for FeatureRegistry Feature) * * `create_time` * * `update_time` *
@@ -415,6 +429,7 @@ public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { * * *
+   * Only applicable for Vertex AI Feature Store (Legacy).
    * If set, return the most recent
    * [ListFeaturesRequest.latest_stats_count][google.cloud.aiplatform.v1.ListFeaturesRequest.latest_stats_count]
    * of stats for each Feature in response. Valid value is [0, 10]. If number of
@@ -656,6 +671,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
    * 
    * Request message for
    * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures].
+   * Request message for
+   * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures].
    * 
* * Protobuf type {@code google.cloud.aiplatform.v1.ListFeaturesRequest} @@ -928,8 +945,10 @@ public Builder mergeFrom( * *
      * Required. The resource name of the Location to list Features.
-     * Format:
+     * Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* * @@ -954,8 +973,10 @@ public java.lang.String getParent() { * *
      * Required. The resource name of the Location to list Features.
-     * Format:
+     * Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* * @@ -980,8 +1001,10 @@ public com.google.protobuf.ByteString getParentBytes() { * *
      * Required. The resource name of the Location to list Features.
-     * Format:
+     * Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* * @@ -1005,8 +1028,10 @@ public Builder setParent(java.lang.String value) { * *
      * Required. The resource name of the Location to list Features.
-     * Format:
+     * Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* * @@ -1026,8 +1051,10 @@ public Builder clearParent() { * *
      * Required. The resource name of the Location to list Features.
-     * Format:
+     * Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* * @@ -1318,10 +1345,14 @@ public Builder clearPageSize() { *
      * A page token, received from a previous
      * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]
+     * call or
+     * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]
      * call. Provide this to retrieve the subsequent page.
      *
      * When paginating, all other parameters provided to
      * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]
+     * or or
+     * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]
      * must match the call that provided the page token.
      * 
* @@ -1346,10 +1377,14 @@ public java.lang.String getPageToken() { *
      * A page token, received from a previous
      * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]
+     * call or
+     * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]
      * call. Provide this to retrieve the subsequent page.
      *
      * When paginating, all other parameters provided to
      * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]
+     * or or
+     * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]
      * must match the call that provided the page token.
      * 
* @@ -1374,10 +1409,14 @@ public com.google.protobuf.ByteString getPageTokenBytes() { *
      * A page token, received from a previous
      * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]
+     * call or
+     * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]
      * call. Provide this to retrieve the subsequent page.
      *
      * When paginating, all other parameters provided to
      * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]
+     * or or
+     * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]
      * must match the call that provided the page token.
      * 
* @@ -1401,10 +1440,14 @@ public Builder setPageToken(java.lang.String value) { *
      * A page token, received from a previous
      * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]
+     * call or
+     * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]
      * call. Provide this to retrieve the subsequent page.
      *
      * When paginating, all other parameters provided to
      * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]
+     * or or
+     * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]
      * must match the call that provided the page token.
      * 
* @@ -1424,10 +1467,14 @@ public Builder clearPageToken() { *
      * A page token, received from a previous
      * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]
+     * call or
+     * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]
      * call. Provide this to retrieve the subsequent page.
      *
      * When paginating, all other parameters provided to
      * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]
+     * or or
+     * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]
      * must match the call that provided the page token.
      * 
* @@ -1457,7 +1504,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * Supported fields: * * * `feature_id` - * * `value_type` + * * `value_type` (Not supported for FeatureRegistry Feature) * * `create_time` * * `update_time` *
@@ -1486,7 +1533,7 @@ public java.lang.String getOrderBy() { * Supported fields: * * * `feature_id` - * * `value_type` + * * `value_type` (Not supported for FeatureRegistry Feature) * * `create_time` * * `update_time` *
@@ -1515,7 +1562,7 @@ public com.google.protobuf.ByteString getOrderByBytes() { * Supported fields: * * * `feature_id` - * * `value_type` + * * `value_type` (Not supported for FeatureRegistry Feature) * * `create_time` * * `update_time` *
@@ -1543,7 +1590,7 @@ public Builder setOrderBy(java.lang.String value) { * Supported fields: * * * `feature_id` - * * `value_type` + * * `value_type` (Not supported for FeatureRegistry Feature) * * `create_time` * * `update_time` *
@@ -1567,7 +1614,7 @@ public Builder clearOrderBy() { * Supported fields: * * * `feature_id` - * * `value_type` + * * `value_type` (Not supported for FeatureRegistry Feature) * * `create_time` * * `update_time` *
@@ -1772,6 +1819,7 @@ public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { * * *
+     * Only applicable for Vertex AI Feature Store (Legacy).
      * If set, return the most recent
      * [ListFeaturesRequest.latest_stats_count][google.cloud.aiplatform.v1.ListFeaturesRequest.latest_stats_count]
      * of stats for each Feature in response. Valid value is [0, 10]. If number of
@@ -1792,6 +1840,7 @@ public int getLatestStatsCount() {
      *
      *
      * 
+     * Only applicable for Vertex AI Feature Store (Legacy).
      * If set, return the most recent
      * [ListFeaturesRequest.latest_stats_count][google.cloud.aiplatform.v1.ListFeaturesRequest.latest_stats_count]
      * of stats for each Feature in response. Valid value is [0, 10]. If number of
@@ -1816,6 +1865,7 @@ public Builder setLatestStatsCount(int value) {
      *
      *
      * 
+     * Only applicable for Vertex AI Feature Store (Legacy).
      * If set, return the most recent
      * [ListFeaturesRequest.latest_stats_count][google.cloud.aiplatform.v1.ListFeaturesRequest.latest_stats_count]
      * of stats for each Feature in response. Valid value is [0, 10]. If number of
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeaturesRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeaturesRequestOrBuilder.java
index 63e9fdc8952b..02f08196cc73 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeaturesRequestOrBuilder.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeaturesRequestOrBuilder.java
@@ -28,8 +28,10 @@ public interface ListFeaturesRequestOrBuilder
    *
    * 
    * Required. The resource name of the Location to list Features.
-   * Format:
+   * Format for entity_type as parent:
    * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
    * 
* * @@ -44,8 +46,10 @@ public interface ListFeaturesRequestOrBuilder * *
    * Required. The resource name of the Location to list Features.
-   * Format:
+   * Format for entity_type as parent:
    * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
    * 
* * @@ -141,10 +145,14 @@ public interface ListFeaturesRequestOrBuilder *
    * A page token, received from a previous
    * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]
+   * call or
+   * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]
    * call. Provide this to retrieve the subsequent page.
    *
    * When paginating, all other parameters provided to
    * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]
+   * or or
+   * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]
    * must match the call that provided the page token.
    * 
* @@ -159,10 +167,14 @@ public interface ListFeaturesRequestOrBuilder *
    * A page token, received from a previous
    * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]
+   * call or
+   * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]
    * call. Provide this to retrieve the subsequent page.
    *
    * When paginating, all other parameters provided to
    * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]
+   * or or
+   * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]
    * must match the call that provided the page token.
    * 
* @@ -181,7 +193,7 @@ public interface ListFeaturesRequestOrBuilder * Supported fields: * * * `feature_id` - * * `value_type` + * * `value_type` (Not supported for FeatureRegistry Feature) * * `create_time` * * `update_time` *
@@ -200,7 +212,7 @@ public interface ListFeaturesRequestOrBuilder * Supported fields: * * * `feature_id` - * * `value_type` + * * `value_type` (Not supported for FeatureRegistry Feature) * * `create_time` * * `update_time` *
@@ -250,6 +262,7 @@ public interface ListFeaturesRequestOrBuilder * * *
+   * Only applicable for Vertex AI Feature Store (Legacy).
    * If set, return the most recent
    * [ListFeaturesRequest.latest_stats_count][google.cloud.aiplatform.v1.ListFeaturesRequest.latest_stats_count]
    * of stats for each Feature in response. Valid value is [0, 10]. If number of
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeaturesResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeaturesResponse.java
index 96050da083b8..763af6f7d371 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeaturesResponse.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListFeaturesResponse.java
@@ -24,6 +24,8 @@
  * 
  * Response message for
  * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures].
+ * Response message for
+ * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures].
  * 
* * Protobuf type {@code google.cloud.aiplatform.v1.ListFeaturesResponse} @@ -368,6 +370,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * Response message for
    * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures].
+   * Response message for
+   * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures].
    * 
* * Protobuf type {@code google.cloud.aiplatform.v1.ListFeaturesResponse} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceProto.java new file mode 100644 index 000000000000..1bcaf35c8485 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceProto.java @@ -0,0 +1,143 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/llm_utility_service.proto + +package com.google.cloud.aiplatform.v1; + +public final class LlmUtilityServiceProto { + private LlmUtilityServiceProto() {} + + 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_aiplatform_v1_ComputeTokensRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ComputeTokensRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_TokensInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_TokensInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ComputeTokensResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ComputeTokensResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n4google/cloud/aiplatform/v1/llm_utility" + + "_service.proto\022\032google.cloud.aiplatform." + + "v1\032\034google/api/annotations.proto\032\027google" + + "/api/client.proto\032\037google/api/field_beha" + + "vior.proto\032\031google/api/resource.proto\0323g" + + "oogle/cloud/aiplatform/v1/prediction_ser" + + "vice.proto\032\034google/protobuf/struct.proto" + + "\"\206\001\n\024ComputeTokensRequest\022=\n\010endpoint\030\001 " + + "\001(\tB+\342A\001\002\372A$\n\"aiplatform.googleapis.com/" + + "Endpoint\022/\n\tinstances\030\002 \003(\0132\026.google.pro" + + "tobuf.ValueB\004\342A\001\002\"/\n\nTokensInfo\022\016\n\006token" + + "s\030\001 \003(\014\022\021\n\ttoken_ids\030\002 \003(\003\"T\n\025ComputeTok" + + "ensResponse\022;\n\013tokens_info\030\001 \003(\0132&.googl" + + "e.cloud.aiplatform.v1.TokensInfo2\254\005\n\021Llm" + + "UtilityService\022\235\002\n\013CountTokens\022..google." + + "cloud.aiplatform.v1.CountTokensRequest\032/" + + ".google.cloud.aiplatform.v1.CountTokensR" + + "esponse\"\254\001\332A\022endpoint,instances\202\323\344\223\002\220\001\"=" + + "/v1/{endpoint=projects/*/locations/*/end" + + "points/*}:countTokens:\001*ZL\"G/v1/{endpoin" + + "t=projects/*/locations/*/publishers/*/mo" + + "dels/*}:countTokens:\001*\022\247\002\n\rComputeTokens" + + "\0220.google.cloud.aiplatform.v1.ComputeTok" + + "ensRequest\0321.google.cloud.aiplatform.v1." + + "ComputeTokensResponse\"\260\001\332A\022endpoint,inst" + + "ances\202\323\344\223\002\224\001\"?/v1/{endpoint=projects/*/l" + + "ocations/*/endpoints/*}:computeTokens:\001*" + + "ZN\"I/v1/{endpoint=projects/*/locations/*" + + "/publishers/*/models/*}:computeTokens:\001*" + + "\032M\312A\031aiplatform.googleapis.com\322A.https:/" + + "/www.googleapis.com/auth/cloud-platformB" + + "\324\001\n\036com.google.cloud.aiplatform.v1B\026LlmU" + + "tilityServiceProtoP\001Z>cloud.google.com/g" + + "o/aiplatform/apiv1/aiplatformpb;aiplatfo" + + "rmpb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Goog" + + "le\\Cloud\\AIPlatform\\V1\352\002\035Google::Cloud::" + + "AIPlatform::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.aiplatform.v1.PredictionServiceProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_ComputeTokensRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_ComputeTokensRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ComputeTokensRequest_descriptor, + new java.lang.String[] { + "Endpoint", "Instances", + }); + internal_static_google_cloud_aiplatform_v1_TokensInfo_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_TokensInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_TokensInfo_descriptor, + new java.lang.String[] { + "Tokens", "TokenIds", + }); + internal_static_google_cloud_aiplatform_v1_ComputeTokensResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_ComputeTokensResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ComputeTokensResponse_descriptor, + new java.lang.String[] { + "TokensInfo", + }); + 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); + 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.aiplatform.v1.PredictionServiceProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineResourcesProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineResourcesProto.java index 7d66763fe3c1..31772d6a76fc 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineResourcesProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineResourcesProto.java @@ -76,37 +76,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ources.proto\022\032google.cloud.aiplatform.v1" + "\032\037google/api/field_behavior.proto\0321googl" + "e/cloud/aiplatform/v1/accelerator_type.p" - + "roto\"\221\001\n\013MachineSpec\022\032\n\014machine_type\030\001 \001" + + "roto\"\255\001\n\013MachineSpec\022\032\n\014machine_type\030\001 \001" + "(\tB\004\342A\001\005\022K\n\020accelerator_type\030\002 \001(\0162+.goo" + "gle.cloud.aiplatform.v1.AcceleratorTypeB" - + "\004\342A\001\005\022\031\n\021accelerator_count\030\003 \001(\005\"\370\001\n\022Ded" - + "icatedResources\022D\n\014machine_spec\030\001 \001(\0132\'." - + "google.cloud.aiplatform.v1.MachineSpecB\005" - + "\342A\002\002\005\022 \n\021min_replica_count\030\002 \001(\005B\005\342A\002\002\005\022" - + "\037\n\021max_replica_count\030\003 \001(\005B\004\342A\001\005\022Y\n\030auto" - + "scaling_metric_specs\030\004 \003(\01321.google.clou" - + "d.aiplatform.v1.AutoscalingMetricSpecB\004\342" - + "A\001\005\"V\n\022AutomaticResources\022\037\n\021min_replica" - + "_count\030\001 \001(\005B\004\342A\001\005\022\037\n\021max_replica_count\030" - + "\002 \001(\005B\004\342A\001\005\"\246\001\n\027BatchDedicatedResources\022" - + "D\n\014machine_spec\030\001 \001(\0132\'.google.cloud.aip" - + "latform.v1.MachineSpecB\005\342A\002\002\005\022$\n\026startin" - + "g_replica_count\030\002 \001(\005B\004\342A\001\005\022\037\n\021max_repli" - + "ca_count\030\003 \001(\005B\004\342A\001\005\"0\n\021ResourcesConsume" - + "d\022\033\n\rreplica_hours\030\001 \001(\001B\004\342A\001\003\"=\n\010DiskSp" - + "ec\022\026\n\016boot_disk_type\030\001 \001(\t\022\031\n\021boot_disk_" - + "size_gb\030\002 \001(\005\"=\n\022PersistentDiskSpec\022\021\n\td" - + "isk_type\030\001 \001(\t\022\024\n\014disk_size_gb\030\002 \001(\003\"O\n\010" - + "NfsMount\022\024\n\006server\030\001 \001(\tB\004\342A\001\002\022\022\n\004path\030\002" - + " \001(\tB\004\342A\001\002\022\031\n\013mount_point\030\003 \001(\tB\004\342A\001\002\"B\n" - + "\025AutoscalingMetricSpec\022\031\n\013metric_name\030\001 " - + "\001(\tB\004\342A\001\002\022\016\n\006target\030\002 \001(\005B\323\001\n\036com.google" - + ".cloud.aiplatform.v1B\025MachineResourcesPr" - + "otoP\001Z>cloud.google.com/go/aiplatform/ap" - + "iv1/aiplatformpb;aiplatformpb\252\002\032Google.C" - + "loud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPlat" - + "form\\V1\352\002\035Google::Cloud::AIPlatform::V1b" - + "\006proto3" + + "\004\342A\001\005\022\031\n\021accelerator_count\030\003 \001(\005\022\032\n\014tpu_" + + "topology\030\004 \001(\tB\004\342A\001\005\"\370\001\n\022DedicatedResour" + + "ces\022D\n\014machine_spec\030\001 \001(\0132\'.google.cloud" + + ".aiplatform.v1.MachineSpecB\005\342A\002\002\005\022 \n\021min" + + "_replica_count\030\002 \001(\005B\005\342A\002\002\005\022\037\n\021max_repli" + + "ca_count\030\003 \001(\005B\004\342A\001\005\022Y\n\030autoscaling_metr" + + "ic_specs\030\004 \003(\01321.google.cloud.aiplatform" + + ".v1.AutoscalingMetricSpecB\004\342A\001\005\"V\n\022Autom" + + "aticResources\022\037\n\021min_replica_count\030\001 \001(\005" + + "B\004\342A\001\005\022\037\n\021max_replica_count\030\002 \001(\005B\004\342A\001\005\"" + + "\246\001\n\027BatchDedicatedResources\022D\n\014machine_s" + + "pec\030\001 \001(\0132\'.google.cloud.aiplatform.v1.M" + + "achineSpecB\005\342A\002\002\005\022$\n\026starting_replica_co" + + "unt\030\002 \001(\005B\004\342A\001\005\022\037\n\021max_replica_count\030\003 \001" + + "(\005B\004\342A\001\005\"0\n\021ResourcesConsumed\022\033\n\rreplica" + + "_hours\030\001 \001(\001B\004\342A\001\003\"=\n\010DiskSpec\022\026\n\016boot_d" + + "isk_type\030\001 \001(\t\022\031\n\021boot_disk_size_gb\030\002 \001(" + + "\005\"=\n\022PersistentDiskSpec\022\021\n\tdisk_type\030\001 \001" + + "(\t\022\024\n\014disk_size_gb\030\002 \001(\003\"O\n\010NfsMount\022\024\n\006" + + "server\030\001 \001(\tB\004\342A\001\002\022\022\n\004path\030\002 \001(\tB\004\342A\001\002\022\031" + + "\n\013mount_point\030\003 \001(\tB\004\342A\001\002\"B\n\025Autoscaling" + + "MetricSpec\022\031\n\013metric_name\030\001 \001(\tB\004\342A\001\002\022\016\n" + + "\006target\030\002 \001(\005B\323\001\n\036com.google.cloud.aipla" + + "tform.v1B\025MachineResourcesProtoP\001Z>cloud" + + ".google.com/go/aiplatform/apiv1/aiplatfo" + + "rmpb;aiplatformpb\252\002\032Google.Cloud.AIPlatf" + + "orm.V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Go" + + "ogle::Cloud::AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -121,7 +121,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_MachineSpec_descriptor, new java.lang.String[] { - "MachineType", "AcceleratorType", "AcceleratorCount", + "MachineType", "AcceleratorType", "AcceleratorCount", "TpuTopology", }); internal_static_google_cloud_aiplatform_v1_DedicatedResources_descriptor = getDescriptor().getMessageTypes().get(1); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineSpec.java index e21b857f5185..b035ee019ceb 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineSpec.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineSpec.java @@ -40,6 +40,7 @@ private MachineSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { private MachineSpec() { machineType_ = ""; acceleratorType_ = 0; + tpuTopology_ = ""; } @java.lang.Override @@ -199,6 +200,59 @@ public int getAcceleratorCount() { return acceleratorCount_; } + public static final int TPU_TOPOLOGY_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object tpuTopology_ = ""; + /** + * + * + *
+   * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
+   * available from GKE. (Example: tpu_topology: "2x2x1").
+   * 
+ * + * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The tpuTopology. + */ + @java.lang.Override + public java.lang.String getTpuTopology() { + java.lang.Object ref = tpuTopology_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tpuTopology_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
+   * available from GKE. (Example: tpu_topology: "2x2x1").
+   * 
+ * + * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for tpuTopology. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTpuTopologyBytes() { + java.lang.Object ref = tpuTopology_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tpuTopology_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -224,6 +278,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (acceleratorCount_ != 0) { output.writeInt32(3, acceleratorCount_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tpuTopology_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, tpuTopology_); + } getUnknownFields().writeTo(output); } @@ -244,6 +301,9 @@ public int getSerializedSize() { if (acceleratorCount_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, acceleratorCount_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tpuTopology_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, tpuTopology_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -263,6 +323,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMachineType().equals(other.getMachineType())) return false; if (acceleratorType_ != other.acceleratorType_) return false; if (getAcceleratorCount() != other.getAcceleratorCount()) return false; + if (!getTpuTopology().equals(other.getTpuTopology())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -280,6 +341,8 @@ public int hashCode() { hash = (53 * hash) + acceleratorType_; hash = (37 * hash) + ACCELERATOR_COUNT_FIELD_NUMBER; hash = (53 * hash) + getAcceleratorCount(); + hash = (37 * hash) + TPU_TOPOLOGY_FIELD_NUMBER; + hash = (53 * hash) + getTpuTopology().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -422,6 +485,7 @@ public Builder clear() { machineType_ = ""; acceleratorType_ = 0; acceleratorCount_ = 0; + tpuTopology_ = ""; return this; } @@ -467,6 +531,9 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.MachineSpec result) { if (((from_bitField0_ & 0x00000004) != 0)) { result.acceleratorCount_ = acceleratorCount_; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.tpuTopology_ = tpuTopology_; + } } @java.lang.Override @@ -525,6 +592,11 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.MachineSpec other) { if (other.getAcceleratorCount() != 0) { setAcceleratorCount(other.getAcceleratorCount()); } + if (!other.getTpuTopology().isEmpty()) { + tpuTopology_ = other.tpuTopology_; + bitField0_ |= 0x00000008; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -569,6 +641,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 24 + case 34: + { + tpuTopology_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -917,6 +995,117 @@ public Builder clearAcceleratorCount() { return this; } + private java.lang.Object tpuTopology_ = ""; + /** + * + * + *
+     * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
+     * available from GKE. (Example: tpu_topology: "2x2x1").
+     * 
+ * + * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The tpuTopology. + */ + public java.lang.String getTpuTopology() { + java.lang.Object ref = tpuTopology_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tpuTopology_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
+     * available from GKE. (Example: tpu_topology: "2x2x1").
+     * 
+ * + * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for tpuTopology. + */ + public com.google.protobuf.ByteString getTpuTopologyBytes() { + java.lang.Object ref = tpuTopology_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tpuTopology_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
+     * available from GKE. (Example: tpu_topology: "2x2x1").
+     * 
+ * + * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The tpuTopology to set. + * @return This builder for chaining. + */ + public Builder setTpuTopology(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tpuTopology_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
+     * available from GKE. (Example: tpu_topology: "2x2x1").
+     * 
+ * + * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearTpuTopology() { + tpuTopology_ = getDefaultInstance().getTpuTopology(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
+     * available from GKE. (Example: tpu_topology: "2x2x1").
+     * 
+ * + * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for tpuTopology to set. + * @return This builder for chaining. + */ + public Builder setTpuTopologyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tpuTopology_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineSpecOrBuilder.java index 1da4f356d218..a9a0fd569857 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineSpecOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineSpecOrBuilder.java @@ -117,4 +117,31 @@ public interface MachineSpecOrBuilder * @return The acceleratorCount. */ int getAcceleratorCount(); + + /** + * + * + *
+   * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
+   * available from GKE. (Example: tpu_topology: "2x2x1").
+   * 
+ * + * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The tpuTopology. + */ + java.lang.String getTpuTopology(); + /** + * + * + *
+   * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
+   * available from GKE. (Example: tpu_topology: "2x2x1").
+   * 
+ * + * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for tpuTopology. + */ + com.google.protobuf.ByteString getTpuTopologyBytes(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelContainerSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelContainerSpec.java index fcd03ee84df1..3b6fa9d267be 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelContainerSpec.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelContainerSpec.java @@ -1178,6 +1178,196 @@ public com.google.protobuf.ByteString getHealthRouteBytes() { } } + public static final int DEPLOYMENT_TIMEOUT_FIELD_NUMBER = 10; + private com.google.protobuf.Duration deploymentTimeout_; + /** + * + * + *
+   * Immutable. Deployment timeout.
+   * Limit for deployment timeout is 2 hours.
+   * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the deploymentTimeout field is set. + */ + @java.lang.Override + public boolean hasDeploymentTimeout() { + return deploymentTimeout_ != null; + } + /** + * + * + *
+   * Immutable. Deployment timeout.
+   * Limit for deployment timeout is 2 hours.
+   * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The deploymentTimeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getDeploymentTimeout() { + return deploymentTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : deploymentTimeout_; + } + /** + * + * + *
+   * Immutable. Deployment timeout.
+   * Limit for deployment timeout is 2 hours.
+   * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getDeploymentTimeoutOrBuilder() { + return deploymentTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : deploymentTimeout_; + } + + public static final int SHARED_MEMORY_SIZE_MB_FIELD_NUMBER = 11; + private long sharedMemorySizeMb_ = 0L; + /** + * + * + *
+   * Immutable. The amount of the VM memory to reserve as the shared memory for
+   * the model in megabytes.
+   * 
+ * + * int64 shared_memory_size_mb = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The sharedMemorySizeMb. + */ + @java.lang.Override + public long getSharedMemorySizeMb() { + return sharedMemorySizeMb_; + } + + public static final int STARTUP_PROBE_FIELD_NUMBER = 12; + private com.google.cloud.aiplatform.v1.Probe startupProbe_; + /** + * + * + *
+   * Immutable. Specification for Kubernetes startup probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the startupProbe field is set. + */ + @java.lang.Override + public boolean hasStartupProbe() { + return startupProbe_ != null; + } + /** + * + * + *
+   * Immutable. Specification for Kubernetes startup probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The startupProbe. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Probe getStartupProbe() { + return startupProbe_ == null + ? com.google.cloud.aiplatform.v1.Probe.getDefaultInstance() + : startupProbe_; + } + /** + * + * + *
+   * Immutable. Specification for Kubernetes startup probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ProbeOrBuilder getStartupProbeOrBuilder() { + return startupProbe_ == null + ? com.google.cloud.aiplatform.v1.Probe.getDefaultInstance() + : startupProbe_; + } + + public static final int HEALTH_PROBE_FIELD_NUMBER = 13; + private com.google.cloud.aiplatform.v1.Probe healthProbe_; + /** + * + * + *
+   * Immutable. Specification for Kubernetes readiness probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the healthProbe field is set. + */ + @java.lang.Override + public boolean hasHealthProbe() { + return healthProbe_ != null; + } + /** + * + * + *
+   * Immutable. Specification for Kubernetes readiness probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The healthProbe. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Probe getHealthProbe() { + return healthProbe_ == null + ? com.google.cloud.aiplatform.v1.Probe.getDefaultInstance() + : healthProbe_; + } + /** + * + * + *
+   * Immutable. Specification for Kubernetes readiness probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ProbeOrBuilder getHealthProbeOrBuilder() { + return healthProbe_ == null + ? com.google.cloud.aiplatform.v1.Probe.getDefaultInstance() + : healthProbe_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1213,6 +1403,18 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthRoute_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, healthRoute_); } + if (deploymentTimeout_ != null) { + output.writeMessage(10, getDeploymentTimeout()); + } + if (sharedMemorySizeMb_ != 0L) { + output.writeInt64(11, sharedMemorySizeMb_); + } + if (startupProbe_ != null) { + output.writeMessage(12, getStartupProbe()); + } + if (healthProbe_ != null) { + output.writeMessage(13, getHealthProbe()); + } getUnknownFields().writeTo(output); } @@ -1253,6 +1455,18 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthRoute_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, healthRoute_); } + if (deploymentTimeout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getDeploymentTimeout()); + } + if (sharedMemorySizeMb_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(11, sharedMemorySizeMb_); + } + if (startupProbe_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getStartupProbe()); + } + if (healthProbe_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getHealthProbe()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1276,6 +1490,19 @@ public boolean equals(final java.lang.Object obj) { if (!getPortsList().equals(other.getPortsList())) return false; if (!getPredictRoute().equals(other.getPredictRoute())) return false; if (!getHealthRoute().equals(other.getHealthRoute())) return false; + if (hasDeploymentTimeout() != other.hasDeploymentTimeout()) return false; + if (hasDeploymentTimeout()) { + if (!getDeploymentTimeout().equals(other.getDeploymentTimeout())) return false; + } + if (getSharedMemorySizeMb() != other.getSharedMemorySizeMb()) return false; + if (hasStartupProbe() != other.hasStartupProbe()) return false; + if (hasStartupProbe()) { + if (!getStartupProbe().equals(other.getStartupProbe())) return false; + } + if (hasHealthProbe() != other.hasHealthProbe()) return false; + if (hasHealthProbe()) { + if (!getHealthProbe().equals(other.getHealthProbe())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1309,6 +1536,20 @@ public int hashCode() { hash = (53 * hash) + getPredictRoute().hashCode(); hash = (37 * hash) + HEALTH_ROUTE_FIELD_NUMBER; hash = (53 * hash) + getHealthRoute().hashCode(); + if (hasDeploymentTimeout()) { + hash = (37 * hash) + DEPLOYMENT_TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getDeploymentTimeout().hashCode(); + } + hash = (37 * hash) + SHARED_MEMORY_SIZE_MB_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSharedMemorySizeMb()); + if (hasStartupProbe()) { + hash = (37 * hash) + STARTUP_PROBE_FIELD_NUMBER; + hash = (53 * hash) + getStartupProbe().hashCode(); + } + if (hasHealthProbe()) { + hash = (37 * hash) + HEALTH_PROBE_FIELD_NUMBER; + hash = (53 * hash) + getHealthProbe().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1469,6 +1710,22 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000010); predictRoute_ = ""; healthRoute_ = ""; + deploymentTimeout_ = null; + if (deploymentTimeoutBuilder_ != null) { + deploymentTimeoutBuilder_.dispose(); + deploymentTimeoutBuilder_ = null; + } + sharedMemorySizeMb_ = 0L; + startupProbe_ = null; + if (startupProbeBuilder_ != null) { + startupProbeBuilder_.dispose(); + startupProbeBuilder_ = null; + } + healthProbe_ = null; + if (healthProbeBuilder_ != null) { + healthProbeBuilder_.dispose(); + healthProbeBuilder_ = null; + } return this; } @@ -1545,6 +1802,23 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.ModelContainerSpec res if (((from_bitField0_ & 0x00000040) != 0)) { result.healthRoute_ = healthRoute_; } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.deploymentTimeout_ = + deploymentTimeoutBuilder_ == null + ? deploymentTimeout_ + : deploymentTimeoutBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.sharedMemorySizeMb_ = sharedMemorySizeMb_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.startupProbe_ = + startupProbeBuilder_ == null ? startupProbe_ : startupProbeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.healthProbe_ = + healthProbeBuilder_ == null ? healthProbe_ : healthProbeBuilder_.build(); + } } @java.lang.Override @@ -1682,6 +1956,18 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.ModelContainerSpec other bitField0_ |= 0x00000040; onChanged(); } + if (other.hasDeploymentTimeout()) { + mergeDeploymentTimeout(other.getDeploymentTimeout()); + } + if (other.getSharedMemorySizeMb() != 0L) { + setSharedMemorySizeMb(other.getSharedMemorySizeMb()); + } + if (other.hasStartupProbe()) { + mergeStartupProbe(other.getStartupProbe()); + } + if (other.hasHealthProbe()) { + mergeHealthProbe(other.getHealthProbe()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1766,6 +2052,31 @@ public Builder mergeFrom( bitField0_ |= 0x00000040; break; } // case 58 + case 82: + { + input.readMessage( + getDeploymentTimeoutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 82 + case 88: + { + sharedMemorySizeMb_ = input.readInt64(); + bitField0_ |= 0x00000100; + break; + } // case 88 + case 98: + { + input.readMessage(getStartupProbeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 98 + case 106: + { + input.readMessage(getHealthProbeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 106 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -5084,6 +5395,674 @@ public Builder setHealthRouteBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.Duration deploymentTimeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + deploymentTimeoutBuilder_; + /** + * + * + *
+     * Immutable. Deployment timeout.
+     * Limit for deployment timeout is 2 hours.
+     * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the deploymentTimeout field is set. + */ + public boolean hasDeploymentTimeout() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Immutable. Deployment timeout.
+     * Limit for deployment timeout is 2 hours.
+     * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The deploymentTimeout. + */ + public com.google.protobuf.Duration getDeploymentTimeout() { + if (deploymentTimeoutBuilder_ == null) { + return deploymentTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : deploymentTimeout_; + } else { + return deploymentTimeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Immutable. Deployment timeout.
+     * Limit for deployment timeout is 2 hours.
+     * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setDeploymentTimeout(com.google.protobuf.Duration value) { + if (deploymentTimeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deploymentTimeout_ = value; + } else { + deploymentTimeoutBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Deployment timeout.
+     * Limit for deployment timeout is 2 hours.
+     * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setDeploymentTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (deploymentTimeoutBuilder_ == null) { + deploymentTimeout_ = builderForValue.build(); + } else { + deploymentTimeoutBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Deployment timeout.
+     * Limit for deployment timeout is 2 hours.
+     * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeDeploymentTimeout(com.google.protobuf.Duration value) { + if (deploymentTimeoutBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && deploymentTimeout_ != null + && deploymentTimeout_ != com.google.protobuf.Duration.getDefaultInstance()) { + getDeploymentTimeoutBuilder().mergeFrom(value); + } else { + deploymentTimeout_ = value; + } + } else { + deploymentTimeoutBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Deployment timeout.
+     * Limit for deployment timeout is 2 hours.
+     * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearDeploymentTimeout() { + bitField0_ = (bitField0_ & ~0x00000080); + deploymentTimeout_ = null; + if (deploymentTimeoutBuilder_ != null) { + deploymentTimeoutBuilder_.dispose(); + deploymentTimeoutBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Deployment timeout.
+     * Limit for deployment timeout is 2 hours.
+     * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.protobuf.Duration.Builder getDeploymentTimeoutBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getDeploymentTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Immutable. Deployment timeout.
+     * Limit for deployment timeout is 2 hours.
+     * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.protobuf.DurationOrBuilder getDeploymentTimeoutOrBuilder() { + if (deploymentTimeoutBuilder_ != null) { + return deploymentTimeoutBuilder_.getMessageOrBuilder(); + } else { + return deploymentTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : deploymentTimeout_; + } + } + /** + * + * + *
+     * Immutable. Deployment timeout.
+     * Limit for deployment timeout is 2 hours.
+     * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getDeploymentTimeoutFieldBuilder() { + if (deploymentTimeoutBuilder_ == null) { + deploymentTimeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getDeploymentTimeout(), getParentForChildren(), isClean()); + deploymentTimeout_ = null; + } + return deploymentTimeoutBuilder_; + } + + private long sharedMemorySizeMb_; + /** + * + * + *
+     * Immutable. The amount of the VM memory to reserve as the shared memory for
+     * the model in megabytes.
+     * 
+ * + * int64 shared_memory_size_mb = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The sharedMemorySizeMb. + */ + @java.lang.Override + public long getSharedMemorySizeMb() { + return sharedMemorySizeMb_; + } + /** + * + * + *
+     * Immutable. The amount of the VM memory to reserve as the shared memory for
+     * the model in megabytes.
+     * 
+ * + * int64 shared_memory_size_mb = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The sharedMemorySizeMb to set. + * @return This builder for chaining. + */ + public Builder setSharedMemorySizeMb(long value) { + + sharedMemorySizeMb_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The amount of the VM memory to reserve as the shared memory for
+     * the model in megabytes.
+     * 
+ * + * int64 shared_memory_size_mb = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearSharedMemorySizeMb() { + bitField0_ = (bitField0_ & ~0x00000100); + sharedMemorySizeMb_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.Probe startupProbe_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Probe, + com.google.cloud.aiplatform.v1.Probe.Builder, + com.google.cloud.aiplatform.v1.ProbeOrBuilder> + startupProbeBuilder_; + /** + * + * + *
+     * Immutable. Specification for Kubernetes startup probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the startupProbe field is set. + */ + public boolean hasStartupProbe() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes startup probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The startupProbe. + */ + public com.google.cloud.aiplatform.v1.Probe getStartupProbe() { + if (startupProbeBuilder_ == null) { + return startupProbe_ == null + ? com.google.cloud.aiplatform.v1.Probe.getDefaultInstance() + : startupProbe_; + } else { + return startupProbeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes startup probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setStartupProbe(com.google.cloud.aiplatform.v1.Probe value) { + if (startupProbeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startupProbe_ = value; + } else { + startupProbeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes startup probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setStartupProbe(com.google.cloud.aiplatform.v1.Probe.Builder builderForValue) { + if (startupProbeBuilder_ == null) { + startupProbe_ = builderForValue.build(); + } else { + startupProbeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes startup probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeStartupProbe(com.google.cloud.aiplatform.v1.Probe value) { + if (startupProbeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && startupProbe_ != null + && startupProbe_ != com.google.cloud.aiplatform.v1.Probe.getDefaultInstance()) { + getStartupProbeBuilder().mergeFrom(value); + } else { + startupProbe_ = value; + } + } else { + startupProbeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes startup probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearStartupProbe() { + bitField0_ = (bitField0_ & ~0x00000200); + startupProbe_ = null; + if (startupProbeBuilder_ != null) { + startupProbeBuilder_.dispose(); + startupProbeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes startup probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.Probe.Builder getStartupProbeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getStartupProbeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes startup probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.ProbeOrBuilder getStartupProbeOrBuilder() { + if (startupProbeBuilder_ != null) { + return startupProbeBuilder_.getMessageOrBuilder(); + } else { + return startupProbe_ == null + ? com.google.cloud.aiplatform.v1.Probe.getDefaultInstance() + : startupProbe_; + } + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes startup probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Probe, + com.google.cloud.aiplatform.v1.Probe.Builder, + com.google.cloud.aiplatform.v1.ProbeOrBuilder> + getStartupProbeFieldBuilder() { + if (startupProbeBuilder_ == null) { + startupProbeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Probe, + com.google.cloud.aiplatform.v1.Probe.Builder, + com.google.cloud.aiplatform.v1.ProbeOrBuilder>( + getStartupProbe(), getParentForChildren(), isClean()); + startupProbe_ = null; + } + return startupProbeBuilder_; + } + + private com.google.cloud.aiplatform.v1.Probe healthProbe_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Probe, + com.google.cloud.aiplatform.v1.Probe.Builder, + com.google.cloud.aiplatform.v1.ProbeOrBuilder> + healthProbeBuilder_; + /** + * + * + *
+     * Immutable. Specification for Kubernetes readiness probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the healthProbe field is set. + */ + public boolean hasHealthProbe() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes readiness probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The healthProbe. + */ + public com.google.cloud.aiplatform.v1.Probe getHealthProbe() { + if (healthProbeBuilder_ == null) { + return healthProbe_ == null + ? com.google.cloud.aiplatform.v1.Probe.getDefaultInstance() + : healthProbe_; + } else { + return healthProbeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes readiness probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setHealthProbe(com.google.cloud.aiplatform.v1.Probe value) { + if (healthProbeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + healthProbe_ = value; + } else { + healthProbeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes readiness probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setHealthProbe(com.google.cloud.aiplatform.v1.Probe.Builder builderForValue) { + if (healthProbeBuilder_ == null) { + healthProbe_ = builderForValue.build(); + } else { + healthProbeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes readiness probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeHealthProbe(com.google.cloud.aiplatform.v1.Probe value) { + if (healthProbeBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && healthProbe_ != null + && healthProbe_ != com.google.cloud.aiplatform.v1.Probe.getDefaultInstance()) { + getHealthProbeBuilder().mergeFrom(value); + } else { + healthProbe_ = value; + } + } else { + healthProbeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes readiness probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearHealthProbe() { + bitField0_ = (bitField0_ & ~0x00000400); + healthProbe_ = null; + if (healthProbeBuilder_ != null) { + healthProbeBuilder_.dispose(); + healthProbeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes readiness probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.Probe.Builder getHealthProbeBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getHealthProbeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes readiness probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.ProbeOrBuilder getHealthProbeOrBuilder() { + if (healthProbeBuilder_ != null) { + return healthProbeBuilder_.getMessageOrBuilder(); + } else { + return healthProbe_ == null + ? com.google.cloud.aiplatform.v1.Probe.getDefaultInstance() + : healthProbe_; + } + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes readiness probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Probe, + com.google.cloud.aiplatform.v1.Probe.Builder, + com.google.cloud.aiplatform.v1.ProbeOrBuilder> + getHealthProbeFieldBuilder() { + if (healthProbeBuilder_ == null) { + healthProbeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Probe, + com.google.cloud.aiplatform.v1.Probe.Builder, + com.google.cloud.aiplatform.v1.ProbeOrBuilder>( + getHealthProbe(), getParentForChildren(), isClean()); + healthProbe_ = null; + } + return healthProbeBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelContainerSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelContainerSpecOrBuilder.java index 10725fca0c3a..cddccf524687 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelContainerSpecOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelContainerSpecOrBuilder.java @@ -986,4 +986,144 @@ public interface ModelContainerSpecOrBuilder * @return The bytes for healthRoute. */ com.google.protobuf.ByteString getHealthRouteBytes(); + + /** + * + * + *
+   * Immutable. Deployment timeout.
+   * Limit for deployment timeout is 2 hours.
+   * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the deploymentTimeout field is set. + */ + boolean hasDeploymentTimeout(); + /** + * + * + *
+   * Immutable. Deployment timeout.
+   * Limit for deployment timeout is 2 hours.
+   * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The deploymentTimeout. + */ + com.google.protobuf.Duration getDeploymentTimeout(); + /** + * + * + *
+   * Immutable. Deployment timeout.
+   * Limit for deployment timeout is 2 hours.
+   * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.protobuf.DurationOrBuilder getDeploymentTimeoutOrBuilder(); + + /** + * + * + *
+   * Immutable. The amount of the VM memory to reserve as the shared memory for
+   * the model in megabytes.
+   * 
+ * + * int64 shared_memory_size_mb = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The sharedMemorySizeMb. + */ + long getSharedMemorySizeMb(); + + /** + * + * + *
+   * Immutable. Specification for Kubernetes startup probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the startupProbe field is set. + */ + boolean hasStartupProbe(); + /** + * + * + *
+   * Immutable. Specification for Kubernetes startup probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The startupProbe. + */ + com.google.cloud.aiplatform.v1.Probe getStartupProbe(); + /** + * + * + *
+   * Immutable. Specification for Kubernetes startup probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.aiplatform.v1.ProbeOrBuilder getStartupProbeOrBuilder(); + + /** + * + * + *
+   * Immutable. Specification for Kubernetes readiness probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the healthProbe field is set. + */ + boolean hasHealthProbe(); + /** + * + * + *
+   * Immutable. Specification for Kubernetes readiness probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The healthProbe. + */ + com.google.cloud.aiplatform.v1.Probe getHealthProbe(); + /** + * + * + *
+   * Immutable. Specification for Kubernetes readiness probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.aiplatform.v1.ProbeOrBuilder getHealthProbeOrBuilder(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelProto.java index 29f23219ef45..6715ad386a65 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelProto.java @@ -63,6 +63,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1_ModelSourceInfo_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1_ModelSourceInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_Probe_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_Probe_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_Probe_ExecAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_Probe_ExecAction_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -80,85 +88,95 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "atform/v1/encryption_spec.proto\032(google/" + "cloud/aiplatform/v1/env_var.proto\032,googl" + "e/cloud/aiplatform/v1/explanation.proto\032" - + "\034google/protobuf/struct.proto\032\037google/pr" - + "otobuf/timestamp.proto\"\364\020\n\005Model\022\014\n\004name" - + "\030\001 \001(\t\022\031\n\nversion_id\030\034 \001(\tB\005\342A\002\005\003\022\027\n\017ver" - + "sion_aliases\030\035 \003(\t\022=\n\023version_create_tim" - + "e\030\037 \001(\0132\032.google.protobuf.TimestampB\004\342A\001" - + "\003\022=\n\023version_update_time\030 \001(\0132\032.google." - + "protobuf.TimestampB\004\342A\001\003\022\032\n\014display_name" - + "\030\002 \001(\tB\004\342A\001\002\022\023\n\013description\030\003 \001(\t\022\033\n\023ver" - + "sion_description\030\036 \001(\t\022E\n\020predict_schema" - + "ta\030\004 \001(\0132+.google.cloud.aiplatform.v1.Pr" - + "edictSchemata\022!\n\023metadata_schema_uri\030\005 \001" - + "(\tB\004\342A\001\005\022.\n\010metadata\030\006 \001(\0132\026.google.prot" - + "obuf.ValueB\004\342A\001\005\022V\n\030supported_export_for" - + "mats\030\024 \003(\0132..google.cloud.aiplatform.v1." - + "Model.ExportFormatB\004\342A\001\003\022N\n\021training_pip" - + "eline\030\007 \001(\tB3\342A\001\003\372A,\n*aiplatform.googlea" - + "pis.com/TrainingPipeline\022D\n\014pipeline_job" - + "\030/ \001(\tB.\342A\001\001\372A\'\n%aiplatform.googleapis.c" - + "om/PipelineJob\022L\n\016container_spec\030\t \001(\0132." - + ".google.cloud.aiplatform.v1.ModelContain" - + "erSpecB\004\342A\001\004\022\032\n\014artifact_uri\030\032 \001(\tB\004\342A\001\005" - + "\022m\n$supported_deployment_resources_types" - + "\030\n \003(\01629.google.cloud.aiplatform.v1.Mode" - + "l.DeploymentResourcesTypeB\004\342A\001\003\022-\n\037suppo" - + "rted_input_storage_formats\030\013 \003(\tB\004\342A\001\003\022." - + "\n supported_output_storage_formats\030\014 \003(\t" - + "B\004\342A\001\003\0225\n\013create_time\030\r \001(\0132\032.google.pro" - + "tobuf.TimestampB\004\342A\001\003\0225\n\013update_time\030\016 \001" - + "(\0132\032.google.protobuf.TimestampB\004\342A\001\003\022K\n\017" - + "deployed_models\030\017 \003(\0132,.google.cloud.aip" - + "latform.v1.DeployedModelRefB\004\342A\001\003\022E\n\020exp" - + "lanation_spec\030\027 \001(\0132+.google.cloud.aipla" - + "tform.v1.ExplanationSpec\022\014\n\004etag\030\020 \001(\t\022=" - + "\n\006labels\030\021 \003(\0132-.google.cloud.aiplatform" - + ".v1.Model.LabelsEntry\022C\n\017encryption_spec" - + "\030\030 \001(\0132*.google.cloud.aiplatform.v1.Encr" - + "yptionSpec\022L\n\021model_source_info\030& \001(\0132+." - + "google.cloud.aiplatform.v1.ModelSourceIn" - + "foB\004\342A\001\003\022V\n\023original_model_info\030\" \001(\01323." - + "google.cloud.aiplatform.v1.Model.Origina" - + "lModelInfoB\004\342A\001\003\022\037\n\021metadata_artifact\030, " - + "\001(\tB\004\342A\001\003\032\327\001\n\014ExportFormat\022\020\n\002id\030\001 \001(\tB\004" - + "\342A\001\003\022c\n\023exportable_contents\030\002 \003(\0162@.goog" - + "le.cloud.aiplatform.v1.Model.ExportForma" - + "t.ExportableContentB\004\342A\001\003\"P\n\021ExportableC" - + "ontent\022\"\n\036EXPORTABLE_CONTENT_UNSPECIFIED" - + "\020\000\022\014\n\010ARTIFACT\020\001\022\t\n\005IMAGE\020\002\032L\n\021OriginalM" - + "odelInfo\0227\n\005model\030\001 \001(\tB(\342A\001\003\372A!\n\037aiplat" - + "form.googleapis.com/Model\032-\n\013LabelsEntry" - + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\214\001\n\027Dep" - + "loymentResourcesType\022)\n%DEPLOYMENT_RESOU" - + "RCES_TYPE_UNSPECIFIED\020\000\022\027\n\023DEDICATED_RES" - + "OURCES\020\001\022\027\n\023AUTOMATIC_RESOURCES\020\002\022\024\n\020SHA" - + "RED_RESOURCES\020\003:\\\352AY\n\037aiplatform.googlea" - + "pis.com/Model\0226projects/{project}/locati" - + "ons/{location}/models/{model}\")\n\023LargeMo" - + "delReference\022\022\n\004name\030\001 \001(\tB\004\342A\001\002\"~\n\017Pred" - + "ictSchemata\022!\n\023instance_schema_uri\030\001 \001(\t" - + "B\004\342A\001\005\022#\n\025parameters_schema_uri\030\002 \001(\tB\004\342" - + "A\001\005\022#\n\025prediction_schema_uri\030\003 \001(\tB\004\342A\001\005" - + "\"\200\002\n\022ModelContainerSpec\022\030\n\timage_uri\030\001 \001" - + "(\tB\005\342A\002\002\005\022\025\n\007command\030\002 \003(\tB\004\342A\001\005\022\022\n\004args" - + "\030\003 \003(\tB\004\342A\001\005\0225\n\003env\030\004 \003(\0132\".google.cloud" - + ".aiplatform.v1.EnvVarB\004\342A\001\005\0225\n\005ports\030\005 \003" - + "(\0132 .google.cloud.aiplatform.v1.PortB\004\342A" - + "\001\005\022\033\n\rpredict_route\030\006 \001(\tB\004\342A\001\005\022\032\n\014healt" - + "h_route\030\007 \001(\tB\004\342A\001\005\"\036\n\004Port\022\026\n\016container" - + "_port\030\003 \001(\005\"\346\001\n\017ModelSourceInfo\022P\n\013sourc" - + "e_type\030\001 \001(\0162;.google.cloud.aiplatform.v" - + "1.ModelSourceInfo.ModelSourceType\022\014\n\004cop" - + "y\030\002 \001(\010\"s\n\017ModelSourceType\022!\n\035MODEL_SOUR" - + "CE_TYPE_UNSPECIFIED\020\000\022\n\n\006AUTOML\020\001\022\n\n\006CUS" - + "TOM\020\002\022\010\n\004BQML\020\003\022\020\n\014MODEL_GARDEN\020\004\022\t\n\005GEN" - + "IE\020\005B\310\001\n\036com.google.cloud.aiplatform.v1B" - + "\nModelProtoP\001Z>cloud.google.com/go/aipla" - + "tform/apiv1/aiplatformpb;aiplatformpb\252\002\032" - + "Google.Cloud.AIPlatform.V1\312\002\032Google\\Clou" - + "d\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlatf" - + "orm::V1b\006proto3" + + "\036google/protobuf/duration.proto\032\034google/" + + "protobuf/struct.proto\032\037google/protobuf/t" + + "imestamp.proto\"\364\020\n\005Model\022\014\n\004name\030\001 \001(\t\022\031" + + "\n\nversion_id\030\034 \001(\tB\005\342A\002\005\003\022\027\n\017version_ali" + + "ases\030\035 \003(\t\022=\n\023version_create_time\030\037 \001(\0132" + + "\032.google.protobuf.TimestampB\004\342A\001\003\022=\n\023ver" + + "sion_update_time\030 \001(\0132\032.google.protobuf" + + ".TimestampB\004\342A\001\003\022\032\n\014display_name\030\002 \001(\tB\004" + + "\342A\001\002\022\023\n\013description\030\003 \001(\t\022\033\n\023version_des" + + "cription\030\036 \001(\t\022E\n\020predict_schemata\030\004 \001(\013" + + "2+.google.cloud.aiplatform.v1.PredictSch" + + "emata\022!\n\023metadata_schema_uri\030\005 \001(\tB\004\342A\001\005" + + "\022.\n\010metadata\030\006 \001(\0132\026.google.protobuf.Val" + + "ueB\004\342A\001\005\022V\n\030supported_export_formats\030\024 \003" + + "(\0132..google.cloud.aiplatform.v1.Model.Ex" + + "portFormatB\004\342A\001\003\022N\n\021training_pipeline\030\007 " + + "\001(\tB3\342A\001\003\372A,\n*aiplatform.googleapis.com/" + + "TrainingPipeline\022D\n\014pipeline_job\030/ \001(\tB." + + "\342A\001\001\372A\'\n%aiplatform.googleapis.com/Pipel" + + "ineJob\022L\n\016container_spec\030\t \001(\0132..google." + + "cloud.aiplatform.v1.ModelContainerSpecB\004" + + "\342A\001\004\022\032\n\014artifact_uri\030\032 \001(\tB\004\342A\001\005\022m\n$supp" + + "orted_deployment_resources_types\030\n \003(\01629" + + ".google.cloud.aiplatform.v1.Model.Deploy" + + "mentResourcesTypeB\004\342A\001\003\022-\n\037supported_inp" + + "ut_storage_formats\030\013 \003(\tB\004\342A\001\003\022.\n suppor" + + "ted_output_storage_formats\030\014 \003(\tB\004\342A\001\003\0225" + + "\n\013create_time\030\r \001(\0132\032.google.protobuf.Ti" + + "mestampB\004\342A\001\003\0225\n\013update_time\030\016 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\004\342A\001\003\022K\n\017deployed" + + "_models\030\017 \003(\0132,.google.cloud.aiplatform." + + "v1.DeployedModelRefB\004\342A\001\003\022E\n\020explanation" + + "_spec\030\027 \001(\0132+.google.cloud.aiplatform.v1" + + ".ExplanationSpec\022\014\n\004etag\030\020 \001(\t\022=\n\006labels" + + "\030\021 \003(\0132-.google.cloud.aiplatform.v1.Mode" + + "l.LabelsEntry\022C\n\017encryption_spec\030\030 \001(\0132*" + + ".google.cloud.aiplatform.v1.EncryptionSp" + + "ec\022L\n\021model_source_info\030& \001(\0132+.google.c" + + "loud.aiplatform.v1.ModelSourceInfoB\004\342A\001\003" + + "\022V\n\023original_model_info\030\" \001(\01323.google.c" + + "loud.aiplatform.v1.Model.OriginalModelIn" + + "foB\004\342A\001\003\022\037\n\021metadata_artifact\030, \001(\tB\004\342A\001" + + "\003\032\327\001\n\014ExportFormat\022\020\n\002id\030\001 \001(\tB\004\342A\001\003\022c\n\023" + + "exportable_contents\030\002 \003(\0162@.google.cloud" + + ".aiplatform.v1.Model.ExportFormat.Export" + + "ableContentB\004\342A\001\003\"P\n\021ExportableContent\022\"" + + "\n\036EXPORTABLE_CONTENT_UNSPECIFIED\020\000\022\014\n\010AR" + + "TIFACT\020\001\022\t\n\005IMAGE\020\002\032L\n\021OriginalModelInfo" + + "\0227\n\005model\030\001 \001(\tB(\342A\001\003\372A!\n\037aiplatform.goo" + + "gleapis.com/Model\032-\n\013LabelsEntry\022\013\n\003key\030" + + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\214\001\n\027DeploymentR" + + "esourcesType\022)\n%DEPLOYMENT_RESOURCES_TYP" + + "E_UNSPECIFIED\020\000\022\027\n\023DEDICATED_RESOURCES\020\001" + + "\022\027\n\023AUTOMATIC_RESOURCES\020\002\022\024\n\020SHARED_RESO" + + "URCES\020\003:\\\352AY\n\037aiplatform.googleapis.com/" + + "Model\0226projects/{project}/locations/{loc" + + "ation}/models/{model}\")\n\023LargeModelRefer" + + "ence\022\022\n\004name\030\001 \001(\tB\004\342A\001\002\"~\n\017PredictSchem" + + "ata\022!\n\023instance_schema_uri\030\001 \001(\tB\004\342A\001\005\022#" + + "\n\025parameters_schema_uri\030\002 \001(\tB\004\342A\001\005\022#\n\025p" + + "rediction_schema_uri\030\003 \001(\tB\004\342A\001\005\"\341\003\n\022Mod" + + "elContainerSpec\022\030\n\timage_uri\030\001 \001(\tB\005\342A\002\002" + + "\005\022\025\n\007command\030\002 \003(\tB\004\342A\001\005\022\022\n\004args\030\003 \003(\tB\004" + + "\342A\001\005\0225\n\003env\030\004 \003(\0132\".google.cloud.aiplatf" + + "orm.v1.EnvVarB\004\342A\001\005\0225\n\005ports\030\005 \003(\0132 .goo" + + "gle.cloud.aiplatform.v1.PortB\004\342A\001\005\022\033\n\rpr" + + "edict_route\030\006 \001(\tB\004\342A\001\005\022\032\n\014health_route\030" + + "\007 \001(\tB\004\342A\001\005\022;\n\022deployment_timeout\030\n \001(\0132" + + "\031.google.protobuf.DurationB\004\342A\001\005\022#\n\025shar" + + "ed_memory_size_mb\030\013 \001(\003B\004\342A\001\005\022>\n\rstartup" + + "_probe\030\014 \001(\0132!.google.cloud.aiplatform.v" + + "1.ProbeB\004\342A\001\005\022=\n\014health_probe\030\r \001(\0132!.go" + + "ogle.cloud.aiplatform.v1.ProbeB\004\342A\001\005\"\036\n\004" + + "Port\022\026\n\016container_port\030\003 \001(\005\"\346\001\n\017ModelSo" + + "urceInfo\022P\n\013source_type\030\001 \001(\0162;.google.c" + + "loud.aiplatform.v1.ModelSourceInfo.Model" + + "SourceType\022\014\n\004copy\030\002 \001(\010\"s\n\017ModelSourceT" + + "ype\022!\n\035MODEL_SOURCE_TYPE_UNSPECIFIED\020\000\022\n" + + "\n\006AUTOML\020\001\022\n\n\006CUSTOM\020\002\022\010\n\004BQML\020\003\022\020\n\014MODE" + + "L_GARDEN\020\004\022\t\n\005GENIE\020\005\"\243\001\n\005Probe\022<\n\004exec\030" + + "\001 \001(\0132,.google.cloud.aiplatform.v1.Probe" + + ".ExecActionH\000\022\026\n\016period_seconds\030\002 \001(\005\022\027\n" + + "\017timeout_seconds\030\003 \001(\005\032\035\n\nExecAction\022\017\n\007" + + "command\030\001 \003(\tB\014\n\nprobe_typeB\310\001\n\036com.goog" + + "le.cloud.aiplatform.v1B\nModelProtoP\001Z>cl" + + "oud.google.com/go/aiplatform/apiv1/aipla" + + "tformpb;aiplatformpb\252\002\032Google.Cloud.AIPl" + + "atform.V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002" + + "\035Google::Cloud::AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -170,6 +188,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(), com.google.cloud.aiplatform.v1.EnvVarProto.getDescriptor(), com.google.cloud.aiplatform.v1.ExplanationProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); @@ -255,7 +274,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ModelContainerSpec_descriptor, new java.lang.String[] { - "ImageUri", "Command", "Args", "Env", "Ports", "PredictRoute", "HealthRoute", + "ImageUri", + "Command", + "Args", + "Env", + "Ports", + "PredictRoute", + "HealthRoute", + "DeploymentTimeout", + "SharedMemorySizeMb", + "StartupProbe", + "HealthProbe", }); internal_static_google_cloud_aiplatform_v1_Port_descriptor = getDescriptor().getMessageTypes().get(4); @@ -273,6 +302,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "SourceType", "Copy", }); + internal_static_google_cloud_aiplatform_v1_Probe_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_aiplatform_v1_Probe_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_Probe_descriptor, + new java.lang.String[] { + "Exec", "PeriodSeconds", "TimeoutSeconds", "ProbeType", + }); + internal_static_google_cloud_aiplatform_v1_Probe_ExecAction_descriptor = + internal_static_google_cloud_aiplatform_v1_Probe_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_aiplatform_v1_Probe_ExecAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_Probe_ExecAction_descriptor, + new java.lang.String[] { + "Command", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); @@ -286,6 +331,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(); com.google.cloud.aiplatform.v1.EnvVarProto.getDescriptor(); com.google.cloud.aiplatform.v1.ExplanationProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceProto.java index e7466914d8c4..dd184e4fa46a 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceProto.java @@ -55,6 +55,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1_ExplainResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1_ExplainResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CountTokensRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CountTokensRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CountTokensResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CountTokensResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -106,41 +114,47 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "tions\030\001 \003(\0132\'.google.cloud.aiplatform.v1" + ".Explanation\022\031\n\021deployed_model_id\030\002 \001(\t\022" + "+\n\013predictions\030\003 \003(\0132\026.google.protobuf.V" - + "alue2\217\t\n\021PredictionService\022\224\002\n\007Predict\022*" - + ".google.cloud.aiplatform.v1.PredictReque" - + "st\032+.google.cloud.aiplatform.v1.PredictR" - + "esponse\"\257\001\332A\035endpoint,instances,paramete" - + "rs\202\323\344\223\002\210\001\"9/v1/{endpoint=projects/*/loca" - + "tions/*/endpoints/*}:predict:\001*ZH\"C/v1/{" - + "endpoint=projects/*/locations/*/publishe" - + "rs/*/models/*}:predict:\001*\022\376\001\n\nRawPredict" - + "\022-.google.cloud.aiplatform.v1.RawPredict" - + "Request\032\024.google.api.HttpBody\"\252\001\332A\022endpo" - + "int,http_body\202\323\344\223\002\216\001\"\"9/v1/{" - + "endpoint=projects/*/locations/*/endpoint" - + "s/*}:explain:\001*\032M\312A\031aiplatform.googleapi" - + "s.com\322A.https://www.googleapis.com/auth/" - + "cloud-platformB\324\001\n\036com.google.cloud.aipl" - + "atform.v1B\026PredictionServiceProtoP\001Z>clo" - + "ud.google.com/go/aiplatform/apiv1/aiplat" - + "formpb;aiplatformpb\252\002\032Google.Cloud.AIPla" - + "tform.V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035" - + "Google::Cloud::AIPlatform::V1b\006proto3" + + "alue\"\204\001\n\022CountTokensRequest\022=\n\010endpoint\030" + + "\001 \001(\tB+\342A\001\002\372A$\n\"aiplatform.googleapis.co" + + "m/Endpoint\022/\n\tinstances\030\002 \003(\0132\026.google.p" + + "rotobuf.ValueB\004\342A\001\002\"N\n\023CountTokensRespon" + + "se\022\024\n\014total_tokens\030\001 \001(\005\022!\n\031total_billab" + + "le_characters\030\002 \001(\0052\217\t\n\021PredictionServic" + + "e\022\224\002\n\007Predict\022*.google.cloud.aiplatform." + + "v1.PredictRequest\032+.google.cloud.aiplatf" + + "orm.v1.PredictResponse\"\257\001\332A\035endpoint,ins" + + "tances,parameters\202\323\344\223\002\210\001\"9/v1/{endpoint=" + + "projects/*/locations/*/endpoints/*}:pred" + + "ict:\001*ZH\"C/v1/{endpoint=projects/*/locat" + + "ions/*/publishers/*/models/*}:predict:\001*" + + "\022\376\001\n\nRawPredict\022-.google.cloud.aiplatfor" + + "m.v1.RawPredictRequest\032\024.google.api.Http" + + "Body\"\252\001\332A\022endpoint,http_body\202\323\344\223\002\216\001\"\"9/v1/{endpoint=projects/*/locat" + + "ions/*/endpoints/*}:explain:\001*\032M\312A\031aipla" + + "tform.googleapis.com\322A.https://www.googl" + + "eapis.com/auth/cloud-platformB\324\001\n\036com.go" + + "ogle.cloud.aiplatform.v1B\026PredictionServ" + + "iceProtoP\001Z>cloud.google.com/go/aiplatfo" + + "rm/apiv1/aiplatformpb;aiplatformpb\252\002\032Goo" + + "gle.Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\A" + + "IPlatform\\V1\352\002\035Google::Cloud::AIPlatform" + + "::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -216,6 +230,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Explanations", "DeployedModelId", "Predictions", }); + internal_static_google_cloud_aiplatform_v1_CountTokensRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_aiplatform_v1_CountTokensRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CountTokensRequest_descriptor, + new java.lang.String[] { + "Endpoint", "Instances", + }); + internal_static_google_cloud_aiplatform_v1_CountTokensResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_aiplatform_v1_CountTokensResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CountTokensResponse_descriptor, + new java.lang.String[] { + "TotalTokens", "TotalBillableCharacters", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Probe.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Probe.java new file mode 100644 index 000000000000..a3dd0a229397 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Probe.java @@ -0,0 +1,1871 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/model.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Probe describes a health check to be performed against a container to
+ * determine whether it is alive or ready to receive traffic.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Probe} + */ +public final class Probe extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.Probe) + ProbeOrBuilder { + private static final long serialVersionUID = 0L; + // Use Probe.newBuilder() to construct. + private Probe(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Probe() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Probe(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Probe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Probe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Probe.class, + com.google.cloud.aiplatform.v1.Probe.Builder.class); + } + + public interface ExecActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.Probe.ExecAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Command is the command line to execute inside the container, the working
+     * directory for the command is root ('/') in the container's filesystem.
+     * The command is simply exec'd, it is not run inside a shell, so
+     * traditional shell instructions ('|', etc) won't work. To use a shell, you
+     * need to explicitly call out to that shell. Exit status of 0 is treated as
+     * live/healthy and non-zero is unhealthy.
+     * 
+ * + * repeated string command = 1; + * + * @return A list containing the command. + */ + java.util.List getCommandList(); + /** + * + * + *
+     * Command is the command line to execute inside the container, the working
+     * directory for the command is root ('/') in the container's filesystem.
+     * The command is simply exec'd, it is not run inside a shell, so
+     * traditional shell instructions ('|', etc) won't work. To use a shell, you
+     * need to explicitly call out to that shell. Exit status of 0 is treated as
+     * live/healthy and non-zero is unhealthy.
+     * 
+ * + * repeated string command = 1; + * + * @return The count of command. + */ + int getCommandCount(); + /** + * + * + *
+     * Command is the command line to execute inside the container, the working
+     * directory for the command is root ('/') in the container's filesystem.
+     * The command is simply exec'd, it is not run inside a shell, so
+     * traditional shell instructions ('|', etc) won't work. To use a shell, you
+     * need to explicitly call out to that shell. Exit status of 0 is treated as
+     * live/healthy and non-zero is unhealthy.
+     * 
+ * + * repeated string command = 1; + * + * @param index The index of the element to return. + * @return The command at the given index. + */ + java.lang.String getCommand(int index); + /** + * + * + *
+     * Command is the command line to execute inside the container, the working
+     * directory for the command is root ('/') in the container's filesystem.
+     * The command is simply exec'd, it is not run inside a shell, so
+     * traditional shell instructions ('|', etc) won't work. To use a shell, you
+     * need to explicitly call out to that shell. Exit status of 0 is treated as
+     * live/healthy and non-zero is unhealthy.
+     * 
+ * + * repeated string command = 1; + * + * @param index The index of the value to return. + * @return The bytes of the command at the given index. + */ + com.google.protobuf.ByteString getCommandBytes(int index); + } + /** + * + * + *
+   * ExecAction specifies a command to execute.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Probe.ExecAction} + */ + public static final class ExecAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.Probe.ExecAction) + ExecActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecAction.newBuilder() to construct. + private ExecAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecAction() { + command_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Probe_ExecAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Probe_ExecAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Probe.ExecAction.class, + com.google.cloud.aiplatform.v1.Probe.ExecAction.Builder.class); + } + + public static final int COMMAND_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList command_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Command is the command line to execute inside the container, the working
+     * directory for the command is root ('/') in the container's filesystem.
+     * The command is simply exec'd, it is not run inside a shell, so
+     * traditional shell instructions ('|', etc) won't work. To use a shell, you
+     * need to explicitly call out to that shell. Exit status of 0 is treated as
+     * live/healthy and non-zero is unhealthy.
+     * 
+ * + * repeated string command = 1; + * + * @return A list containing the command. + */ + public com.google.protobuf.ProtocolStringList getCommandList() { + return command_; + } + /** + * + * + *
+     * Command is the command line to execute inside the container, the working
+     * directory for the command is root ('/') in the container's filesystem.
+     * The command is simply exec'd, it is not run inside a shell, so
+     * traditional shell instructions ('|', etc) won't work. To use a shell, you
+     * need to explicitly call out to that shell. Exit status of 0 is treated as
+     * live/healthy and non-zero is unhealthy.
+     * 
+ * + * repeated string command = 1; + * + * @return The count of command. + */ + public int getCommandCount() { + return command_.size(); + } + /** + * + * + *
+     * Command is the command line to execute inside the container, the working
+     * directory for the command is root ('/') in the container's filesystem.
+     * The command is simply exec'd, it is not run inside a shell, so
+     * traditional shell instructions ('|', etc) won't work. To use a shell, you
+     * need to explicitly call out to that shell. Exit status of 0 is treated as
+     * live/healthy and non-zero is unhealthy.
+     * 
+ * + * repeated string command = 1; + * + * @param index The index of the element to return. + * @return The command at the given index. + */ + public java.lang.String getCommand(int index) { + return command_.get(index); + } + /** + * + * + *
+     * Command is the command line to execute inside the container, the working
+     * directory for the command is root ('/') in the container's filesystem.
+     * The command is simply exec'd, it is not run inside a shell, so
+     * traditional shell instructions ('|', etc) won't work. To use a shell, you
+     * need to explicitly call out to that shell. Exit status of 0 is treated as
+     * live/healthy and non-zero is unhealthy.
+     * 
+ * + * repeated string command = 1; + * + * @param index The index of the value to return. + * @return The bytes of the command at the given index. + */ + public com.google.protobuf.ByteString getCommandBytes(int index) { + return command_.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 < command_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, command_.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 < command_.size(); i++) { + dataSize += computeStringSizeNoTag(command_.getRaw(i)); + } + size += dataSize; + size += 1 * getCommandList().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.aiplatform.v1.Probe.ExecAction)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.Probe.ExecAction other = + (com.google.cloud.aiplatform.v1.Probe.ExecAction) obj; + + if (!getCommandList().equals(other.getCommandList())) return false; + if (!getUnknownFields().equals(other.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 (getCommandCount() > 0) { + hash = (37 * hash) + COMMAND_FIELD_NUMBER; + hash = (53 * hash) + getCommandList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.Probe.ExecAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Probe.ExecAction parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Probe.ExecAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Probe.ExecAction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Probe.ExecAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Probe.ExecAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Probe.ExecAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Probe.ExecAction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Probe.ExecAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Probe.ExecAction parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Probe.ExecAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Probe.ExecAction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.Probe.ExecAction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * ExecAction specifies a command to execute.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Probe.ExecAction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.Probe.ExecAction) + com.google.cloud.aiplatform.v1.Probe.ExecActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Probe_ExecAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Probe_ExecAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Probe.ExecAction.class, + com.google.cloud.aiplatform.v1.Probe.ExecAction.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.Probe.ExecAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + command_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Probe_ExecAction_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Probe.ExecAction getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.Probe.ExecAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Probe.ExecAction build() { + com.google.cloud.aiplatform.v1.Probe.ExecAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Probe.ExecAction buildPartial() { + com.google.cloud.aiplatform.v1.Probe.ExecAction result = + new com.google.cloud.aiplatform.v1.Probe.ExecAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.Probe.ExecAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + command_.makeImmutable(); + result.command_ = command_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.Probe.ExecAction) { + return mergeFrom((com.google.cloud.aiplatform.v1.Probe.ExecAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.Probe.ExecAction other) { + if (other == com.google.cloud.aiplatform.v1.Probe.ExecAction.getDefaultInstance()) + return this; + if (!other.command_.isEmpty()) { + if (command_.isEmpty()) { + command_ = other.command_; + bitField0_ |= 0x00000001; + } else { + ensureCommandIsMutable(); + command_.addAll(other.command_); + } + 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(); + ensureCommandIsMutable(); + command_.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 command_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureCommandIsMutable() { + if (!command_.isModifiable()) { + command_ = new com.google.protobuf.LazyStringArrayList(command_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+       * Command is the command line to execute inside the container, the working
+       * directory for the command is root ('/') in the container's filesystem.
+       * The command is simply exec'd, it is not run inside a shell, so
+       * traditional shell instructions ('|', etc) won't work. To use a shell, you
+       * need to explicitly call out to that shell. Exit status of 0 is treated as
+       * live/healthy and non-zero is unhealthy.
+       * 
+ * + * repeated string command = 1; + * + * @return A list containing the command. + */ + public com.google.protobuf.ProtocolStringList getCommandList() { + command_.makeImmutable(); + return command_; + } + /** + * + * + *
+       * Command is the command line to execute inside the container, the working
+       * directory for the command is root ('/') in the container's filesystem.
+       * The command is simply exec'd, it is not run inside a shell, so
+       * traditional shell instructions ('|', etc) won't work. To use a shell, you
+       * need to explicitly call out to that shell. Exit status of 0 is treated as
+       * live/healthy and non-zero is unhealthy.
+       * 
+ * + * repeated string command = 1; + * + * @return The count of command. + */ + public int getCommandCount() { + return command_.size(); + } + /** + * + * + *
+       * Command is the command line to execute inside the container, the working
+       * directory for the command is root ('/') in the container's filesystem.
+       * The command is simply exec'd, it is not run inside a shell, so
+       * traditional shell instructions ('|', etc) won't work. To use a shell, you
+       * need to explicitly call out to that shell. Exit status of 0 is treated as
+       * live/healthy and non-zero is unhealthy.
+       * 
+ * + * repeated string command = 1; + * + * @param index The index of the element to return. + * @return The command at the given index. + */ + public java.lang.String getCommand(int index) { + return command_.get(index); + } + /** + * + * + *
+       * Command is the command line to execute inside the container, the working
+       * directory for the command is root ('/') in the container's filesystem.
+       * The command is simply exec'd, it is not run inside a shell, so
+       * traditional shell instructions ('|', etc) won't work. To use a shell, you
+       * need to explicitly call out to that shell. Exit status of 0 is treated as
+       * live/healthy and non-zero is unhealthy.
+       * 
+ * + * repeated string command = 1; + * + * @param index The index of the value to return. + * @return The bytes of the command at the given index. + */ + public com.google.protobuf.ByteString getCommandBytes(int index) { + return command_.getByteString(index); + } + /** + * + * + *
+       * Command is the command line to execute inside the container, the working
+       * directory for the command is root ('/') in the container's filesystem.
+       * The command is simply exec'd, it is not run inside a shell, so
+       * traditional shell instructions ('|', etc) won't work. To use a shell, you
+       * need to explicitly call out to that shell. Exit status of 0 is treated as
+       * live/healthy and non-zero is unhealthy.
+       * 
+ * + * repeated string command = 1; + * + * @param index The index to set the value at. + * @param value The command to set. + * @return This builder for chaining. + */ + public Builder setCommand(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommandIsMutable(); + command_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Command is the command line to execute inside the container, the working
+       * directory for the command is root ('/') in the container's filesystem.
+       * The command is simply exec'd, it is not run inside a shell, so
+       * traditional shell instructions ('|', etc) won't work. To use a shell, you
+       * need to explicitly call out to that shell. Exit status of 0 is treated as
+       * live/healthy and non-zero is unhealthy.
+       * 
+ * + * repeated string command = 1; + * + * @param value The command to add. + * @return This builder for chaining. + */ + public Builder addCommand(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommandIsMutable(); + command_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Command is the command line to execute inside the container, the working
+       * directory for the command is root ('/') in the container's filesystem.
+       * The command is simply exec'd, it is not run inside a shell, so
+       * traditional shell instructions ('|', etc) won't work. To use a shell, you
+       * need to explicitly call out to that shell. Exit status of 0 is treated as
+       * live/healthy and non-zero is unhealthy.
+       * 
+ * + * repeated string command = 1; + * + * @param values The command to add. + * @return This builder for chaining. + */ + public Builder addAllCommand(java.lang.Iterable values) { + ensureCommandIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, command_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Command is the command line to execute inside the container, the working
+       * directory for the command is root ('/') in the container's filesystem.
+       * The command is simply exec'd, it is not run inside a shell, so
+       * traditional shell instructions ('|', etc) won't work. To use a shell, you
+       * need to explicitly call out to that shell. Exit status of 0 is treated as
+       * live/healthy and non-zero is unhealthy.
+       * 
+ * + * repeated string command = 1; + * + * @return This builder for chaining. + */ + public Builder clearCommand() { + command_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Command is the command line to execute inside the container, the working
+       * directory for the command is root ('/') in the container's filesystem.
+       * The command is simply exec'd, it is not run inside a shell, so
+       * traditional shell instructions ('|', etc) won't work. To use a shell, you
+       * need to explicitly call out to that shell. Exit status of 0 is treated as
+       * live/healthy and non-zero is unhealthy.
+       * 
+ * + * repeated string command = 1; + * + * @param value The bytes of the command to add. + * @return This builder for chaining. + */ + public Builder addCommandBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCommandIsMutable(); + command_.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.aiplatform.v1.Probe.ExecAction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.Probe.ExecAction) + private static final com.google.cloud.aiplatform.v1.Probe.ExecAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.Probe.ExecAction(); + } + + public static com.google.cloud.aiplatform.v1.Probe.ExecAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecAction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Probe.ExecAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int probeTypeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object probeType_; + + public enum ProbeTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + EXEC(1), + PROBETYPE_NOT_SET(0); + private final int value; + + private ProbeTypeCase(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 ProbeTypeCase valueOf(int value) { + return forNumber(value); + } + + public static ProbeTypeCase forNumber(int value) { + switch (value) { + case 1: + return EXEC; + case 0: + return PROBETYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ProbeTypeCase getProbeTypeCase() { + return ProbeTypeCase.forNumber(probeTypeCase_); + } + + public static final int EXEC_FIELD_NUMBER = 1; + /** + * + * + *
+   * Exec specifies the action to take.
+   * 
+ * + * .google.cloud.aiplatform.v1.Probe.ExecAction exec = 1; + * + * @return Whether the exec field is set. + */ + @java.lang.Override + public boolean hasExec() { + return probeTypeCase_ == 1; + } + /** + * + * + *
+   * Exec specifies the action to take.
+   * 
+ * + * .google.cloud.aiplatform.v1.Probe.ExecAction exec = 1; + * + * @return The exec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Probe.ExecAction getExec() { + if (probeTypeCase_ == 1) { + return (com.google.cloud.aiplatform.v1.Probe.ExecAction) probeType_; + } + return com.google.cloud.aiplatform.v1.Probe.ExecAction.getDefaultInstance(); + } + /** + * + * + *
+   * Exec specifies the action to take.
+   * 
+ * + * .google.cloud.aiplatform.v1.Probe.ExecAction exec = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Probe.ExecActionOrBuilder getExecOrBuilder() { + if (probeTypeCase_ == 1) { + return (com.google.cloud.aiplatform.v1.Probe.ExecAction) probeType_; + } + return com.google.cloud.aiplatform.v1.Probe.ExecAction.getDefaultInstance(); + } + + public static final int PERIOD_SECONDS_FIELD_NUMBER = 2; + private int periodSeconds_ = 0; + /** + * + * + *
+   * How often (in seconds) to perform the probe. Default to 10 seconds.
+   * Minimum value is 1. Must be less than timeout_seconds.
+   *
+   * Maps to Kubernetes probe argument 'periodSeconds'.
+   * 
+ * + * int32 period_seconds = 2; + * + * @return The periodSeconds. + */ + @java.lang.Override + public int getPeriodSeconds() { + return periodSeconds_; + } + + public static final int TIMEOUT_SECONDS_FIELD_NUMBER = 3; + private int timeoutSeconds_ = 0; + /** + * + * + *
+   * Number of seconds after which the probe times out. Defaults to 1 second.
+   * Minimum value is 1. Must be greater or equal to period_seconds.
+   *
+   * Maps to Kubernetes probe argument 'timeoutSeconds'.
+   * 
+ * + * int32 timeout_seconds = 3; + * + * @return The timeoutSeconds. + */ + @java.lang.Override + public int getTimeoutSeconds() { + return timeoutSeconds_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (probeTypeCase_ == 1) { + output.writeMessage(1, (com.google.cloud.aiplatform.v1.Probe.ExecAction) probeType_); + } + if (periodSeconds_ != 0) { + output.writeInt32(2, periodSeconds_); + } + if (timeoutSeconds_ != 0) { + output.writeInt32(3, timeoutSeconds_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (probeTypeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.aiplatform.v1.Probe.ExecAction) probeType_); + } + if (periodSeconds_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, periodSeconds_); + } + if (timeoutSeconds_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, timeoutSeconds_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.Probe)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.Probe other = (com.google.cloud.aiplatform.v1.Probe) obj; + + if (getPeriodSeconds() != other.getPeriodSeconds()) return false; + if (getTimeoutSeconds() != other.getTimeoutSeconds()) return false; + if (!getProbeTypeCase().equals(other.getProbeTypeCase())) return false; + switch (probeTypeCase_) { + case 1: + if (!getExec().equals(other.getExec())) 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) + PERIOD_SECONDS_FIELD_NUMBER; + hash = (53 * hash) + getPeriodSeconds(); + hash = (37 * hash) + TIMEOUT_SECONDS_FIELD_NUMBER; + hash = (53 * hash) + getTimeoutSeconds(); + switch (probeTypeCase_) { + case 1: + hash = (37 * hash) + EXEC_FIELD_NUMBER; + hash = (53 * hash) + getExec().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.Probe parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Probe parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Probe parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Probe parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Probe parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Probe parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Probe parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Probe parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Probe parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Probe parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Probe parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Probe parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.Probe prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Probe describes a health check to be performed against a container to
+   * determine whether it is alive or ready to receive traffic.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Probe} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.Probe) + com.google.cloud.aiplatform.v1.ProbeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Probe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Probe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Probe.class, + com.google.cloud.aiplatform.v1.Probe.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.Probe.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (execBuilder_ != null) { + execBuilder_.clear(); + } + periodSeconds_ = 0; + timeoutSeconds_ = 0; + probeTypeCase_ = 0; + probeType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Probe_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Probe getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.Probe.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Probe build() { + com.google.cloud.aiplatform.v1.Probe result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Probe buildPartial() { + com.google.cloud.aiplatform.v1.Probe result = new com.google.cloud.aiplatform.v1.Probe(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.Probe result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.periodSeconds_ = periodSeconds_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.timeoutSeconds_ = timeoutSeconds_; + } + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1.Probe result) { + result.probeTypeCase_ = probeTypeCase_; + result.probeType_ = this.probeType_; + if (probeTypeCase_ == 1 && execBuilder_ != null) { + result.probeType_ = execBuilder_.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.aiplatform.v1.Probe) { + return mergeFrom((com.google.cloud.aiplatform.v1.Probe) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.Probe other) { + if (other == com.google.cloud.aiplatform.v1.Probe.getDefaultInstance()) return this; + if (other.getPeriodSeconds() != 0) { + setPeriodSeconds(other.getPeriodSeconds()); + } + if (other.getTimeoutSeconds() != 0) { + setTimeoutSeconds(other.getTimeoutSeconds()); + } + switch (other.getProbeTypeCase()) { + case EXEC: + { + mergeExec(other.getExec()); + break; + } + case PROBETYPE_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(getExecFieldBuilder().getBuilder(), extensionRegistry); + probeTypeCase_ = 1; + break; + } // case 10 + case 16: + { + periodSeconds_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + timeoutSeconds_ = 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 probeTypeCase_ = 0; + private java.lang.Object probeType_; + + public ProbeTypeCase getProbeTypeCase() { + return ProbeTypeCase.forNumber(probeTypeCase_); + } + + public Builder clearProbeType() { + probeTypeCase_ = 0; + probeType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Probe.ExecAction, + com.google.cloud.aiplatform.v1.Probe.ExecAction.Builder, + com.google.cloud.aiplatform.v1.Probe.ExecActionOrBuilder> + execBuilder_; + /** + * + * + *
+     * Exec specifies the action to take.
+     * 
+ * + * .google.cloud.aiplatform.v1.Probe.ExecAction exec = 1; + * + * @return Whether the exec field is set. + */ + @java.lang.Override + public boolean hasExec() { + return probeTypeCase_ == 1; + } + /** + * + * + *
+     * Exec specifies the action to take.
+     * 
+ * + * .google.cloud.aiplatform.v1.Probe.ExecAction exec = 1; + * + * @return The exec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Probe.ExecAction getExec() { + if (execBuilder_ == null) { + if (probeTypeCase_ == 1) { + return (com.google.cloud.aiplatform.v1.Probe.ExecAction) probeType_; + } + return com.google.cloud.aiplatform.v1.Probe.ExecAction.getDefaultInstance(); + } else { + if (probeTypeCase_ == 1) { + return execBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.Probe.ExecAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Exec specifies the action to take.
+     * 
+ * + * .google.cloud.aiplatform.v1.Probe.ExecAction exec = 1; + */ + public Builder setExec(com.google.cloud.aiplatform.v1.Probe.ExecAction value) { + if (execBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + probeType_ = value; + onChanged(); + } else { + execBuilder_.setMessage(value); + } + probeTypeCase_ = 1; + return this; + } + /** + * + * + *
+     * Exec specifies the action to take.
+     * 
+ * + * .google.cloud.aiplatform.v1.Probe.ExecAction exec = 1; + */ + public Builder setExec( + com.google.cloud.aiplatform.v1.Probe.ExecAction.Builder builderForValue) { + if (execBuilder_ == null) { + probeType_ = builderForValue.build(); + onChanged(); + } else { + execBuilder_.setMessage(builderForValue.build()); + } + probeTypeCase_ = 1; + return this; + } + /** + * + * + *
+     * Exec specifies the action to take.
+     * 
+ * + * .google.cloud.aiplatform.v1.Probe.ExecAction exec = 1; + */ + public Builder mergeExec(com.google.cloud.aiplatform.v1.Probe.ExecAction value) { + if (execBuilder_ == null) { + if (probeTypeCase_ == 1 + && probeType_ != com.google.cloud.aiplatform.v1.Probe.ExecAction.getDefaultInstance()) { + probeType_ = + com.google.cloud.aiplatform.v1.Probe.ExecAction.newBuilder( + (com.google.cloud.aiplatform.v1.Probe.ExecAction) probeType_) + .mergeFrom(value) + .buildPartial(); + } else { + probeType_ = value; + } + onChanged(); + } else { + if (probeTypeCase_ == 1) { + execBuilder_.mergeFrom(value); + } else { + execBuilder_.setMessage(value); + } + } + probeTypeCase_ = 1; + return this; + } + /** + * + * + *
+     * Exec specifies the action to take.
+     * 
+ * + * .google.cloud.aiplatform.v1.Probe.ExecAction exec = 1; + */ + public Builder clearExec() { + if (execBuilder_ == null) { + if (probeTypeCase_ == 1) { + probeTypeCase_ = 0; + probeType_ = null; + onChanged(); + } + } else { + if (probeTypeCase_ == 1) { + probeTypeCase_ = 0; + probeType_ = null; + } + execBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Exec specifies the action to take.
+     * 
+ * + * .google.cloud.aiplatform.v1.Probe.ExecAction exec = 1; + */ + public com.google.cloud.aiplatform.v1.Probe.ExecAction.Builder getExecBuilder() { + return getExecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Exec specifies the action to take.
+     * 
+ * + * .google.cloud.aiplatform.v1.Probe.ExecAction exec = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Probe.ExecActionOrBuilder getExecOrBuilder() { + if ((probeTypeCase_ == 1) && (execBuilder_ != null)) { + return execBuilder_.getMessageOrBuilder(); + } else { + if (probeTypeCase_ == 1) { + return (com.google.cloud.aiplatform.v1.Probe.ExecAction) probeType_; + } + return com.google.cloud.aiplatform.v1.Probe.ExecAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Exec specifies the action to take.
+     * 
+ * + * .google.cloud.aiplatform.v1.Probe.ExecAction exec = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Probe.ExecAction, + com.google.cloud.aiplatform.v1.Probe.ExecAction.Builder, + com.google.cloud.aiplatform.v1.Probe.ExecActionOrBuilder> + getExecFieldBuilder() { + if (execBuilder_ == null) { + if (!(probeTypeCase_ == 1)) { + probeType_ = com.google.cloud.aiplatform.v1.Probe.ExecAction.getDefaultInstance(); + } + execBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Probe.ExecAction, + com.google.cloud.aiplatform.v1.Probe.ExecAction.Builder, + com.google.cloud.aiplatform.v1.Probe.ExecActionOrBuilder>( + (com.google.cloud.aiplatform.v1.Probe.ExecAction) probeType_, + getParentForChildren(), + isClean()); + probeType_ = null; + } + probeTypeCase_ = 1; + onChanged(); + return execBuilder_; + } + + private int periodSeconds_; + /** + * + * + *
+     * How often (in seconds) to perform the probe. Default to 10 seconds.
+     * Minimum value is 1. Must be less than timeout_seconds.
+     *
+     * Maps to Kubernetes probe argument 'periodSeconds'.
+     * 
+ * + * int32 period_seconds = 2; + * + * @return The periodSeconds. + */ + @java.lang.Override + public int getPeriodSeconds() { + return periodSeconds_; + } + /** + * + * + *
+     * How often (in seconds) to perform the probe. Default to 10 seconds.
+     * Minimum value is 1. Must be less than timeout_seconds.
+     *
+     * Maps to Kubernetes probe argument 'periodSeconds'.
+     * 
+ * + * int32 period_seconds = 2; + * + * @param value The periodSeconds to set. + * @return This builder for chaining. + */ + public Builder setPeriodSeconds(int value) { + + periodSeconds_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * How often (in seconds) to perform the probe. Default to 10 seconds.
+     * Minimum value is 1. Must be less than timeout_seconds.
+     *
+     * Maps to Kubernetes probe argument 'periodSeconds'.
+     * 
+ * + * int32 period_seconds = 2; + * + * @return This builder for chaining. + */ + public Builder clearPeriodSeconds() { + bitField0_ = (bitField0_ & ~0x00000002); + periodSeconds_ = 0; + onChanged(); + return this; + } + + private int timeoutSeconds_; + /** + * + * + *
+     * Number of seconds after which the probe times out. Defaults to 1 second.
+     * Minimum value is 1. Must be greater or equal to period_seconds.
+     *
+     * Maps to Kubernetes probe argument 'timeoutSeconds'.
+     * 
+ * + * int32 timeout_seconds = 3; + * + * @return The timeoutSeconds. + */ + @java.lang.Override + public int getTimeoutSeconds() { + return timeoutSeconds_; + } + /** + * + * + *
+     * Number of seconds after which the probe times out. Defaults to 1 second.
+     * Minimum value is 1. Must be greater or equal to period_seconds.
+     *
+     * Maps to Kubernetes probe argument 'timeoutSeconds'.
+     * 
+ * + * int32 timeout_seconds = 3; + * + * @param value The timeoutSeconds to set. + * @return This builder for chaining. + */ + public Builder setTimeoutSeconds(int value) { + + timeoutSeconds_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of seconds after which the probe times out. Defaults to 1 second.
+     * Minimum value is 1. Must be greater or equal to period_seconds.
+     *
+     * Maps to Kubernetes probe argument 'timeoutSeconds'.
+     * 
+ * + * int32 timeout_seconds = 3; + * + * @return This builder for chaining. + */ + public Builder clearTimeoutSeconds() { + bitField0_ = (bitField0_ & ~0x00000004); + timeoutSeconds_ = 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.aiplatform.v1.Probe) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.Probe) + private static final com.google.cloud.aiplatform.v1.Probe DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.Probe(); + } + + public static com.google.cloud.aiplatform.v1.Probe getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Probe parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Probe getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ProbeOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ProbeOrBuilder.java new file mode 100644 index 000000000000..1a4c29ca1196 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ProbeOrBuilder.java @@ -0,0 +1,94 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/model.proto + +package com.google.cloud.aiplatform.v1; + +public interface ProbeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.Probe) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Exec specifies the action to take.
+   * 
+ * + * .google.cloud.aiplatform.v1.Probe.ExecAction exec = 1; + * + * @return Whether the exec field is set. + */ + boolean hasExec(); + /** + * + * + *
+   * Exec specifies the action to take.
+   * 
+ * + * .google.cloud.aiplatform.v1.Probe.ExecAction exec = 1; + * + * @return The exec. + */ + com.google.cloud.aiplatform.v1.Probe.ExecAction getExec(); + /** + * + * + *
+   * Exec specifies the action to take.
+   * 
+ * + * .google.cloud.aiplatform.v1.Probe.ExecAction exec = 1; + */ + com.google.cloud.aiplatform.v1.Probe.ExecActionOrBuilder getExecOrBuilder(); + + /** + * + * + *
+   * How often (in seconds) to perform the probe. Default to 10 seconds.
+   * Minimum value is 1. Must be less than timeout_seconds.
+   *
+   * Maps to Kubernetes probe argument 'periodSeconds'.
+   * 
+ * + * int32 period_seconds = 2; + * + * @return The periodSeconds. + */ + int getPeriodSeconds(); + + /** + * + * + *
+   * Number of seconds after which the probe times out. Defaults to 1 second.
+   * Minimum value is 1. Must be greater or equal to period_seconds.
+   *
+   * Maps to Kubernetes probe argument 'timeoutSeconds'.
+   * 
+ * + * int32 timeout_seconds = 3; + * + * @return The timeoutSeconds. + */ + int getTimeoutSeconds(); + + com.google.cloud.aiplatform.v1.Probe.ProbeTypeCase getProbeTypeCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudyProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudyProto.java index d1a03cf4b902..d1bb389496b1 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudyProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudyProto.java @@ -47,6 +47,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1_TrialContext_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1_TrialContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_StudyTimeConstraint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_StudyTimeConstraint_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1_StudySpec_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -107,6 +111,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1_StudySpec_ConvexAutomatedStoppingSpec_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1_StudySpec_ConvexAutomatedStoppingSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_StudySpec_StudyStoppingConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_StudySpec_StudyStoppingConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1_Measurement_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -129,150 +137,169 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/field_behavior.proto\032\031google/api/resour" + "ce.proto\032\036google/protobuf/duration.proto" + "\032\034google/protobuf/struct.proto\032\037google/p" - + "rotobuf/timestamp.proto\"\264\003\n\005Study\022\022\n\004nam" - + "e\030\001 \001(\tB\004\342A\001\003\022\032\n\014display_name\030\002 \001(\tB\004\342A\001" - + "\002\022?\n\nstudy_spec\030\003 \001(\0132%.google.cloud.aip" - + "latform.v1.StudySpecB\004\342A\001\002\022<\n\005state\030\004 \001(" - + "\0162\'.google.cloud.aiplatform.v1.Study.Sta" - + "teB\004\342A\001\003\0225\n\013create_time\030\005 \001(\0132\032.google.p" - + "rotobuf.TimestampB\004\342A\001\003\022\035\n\017inactive_reas" - + "on\030\006 \001(\tB\004\342A\001\003\"G\n\005State\022\025\n\021STATE_UNSPECI" - + "FIED\020\000\022\n\n\006ACTIVE\020\001\022\014\n\010INACTIVE\020\002\022\r\n\tCOMP" - + "LETED\020\003:]\352AZ\n\037aiplatform.googleapis.com/" - + "Study\0227projects/{project}/locations/{loc" - + "ation}/studies/{study}\"\336\007\n\005Trial\022\022\n\004name" - + "\030\001 \001(\tB\004\342A\001\003\022\020\n\002id\030\002 \001(\tB\004\342A\001\003\022<\n\005state\030" - + "\003 \001(\0162\'.google.cloud.aiplatform.v1.Trial" - + ".StateB\004\342A\001\003\022E\n\nparameters\030\004 \003(\0132+.googl" - + "e.cloud.aiplatform.v1.Trial.ParameterB\004\342" - + "A\001\003\022H\n\021final_measurement\030\005 \001(\0132\'.google." - + "cloud.aiplatform.v1.MeasurementB\004\342A\001\003\022C\n" - + "\014measurements\030\006 \003(\0132\'.google.cloud.aipla" - + "tform.v1.MeasurementB\004\342A\001\003\0224\n\nstart_time" - + "\030\007 \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003" - + "\0222\n\010end_time\030\010 \001(\0132\032.google.protobuf.Tim" - + "estampB\004\342A\001\003\022\027\n\tclient_id\030\t \001(\tB\004\342A\001\003\022\037\n" - + "\021infeasible_reason\030\n \001(\tB\004\342A\001\003\022@\n\ncustom" - + "_job\030\013 \001(\tB,\342A\001\003\372A%\n#aiplatform.googleap" - + "is.com/CustomJob\022S\n\017web_access_uris\030\014 \003(" - + "\01324.google.cloud.aiplatform.v1.Trial.Web" - + "AccessUrisEntryB\004\342A\001\003\032T\n\tParameter\022\032\n\014pa" - + "rameter_id\030\001 \001(\tB\004\342A\001\003\022+\n\005value\030\002 \001(\0132\026." - + "google.protobuf.ValueB\004\342A\001\003\0324\n\022WebAccess" - + "UrisEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028" - + "\001\"f\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\r\n\tREQ" - + "UESTED\020\001\022\n\n\006ACTIVE\020\002\022\014\n\010STOPPING\020\003\022\r\n\tSU" - + "CCEEDED\020\004\022\016\n\nINFEASIBLE\020\005:l\352Ai\n\037aiplatfo" - + "rm.googleapis.com/Trial\022Fprojects/{proje" - + "ct}/locations/{location}/studies/{study}" - + "/trials/{trial}\"d\n\014TrialContext\022\023\n\013descr" - + "iption\030\001 \001(\t\022?\n\nparameters\030\002 \003(\0132+.googl" - + "e.cloud.aiplatform.v1.Trial.Parameter\"\215\035" - + "\n\tStudySpec\022j\n\031decay_curve_stopping_spec" - + "\030\004 \001(\0132E.google.cloud.aiplatform.v1.Stud" - + "ySpec.DecayCurveAutomatedStoppingSpecH\000\022" - + "k\n\036median_automated_stopping_spec\030\005 \001(\0132" - + "A.google.cloud.aiplatform.v1.StudySpec.M" - + "edianAutomatedStoppingSpecH\000\022k\n\036convex_a" - + "utomated_stopping_spec\030\t \001(\0132A.google.cl" - + "oud.aiplatform.v1.StudySpec.ConvexAutoma" - + "tedStoppingSpecH\000\022G\n\007metrics\030\001 \003(\01320.goo" - + "gle.cloud.aiplatform.v1.StudySpec.Metric" - + "SpecB\004\342A\001\002\022M\n\nparameters\030\002 \003(\01323.google." - + "cloud.aiplatform.v1.StudySpec.ParameterS" - + "pecB\004\342A\001\002\022B\n\talgorithm\030\003 \001(\0162/.google.cl" - + "oud.aiplatform.v1.StudySpec.Algorithm\022Q\n" - + "\021observation_noise\030\006 \001(\01626.google.cloud." - + "aiplatform.v1.StudySpec.ObservationNoise" - + "\022b\n\032measurement_selection_type\030\007 \001(\0162>.g" - + "oogle.cloud.aiplatform.v1.StudySpec.Meas" - + "urementSelectionType\032\257\003\n\nMetricSpec\022\027\n\tm" - + "etric_id\030\001 \001(\tB\004\342A\001\002\022M\n\004goal\030\002 \001(\01629.goo" - + "gle.cloud.aiplatform.v1.StudySpec.Metric" - + "Spec.GoalTypeB\004\342A\001\002\022_\n\rsafety_config\030\003 \001" - + "(\0132C.google.cloud.aiplatform.v1.StudySpe" - + "c.MetricSpec.SafetyMetricConfigH\000\210\001\001\032\202\001\n" - + "\022SafetyMetricConfig\022\030\n\020safety_threshold\030" - + "\001 \001(\001\022-\n desired_min_safe_trials_fractio" - + "n\030\002 \001(\001H\000\210\001\001B#\n!_desired_min_safe_trials" - + "_fraction\"A\n\010GoalType\022\031\n\025GOAL_TYPE_UNSPE" - + "CIFIED\020\000\022\014\n\010MAXIMIZE\020\001\022\014\n\010MINIMIZE\020\002B\020\n\016" - + "_safety_config\032\330\016\n\rParameterSpec\022`\n\021doub" - + "le_value_spec\030\002 \001(\0132C.google.cloud.aipla" - + "tform.v1.StudySpec.ParameterSpec.DoubleV" - + "alueSpecH\000\022b\n\022integer_value_spec\030\003 \001(\0132D" - + ".google.cloud.aiplatform.v1.StudySpec.Pa" - + "rameterSpec.IntegerValueSpecH\000\022j\n\026catego" - + "rical_value_spec\030\004 \001(\0132H.google.cloud.ai" - + "platform.v1.StudySpec.ParameterSpec.Cate" - + "goricalValueSpecH\000\022d\n\023discrete_value_spe" - + "c\030\005 \001(\0132E.google.cloud.aiplatform.v1.Stu" - + "dySpec.ParameterSpec.DiscreteValueSpecH\000" - + "\022\032\n\014parameter_id\030\001 \001(\tB\004\342A\001\002\022Q\n\nscale_ty" - + "pe\030\006 \001(\0162=.google.cloud.aiplatform.v1.St" - + "udySpec.ParameterSpec.ScaleType\022q\n\033condi" - + "tional_parameter_specs\030\n \003(\0132L.google.cl" - + "oud.aiplatform.v1.StudySpec.ParameterSpe" - + "c.ConditionalParameterSpec\032q\n\017DoubleValu" - + "eSpec\022\027\n\tmin_value\030\001 \001(\001B\004\342A\001\002\022\027\n\tmax_va" - + "lue\030\002 \001(\001B\004\342A\001\002\022\032\n\rdefault_value\030\004 \001(\001H\000" - + "\210\001\001B\020\n\016_default_value\032r\n\020IntegerValueSpe" - + "c\022\027\n\tmin_value\030\001 \001(\003B\004\342A\001\002\022\027\n\tmax_value\030" - + "\002 \001(\003B\004\342A\001\002\022\032\n\rdefault_value\030\004 \001(\003H\000\210\001\001B" - + "\020\n\016_default_value\032Z\n\024CategoricalValueSpe" - + "c\022\024\n\006values\030\001 \003(\tB\004\342A\001\002\022\032\n\rdefault_value" - + "\030\003 \001(\tH\000\210\001\001B\020\n\016_default_value\032W\n\021Discret" - + "eValueSpec\022\024\n\006values\030\001 \003(\001B\004\342A\001\002\022\032\n\rdefa" - + "ult_value\030\003 \001(\001H\000\210\001\001B\020\n\016_default_value\032\250" - + "\005\n\030ConditionalParameterSpec\022\205\001\n\026parent_d" - + "iscrete_values\030\002 \001(\0132c.google.cloud.aipl" - + "atform.v1.StudySpec.ParameterSpec.Condit" - + "ionalParameterSpec.DiscreteValueConditio" - + "nH\000\022{\n\021parent_int_values\030\003 \001(\0132^.google." - + "cloud.aiplatform.v1.StudySpec.ParameterS" - + "pec.ConditionalParameterSpec.IntValueCon" - + "ditionH\000\022\213\001\n\031parent_categorical_values\030\004" - + " \001(\0132f.google.cloud.aiplatform.v1.StudyS" + + "rotobuf/timestamp.proto\032\036google/protobuf" + + "/wrappers.proto\"\264\003\n\005Study\022\022\n\004name\030\001 \001(\tB" + + "\004\342A\001\003\022\032\n\014display_name\030\002 \001(\tB\004\342A\001\002\022?\n\nstu" + + "dy_spec\030\003 \001(\0132%.google.cloud.aiplatform." + + "v1.StudySpecB\004\342A\001\002\022<\n\005state\030\004 \001(\0162\'.goog" + + "le.cloud.aiplatform.v1.Study.StateB\004\342A\001\003" + + "\0225\n\013create_time\030\005 \001(\0132\032.google.protobuf." + + "TimestampB\004\342A\001\003\022\035\n\017inactive_reason\030\006 \001(\t" + + "B\004\342A\001\003\"G\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\n" + + "\n\006ACTIVE\020\001\022\014\n\010INACTIVE\020\002\022\r\n\tCOMPLETED\020\003:" + + "]\352AZ\n\037aiplatform.googleapis.com/Study\0227p" + + "rojects/{project}/locations/{location}/s" + + "tudies/{study}\"\336\007\n\005Trial\022\022\n\004name\030\001 \001(\tB\004" + + "\342A\001\003\022\020\n\002id\030\002 \001(\tB\004\342A\001\003\022<\n\005state\030\003 \001(\0162\'." + + "google.cloud.aiplatform.v1.Trial.StateB\004" + + "\342A\001\003\022E\n\nparameters\030\004 \003(\0132+.google.cloud." + + "aiplatform.v1.Trial.ParameterB\004\342A\001\003\022H\n\021f" + + "inal_measurement\030\005 \001(\0132\'.google.cloud.ai" + + "platform.v1.MeasurementB\004\342A\001\003\022C\n\014measure" + + "ments\030\006 \003(\0132\'.google.cloud.aiplatform.v1" + + ".MeasurementB\004\342A\001\003\0224\n\nstart_time\030\007 \001(\0132\032" + + ".google.protobuf.TimestampB\004\342A\001\003\0222\n\010end_" + + "time\030\010 \001(\0132\032.google.protobuf.TimestampB\004" + + "\342A\001\003\022\027\n\tclient_id\030\t \001(\tB\004\342A\001\003\022\037\n\021infeasi" + + "ble_reason\030\n \001(\tB\004\342A\001\003\022@\n\ncustom_job\030\013 \001" + + "(\tB,\342A\001\003\372A%\n#aiplatform.googleapis.com/C" + + "ustomJob\022S\n\017web_access_uris\030\014 \003(\01324.goog" + + "le.cloud.aiplatform.v1.Trial.WebAccessUr" + + "isEntryB\004\342A\001\003\032T\n\tParameter\022\032\n\014parameter_" + + "id\030\001 \001(\tB\004\342A\001\003\022+\n\005value\030\002 \001(\0132\026.google.p" + + "rotobuf.ValueB\004\342A\001\003\0324\n\022WebAccessUrisEntr" + + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"f\n\005Sta" + + "te\022\025\n\021STATE_UNSPECIFIED\020\000\022\r\n\tREQUESTED\020\001" + + "\022\n\n\006ACTIVE\020\002\022\014\n\010STOPPING\020\003\022\r\n\tSUCCEEDED\020" + + "\004\022\016\n\nINFEASIBLE\020\005:l\352Ai\n\037aiplatform.googl" + + "eapis.com/Trial\022Fprojects/{project}/loca" + + "tions/{location}/studies/{study}/trials/" + + "{trial}\"d\n\014TrialContext\022\023\n\013description\030\001" + + " \001(\t\022?\n\nparameters\030\002 \003(\0132+.google.cloud." + + "aiplatform.v1.Trial.Parameter\"\206\001\n\023StudyT" + + "imeConstraint\0221\n\014max_duration\030\001 \001(\0132\031.go" + + "ogle.protobuf.DurationH\000\022.\n\010end_time\030\002 \001" + + "(\0132\032.google.protobuf.TimestampH\000B\014\n\ncons" + + "traint\"\346!\n\tStudySpec\022j\n\031decay_curve_stop" + + "ping_spec\030\004 \001(\0132E.google.cloud.aiplatfor" + + "m.v1.StudySpec.DecayCurveAutomatedStoppi" + + "ngSpecH\000\022k\n\036median_automated_stopping_sp" + + "ec\030\005 \001(\0132A.google.cloud.aiplatform.v1.St" + + "udySpec.MedianAutomatedStoppingSpecH\000\022k\n" + + "\036convex_automated_stopping_spec\030\t \001(\0132A." + + "google.cloud.aiplatform.v1.StudySpec.Con" + + "vexAutomatedStoppingSpecH\000\022G\n\007metrics\030\001 " + + "\003(\01320.google.cloud.aiplatform.v1.StudySp" + + "ec.MetricSpecB\004\342A\001\002\022M\n\nparameters\030\002 \003(\0132" + + "3.google.cloud.aiplatform.v1.StudySpec.P" + + "arameterSpecB\004\342A\001\002\022B\n\talgorithm\030\003 \001(\0162/." + + "google.cloud.aiplatform.v1.StudySpec.Alg" + + "orithm\022Q\n\021observation_noise\030\006 \001(\01626.goog" + + "le.cloud.aiplatform.v1.StudySpec.Observa" + + "tionNoise\022b\n\032measurement_selection_type\030" + + "\007 \001(\0162>.google.cloud.aiplatform.v1.Study" + + "Spec.MeasurementSelectionType\022]\n\025study_s" + + "topping_config\030\013 \001(\01329.google.cloud.aipl" + + "atform.v1.StudySpec.StudyStoppingConfigH" + + "\001\210\001\001\032\257\003\n\nMetricSpec\022\027\n\tmetric_id\030\001 \001(\tB\004" + + "\342A\001\002\022M\n\004goal\030\002 \001(\01629.google.cloud.aiplat" + + "form.v1.StudySpec.MetricSpec.GoalTypeB\004\342" + + "A\001\002\022_\n\rsafety_config\030\003 \001(\0132C.google.clou" + + "d.aiplatform.v1.StudySpec.MetricSpec.Saf" + + "etyMetricConfigH\000\210\001\001\032\202\001\n\022SafetyMetricCon" + + "fig\022\030\n\020safety_threshold\030\001 \001(\001\022-\n desired" + + "_min_safe_trials_fraction\030\002 \001(\001H\000\210\001\001B#\n!" + + "_desired_min_safe_trials_fraction\"A\n\010Goa" + + "lType\022\031\n\025GOAL_TYPE_UNSPECIFIED\020\000\022\014\n\010MAXI" + + "MIZE\020\001\022\014\n\010MINIMIZE\020\002B\020\n\016_safety_config\032\330" + + "\016\n\rParameterSpec\022`\n\021double_value_spec\030\002 " + + "\001(\0132C.google.cloud.aiplatform.v1.StudySp" + + "ec.ParameterSpec.DoubleValueSpecH\000\022b\n\022in" + + "teger_value_spec\030\003 \001(\0132D.google.cloud.ai" + + "platform.v1.StudySpec.ParameterSpec.Inte" + + "gerValueSpecH\000\022j\n\026categorical_value_spec" + + "\030\004 \001(\0132H.google.cloud.aiplatform.v1.Stud" + + "ySpec.ParameterSpec.CategoricalValueSpec" + + "H\000\022d\n\023discrete_value_spec\030\005 \001(\0132E.google" + + ".cloud.aiplatform.v1.StudySpec.Parameter" + + "Spec.DiscreteValueSpecH\000\022\032\n\014parameter_id" + + "\030\001 \001(\tB\004\342A\001\002\022Q\n\nscale_type\030\006 \001(\0162=.googl" + + "e.cloud.aiplatform.v1.StudySpec.Paramete" + + "rSpec.ScaleType\022q\n\033conditional_parameter" + + "_specs\030\n \003(\0132L.google.cloud.aiplatform.v" + + "1.StudySpec.ParameterSpec.ConditionalPar" + + "ameterSpec\032q\n\017DoubleValueSpec\022\027\n\tmin_val" + + "ue\030\001 \001(\001B\004\342A\001\002\022\027\n\tmax_value\030\002 \001(\001B\004\342A\001\002\022" + + "\032\n\rdefault_value\030\004 \001(\001H\000\210\001\001B\020\n\016_default_" + + "value\032r\n\020IntegerValueSpec\022\027\n\tmin_value\030\001" + + " \001(\003B\004\342A\001\002\022\027\n\tmax_value\030\002 \001(\003B\004\342A\001\002\022\032\n\rd" + + "efault_value\030\004 \001(\003H\000\210\001\001B\020\n\016_default_valu" + + "e\032Z\n\024CategoricalValueSpec\022\024\n\006values\030\001 \003(" + + "\tB\004\342A\001\002\022\032\n\rdefault_value\030\003 \001(\tH\000\210\001\001B\020\n\016_" + + "default_value\032W\n\021DiscreteValueSpec\022\024\n\006va" + + "lues\030\001 \003(\001B\004\342A\001\002\022\032\n\rdefault_value\030\003 \001(\001H" + + "\000\210\001\001B\020\n\016_default_value\032\250\005\n\030ConditionalPa" + + "rameterSpec\022\205\001\n\026parent_discrete_values\030\002" + + " \001(\0132c.google.cloud.aiplatform.v1.StudyS" + "pec.ParameterSpec.ConditionalParameterSp" - + "ec.CategoricalValueConditionH\000\022Q\n\016parame" - + "ter_spec\030\001 \001(\01323.google.cloud.aiplatform" - + ".v1.StudySpec.ParameterSpecB\004\342A\001\002\032.\n\026Dis" - + "creteValueCondition\022\024\n\006values\030\001 \003(\001B\004\342A\001" - + "\002\032)\n\021IntValueCondition\022\024\n\006values\030\001 \003(\003B\004" - + "\342A\001\002\0321\n\031CategoricalValueCondition\022\024\n\006val" - + "ues\030\001 \003(\tB\004\342A\001\002B\030\n\026parent_value_conditio" - + "n\"n\n\tScaleType\022\032\n\026SCALE_TYPE_UNSPECIFIED" - + "\020\000\022\025\n\021UNIT_LINEAR_SCALE\020\001\022\022\n\016UNIT_LOG_SC" - + "ALE\020\002\022\032\n\026UNIT_REVERSE_LOG_SCALE\020\003B\026\n\024par" - + "ameter_value_spec\032?\n\037DecayCurveAutomated" - + "StoppingSpec\022\034\n\024use_elapsed_duration\030\001 \001" - + "(\010\032;\n\033MedianAutomatedStoppingSpec\022\034\n\024use" - + "_elapsed_duration\030\001 \001(\010\032\366\001\n\033ConvexAutoma" - + "tedStoppingSpec\022\026\n\016max_step_count\030\001 \001(\003\022" - + "\026\n\016min_step_count\030\002 \001(\003\022\035\n\025min_measureme" - + "nt_count\030\003 \001(\003\022$\n\034learning_rate_paramete" - + "r_name\030\004 \001(\t\022\034\n\024use_elapsed_duration\030\005 \001" - + "(\010\022&\n\031update_all_stopped_trials\030\006 \001(\010H\000\210" - + "\001\001B\034\n\032_update_all_stopped_trials\"J\n\tAlgo" - + "rithm\022\031\n\025ALGORITHM_UNSPECIFIED\020\000\022\017\n\013GRID" - + "_SEARCH\020\002\022\021\n\rRANDOM_SEARCH\020\003\"H\n\020Observat" - + "ionNoise\022!\n\035OBSERVATION_NOISE_UNSPECIFIE" - + "D\020\000\022\007\n\003LOW\020\001\022\010\n\004HIGH\020\002\"r\n\030MeasurementSel" - + "ectionType\022*\n&MEASUREMENT_SELECTION_TYPE" - + "_UNSPECIFIED\020\000\022\024\n\020LAST_MEASUREMENT\020\001\022\024\n\020" - + "BEST_MEASUREMENT\020\002B\031\n\027automated_stopping" - + "_spec\"\341\001\n\013Measurement\0229\n\020elapsed_duratio" - + "n\030\001 \001(\0132\031.google.protobuf.DurationB\004\342A\001\003" - + "\022\030\n\nstep_count\030\002 \001(\003B\004\342A\001\003\022E\n\007metrics\030\003 " - + "\003(\0132..google.cloud.aiplatform.v1.Measure" - + "ment.MetricB\004\342A\001\003\0326\n\006Metric\022\027\n\tmetric_id" - + "\030\001 \001(\tB\004\342A\001\003\022\023\n\005value\030\002 \001(\001B\004\342A\001\003B\310\001\n\036co" - + "m.google.cloud.aiplatform.v1B\nStudyProto" - + "P\001Z>cloud.google.com/go/aiplatform/apiv1" - + "/aiplatformpb;aiplatformpb\252\002\032Google.Clou" - + "d.AIPlatform.V1\312\002\032Google\\Cloud\\AIPlatfor" - + "m\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006pr" - + "oto3" + + "ec.DiscreteValueConditionH\000\022{\n\021parent_in" + + "t_values\030\003 \001(\0132^.google.cloud.aiplatform" + + ".v1.StudySpec.ParameterSpec.ConditionalP" + + "arameterSpec.IntValueConditionH\000\022\213\001\n\031par" + + "ent_categorical_values\030\004 \001(\0132f.google.cl" + + "oud.aiplatform.v1.StudySpec.ParameterSpe" + + "c.ConditionalParameterSpec.CategoricalVa" + + "lueConditionH\000\022Q\n\016parameter_spec\030\001 \001(\01323" + + ".google.cloud.aiplatform.v1.StudySpec.Pa" + + "rameterSpecB\004\342A\001\002\032.\n\026DiscreteValueCondit" + + "ion\022\024\n\006values\030\001 \003(\001B\004\342A\001\002\032)\n\021IntValueCon" + + "dition\022\024\n\006values\030\001 \003(\003B\004\342A\001\002\0321\n\031Categori" + + "calValueCondition\022\024\n\006values\030\001 \003(\tB\004\342A\001\002B" + + "\030\n\026parent_value_condition\"n\n\tScaleType\022\032" + + "\n\026SCALE_TYPE_UNSPECIFIED\020\000\022\025\n\021UNIT_LINEA" + + "R_SCALE\020\001\022\022\n\016UNIT_LOG_SCALE\020\002\022\032\n\026UNIT_RE" + + "VERSE_LOG_SCALE\020\003B\026\n\024parameter_value_spe" + + "c\032?\n\037DecayCurveAutomatedStoppingSpec\022\034\n\024" + + "use_elapsed_duration\030\001 \001(\010\032;\n\033MedianAuto" + + "matedStoppingSpec\022\034\n\024use_elapsed_duratio" + + "n\030\001 \001(\010\032\366\001\n\033ConvexAutomatedStoppingSpec\022" + + "\026\n\016max_step_count\030\001 \001(\003\022\026\n\016min_step_coun" + + "t\030\002 \001(\003\022\035\n\025min_measurement_count\030\003 \001(\003\022$" + + "\n\034learning_rate_parameter_name\030\004 \001(\t\022\034\n\024" + + "use_elapsed_duration\030\005 \001(\010\022&\n\031update_all" + + "_stopped_trials\030\006 \001(\010H\000\210\001\001B\034\n\032_update_al" + + "l_stopped_trials\032\335\003\n\023StudyStoppingConfig" + + "\0224\n\020should_stop_asap\030\001 \001(\0132\032.google.prot" + + "obuf.BoolValue\022S\n\032minimum_runtime_constr" + + "aint\030\002 \001(\0132/.google.cloud.aiplatform.v1." + + "StudyTimeConstraint\022S\n\032maximum_runtime_c" + + "onstraint\030\003 \001(\0132/.google.cloud.aiplatfor" + + "m.v1.StudyTimeConstraint\0223\n\016min_num_tria" + + "ls\030\004 \001(\0132\033.google.protobuf.Int32Value\0223\n" + + "\016max_num_trials\030\005 \001(\0132\033.google.protobuf." + + "Int32Value\022?\n\032max_num_trials_no_progress" + + "\030\006 \001(\0132\033.google.protobuf.Int32Value\022;\n\030m" + + "ax_duration_no_progress\030\007 \001(\0132\031.google.p" + + "rotobuf.Duration\"J\n\tAlgorithm\022\031\n\025ALGORIT" + + "HM_UNSPECIFIED\020\000\022\017\n\013GRID_SEARCH\020\002\022\021\n\rRAN" + + "DOM_SEARCH\020\003\"H\n\020ObservationNoise\022!\n\035OBSE" + + "RVATION_NOISE_UNSPECIFIED\020\000\022\007\n\003LOW\020\001\022\010\n\004" + + "HIGH\020\002\"r\n\030MeasurementSelectionType\022*\n&ME" + + "ASUREMENT_SELECTION_TYPE_UNSPECIFIED\020\000\022\024" + + "\n\020LAST_MEASUREMENT\020\001\022\024\n\020BEST_MEASUREMENT" + + "\020\002B\031\n\027automated_stopping_specB\030\n\026_study_" + + "stopping_config\"\341\001\n\013Measurement\0229\n\020elaps" + + "ed_duration\030\001 \001(\0132\031.google.protobuf.Dura" + + "tionB\004\342A\001\003\022\030\n\nstep_count\030\002 \001(\003B\004\342A\001\003\022E\n\007" + + "metrics\030\003 \003(\0132..google.cloud.aiplatform." + + "v1.Measurement.MetricB\004\342A\001\003\0326\n\006Metric\022\027\n" + + "\tmetric_id\030\001 \001(\tB\004\342A\001\003\022\023\n\005value\030\002 \001(\001B\004\342" + + "A\001\003B\310\001\n\036com.google.cloud.aiplatform.v1B\n" + + "StudyProtoP\001Z>cloud.google.com/go/aiplat" + + "form/apiv1/aiplatformpb;aiplatformpb\252\002\032G" + + "oogle.Cloud.AIPlatform.V1\312\002\032Google\\Cloud" + + "\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlatfo" + + "rm::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -283,6 +310,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), }); internal_static_google_cloud_aiplatform_v1_Study_descriptor = getDescriptor().getMessageTypes().get(0); @@ -335,8 +363,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Description", "Parameters", }); - internal_static_google_cloud_aiplatform_v1_StudySpec_descriptor = + internal_static_google_cloud_aiplatform_v1_StudyTimeConstraint_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_StudyTimeConstraint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_StudyTimeConstraint_descriptor, + new java.lang.String[] { + "MaxDuration", "EndTime", "Constraint", + }); + internal_static_google_cloud_aiplatform_v1_StudySpec_descriptor = + getDescriptor().getMessageTypes().get(4); internal_static_google_cloud_aiplatform_v1_StudySpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_StudySpec_descriptor, @@ -349,7 +385,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Algorithm", "ObservationNoise", "MeasurementSelectionType", + "StudyStoppingConfig", "AutomatedStoppingSpec", + "StudyStoppingConfig", }); internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_descriptor = internal_static_google_cloud_aiplatform_v1_StudySpec_descriptor.getNestedTypes().get(0); @@ -498,8 +536,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UpdateAllStoppedTrials", "UpdateAllStoppedTrials", }); + internal_static_google_cloud_aiplatform_v1_StudySpec_StudyStoppingConfig_descriptor = + internal_static_google_cloud_aiplatform_v1_StudySpec_descriptor.getNestedTypes().get(5); + internal_static_google_cloud_aiplatform_v1_StudySpec_StudyStoppingConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_StudySpec_StudyStoppingConfig_descriptor, + new java.lang.String[] { + "ShouldStopAsap", + "MinimumRuntimeConstraint", + "MaximumRuntimeConstraint", + "MinNumTrials", + "MaxNumTrials", + "MaxNumTrialsNoProgress", + "MaxDurationNoProgress", + }); internal_static_google_cloud_aiplatform_v1_Measurement_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_aiplatform_v1_Measurement_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_Measurement_descriptor, @@ -526,6 +578,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudySpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudySpec.java index 5b169c75d602..13106d34a9ce 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudySpec.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudySpec.java @@ -17350,6 +17350,3072 @@ public com.google.protobuf.Parser getParserForType( } } + public interface StudyStoppingConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+     * STOPPING state.
+     *
+     * The bottom line is: set to true if you want to interrupt on-going
+     * evaluations of Trials as soon as the study stopping condition is met.
+     * (Please see Study.State documentation for the source of truth).
+     * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + * + * @return Whether the shouldStopAsap field is set. + */ + boolean hasShouldStopAsap(); + /** + * + * + *
+     * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+     * STOPPING state.
+     *
+     * The bottom line is: set to true if you want to interrupt on-going
+     * evaluations of Trials as soon as the study stopping condition is met.
+     * (Please see Study.State documentation for the source of truth).
+     * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + * + * @return The shouldStopAsap. + */ + com.google.protobuf.BoolValue getShouldStopAsap(); + /** + * + * + *
+     * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+     * STOPPING state.
+     *
+     * The bottom line is: set to true if you want to interrupt on-going
+     * evaluations of Trials as soon as the study stopping condition is met.
+     * (Please see Study.State documentation for the source of truth).
+     * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + */ + com.google.protobuf.BoolValueOrBuilder getShouldStopAsapOrBuilder(); + + /** + * + * + *
+     * Each "stopping rule" in this proto specifies an "if" condition. Before
+     * Vizier would generate a new suggestion, it first checks each specified
+     * stopping rule, from top to bottom in this list.
+     * Note that the first few rules (e.g. minimum_runtime_constraint,
+     * min_num_trials) will prevent other stopping rules from being evaluated
+     * until they are met. For example, setting `min_num_trials=5` and
+     * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+     * has 5 COMPLETED trials, even if more than an hour has passed since its
+     * creation. It follows the first applicable rule (whose "if" condition is
+     * satisfied) to make a stopping decision. If none of the specified rules
+     * are applicable, then Vizier decides that the study should not stop.
+     * If Vizier decides that the study should stop, the study enters
+     * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+     * IMPORTANT: The automatic study state transition happens precisely as
+     * described above; that is, deleting trials or updating StudyConfig NEVER
+     * automatically moves the study state back to ACTIVE. If you want to
+     * _resume_ a Study that was stopped, 1) change the stopping conditions if
+     * necessary, 2) activate the study, and then 3) ask for suggestions.
+     * If the specified time or duration has not passed, do not stop the
+     * study.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + * @return Whether the minimumRuntimeConstraint field is set. + */ + boolean hasMinimumRuntimeConstraint(); + /** + * + * + *
+     * Each "stopping rule" in this proto specifies an "if" condition. Before
+     * Vizier would generate a new suggestion, it first checks each specified
+     * stopping rule, from top to bottom in this list.
+     * Note that the first few rules (e.g. minimum_runtime_constraint,
+     * min_num_trials) will prevent other stopping rules from being evaluated
+     * until they are met. For example, setting `min_num_trials=5` and
+     * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+     * has 5 COMPLETED trials, even if more than an hour has passed since its
+     * creation. It follows the first applicable rule (whose "if" condition is
+     * satisfied) to make a stopping decision. If none of the specified rules
+     * are applicable, then Vizier decides that the study should not stop.
+     * If Vizier decides that the study should stop, the study enters
+     * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+     * IMPORTANT: The automatic study state transition happens precisely as
+     * described above; that is, deleting trials or updating StudyConfig NEVER
+     * automatically moves the study state back to ACTIVE. If you want to
+     * _resume_ a Study that was stopped, 1) change the stopping conditions if
+     * necessary, 2) activate the study, and then 3) ask for suggestions.
+     * If the specified time or duration has not passed, do not stop the
+     * study.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + * @return The minimumRuntimeConstraint. + */ + com.google.cloud.aiplatform.v1.StudyTimeConstraint getMinimumRuntimeConstraint(); + /** + * + * + *
+     * Each "stopping rule" in this proto specifies an "if" condition. Before
+     * Vizier would generate a new suggestion, it first checks each specified
+     * stopping rule, from top to bottom in this list.
+     * Note that the first few rules (e.g. minimum_runtime_constraint,
+     * min_num_trials) will prevent other stopping rules from being evaluated
+     * until they are met. For example, setting `min_num_trials=5` and
+     * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+     * has 5 COMPLETED trials, even if more than an hour has passed since its
+     * creation. It follows the first applicable rule (whose "if" condition is
+     * satisfied) to make a stopping decision. If none of the specified rules
+     * are applicable, then Vizier decides that the study should not stop.
+     * If Vizier decides that the study should stop, the study enters
+     * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+     * IMPORTANT: The automatic study state transition happens precisely as
+     * described above; that is, deleting trials or updating StudyConfig NEVER
+     * automatically moves the study state back to ACTIVE. If you want to
+     * _resume_ a Study that was stopped, 1) change the stopping conditions if
+     * necessary, 2) activate the study, and then 3) ask for suggestions.
+     * If the specified time or duration has not passed, do not stop the
+     * study.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint minimum_runtime_constraint = 2; + */ + com.google.cloud.aiplatform.v1.StudyTimeConstraintOrBuilder + getMinimumRuntimeConstraintOrBuilder(); + + /** + * + * + *
+     * If the specified time or duration has passed, stop the study.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + * @return Whether the maximumRuntimeConstraint field is set. + */ + boolean hasMaximumRuntimeConstraint(); + /** + * + * + *
+     * If the specified time or duration has passed, stop the study.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + * @return The maximumRuntimeConstraint. + */ + com.google.cloud.aiplatform.v1.StudyTimeConstraint getMaximumRuntimeConstraint(); + /** + * + * + *
+     * If the specified time or duration has passed, stop the study.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint maximum_runtime_constraint = 3; + */ + com.google.cloud.aiplatform.v1.StudyTimeConstraintOrBuilder + getMaximumRuntimeConstraintOrBuilder(); + + /** + * + * + *
+     * If there are fewer than this many COMPLETED trials, do not stop the
+     * study.
+     * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + * + * @return Whether the minNumTrials field is set. + */ + boolean hasMinNumTrials(); + /** + * + * + *
+     * If there are fewer than this many COMPLETED trials, do not stop the
+     * study.
+     * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + * + * @return The minNumTrials. + */ + com.google.protobuf.Int32Value getMinNumTrials(); + /** + * + * + *
+     * If there are fewer than this many COMPLETED trials, do not stop the
+     * study.
+     * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + */ + com.google.protobuf.Int32ValueOrBuilder getMinNumTrialsOrBuilder(); + + /** + * + * + *
+     * If there are more than this many trials, stop the study.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + * + * @return Whether the maxNumTrials field is set. + */ + boolean hasMaxNumTrials(); + /** + * + * + *
+     * If there are more than this many trials, stop the study.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + * + * @return The maxNumTrials. + */ + com.google.protobuf.Int32Value getMaxNumTrials(); + /** + * + * + *
+     * If there are more than this many trials, stop the study.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + */ + com.google.protobuf.Int32ValueOrBuilder getMaxNumTrialsOrBuilder(); + + /** + * + * + *
+     * If the objective value has not improved for this many consecutive
+     * trials, stop the study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + * + * @return Whether the maxNumTrialsNoProgress field is set. + */ + boolean hasMaxNumTrialsNoProgress(); + /** + * + * + *
+     * If the objective value has not improved for this many consecutive
+     * trials, stop the study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + * + * @return The maxNumTrialsNoProgress. + */ + com.google.protobuf.Int32Value getMaxNumTrialsNoProgress(); + /** + * + * + *
+     * If the objective value has not improved for this many consecutive
+     * trials, stop the study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + */ + com.google.protobuf.Int32ValueOrBuilder getMaxNumTrialsNoProgressOrBuilder(); + + /** + * + * + *
+     * If the objective value has not improved for this much time, stop the
+     * study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + * + * @return Whether the maxDurationNoProgress field is set. + */ + boolean hasMaxDurationNoProgress(); + /** + * + * + *
+     * If the objective value has not improved for this much time, stop the
+     * study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + * + * @return The maxDurationNoProgress. + */ + com.google.protobuf.Duration getMaxDurationNoProgress(); + /** + * + * + *
+     * If the objective value has not improved for this much time, stop the
+     * study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + */ + com.google.protobuf.DurationOrBuilder getMaxDurationNoProgressOrBuilder(); + } + /** + * + * + *
+   * The configuration (stopping conditions) for automated stopping of a Study.
+   * Conditions include trial budgets, time budgets, and convergence detection.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig} + */ + public static final class StudyStoppingConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig) + StudyStoppingConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use StudyStoppingConfig.newBuilder() to construct. + private StudyStoppingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StudyStoppingConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StudyStoppingConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_StudyStoppingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_StudyStoppingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig.class, + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig.Builder.class); + } + + public static final int SHOULD_STOP_ASAP_FIELD_NUMBER = 1; + private com.google.protobuf.BoolValue shouldStopAsap_; + /** + * + * + *
+     * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+     * STOPPING state.
+     *
+     * The bottom line is: set to true if you want to interrupt on-going
+     * evaluations of Trials as soon as the study stopping condition is met.
+     * (Please see Study.State documentation for the source of truth).
+     * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + * + * @return Whether the shouldStopAsap field is set. + */ + @java.lang.Override + public boolean hasShouldStopAsap() { + return shouldStopAsap_ != null; + } + /** + * + * + *
+     * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+     * STOPPING state.
+     *
+     * The bottom line is: set to true if you want to interrupt on-going
+     * evaluations of Trials as soon as the study stopping condition is met.
+     * (Please see Study.State documentation for the source of truth).
+     * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + * + * @return The shouldStopAsap. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getShouldStopAsap() { + return shouldStopAsap_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : shouldStopAsap_; + } + /** + * + * + *
+     * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+     * STOPPING state.
+     *
+     * The bottom line is: set to true if you want to interrupt on-going
+     * evaluations of Trials as soon as the study stopping condition is met.
+     * (Please see Study.State documentation for the source of truth).
+     * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getShouldStopAsapOrBuilder() { + return shouldStopAsap_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : shouldStopAsap_; + } + + public static final int MINIMUM_RUNTIME_CONSTRAINT_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.StudyTimeConstraint minimumRuntimeConstraint_; + /** + * + * + *
+     * Each "stopping rule" in this proto specifies an "if" condition. Before
+     * Vizier would generate a new suggestion, it first checks each specified
+     * stopping rule, from top to bottom in this list.
+     * Note that the first few rules (e.g. minimum_runtime_constraint,
+     * min_num_trials) will prevent other stopping rules from being evaluated
+     * until they are met. For example, setting `min_num_trials=5` and
+     * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+     * has 5 COMPLETED trials, even if more than an hour has passed since its
+     * creation. It follows the first applicable rule (whose "if" condition is
+     * satisfied) to make a stopping decision. If none of the specified rules
+     * are applicable, then Vizier decides that the study should not stop.
+     * If Vizier decides that the study should stop, the study enters
+     * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+     * IMPORTANT: The automatic study state transition happens precisely as
+     * described above; that is, deleting trials or updating StudyConfig NEVER
+     * automatically moves the study state back to ACTIVE. If you want to
+     * _resume_ a Study that was stopped, 1) change the stopping conditions if
+     * necessary, 2) activate the study, and then 3) ask for suggestions.
+     * If the specified time or duration has not passed, do not stop the
+     * study.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + * @return Whether the minimumRuntimeConstraint field is set. + */ + @java.lang.Override + public boolean hasMinimumRuntimeConstraint() { + return minimumRuntimeConstraint_ != null; + } + /** + * + * + *
+     * Each "stopping rule" in this proto specifies an "if" condition. Before
+     * Vizier would generate a new suggestion, it first checks each specified
+     * stopping rule, from top to bottom in this list.
+     * Note that the first few rules (e.g. minimum_runtime_constraint,
+     * min_num_trials) will prevent other stopping rules from being evaluated
+     * until they are met. For example, setting `min_num_trials=5` and
+     * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+     * has 5 COMPLETED trials, even if more than an hour has passed since its
+     * creation. It follows the first applicable rule (whose "if" condition is
+     * satisfied) to make a stopping decision. If none of the specified rules
+     * are applicable, then Vizier decides that the study should not stop.
+     * If Vizier decides that the study should stop, the study enters
+     * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+     * IMPORTANT: The automatic study state transition happens precisely as
+     * described above; that is, deleting trials or updating StudyConfig NEVER
+     * automatically moves the study state back to ACTIVE. If you want to
+     * _resume_ a Study that was stopped, 1) change the stopping conditions if
+     * necessary, 2) activate the study, and then 3) ask for suggestions.
+     * If the specified time or duration has not passed, do not stop the
+     * study.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + * @return The minimumRuntimeConstraint. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudyTimeConstraint getMinimumRuntimeConstraint() { + return minimumRuntimeConstraint_ == null + ? com.google.cloud.aiplatform.v1.StudyTimeConstraint.getDefaultInstance() + : minimumRuntimeConstraint_; + } + /** + * + * + *
+     * Each "stopping rule" in this proto specifies an "if" condition. Before
+     * Vizier would generate a new suggestion, it first checks each specified
+     * stopping rule, from top to bottom in this list.
+     * Note that the first few rules (e.g. minimum_runtime_constraint,
+     * min_num_trials) will prevent other stopping rules from being evaluated
+     * until they are met. For example, setting `min_num_trials=5` and
+     * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+     * has 5 COMPLETED trials, even if more than an hour has passed since its
+     * creation. It follows the first applicable rule (whose "if" condition is
+     * satisfied) to make a stopping decision. If none of the specified rules
+     * are applicable, then Vizier decides that the study should not stop.
+     * If Vizier decides that the study should stop, the study enters
+     * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+     * IMPORTANT: The automatic study state transition happens precisely as
+     * described above; that is, deleting trials or updating StudyConfig NEVER
+     * automatically moves the study state back to ACTIVE. If you want to
+     * _resume_ a Study that was stopped, 1) change the stopping conditions if
+     * necessary, 2) activate the study, and then 3) ask for suggestions.
+     * If the specified time or duration has not passed, do not stop the
+     * study.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint minimum_runtime_constraint = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudyTimeConstraintOrBuilder + getMinimumRuntimeConstraintOrBuilder() { + return minimumRuntimeConstraint_ == null + ? com.google.cloud.aiplatform.v1.StudyTimeConstraint.getDefaultInstance() + : minimumRuntimeConstraint_; + } + + public static final int MAXIMUM_RUNTIME_CONSTRAINT_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.StudyTimeConstraint maximumRuntimeConstraint_; + /** + * + * + *
+     * If the specified time or duration has passed, stop the study.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + * @return Whether the maximumRuntimeConstraint field is set. + */ + @java.lang.Override + public boolean hasMaximumRuntimeConstraint() { + return maximumRuntimeConstraint_ != null; + } + /** + * + * + *
+     * If the specified time or duration has passed, stop the study.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + * @return The maximumRuntimeConstraint. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudyTimeConstraint getMaximumRuntimeConstraint() { + return maximumRuntimeConstraint_ == null + ? com.google.cloud.aiplatform.v1.StudyTimeConstraint.getDefaultInstance() + : maximumRuntimeConstraint_; + } + /** + * + * + *
+     * If the specified time or duration has passed, stop the study.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint maximum_runtime_constraint = 3; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudyTimeConstraintOrBuilder + getMaximumRuntimeConstraintOrBuilder() { + return maximumRuntimeConstraint_ == null + ? com.google.cloud.aiplatform.v1.StudyTimeConstraint.getDefaultInstance() + : maximumRuntimeConstraint_; + } + + public static final int MIN_NUM_TRIALS_FIELD_NUMBER = 4; + private com.google.protobuf.Int32Value minNumTrials_; + /** + * + * + *
+     * If there are fewer than this many COMPLETED trials, do not stop the
+     * study.
+     * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + * + * @return Whether the minNumTrials field is set. + */ + @java.lang.Override + public boolean hasMinNumTrials() { + return minNumTrials_ != null; + } + /** + * + * + *
+     * If there are fewer than this many COMPLETED trials, do not stop the
+     * study.
+     * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + * + * @return The minNumTrials. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getMinNumTrials() { + return minNumTrials_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : minNumTrials_; + } + /** + * + * + *
+     * If there are fewer than this many COMPLETED trials, do not stop the
+     * study.
+     * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getMinNumTrialsOrBuilder() { + return minNumTrials_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : minNumTrials_; + } + + public static final int MAX_NUM_TRIALS_FIELD_NUMBER = 5; + private com.google.protobuf.Int32Value maxNumTrials_; + /** + * + * + *
+     * If there are more than this many trials, stop the study.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + * + * @return Whether the maxNumTrials field is set. + */ + @java.lang.Override + public boolean hasMaxNumTrials() { + return maxNumTrials_ != null; + } + /** + * + * + *
+     * If there are more than this many trials, stop the study.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + * + * @return The maxNumTrials. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getMaxNumTrials() { + return maxNumTrials_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : maxNumTrials_; + } + /** + * + * + *
+     * If there are more than this many trials, stop the study.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getMaxNumTrialsOrBuilder() { + return maxNumTrials_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : maxNumTrials_; + } + + public static final int MAX_NUM_TRIALS_NO_PROGRESS_FIELD_NUMBER = 6; + private com.google.protobuf.Int32Value maxNumTrialsNoProgress_; + /** + * + * + *
+     * If the objective value has not improved for this many consecutive
+     * trials, stop the study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + * + * @return Whether the maxNumTrialsNoProgress field is set. + */ + @java.lang.Override + public boolean hasMaxNumTrialsNoProgress() { + return maxNumTrialsNoProgress_ != null; + } + /** + * + * + *
+     * If the objective value has not improved for this many consecutive
+     * trials, stop the study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + * + * @return The maxNumTrialsNoProgress. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getMaxNumTrialsNoProgress() { + return maxNumTrialsNoProgress_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : maxNumTrialsNoProgress_; + } + /** + * + * + *
+     * If the objective value has not improved for this many consecutive
+     * trials, stop the study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getMaxNumTrialsNoProgressOrBuilder() { + return maxNumTrialsNoProgress_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : maxNumTrialsNoProgress_; + } + + public static final int MAX_DURATION_NO_PROGRESS_FIELD_NUMBER = 7; + private com.google.protobuf.Duration maxDurationNoProgress_; + /** + * + * + *
+     * If the objective value has not improved for this much time, stop the
+     * study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + * + * @return Whether the maxDurationNoProgress field is set. + */ + @java.lang.Override + public boolean hasMaxDurationNoProgress() { + return maxDurationNoProgress_ != null; + } + /** + * + * + *
+     * If the objective value has not improved for this much time, stop the
+     * study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + * + * @return The maxDurationNoProgress. + */ + @java.lang.Override + public com.google.protobuf.Duration getMaxDurationNoProgress() { + return maxDurationNoProgress_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maxDurationNoProgress_; + } + /** + * + * + *
+     * If the objective value has not improved for this much time, stop the
+     * study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMaxDurationNoProgressOrBuilder() { + return maxDurationNoProgress_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maxDurationNoProgress_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (shouldStopAsap_ != null) { + output.writeMessage(1, getShouldStopAsap()); + } + if (minimumRuntimeConstraint_ != null) { + output.writeMessage(2, getMinimumRuntimeConstraint()); + } + if (maximumRuntimeConstraint_ != null) { + output.writeMessage(3, getMaximumRuntimeConstraint()); + } + if (minNumTrials_ != null) { + output.writeMessage(4, getMinNumTrials()); + } + if (maxNumTrials_ != null) { + output.writeMessage(5, getMaxNumTrials()); + } + if (maxNumTrialsNoProgress_ != null) { + output.writeMessage(6, getMaxNumTrialsNoProgress()); + } + if (maxDurationNoProgress_ != null) { + output.writeMessage(7, getMaxDurationNoProgress()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (shouldStopAsap_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getShouldStopAsap()); + } + if (minimumRuntimeConstraint_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, getMinimumRuntimeConstraint()); + } + if (maximumRuntimeConstraint_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getMaximumRuntimeConstraint()); + } + if (minNumTrials_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getMinNumTrials()); + } + if (maxNumTrials_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getMaxNumTrials()); + } + if (maxNumTrialsNoProgress_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, getMaxNumTrialsNoProgress()); + } + if (maxDurationNoProgress_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(7, getMaxDurationNoProgress()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig other = + (com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig) obj; + + if (hasShouldStopAsap() != other.hasShouldStopAsap()) return false; + if (hasShouldStopAsap()) { + if (!getShouldStopAsap().equals(other.getShouldStopAsap())) return false; + } + if (hasMinimumRuntimeConstraint() != other.hasMinimumRuntimeConstraint()) return false; + if (hasMinimumRuntimeConstraint()) { + if (!getMinimumRuntimeConstraint().equals(other.getMinimumRuntimeConstraint())) + return false; + } + if (hasMaximumRuntimeConstraint() != other.hasMaximumRuntimeConstraint()) return false; + if (hasMaximumRuntimeConstraint()) { + if (!getMaximumRuntimeConstraint().equals(other.getMaximumRuntimeConstraint())) + return false; + } + if (hasMinNumTrials() != other.hasMinNumTrials()) return false; + if (hasMinNumTrials()) { + if (!getMinNumTrials().equals(other.getMinNumTrials())) return false; + } + if (hasMaxNumTrials() != other.hasMaxNumTrials()) return false; + if (hasMaxNumTrials()) { + if (!getMaxNumTrials().equals(other.getMaxNumTrials())) return false; + } + if (hasMaxNumTrialsNoProgress() != other.hasMaxNumTrialsNoProgress()) return false; + if (hasMaxNumTrialsNoProgress()) { + if (!getMaxNumTrialsNoProgress().equals(other.getMaxNumTrialsNoProgress())) return false; + } + if (hasMaxDurationNoProgress() != other.hasMaxDurationNoProgress()) return false; + if (hasMaxDurationNoProgress()) { + if (!getMaxDurationNoProgress().equals(other.getMaxDurationNoProgress())) return false; + } + if (!getUnknownFields().equals(other.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 (hasShouldStopAsap()) { + hash = (37 * hash) + SHOULD_STOP_ASAP_FIELD_NUMBER; + hash = (53 * hash) + getShouldStopAsap().hashCode(); + } + if (hasMinimumRuntimeConstraint()) { + hash = (37 * hash) + MINIMUM_RUNTIME_CONSTRAINT_FIELD_NUMBER; + hash = (53 * hash) + getMinimumRuntimeConstraint().hashCode(); + } + if (hasMaximumRuntimeConstraint()) { + hash = (37 * hash) + MAXIMUM_RUNTIME_CONSTRAINT_FIELD_NUMBER; + hash = (53 * hash) + getMaximumRuntimeConstraint().hashCode(); + } + if (hasMinNumTrials()) { + hash = (37 * hash) + MIN_NUM_TRIALS_FIELD_NUMBER; + hash = (53 * hash) + getMinNumTrials().hashCode(); + } + if (hasMaxNumTrials()) { + hash = (37 * hash) + MAX_NUM_TRIALS_FIELD_NUMBER; + hash = (53 * hash) + getMaxNumTrials().hashCode(); + } + if (hasMaxNumTrialsNoProgress()) { + hash = (37 * hash) + MAX_NUM_TRIALS_NO_PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getMaxNumTrialsNoProgress().hashCode(); + } + if (hasMaxDurationNoProgress()) { + hash = (37 * hash) + MAX_DURATION_NO_PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getMaxDurationNoProgress().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 (stopping conditions) for automated stopping of a Study.
+     * Conditions include trial budgets, time budgets, and convergence detection.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig) + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_StudyStoppingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_StudyStoppingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig.class, + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + shouldStopAsap_ = null; + if (shouldStopAsapBuilder_ != null) { + shouldStopAsapBuilder_.dispose(); + shouldStopAsapBuilder_ = null; + } + minimumRuntimeConstraint_ = null; + if (minimumRuntimeConstraintBuilder_ != null) { + minimumRuntimeConstraintBuilder_.dispose(); + minimumRuntimeConstraintBuilder_ = null; + } + maximumRuntimeConstraint_ = null; + if (maximumRuntimeConstraintBuilder_ != null) { + maximumRuntimeConstraintBuilder_.dispose(); + maximumRuntimeConstraintBuilder_ = null; + } + minNumTrials_ = null; + if (minNumTrialsBuilder_ != null) { + minNumTrialsBuilder_.dispose(); + minNumTrialsBuilder_ = null; + } + maxNumTrials_ = null; + if (maxNumTrialsBuilder_ != null) { + maxNumTrialsBuilder_.dispose(); + maxNumTrialsBuilder_ = null; + } + maxNumTrialsNoProgress_ = null; + if (maxNumTrialsNoProgressBuilder_ != null) { + maxNumTrialsNoProgressBuilder_.dispose(); + maxNumTrialsNoProgressBuilder_ = null; + } + maxDurationNoProgress_ = null; + if (maxDurationNoProgressBuilder_ != null) { + maxDurationNoProgressBuilder_.dispose(); + maxDurationNoProgressBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_StudyStoppingConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig build() { + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig buildPartial() { + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig result = + new com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.shouldStopAsap_ = + shouldStopAsapBuilder_ == null ? shouldStopAsap_ : shouldStopAsapBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.minimumRuntimeConstraint_ = + minimumRuntimeConstraintBuilder_ == null + ? minimumRuntimeConstraint_ + : minimumRuntimeConstraintBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.maximumRuntimeConstraint_ = + maximumRuntimeConstraintBuilder_ == null + ? maximumRuntimeConstraint_ + : maximumRuntimeConstraintBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.minNumTrials_ = + minNumTrialsBuilder_ == null ? minNumTrials_ : minNumTrialsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.maxNumTrials_ = + maxNumTrialsBuilder_ == null ? maxNumTrials_ : maxNumTrialsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.maxNumTrialsNoProgress_ = + maxNumTrialsNoProgressBuilder_ == null + ? maxNumTrialsNoProgress_ + : maxNumTrialsNoProgressBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.maxDurationNoProgress_ = + maxDurationNoProgressBuilder_ == null + ? maxDurationNoProgress_ + : maxDurationNoProgressBuilder_.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.aiplatform.v1.StudySpec.StudyStoppingConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig other) { + if (other + == com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig.getDefaultInstance()) + return this; + if (other.hasShouldStopAsap()) { + mergeShouldStopAsap(other.getShouldStopAsap()); + } + if (other.hasMinimumRuntimeConstraint()) { + mergeMinimumRuntimeConstraint(other.getMinimumRuntimeConstraint()); + } + if (other.hasMaximumRuntimeConstraint()) { + mergeMaximumRuntimeConstraint(other.getMaximumRuntimeConstraint()); + } + if (other.hasMinNumTrials()) { + mergeMinNumTrials(other.getMinNumTrials()); + } + if (other.hasMaxNumTrials()) { + mergeMaxNumTrials(other.getMaxNumTrials()); + } + if (other.hasMaxNumTrialsNoProgress()) { + mergeMaxNumTrialsNoProgress(other.getMaxNumTrialsNoProgress()); + } + if (other.hasMaxDurationNoProgress()) { + mergeMaxDurationNoProgress(other.getMaxDurationNoProgress()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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( + getShouldStopAsapFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getMinimumRuntimeConstraintFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getMaximumRuntimeConstraintFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getMinNumTrialsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getMaxNumTrialsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + getMaxNumTrialsNoProgressFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + getMaxDurationNoProgressFieldBuilder().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 com.google.protobuf.BoolValue shouldStopAsap_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + shouldStopAsapBuilder_; + /** + * + * + *
+       * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+       * STOPPING state.
+       *
+       * The bottom line is: set to true if you want to interrupt on-going
+       * evaluations of Trials as soon as the study stopping condition is met.
+       * (Please see Study.State documentation for the source of truth).
+       * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + * + * @return Whether the shouldStopAsap field is set. + */ + public boolean hasShouldStopAsap() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+       * STOPPING state.
+       *
+       * The bottom line is: set to true if you want to interrupt on-going
+       * evaluations of Trials as soon as the study stopping condition is met.
+       * (Please see Study.State documentation for the source of truth).
+       * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + * + * @return The shouldStopAsap. + */ + public com.google.protobuf.BoolValue getShouldStopAsap() { + if (shouldStopAsapBuilder_ == null) { + return shouldStopAsap_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : shouldStopAsap_; + } else { + return shouldStopAsapBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+       * STOPPING state.
+       *
+       * The bottom line is: set to true if you want to interrupt on-going
+       * evaluations of Trials as soon as the study stopping condition is met.
+       * (Please see Study.State documentation for the source of truth).
+       * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + */ + public Builder setShouldStopAsap(com.google.protobuf.BoolValue value) { + if (shouldStopAsapBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + shouldStopAsap_ = value; + } else { + shouldStopAsapBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+       * STOPPING state.
+       *
+       * The bottom line is: set to true if you want to interrupt on-going
+       * evaluations of Trials as soon as the study stopping condition is met.
+       * (Please see Study.State documentation for the source of truth).
+       * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + */ + public Builder setShouldStopAsap(com.google.protobuf.BoolValue.Builder builderForValue) { + if (shouldStopAsapBuilder_ == null) { + shouldStopAsap_ = builderForValue.build(); + } else { + shouldStopAsapBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+       * STOPPING state.
+       *
+       * The bottom line is: set to true if you want to interrupt on-going
+       * evaluations of Trials as soon as the study stopping condition is met.
+       * (Please see Study.State documentation for the source of truth).
+       * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + */ + public Builder mergeShouldStopAsap(com.google.protobuf.BoolValue value) { + if (shouldStopAsapBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && shouldStopAsap_ != null + && shouldStopAsap_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getShouldStopAsapBuilder().mergeFrom(value); + } else { + shouldStopAsap_ = value; + } + } else { + shouldStopAsapBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+       * STOPPING state.
+       *
+       * The bottom line is: set to true if you want to interrupt on-going
+       * evaluations of Trials as soon as the study stopping condition is met.
+       * (Please see Study.State documentation for the source of truth).
+       * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + */ + public Builder clearShouldStopAsap() { + bitField0_ = (bitField0_ & ~0x00000001); + shouldStopAsap_ = null; + if (shouldStopAsapBuilder_ != null) { + shouldStopAsapBuilder_.dispose(); + shouldStopAsapBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+       * STOPPING state.
+       *
+       * The bottom line is: set to true if you want to interrupt on-going
+       * evaluations of Trials as soon as the study stopping condition is met.
+       * (Please see Study.State documentation for the source of truth).
+       * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + */ + public com.google.protobuf.BoolValue.Builder getShouldStopAsapBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getShouldStopAsapFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+       * STOPPING state.
+       *
+       * The bottom line is: set to true if you want to interrupt on-going
+       * evaluations of Trials as soon as the study stopping condition is met.
+       * (Please see Study.State documentation for the source of truth).
+       * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + */ + public com.google.protobuf.BoolValueOrBuilder getShouldStopAsapOrBuilder() { + if (shouldStopAsapBuilder_ != null) { + return shouldStopAsapBuilder_.getMessageOrBuilder(); + } else { + return shouldStopAsap_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : shouldStopAsap_; + } + } + /** + * + * + *
+       * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+       * STOPPING state.
+       *
+       * The bottom line is: set to true if you want to interrupt on-going
+       * evaluations of Trials as soon as the study stopping condition is met.
+       * (Please see Study.State documentation for the source of truth).
+       * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + getShouldStopAsapFieldBuilder() { + if (shouldStopAsapBuilder_ == null) { + shouldStopAsapBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder>( + getShouldStopAsap(), getParentForChildren(), isClean()); + shouldStopAsap_ = null; + } + return shouldStopAsapBuilder_; + } + + private com.google.cloud.aiplatform.v1.StudyTimeConstraint minimumRuntimeConstraint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudyTimeConstraint, + com.google.cloud.aiplatform.v1.StudyTimeConstraint.Builder, + com.google.cloud.aiplatform.v1.StudyTimeConstraintOrBuilder> + minimumRuntimeConstraintBuilder_; + /** + * + * + *
+       * Each "stopping rule" in this proto specifies an "if" condition. Before
+       * Vizier would generate a new suggestion, it first checks each specified
+       * stopping rule, from top to bottom in this list.
+       * Note that the first few rules (e.g. minimum_runtime_constraint,
+       * min_num_trials) will prevent other stopping rules from being evaluated
+       * until they are met. For example, setting `min_num_trials=5` and
+       * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+       * has 5 COMPLETED trials, even if more than an hour has passed since its
+       * creation. It follows the first applicable rule (whose "if" condition is
+       * satisfied) to make a stopping decision. If none of the specified rules
+       * are applicable, then Vizier decides that the study should not stop.
+       * If Vizier decides that the study should stop, the study enters
+       * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+       * IMPORTANT: The automatic study state transition happens precisely as
+       * described above; that is, deleting trials or updating StudyConfig NEVER
+       * automatically moves the study state back to ACTIVE. If you want to
+       * _resume_ a Study that was stopped, 1) change the stopping conditions if
+       * necessary, 2) activate the study, and then 3) ask for suggestions.
+       * If the specified time or duration has not passed, do not stop the
+       * study.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + * + * @return Whether the minimumRuntimeConstraint field is set. + */ + public boolean hasMinimumRuntimeConstraint() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Each "stopping rule" in this proto specifies an "if" condition. Before
+       * Vizier would generate a new suggestion, it first checks each specified
+       * stopping rule, from top to bottom in this list.
+       * Note that the first few rules (e.g. minimum_runtime_constraint,
+       * min_num_trials) will prevent other stopping rules from being evaluated
+       * until they are met. For example, setting `min_num_trials=5` and
+       * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+       * has 5 COMPLETED trials, even if more than an hour has passed since its
+       * creation. It follows the first applicable rule (whose "if" condition is
+       * satisfied) to make a stopping decision. If none of the specified rules
+       * are applicable, then Vizier decides that the study should not stop.
+       * If Vizier decides that the study should stop, the study enters
+       * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+       * IMPORTANT: The automatic study state transition happens precisely as
+       * described above; that is, deleting trials or updating StudyConfig NEVER
+       * automatically moves the study state back to ACTIVE. If you want to
+       * _resume_ a Study that was stopped, 1) change the stopping conditions if
+       * necessary, 2) activate the study, and then 3) ask for suggestions.
+       * If the specified time or duration has not passed, do not stop the
+       * study.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + * + * @return The minimumRuntimeConstraint. + */ + public com.google.cloud.aiplatform.v1.StudyTimeConstraint getMinimumRuntimeConstraint() { + if (minimumRuntimeConstraintBuilder_ == null) { + return minimumRuntimeConstraint_ == null + ? com.google.cloud.aiplatform.v1.StudyTimeConstraint.getDefaultInstance() + : minimumRuntimeConstraint_; + } else { + return minimumRuntimeConstraintBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Each "stopping rule" in this proto specifies an "if" condition. Before
+       * Vizier would generate a new suggestion, it first checks each specified
+       * stopping rule, from top to bottom in this list.
+       * Note that the first few rules (e.g. minimum_runtime_constraint,
+       * min_num_trials) will prevent other stopping rules from being evaluated
+       * until they are met. For example, setting `min_num_trials=5` and
+       * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+       * has 5 COMPLETED trials, even if more than an hour has passed since its
+       * creation. It follows the first applicable rule (whose "if" condition is
+       * satisfied) to make a stopping decision. If none of the specified rules
+       * are applicable, then Vizier decides that the study should not stop.
+       * If Vizier decides that the study should stop, the study enters
+       * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+       * IMPORTANT: The automatic study state transition happens precisely as
+       * described above; that is, deleting trials or updating StudyConfig NEVER
+       * automatically moves the study state back to ACTIVE. If you want to
+       * _resume_ a Study that was stopped, 1) change the stopping conditions if
+       * necessary, 2) activate the study, and then 3) ask for suggestions.
+       * If the specified time or duration has not passed, do not stop the
+       * study.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + */ + public Builder setMinimumRuntimeConstraint( + com.google.cloud.aiplatform.v1.StudyTimeConstraint value) { + if (minimumRuntimeConstraintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minimumRuntimeConstraint_ = value; + } else { + minimumRuntimeConstraintBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Each "stopping rule" in this proto specifies an "if" condition. Before
+       * Vizier would generate a new suggestion, it first checks each specified
+       * stopping rule, from top to bottom in this list.
+       * Note that the first few rules (e.g. minimum_runtime_constraint,
+       * min_num_trials) will prevent other stopping rules from being evaluated
+       * until they are met. For example, setting `min_num_trials=5` and
+       * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+       * has 5 COMPLETED trials, even if more than an hour has passed since its
+       * creation. It follows the first applicable rule (whose "if" condition is
+       * satisfied) to make a stopping decision. If none of the specified rules
+       * are applicable, then Vizier decides that the study should not stop.
+       * If Vizier decides that the study should stop, the study enters
+       * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+       * IMPORTANT: The automatic study state transition happens precisely as
+       * described above; that is, deleting trials or updating StudyConfig NEVER
+       * automatically moves the study state back to ACTIVE. If you want to
+       * _resume_ a Study that was stopped, 1) change the stopping conditions if
+       * necessary, 2) activate the study, and then 3) ask for suggestions.
+       * If the specified time or duration has not passed, do not stop the
+       * study.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + */ + public Builder setMinimumRuntimeConstraint( + com.google.cloud.aiplatform.v1.StudyTimeConstraint.Builder builderForValue) { + if (minimumRuntimeConstraintBuilder_ == null) { + minimumRuntimeConstraint_ = builderForValue.build(); + } else { + minimumRuntimeConstraintBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Each "stopping rule" in this proto specifies an "if" condition. Before
+       * Vizier would generate a new suggestion, it first checks each specified
+       * stopping rule, from top to bottom in this list.
+       * Note that the first few rules (e.g. minimum_runtime_constraint,
+       * min_num_trials) will prevent other stopping rules from being evaluated
+       * until they are met. For example, setting `min_num_trials=5` and
+       * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+       * has 5 COMPLETED trials, even if more than an hour has passed since its
+       * creation. It follows the first applicable rule (whose "if" condition is
+       * satisfied) to make a stopping decision. If none of the specified rules
+       * are applicable, then Vizier decides that the study should not stop.
+       * If Vizier decides that the study should stop, the study enters
+       * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+       * IMPORTANT: The automatic study state transition happens precisely as
+       * described above; that is, deleting trials or updating StudyConfig NEVER
+       * automatically moves the study state back to ACTIVE. If you want to
+       * _resume_ a Study that was stopped, 1) change the stopping conditions if
+       * necessary, 2) activate the study, and then 3) ask for suggestions.
+       * If the specified time or duration has not passed, do not stop the
+       * study.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + */ + public Builder mergeMinimumRuntimeConstraint( + com.google.cloud.aiplatform.v1.StudyTimeConstraint value) { + if (minimumRuntimeConstraintBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && minimumRuntimeConstraint_ != null + && minimumRuntimeConstraint_ + != com.google.cloud.aiplatform.v1.StudyTimeConstraint.getDefaultInstance()) { + getMinimumRuntimeConstraintBuilder().mergeFrom(value); + } else { + minimumRuntimeConstraint_ = value; + } + } else { + minimumRuntimeConstraintBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Each "stopping rule" in this proto specifies an "if" condition. Before
+       * Vizier would generate a new suggestion, it first checks each specified
+       * stopping rule, from top to bottom in this list.
+       * Note that the first few rules (e.g. minimum_runtime_constraint,
+       * min_num_trials) will prevent other stopping rules from being evaluated
+       * until they are met. For example, setting `min_num_trials=5` and
+       * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+       * has 5 COMPLETED trials, even if more than an hour has passed since its
+       * creation. It follows the first applicable rule (whose "if" condition is
+       * satisfied) to make a stopping decision. If none of the specified rules
+       * are applicable, then Vizier decides that the study should not stop.
+       * If Vizier decides that the study should stop, the study enters
+       * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+       * IMPORTANT: The automatic study state transition happens precisely as
+       * described above; that is, deleting trials or updating StudyConfig NEVER
+       * automatically moves the study state back to ACTIVE. If you want to
+       * _resume_ a Study that was stopped, 1) change the stopping conditions if
+       * necessary, 2) activate the study, and then 3) ask for suggestions.
+       * If the specified time or duration has not passed, do not stop the
+       * study.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + */ + public Builder clearMinimumRuntimeConstraint() { + bitField0_ = (bitField0_ & ~0x00000002); + minimumRuntimeConstraint_ = null; + if (minimumRuntimeConstraintBuilder_ != null) { + minimumRuntimeConstraintBuilder_.dispose(); + minimumRuntimeConstraintBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Each "stopping rule" in this proto specifies an "if" condition. Before
+       * Vizier would generate a new suggestion, it first checks each specified
+       * stopping rule, from top to bottom in this list.
+       * Note that the first few rules (e.g. minimum_runtime_constraint,
+       * min_num_trials) will prevent other stopping rules from being evaluated
+       * until they are met. For example, setting `min_num_trials=5` and
+       * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+       * has 5 COMPLETED trials, even if more than an hour has passed since its
+       * creation. It follows the first applicable rule (whose "if" condition is
+       * satisfied) to make a stopping decision. If none of the specified rules
+       * are applicable, then Vizier decides that the study should not stop.
+       * If Vizier decides that the study should stop, the study enters
+       * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+       * IMPORTANT: The automatic study state transition happens precisely as
+       * described above; that is, deleting trials or updating StudyConfig NEVER
+       * automatically moves the study state back to ACTIVE. If you want to
+       * _resume_ a Study that was stopped, 1) change the stopping conditions if
+       * necessary, 2) activate the study, and then 3) ask for suggestions.
+       * If the specified time or duration has not passed, do not stop the
+       * study.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + */ + public com.google.cloud.aiplatform.v1.StudyTimeConstraint.Builder + getMinimumRuntimeConstraintBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getMinimumRuntimeConstraintFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Each "stopping rule" in this proto specifies an "if" condition. Before
+       * Vizier would generate a new suggestion, it first checks each specified
+       * stopping rule, from top to bottom in this list.
+       * Note that the first few rules (e.g. minimum_runtime_constraint,
+       * min_num_trials) will prevent other stopping rules from being evaluated
+       * until they are met. For example, setting `min_num_trials=5` and
+       * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+       * has 5 COMPLETED trials, even if more than an hour has passed since its
+       * creation. It follows the first applicable rule (whose "if" condition is
+       * satisfied) to make a stopping decision. If none of the specified rules
+       * are applicable, then Vizier decides that the study should not stop.
+       * If Vizier decides that the study should stop, the study enters
+       * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+       * IMPORTANT: The automatic study state transition happens precisely as
+       * described above; that is, deleting trials or updating StudyConfig NEVER
+       * automatically moves the study state back to ACTIVE. If you want to
+       * _resume_ a Study that was stopped, 1) change the stopping conditions if
+       * necessary, 2) activate the study, and then 3) ask for suggestions.
+       * If the specified time or duration has not passed, do not stop the
+       * study.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + */ + public com.google.cloud.aiplatform.v1.StudyTimeConstraintOrBuilder + getMinimumRuntimeConstraintOrBuilder() { + if (minimumRuntimeConstraintBuilder_ != null) { + return minimumRuntimeConstraintBuilder_.getMessageOrBuilder(); + } else { + return minimumRuntimeConstraint_ == null + ? com.google.cloud.aiplatform.v1.StudyTimeConstraint.getDefaultInstance() + : minimumRuntimeConstraint_; + } + } + /** + * + * + *
+       * Each "stopping rule" in this proto specifies an "if" condition. Before
+       * Vizier would generate a new suggestion, it first checks each specified
+       * stopping rule, from top to bottom in this list.
+       * Note that the first few rules (e.g. minimum_runtime_constraint,
+       * min_num_trials) will prevent other stopping rules from being evaluated
+       * until they are met. For example, setting `min_num_trials=5` and
+       * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+       * has 5 COMPLETED trials, even if more than an hour has passed since its
+       * creation. It follows the first applicable rule (whose "if" condition is
+       * satisfied) to make a stopping decision. If none of the specified rules
+       * are applicable, then Vizier decides that the study should not stop.
+       * If Vizier decides that the study should stop, the study enters
+       * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+       * IMPORTANT: The automatic study state transition happens precisely as
+       * described above; that is, deleting trials or updating StudyConfig NEVER
+       * automatically moves the study state back to ACTIVE. If you want to
+       * _resume_ a Study that was stopped, 1) change the stopping conditions if
+       * necessary, 2) activate the study, and then 3) ask for suggestions.
+       * If the specified time or duration has not passed, do not stop the
+       * study.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudyTimeConstraint, + com.google.cloud.aiplatform.v1.StudyTimeConstraint.Builder, + com.google.cloud.aiplatform.v1.StudyTimeConstraintOrBuilder> + getMinimumRuntimeConstraintFieldBuilder() { + if (minimumRuntimeConstraintBuilder_ == null) { + minimumRuntimeConstraintBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudyTimeConstraint, + com.google.cloud.aiplatform.v1.StudyTimeConstraint.Builder, + com.google.cloud.aiplatform.v1.StudyTimeConstraintOrBuilder>( + getMinimumRuntimeConstraint(), getParentForChildren(), isClean()); + minimumRuntimeConstraint_ = null; + } + return minimumRuntimeConstraintBuilder_; + } + + private com.google.cloud.aiplatform.v1.StudyTimeConstraint maximumRuntimeConstraint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudyTimeConstraint, + com.google.cloud.aiplatform.v1.StudyTimeConstraint.Builder, + com.google.cloud.aiplatform.v1.StudyTimeConstraintOrBuilder> + maximumRuntimeConstraintBuilder_; + /** + * + * + *
+       * If the specified time or duration has passed, stop the study.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + * + * @return Whether the maximumRuntimeConstraint field is set. + */ + public boolean hasMaximumRuntimeConstraint() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * If the specified time or duration has passed, stop the study.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + * + * @return The maximumRuntimeConstraint. + */ + public com.google.cloud.aiplatform.v1.StudyTimeConstraint getMaximumRuntimeConstraint() { + if (maximumRuntimeConstraintBuilder_ == null) { + return maximumRuntimeConstraint_ == null + ? com.google.cloud.aiplatform.v1.StudyTimeConstraint.getDefaultInstance() + : maximumRuntimeConstraint_; + } else { + return maximumRuntimeConstraintBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If the specified time or duration has passed, stop the study.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + */ + public Builder setMaximumRuntimeConstraint( + com.google.cloud.aiplatform.v1.StudyTimeConstraint value) { + if (maximumRuntimeConstraintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maximumRuntimeConstraint_ = value; + } else { + maximumRuntimeConstraintBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * If the specified time or duration has passed, stop the study.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + */ + public Builder setMaximumRuntimeConstraint( + com.google.cloud.aiplatform.v1.StudyTimeConstraint.Builder builderForValue) { + if (maximumRuntimeConstraintBuilder_ == null) { + maximumRuntimeConstraint_ = builderForValue.build(); + } else { + maximumRuntimeConstraintBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * If the specified time or duration has passed, stop the study.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + */ + public Builder mergeMaximumRuntimeConstraint( + com.google.cloud.aiplatform.v1.StudyTimeConstraint value) { + if (maximumRuntimeConstraintBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && maximumRuntimeConstraint_ != null + && maximumRuntimeConstraint_ + != com.google.cloud.aiplatform.v1.StudyTimeConstraint.getDefaultInstance()) { + getMaximumRuntimeConstraintBuilder().mergeFrom(value); + } else { + maximumRuntimeConstraint_ = value; + } + } else { + maximumRuntimeConstraintBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * If the specified time or duration has passed, stop the study.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + */ + public Builder clearMaximumRuntimeConstraint() { + bitField0_ = (bitField0_ & ~0x00000004); + maximumRuntimeConstraint_ = null; + if (maximumRuntimeConstraintBuilder_ != null) { + maximumRuntimeConstraintBuilder_.dispose(); + maximumRuntimeConstraintBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * If the specified time or duration has passed, stop the study.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + */ + public com.google.cloud.aiplatform.v1.StudyTimeConstraint.Builder + getMaximumRuntimeConstraintBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMaximumRuntimeConstraintFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If the specified time or duration has passed, stop the study.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + */ + public com.google.cloud.aiplatform.v1.StudyTimeConstraintOrBuilder + getMaximumRuntimeConstraintOrBuilder() { + if (maximumRuntimeConstraintBuilder_ != null) { + return maximumRuntimeConstraintBuilder_.getMessageOrBuilder(); + } else { + return maximumRuntimeConstraint_ == null + ? com.google.cloud.aiplatform.v1.StudyTimeConstraint.getDefaultInstance() + : maximumRuntimeConstraint_; + } + } + /** + * + * + *
+       * If the specified time or duration has passed, stop the study.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudyTimeConstraint, + com.google.cloud.aiplatform.v1.StudyTimeConstraint.Builder, + com.google.cloud.aiplatform.v1.StudyTimeConstraintOrBuilder> + getMaximumRuntimeConstraintFieldBuilder() { + if (maximumRuntimeConstraintBuilder_ == null) { + maximumRuntimeConstraintBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudyTimeConstraint, + com.google.cloud.aiplatform.v1.StudyTimeConstraint.Builder, + com.google.cloud.aiplatform.v1.StudyTimeConstraintOrBuilder>( + getMaximumRuntimeConstraint(), getParentForChildren(), isClean()); + maximumRuntimeConstraint_ = null; + } + return maximumRuntimeConstraintBuilder_; + } + + private com.google.protobuf.Int32Value minNumTrials_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + minNumTrialsBuilder_; + /** + * + * + *
+       * If there are fewer than this many COMPLETED trials, do not stop the
+       * study.
+       * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + * + * @return Whether the minNumTrials field is set. + */ + public boolean hasMinNumTrials() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * If there are fewer than this many COMPLETED trials, do not stop the
+       * study.
+       * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + * + * @return The minNumTrials. + */ + public com.google.protobuf.Int32Value getMinNumTrials() { + if (minNumTrialsBuilder_ == null) { + return minNumTrials_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : minNumTrials_; + } else { + return minNumTrialsBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If there are fewer than this many COMPLETED trials, do not stop the
+       * study.
+       * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + */ + public Builder setMinNumTrials(com.google.protobuf.Int32Value value) { + if (minNumTrialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minNumTrials_ = value; + } else { + minNumTrialsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * If there are fewer than this many COMPLETED trials, do not stop the
+       * study.
+       * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + */ + public Builder setMinNumTrials(com.google.protobuf.Int32Value.Builder builderForValue) { + if (minNumTrialsBuilder_ == null) { + minNumTrials_ = builderForValue.build(); + } else { + minNumTrialsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * If there are fewer than this many COMPLETED trials, do not stop the
+       * study.
+       * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + */ + public Builder mergeMinNumTrials(com.google.protobuf.Int32Value value) { + if (minNumTrialsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && minNumTrials_ != null + && minNumTrials_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getMinNumTrialsBuilder().mergeFrom(value); + } else { + minNumTrials_ = value; + } + } else { + minNumTrialsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * If there are fewer than this many COMPLETED trials, do not stop the
+       * study.
+       * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + */ + public Builder clearMinNumTrials() { + bitField0_ = (bitField0_ & ~0x00000008); + minNumTrials_ = null; + if (minNumTrialsBuilder_ != null) { + minNumTrialsBuilder_.dispose(); + minNumTrialsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * If there are fewer than this many COMPLETED trials, do not stop the
+       * study.
+       * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + */ + public com.google.protobuf.Int32Value.Builder getMinNumTrialsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getMinNumTrialsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If there are fewer than this many COMPLETED trials, do not stop the
+       * study.
+       * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + */ + public com.google.protobuf.Int32ValueOrBuilder getMinNumTrialsOrBuilder() { + if (minNumTrialsBuilder_ != null) { + return minNumTrialsBuilder_.getMessageOrBuilder(); + } else { + return minNumTrials_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : minNumTrials_; + } + } + /** + * + * + *
+       * If there are fewer than this many COMPLETED trials, do not stop the
+       * study.
+       * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getMinNumTrialsFieldBuilder() { + if (minNumTrialsBuilder_ == null) { + minNumTrialsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getMinNumTrials(), getParentForChildren(), isClean()); + minNumTrials_ = null; + } + return minNumTrialsBuilder_; + } + + private com.google.protobuf.Int32Value maxNumTrials_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + maxNumTrialsBuilder_; + /** + * + * + *
+       * If there are more than this many trials, stop the study.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + * + * @return Whether the maxNumTrials field is set. + */ + public boolean hasMaxNumTrials() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+       * If there are more than this many trials, stop the study.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + * + * @return The maxNumTrials. + */ + public com.google.protobuf.Int32Value getMaxNumTrials() { + if (maxNumTrialsBuilder_ == null) { + return maxNumTrials_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : maxNumTrials_; + } else { + return maxNumTrialsBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If there are more than this many trials, stop the study.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + */ + public Builder setMaxNumTrials(com.google.protobuf.Int32Value value) { + if (maxNumTrialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxNumTrials_ = value; + } else { + maxNumTrialsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * If there are more than this many trials, stop the study.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + */ + public Builder setMaxNumTrials(com.google.protobuf.Int32Value.Builder builderForValue) { + if (maxNumTrialsBuilder_ == null) { + maxNumTrials_ = builderForValue.build(); + } else { + maxNumTrialsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * If there are more than this many trials, stop the study.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + */ + public Builder mergeMaxNumTrials(com.google.protobuf.Int32Value value) { + if (maxNumTrialsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && maxNumTrials_ != null + && maxNumTrials_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getMaxNumTrialsBuilder().mergeFrom(value); + } else { + maxNumTrials_ = value; + } + } else { + maxNumTrialsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * If there are more than this many trials, stop the study.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + */ + public Builder clearMaxNumTrials() { + bitField0_ = (bitField0_ & ~0x00000010); + maxNumTrials_ = null; + if (maxNumTrialsBuilder_ != null) { + maxNumTrialsBuilder_.dispose(); + maxNumTrialsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * If there are more than this many trials, stop the study.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + */ + public com.google.protobuf.Int32Value.Builder getMaxNumTrialsBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getMaxNumTrialsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If there are more than this many trials, stop the study.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + */ + public com.google.protobuf.Int32ValueOrBuilder getMaxNumTrialsOrBuilder() { + if (maxNumTrialsBuilder_ != null) { + return maxNumTrialsBuilder_.getMessageOrBuilder(); + } else { + return maxNumTrials_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : maxNumTrials_; + } + } + /** + * + * + *
+       * If there are more than this many trials, stop the study.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getMaxNumTrialsFieldBuilder() { + if (maxNumTrialsBuilder_ == null) { + maxNumTrialsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getMaxNumTrials(), getParentForChildren(), isClean()); + maxNumTrials_ = null; + } + return maxNumTrialsBuilder_; + } + + private com.google.protobuf.Int32Value maxNumTrialsNoProgress_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + maxNumTrialsNoProgressBuilder_; + /** + * + * + *
+       * If the objective value has not improved for this many consecutive
+       * trials, stop the study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + * + * @return Whether the maxNumTrialsNoProgress field is set. + */ + public boolean hasMaxNumTrialsNoProgress() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+       * If the objective value has not improved for this many consecutive
+       * trials, stop the study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + * + * @return The maxNumTrialsNoProgress. + */ + public com.google.protobuf.Int32Value getMaxNumTrialsNoProgress() { + if (maxNumTrialsNoProgressBuilder_ == null) { + return maxNumTrialsNoProgress_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : maxNumTrialsNoProgress_; + } else { + return maxNumTrialsNoProgressBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If the objective value has not improved for this many consecutive
+       * trials, stop the study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + */ + public Builder setMaxNumTrialsNoProgress(com.google.protobuf.Int32Value value) { + if (maxNumTrialsNoProgressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxNumTrialsNoProgress_ = value; + } else { + maxNumTrialsNoProgressBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * If the objective value has not improved for this many consecutive
+       * trials, stop the study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + */ + public Builder setMaxNumTrialsNoProgress( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (maxNumTrialsNoProgressBuilder_ == null) { + maxNumTrialsNoProgress_ = builderForValue.build(); + } else { + maxNumTrialsNoProgressBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * If the objective value has not improved for this many consecutive
+       * trials, stop the study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + */ + public Builder mergeMaxNumTrialsNoProgress(com.google.protobuf.Int32Value value) { + if (maxNumTrialsNoProgressBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && maxNumTrialsNoProgress_ != null + && maxNumTrialsNoProgress_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getMaxNumTrialsNoProgressBuilder().mergeFrom(value); + } else { + maxNumTrialsNoProgress_ = value; + } + } else { + maxNumTrialsNoProgressBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * If the objective value has not improved for this many consecutive
+       * trials, stop the study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + */ + public Builder clearMaxNumTrialsNoProgress() { + bitField0_ = (bitField0_ & ~0x00000020); + maxNumTrialsNoProgress_ = null; + if (maxNumTrialsNoProgressBuilder_ != null) { + maxNumTrialsNoProgressBuilder_.dispose(); + maxNumTrialsNoProgressBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * If the objective value has not improved for this many consecutive
+       * trials, stop the study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + */ + public com.google.protobuf.Int32Value.Builder getMaxNumTrialsNoProgressBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getMaxNumTrialsNoProgressFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If the objective value has not improved for this many consecutive
+       * trials, stop the study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + */ + public com.google.protobuf.Int32ValueOrBuilder getMaxNumTrialsNoProgressOrBuilder() { + if (maxNumTrialsNoProgressBuilder_ != null) { + return maxNumTrialsNoProgressBuilder_.getMessageOrBuilder(); + } else { + return maxNumTrialsNoProgress_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : maxNumTrialsNoProgress_; + } + } + /** + * + * + *
+       * If the objective value has not improved for this many consecutive
+       * trials, stop the study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getMaxNumTrialsNoProgressFieldBuilder() { + if (maxNumTrialsNoProgressBuilder_ == null) { + maxNumTrialsNoProgressBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getMaxNumTrialsNoProgress(), getParentForChildren(), isClean()); + maxNumTrialsNoProgress_ = null; + } + return maxNumTrialsNoProgressBuilder_; + } + + private com.google.protobuf.Duration maxDurationNoProgress_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + maxDurationNoProgressBuilder_; + /** + * + * + *
+       * If the objective value has not improved for this much time, stop the
+       * study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + * + * @return Whether the maxDurationNoProgress field is set. + */ + public boolean hasMaxDurationNoProgress() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+       * If the objective value has not improved for this much time, stop the
+       * study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + * + * @return The maxDurationNoProgress. + */ + public com.google.protobuf.Duration getMaxDurationNoProgress() { + if (maxDurationNoProgressBuilder_ == null) { + return maxDurationNoProgress_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maxDurationNoProgress_; + } else { + return maxDurationNoProgressBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If the objective value has not improved for this much time, stop the
+       * study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + */ + public Builder setMaxDurationNoProgress(com.google.protobuf.Duration value) { + if (maxDurationNoProgressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxDurationNoProgress_ = value; + } else { + maxDurationNoProgressBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * If the objective value has not improved for this much time, stop the
+       * study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + */ + public Builder setMaxDurationNoProgress( + com.google.protobuf.Duration.Builder builderForValue) { + if (maxDurationNoProgressBuilder_ == null) { + maxDurationNoProgress_ = builderForValue.build(); + } else { + maxDurationNoProgressBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * If the objective value has not improved for this much time, stop the
+       * study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + */ + public Builder mergeMaxDurationNoProgress(com.google.protobuf.Duration value) { + if (maxDurationNoProgressBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && maxDurationNoProgress_ != null + && maxDurationNoProgress_ != com.google.protobuf.Duration.getDefaultInstance()) { + getMaxDurationNoProgressBuilder().mergeFrom(value); + } else { + maxDurationNoProgress_ = value; + } + } else { + maxDurationNoProgressBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * If the objective value has not improved for this much time, stop the
+       * study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + */ + public Builder clearMaxDurationNoProgress() { + bitField0_ = (bitField0_ & ~0x00000040); + maxDurationNoProgress_ = null; + if (maxDurationNoProgressBuilder_ != null) { + maxDurationNoProgressBuilder_.dispose(); + maxDurationNoProgressBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * If the objective value has not improved for this much time, stop the
+       * study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + */ + public com.google.protobuf.Duration.Builder getMaxDurationNoProgressBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getMaxDurationNoProgressFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If the objective value has not improved for this much time, stop the
+       * study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + */ + public com.google.protobuf.DurationOrBuilder getMaxDurationNoProgressOrBuilder() { + if (maxDurationNoProgressBuilder_ != null) { + return maxDurationNoProgressBuilder_.getMessageOrBuilder(); + } else { + return maxDurationNoProgress_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maxDurationNoProgress_; + } + } + /** + * + * + *
+       * If the objective value has not improved for this much time, stop the
+       * study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getMaxDurationNoProgressFieldBuilder() { + if (maxDurationNoProgressBuilder_ == null) { + maxDurationNoProgressBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getMaxDurationNoProgress(), getParentForChildren(), isClean()); + maxDurationNoProgress_ = null; + } + return maxDurationNoProgressBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig) + private static final com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig(); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StudyStoppingConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; private int automatedStoppingSpecCase_ = 0; @SuppressWarnings("serial") @@ -17877,6 +20943,66 @@ public int getMeasurementSelectionTypeValue() { : result; } + public static final int STUDY_STOPPING_CONFIG_FIELD_NUMBER = 11; + private com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig studyStoppingConfig_; + /** + * + * + *
+   * Conditions for automated stopping of a Study. Enable automated stopping by
+   * configuring at least one condition.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + * + * @return Whether the studyStoppingConfig field is set. + */ + @java.lang.Override + public boolean hasStudyStoppingConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Conditions for automated stopping of a Study. Enable automated stopping by
+   * configuring at least one condition.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + * + * @return The studyStoppingConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig getStudyStoppingConfig() { + return studyStoppingConfig_ == null + ? com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig.getDefaultInstance() + : studyStoppingConfig_; + } + /** + * + * + *
+   * Conditions for automated stopping of a Study. Enable automated stopping by
+   * configuring at least one condition.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfigOrBuilder + getStudyStoppingConfigOrBuilder() { + return studyStoppingConfig_ == null + ? com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig.getDefaultInstance() + : studyStoppingConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -17930,6 +21056,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io (com.google.cloud.aiplatform.v1.StudySpec.ConvexAutomatedStoppingSpec) automatedStoppingSpec_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(11, getStudyStoppingConfig()); + } getUnknownFields().writeTo(output); } @@ -17981,6 +21110,10 @@ public int getSerializedSize() { (com.google.cloud.aiplatform.v1.StudySpec.ConvexAutomatedStoppingSpec) automatedStoppingSpec_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(11, getStudyStoppingConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -18001,6 +21134,10 @@ public boolean equals(final java.lang.Object obj) { if (algorithm_ != other.algorithm_) return false; if (observationNoise_ != other.observationNoise_) return false; if (measurementSelectionType_ != other.measurementSelectionType_) return false; + if (hasStudyStoppingConfig() != other.hasStudyStoppingConfig()) return false; + if (hasStudyStoppingConfig()) { + if (!getStudyStoppingConfig().equals(other.getStudyStoppingConfig())) return false; + } if (!getAutomatedStoppingSpecCase().equals(other.getAutomatedStoppingSpecCase())) return false; switch (automatedStoppingSpecCase_) { case 4: @@ -18042,6 +21179,10 @@ public int hashCode() { hash = (53 * hash) + observationNoise_; hash = (37 * hash) + MEASUREMENT_SELECTION_TYPE_FIELD_NUMBER; hash = (53 * hash) + measurementSelectionType_; + if (hasStudyStoppingConfig()) { + hash = (37 * hash) + STUDY_STOPPING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getStudyStoppingConfig().hashCode(); + } switch (automatedStoppingSpecCase_) { case 4: hash = (37 * hash) + DECAY_CURVE_STOPPING_SPEC_FIELD_NUMBER; @@ -18187,10 +21328,21 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.aiplatform.v1.StudySpec.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMetricsFieldBuilder(); + getParametersFieldBuilder(); + getStudyStoppingConfigFieldBuilder(); + } } @java.lang.Override @@ -18223,6 +21375,11 @@ public Builder clear() { algorithm_ = 0; observationNoise_ = 0; measurementSelectionType_ = 0; + studyStoppingConfig_ = null; + if (studyStoppingConfigBuilder_ != null) { + studyStoppingConfigBuilder_.dispose(); + studyStoppingConfigBuilder_ = null; + } automatedStoppingSpecCase_ = 0; automatedStoppingSpec_ = null; return this; @@ -18293,6 +21450,15 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.StudySpec result) { if (((from_bitField0_ & 0x00000080) != 0)) { result.measurementSelectionType_ = measurementSelectionType_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000100) != 0)) { + result.studyStoppingConfig_ = + studyStoppingConfigBuilder_ == null + ? studyStoppingConfig_ + : studyStoppingConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } private void buildPartialOneofs(com.google.cloud.aiplatform.v1.StudySpec result) { @@ -18417,6 +21583,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.StudySpec other) { if (other.measurementSelectionType_ != 0) { setMeasurementSelectionTypeValue(other.getMeasurementSelectionTypeValue()); } + if (other.hasStudyStoppingConfig()) { + mergeStudyStoppingConfig(other.getStudyStoppingConfig()); + } switch (other.getAutomatedStoppingSpecCase()) { case DECAY_CURVE_STOPPING_SPEC: { @@ -18531,6 +21700,13 @@ public Builder mergeFrom( automatedStoppingSpecCase_ = 9; break; } // case 74 + case 90: + { + input.readMessage( + getStudyStoppingConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 90 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -20385,6 +23561,223 @@ public Builder clearMeasurementSelectionType() { return this; } + private com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig studyStoppingConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig, + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig.Builder, + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfigOrBuilder> + studyStoppingConfigBuilder_; + /** + * + * + *
+     * Conditions for automated stopping of a Study. Enable automated stopping by
+     * configuring at least one condition.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + * + * @return Whether the studyStoppingConfig field is set. + */ + public boolean hasStudyStoppingConfig() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Conditions for automated stopping of a Study. Enable automated stopping by
+     * configuring at least one condition.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + * + * @return The studyStoppingConfig. + */ + public com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig getStudyStoppingConfig() { + if (studyStoppingConfigBuilder_ == null) { + return studyStoppingConfig_ == null + ? com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig.getDefaultInstance() + : studyStoppingConfig_; + } else { + return studyStoppingConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Conditions for automated stopping of a Study. Enable automated stopping by
+     * configuring at least one condition.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + */ + public Builder setStudyStoppingConfig( + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig value) { + if (studyStoppingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + studyStoppingConfig_ = value; + } else { + studyStoppingConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Conditions for automated stopping of a Study. Enable automated stopping by
+     * configuring at least one condition.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + */ + public Builder setStudyStoppingConfig( + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig.Builder builderForValue) { + if (studyStoppingConfigBuilder_ == null) { + studyStoppingConfig_ = builderForValue.build(); + } else { + studyStoppingConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Conditions for automated stopping of a Study. Enable automated stopping by
+     * configuring at least one condition.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + */ + public Builder mergeStudyStoppingConfig( + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig value) { + if (studyStoppingConfigBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && studyStoppingConfig_ != null + && studyStoppingConfig_ + != com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig + .getDefaultInstance()) { + getStudyStoppingConfigBuilder().mergeFrom(value); + } else { + studyStoppingConfig_ = value; + } + } else { + studyStoppingConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Conditions for automated stopping of a Study. Enable automated stopping by
+     * configuring at least one condition.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + */ + public Builder clearStudyStoppingConfig() { + bitField0_ = (bitField0_ & ~0x00000100); + studyStoppingConfig_ = null; + if (studyStoppingConfigBuilder_ != null) { + studyStoppingConfigBuilder_.dispose(); + studyStoppingConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Conditions for automated stopping of a Study. Enable automated stopping by
+     * configuring at least one condition.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig.Builder + getStudyStoppingConfigBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getStudyStoppingConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Conditions for automated stopping of a Study. Enable automated stopping by
+     * configuring at least one condition.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfigOrBuilder + getStudyStoppingConfigOrBuilder() { + if (studyStoppingConfigBuilder_ != null) { + return studyStoppingConfigBuilder_.getMessageOrBuilder(); + } else { + return studyStoppingConfig_ == null + ? com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig.getDefaultInstance() + : studyStoppingConfig_; + } + } + /** + * + * + *
+     * Conditions for automated stopping of a Study. Enable automated stopping by
+     * configuring at least one condition.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig, + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig.Builder, + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfigOrBuilder> + getStudyStoppingConfigFieldBuilder() { + if (studyStoppingConfigBuilder_ == null) { + studyStoppingConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig, + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig.Builder, + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfigOrBuilder>( + getStudyStoppingConfig(), getParentForChildren(), isClean()); + studyStoppingConfig_ = null; + } + return studyStoppingConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudySpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudySpecOrBuilder.java index 93563231b33e..65ff4f027035 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudySpecOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudySpecOrBuilder.java @@ -359,5 +359,50 @@ public interface StudySpecOrBuilder */ com.google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType getMeasurementSelectionType(); + /** + * + * + *
+   * Conditions for automated stopping of a Study. Enable automated stopping by
+   * configuring at least one condition.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + * + * @return Whether the studyStoppingConfig field is set. + */ + boolean hasStudyStoppingConfig(); + /** + * + * + *
+   * Conditions for automated stopping of a Study. Enable automated stopping by
+   * configuring at least one condition.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + * + * @return The studyStoppingConfig. + */ + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig getStudyStoppingConfig(); + /** + * + * + *
+   * Conditions for automated stopping of a Study. Enable automated stopping by
+   * configuring at least one condition.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + */ + com.google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfigOrBuilder + getStudyStoppingConfigOrBuilder(); + com.google.cloud.aiplatform.v1.StudySpec.AutomatedStoppingSpecCase getAutomatedStoppingSpecCase(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudyTimeConstraint.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudyTimeConstraint.java new file mode 100644 index 000000000000..ed3be4d100b5 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudyTimeConstraint.java @@ -0,0 +1,1103 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/study.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Time-based Constraint for Study
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StudyTimeConstraint} + */ +public final class StudyTimeConstraint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StudyTimeConstraint) + StudyTimeConstraintOrBuilder { + private static final long serialVersionUID = 0L; + // Use StudyTimeConstraint.newBuilder() to construct. + private StudyTimeConstraint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StudyTimeConstraint() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StudyTimeConstraint(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudyTimeConstraint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudyTimeConstraint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudyTimeConstraint.class, + com.google.cloud.aiplatform.v1.StudyTimeConstraint.Builder.class); + } + + private int constraintCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object constraint_; + + public enum ConstraintCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MAX_DURATION(1), + END_TIME(2), + CONSTRAINT_NOT_SET(0); + private final int value; + + private ConstraintCase(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 ConstraintCase valueOf(int value) { + return forNumber(value); + } + + public static ConstraintCase forNumber(int value) { + switch (value) { + case 1: + return MAX_DURATION; + case 2: + return END_TIME; + case 0: + return CONSTRAINT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ConstraintCase getConstraintCase() { + return ConstraintCase.forNumber(constraintCase_); + } + + public static final int MAX_DURATION_FIELD_NUMBER = 1; + /** + * + * + *
+   * Counts the wallclock time passed since the creation of this Study.
+   * 
+ * + * .google.protobuf.Duration max_duration = 1; + * + * @return Whether the maxDuration field is set. + */ + @java.lang.Override + public boolean hasMaxDuration() { + return constraintCase_ == 1; + } + /** + * + * + *
+   * Counts the wallclock time passed since the creation of this Study.
+   * 
+ * + * .google.protobuf.Duration max_duration = 1; + * + * @return The maxDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getMaxDuration() { + if (constraintCase_ == 1) { + return (com.google.protobuf.Duration) constraint_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + /** + * + * + *
+   * Counts the wallclock time passed since the creation of this Study.
+   * 
+ * + * .google.protobuf.Duration max_duration = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMaxDurationOrBuilder() { + if (constraintCase_ == 1) { + return (com.google.protobuf.Duration) constraint_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + /** + * + * + *
+   * Compares the wallclock time to this time. Must use UTC timezone.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return constraintCase_ == 2; + } + /** + * + * + *
+   * Compares the wallclock time to this time. Must use UTC timezone.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + if (constraintCase_ == 2) { + return (com.google.protobuf.Timestamp) constraint_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + /** + * + * + *
+   * Compares the wallclock time to this time. Must use UTC timezone.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (constraintCase_ == 2) { + return (com.google.protobuf.Timestamp) constraint_; + } + return com.google.protobuf.Timestamp.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 (constraintCase_ == 1) { + output.writeMessage(1, (com.google.protobuf.Duration) constraint_); + } + if (constraintCase_ == 2) { + output.writeMessage(2, (com.google.protobuf.Timestamp) constraint_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (constraintCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.protobuf.Duration) constraint_); + } + if (constraintCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.protobuf.Timestamp) constraint_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.StudyTimeConstraint)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.StudyTimeConstraint other = + (com.google.cloud.aiplatform.v1.StudyTimeConstraint) obj; + + if (!getConstraintCase().equals(other.getConstraintCase())) return false; + switch (constraintCase_) { + case 1: + if (!getMaxDuration().equals(other.getMaxDuration())) return false; + break; + case 2: + if (!getEndTime().equals(other.getEndTime())) 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 (constraintCase_) { + case 1: + hash = (37 * hash) + MAX_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getMaxDuration().hashCode(); + break; + case 2: + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.StudyTimeConstraint parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudyTimeConstraint parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudyTimeConstraint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudyTimeConstraint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudyTimeConstraint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudyTimeConstraint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudyTimeConstraint parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudyTimeConstraint parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudyTimeConstraint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudyTimeConstraint parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudyTimeConstraint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudyTimeConstraint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.StudyTimeConstraint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Time-based Constraint for Study
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StudyTimeConstraint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.StudyTimeConstraint) + com.google.cloud.aiplatform.v1.StudyTimeConstraintOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudyTimeConstraint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudyTimeConstraint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudyTimeConstraint.class, + com.google.cloud.aiplatform.v1.StudyTimeConstraint.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.StudyTimeConstraint.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (maxDurationBuilder_ != null) { + maxDurationBuilder_.clear(); + } + if (endTimeBuilder_ != null) { + endTimeBuilder_.clear(); + } + constraintCase_ = 0; + constraint_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudyTimeConstraint_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudyTimeConstraint getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.StudyTimeConstraint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudyTimeConstraint build() { + com.google.cloud.aiplatform.v1.StudyTimeConstraint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudyTimeConstraint buildPartial() { + com.google.cloud.aiplatform.v1.StudyTimeConstraint result = + new com.google.cloud.aiplatform.v1.StudyTimeConstraint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.StudyTimeConstraint result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1.StudyTimeConstraint result) { + result.constraintCase_ = constraintCase_; + result.constraint_ = this.constraint_; + if (constraintCase_ == 1 && maxDurationBuilder_ != null) { + result.constraint_ = maxDurationBuilder_.build(); + } + if (constraintCase_ == 2 && endTimeBuilder_ != null) { + result.constraint_ = endTimeBuilder_.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.aiplatform.v1.StudyTimeConstraint) { + return mergeFrom((com.google.cloud.aiplatform.v1.StudyTimeConstraint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.StudyTimeConstraint other) { + if (other == com.google.cloud.aiplatform.v1.StudyTimeConstraint.getDefaultInstance()) + return this; + switch (other.getConstraintCase()) { + case MAX_DURATION: + { + mergeMaxDuration(other.getMaxDuration()); + break; + } + case END_TIME: + { + mergeEndTime(other.getEndTime()); + break; + } + case CONSTRAINT_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(getMaxDurationFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 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 constraintCase_ = 0; + private java.lang.Object constraint_; + + public ConstraintCase getConstraintCase() { + return ConstraintCase.forNumber(constraintCase_); + } + + public Builder clearConstraint() { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + maxDurationBuilder_; + /** + * + * + *
+     * Counts the wallclock time passed since the creation of this Study.
+     * 
+ * + * .google.protobuf.Duration max_duration = 1; + * + * @return Whether the maxDuration field is set. + */ + @java.lang.Override + public boolean hasMaxDuration() { + return constraintCase_ == 1; + } + /** + * + * + *
+     * Counts the wallclock time passed since the creation of this Study.
+     * 
+ * + * .google.protobuf.Duration max_duration = 1; + * + * @return The maxDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getMaxDuration() { + if (maxDurationBuilder_ == null) { + if (constraintCase_ == 1) { + return (com.google.protobuf.Duration) constraint_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } else { + if (constraintCase_ == 1) { + return maxDurationBuilder_.getMessage(); + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + } + /** + * + * + *
+     * Counts the wallclock time passed since the creation of this Study.
+     * 
+ * + * .google.protobuf.Duration max_duration = 1; + */ + public Builder setMaxDuration(com.google.protobuf.Duration value) { + if (maxDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + maxDurationBuilder_.setMessage(value); + } + constraintCase_ = 1; + return this; + } + /** + * + * + *
+     * Counts the wallclock time passed since the creation of this Study.
+     * 
+ * + * .google.protobuf.Duration max_duration = 1; + */ + public Builder setMaxDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (maxDurationBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + maxDurationBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 1; + return this; + } + /** + * + * + *
+     * Counts the wallclock time passed since the creation of this Study.
+     * 
+ * + * .google.protobuf.Duration max_duration = 1; + */ + public Builder mergeMaxDuration(com.google.protobuf.Duration value) { + if (maxDurationBuilder_ == null) { + if (constraintCase_ == 1 + && constraint_ != com.google.protobuf.Duration.getDefaultInstance()) { + constraint_ = + com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) constraint_) + .mergeFrom(value) + .buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 1) { + maxDurationBuilder_.mergeFrom(value); + } else { + maxDurationBuilder_.setMessage(value); + } + } + constraintCase_ = 1; + return this; + } + /** + * + * + *
+     * Counts the wallclock time passed since the creation of this Study.
+     * 
+ * + * .google.protobuf.Duration max_duration = 1; + */ + public Builder clearMaxDuration() { + if (maxDurationBuilder_ == null) { + if (constraintCase_ == 1) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 1) { + constraintCase_ = 0; + constraint_ = null; + } + maxDurationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Counts the wallclock time passed since the creation of this Study.
+     * 
+ * + * .google.protobuf.Duration max_duration = 1; + */ + public com.google.protobuf.Duration.Builder getMaxDurationBuilder() { + return getMaxDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Counts the wallclock time passed since the creation of this Study.
+     * 
+ * + * .google.protobuf.Duration max_duration = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMaxDurationOrBuilder() { + if ((constraintCase_ == 1) && (maxDurationBuilder_ != null)) { + return maxDurationBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 1) { + return (com.google.protobuf.Duration) constraint_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + } + /** + * + * + *
+     * Counts the wallclock time passed since the creation of this Study.
+     * 
+ * + * .google.protobuf.Duration max_duration = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getMaxDurationFieldBuilder() { + if (maxDurationBuilder_ == null) { + if (!(constraintCase_ == 1)) { + constraint_ = com.google.protobuf.Duration.getDefaultInstance(); + } + maxDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + (com.google.protobuf.Duration) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 1; + onChanged(); + return maxDurationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Compares the wallclock time to this time. Must use UTC timezone.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return constraintCase_ == 2; + } + /** + * + * + *
+     * Compares the wallclock time to this time. Must use UTC timezone.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + if (constraintCase_ == 2) { + return (com.google.protobuf.Timestamp) constraint_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } else { + if (constraintCase_ == 2) { + return endTimeBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + * + * + *
+     * Compares the wallclock time to this time. Must use UTC timezone.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + constraintCase_ = 2; + return this; + } + /** + * + * + *
+     * Compares the wallclock time to this time. Must use UTC timezone.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 2; + return this; + } + /** + * + * + *
+     * Compares the wallclock time to this time. Must use UTC timezone.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (constraintCase_ == 2 + && constraint_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + constraint_ = + com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) constraint_) + .mergeFrom(value) + .buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 2) { + endTimeBuilder_.mergeFrom(value); + } else { + endTimeBuilder_.setMessage(value); + } + } + constraintCase_ = 2; + return this; + } + /** + * + * + *
+     * Compares the wallclock time to this time. Must use UTC timezone.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + if (constraintCase_ == 2) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 2) { + constraintCase_ = 0; + constraint_ = null; + } + endTimeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Compares the wallclock time to this time. Must use UTC timezone.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Compares the wallclock time to this time. Must use UTC timezone.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if ((constraintCase_ == 2) && (endTimeBuilder_ != null)) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 2) { + return (com.google.protobuf.Timestamp) constraint_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + * + * + *
+     * Compares the wallclock time to this time. Must use UTC timezone.
+     * 
+ * + * .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) { + if (!(constraintCase_ == 2)) { + constraint_ = com.google.protobuf.Timestamp.getDefaultInstance(); + } + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + (com.google.protobuf.Timestamp) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 2; + onChanged(); + 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.aiplatform.v1.StudyTimeConstraint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.StudyTimeConstraint) + private static final com.google.cloud.aiplatform.v1.StudyTimeConstraint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.StudyTimeConstraint(); + } + + public static com.google.cloud.aiplatform.v1.StudyTimeConstraint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StudyTimeConstraint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudyTimeConstraint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudyTimeConstraintOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudyTimeConstraintOrBuilder.java new file mode 100644 index 000000000000..f632481ad6ab --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudyTimeConstraintOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/study.proto + +package com.google.cloud.aiplatform.v1; + +public interface StudyTimeConstraintOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.StudyTimeConstraint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Counts the wallclock time passed since the creation of this Study.
+   * 
+ * + * .google.protobuf.Duration max_duration = 1; + * + * @return Whether the maxDuration field is set. + */ + boolean hasMaxDuration(); + /** + * + * + *
+   * Counts the wallclock time passed since the creation of this Study.
+   * 
+ * + * .google.protobuf.Duration max_duration = 1; + * + * @return The maxDuration. + */ + com.google.protobuf.Duration getMaxDuration(); + /** + * + * + *
+   * Counts the wallclock time passed since the creation of this Study.
+   * 
+ * + * .google.protobuf.Duration max_duration = 1; + */ + com.google.protobuf.DurationOrBuilder getMaxDurationOrBuilder(); + + /** + * + * + *
+   * Compares the wallclock time to this time. Must use UTC timezone.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Compares the wallclock time to this time. Must use UTC timezone.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Compares the wallclock time to this time. Must use UTC timezone.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + com.google.cloud.aiplatform.v1.StudyTimeConstraint.ConstraintCase getConstraintCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SyncFeatureViewRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SyncFeatureViewRequest.java new file mode 100644 index 000000000000..3c38aa74ab99 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SyncFeatureViewRequest.java @@ -0,0 +1,648 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [FeatureOnlineStoreAdminService.SyncFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.SyncFeatureView].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.SyncFeatureViewRequest} + */ +public final class SyncFeatureViewRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.SyncFeatureViewRequest) + SyncFeatureViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SyncFeatureViewRequest.newBuilder() to construct. + private SyncFeatureViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SyncFeatureViewRequest() { + featureView_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SyncFeatureViewRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_SyncFeatureViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_SyncFeatureViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SyncFeatureViewRequest.class, + com.google.cloud.aiplatform.v1.SyncFeatureViewRequest.Builder.class); + } + + public static final int FEATURE_VIEW_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object featureView_ = ""; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The featureView. + */ + @java.lang.Override + public java.lang.String getFeatureView() { + java.lang.Object ref = featureView_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + featureView_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for featureView. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFeatureViewBytes() { + java.lang.Object ref = featureView_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + featureView_ = 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(featureView_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, featureView_); + } + 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(featureView_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, featureView_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.SyncFeatureViewRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.SyncFeatureViewRequest other = + (com.google.cloud.aiplatform.v1.SyncFeatureViewRequest) obj; + + if (!getFeatureView().equals(other.getFeatureView())) return false; + if (!getUnknownFields().equals(other.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) + FEATURE_VIEW_FIELD_NUMBER; + hash = (53 * hash) + getFeatureView().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.SyncFeatureViewRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureOnlineStoreAdminService.SyncFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.SyncFeatureView].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.SyncFeatureViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.SyncFeatureViewRequest) + com.google.cloud.aiplatform.v1.SyncFeatureViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_SyncFeatureViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_SyncFeatureViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SyncFeatureViewRequest.class, + com.google.cloud.aiplatform.v1.SyncFeatureViewRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.SyncFeatureViewRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + featureView_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_SyncFeatureViewRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SyncFeatureViewRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.SyncFeatureViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SyncFeatureViewRequest build() { + com.google.cloud.aiplatform.v1.SyncFeatureViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SyncFeatureViewRequest buildPartial() { + com.google.cloud.aiplatform.v1.SyncFeatureViewRequest result = + new com.google.cloud.aiplatform.v1.SyncFeatureViewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.SyncFeatureViewRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.featureView_ = featureView_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.SyncFeatureViewRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.SyncFeatureViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.SyncFeatureViewRequest other) { + if (other == com.google.cloud.aiplatform.v1.SyncFeatureViewRequest.getDefaultInstance()) + return this; + if (!other.getFeatureView().isEmpty()) { + featureView_ = other.featureView_; + 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: + { + featureView_ = 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 featureView_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The featureView. + */ + public java.lang.String getFeatureView() { + java.lang.Object ref = featureView_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + featureView_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for featureView. + */ + public com.google.protobuf.ByteString getFeatureViewBytes() { + java.lang.Object ref = featureView_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + featureView_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The featureView to set. + * @return This builder for chaining. + */ + public Builder setFeatureView(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + featureView_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearFeatureView() { + featureView_ = getDefaultInstance().getFeatureView(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for featureView to set. + * @return This builder for chaining. + */ + public Builder setFeatureViewBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + featureView_ = 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.aiplatform.v1.SyncFeatureViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.SyncFeatureViewRequest) + private static final com.google.cloud.aiplatform.v1.SyncFeatureViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.SyncFeatureViewRequest(); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SyncFeatureViewRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SyncFeatureViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SyncFeatureViewRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SyncFeatureViewRequestOrBuilder.java new file mode 100644 index 000000000000..16a7297d273f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SyncFeatureViewRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface SyncFeatureViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.SyncFeatureViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The featureView. + */ + java.lang.String getFeatureView(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for featureView. + */ + com.google.protobuf.ByteString getFeatureViewBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SyncFeatureViewResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SyncFeatureViewResponse.java new file mode 100644 index 000000000000..d2626f7ee26c --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SyncFeatureViewResponse.java @@ -0,0 +1,634 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Respose message for
+ * [FeatureOnlineStoreAdminService.SyncFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.SyncFeatureView].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.SyncFeatureViewResponse} + */ +public final class SyncFeatureViewResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.SyncFeatureViewResponse) + SyncFeatureViewResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SyncFeatureViewResponse.newBuilder() to construct. + private SyncFeatureViewResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SyncFeatureViewResponse() { + featureViewSync_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SyncFeatureViewResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_SyncFeatureViewResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_SyncFeatureViewResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SyncFeatureViewResponse.class, + com.google.cloud.aiplatform.v1.SyncFeatureViewResponse.Builder.class); + } + + public static final int FEATURE_VIEW_SYNC_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object featureViewSync_ = ""; + /** + * + * + *
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+   * 
+ * + * string feature_view_sync = 1; + * + * @return The featureViewSync. + */ + @java.lang.Override + public java.lang.String getFeatureViewSync() { + java.lang.Object ref = featureViewSync_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + featureViewSync_ = s; + return s; + } + } + /** + * + * + *
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+   * 
+ * + * string feature_view_sync = 1; + * + * @return The bytes for featureViewSync. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFeatureViewSyncBytes() { + java.lang.Object ref = featureViewSync_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + featureViewSync_ = 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(featureViewSync_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, featureViewSync_); + } + 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(featureViewSync_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, featureViewSync_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.SyncFeatureViewResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.SyncFeatureViewResponse other = + (com.google.cloud.aiplatform.v1.SyncFeatureViewResponse) obj; + + if (!getFeatureViewSync().equals(other.getFeatureViewSync())) return false; + if (!getUnknownFields().equals(other.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) + FEATURE_VIEW_SYNC_FIELD_NUMBER; + hash = (53 * hash) + getFeatureViewSync().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.SyncFeatureViewResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Respose message for
+   * [FeatureOnlineStoreAdminService.SyncFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.SyncFeatureView].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.SyncFeatureViewResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.SyncFeatureViewResponse) + com.google.cloud.aiplatform.v1.SyncFeatureViewResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_SyncFeatureViewResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_SyncFeatureViewResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SyncFeatureViewResponse.class, + com.google.cloud.aiplatform.v1.SyncFeatureViewResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.SyncFeatureViewResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + featureViewSync_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_SyncFeatureViewResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SyncFeatureViewResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.SyncFeatureViewResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SyncFeatureViewResponse build() { + com.google.cloud.aiplatform.v1.SyncFeatureViewResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SyncFeatureViewResponse buildPartial() { + com.google.cloud.aiplatform.v1.SyncFeatureViewResponse result = + new com.google.cloud.aiplatform.v1.SyncFeatureViewResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.SyncFeatureViewResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.featureViewSync_ = featureViewSync_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.SyncFeatureViewResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.SyncFeatureViewResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.SyncFeatureViewResponse other) { + if (other == com.google.cloud.aiplatform.v1.SyncFeatureViewResponse.getDefaultInstance()) + return this; + if (!other.getFeatureViewSync().isEmpty()) { + featureViewSync_ = other.featureViewSync_; + 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: + { + featureViewSync_ = 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 featureViewSync_ = ""; + /** + * + * + *
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+     * 
+ * + * string feature_view_sync = 1; + * + * @return The featureViewSync. + */ + public java.lang.String getFeatureViewSync() { + java.lang.Object ref = featureViewSync_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + featureViewSync_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+     * 
+ * + * string feature_view_sync = 1; + * + * @return The bytes for featureViewSync. + */ + public com.google.protobuf.ByteString getFeatureViewSyncBytes() { + java.lang.Object ref = featureViewSync_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + featureViewSync_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+     * 
+ * + * string feature_view_sync = 1; + * + * @param value The featureViewSync to set. + * @return This builder for chaining. + */ + public Builder setFeatureViewSync(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + featureViewSync_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+     * 
+ * + * string feature_view_sync = 1; + * + * @return This builder for chaining. + */ + public Builder clearFeatureViewSync() { + featureViewSync_ = getDefaultInstance().getFeatureViewSync(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+     * 
+ * + * string feature_view_sync = 1; + * + * @param value The bytes for featureViewSync to set. + * @return This builder for chaining. + */ + public Builder setFeatureViewSyncBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + featureViewSync_ = 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.aiplatform.v1.SyncFeatureViewResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.SyncFeatureViewResponse) + private static final com.google.cloud.aiplatform.v1.SyncFeatureViewResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.SyncFeatureViewResponse(); + } + + public static com.google.cloud.aiplatform.v1.SyncFeatureViewResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SyncFeatureViewResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SyncFeatureViewResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SyncFeatureViewResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SyncFeatureViewResponseOrBuilder.java new file mode 100644 index 000000000000..4cf6d3b80f6a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SyncFeatureViewResponseOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface SyncFeatureViewResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.SyncFeatureViewResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+   * 
+ * + * string feature_view_sync = 1; + * + * @return The featureViewSync. + */ + java.lang.String getFeatureViewSync(); + /** + * + * + *
+   * Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
+   * 
+ * + * string feature_view_sync = 1; + * + * @return The bytes for featureViewSync. + */ + com.google.protobuf.ByteString getFeatureViewSyncBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TokensInfo.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TokensInfo.java new file mode 100644 index 000000000000..7cb8e7ad90d3 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TokensInfo.java @@ -0,0 +1,908 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/llm_utility_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Tokens info with a list of tokens and the corresponding list of token ids.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.TokensInfo} + */ +public final class TokensInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.TokensInfo) + TokensInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use TokensInfo.newBuilder() to construct. + private TokensInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TokensInfo() { + tokens_ = java.util.Collections.emptyList(); + tokenIds_ = emptyLongList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TokensInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1_TokensInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1_TokensInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.TokensInfo.class, + com.google.cloud.aiplatform.v1.TokensInfo.Builder.class); + } + + public static final int TOKENS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List tokens_; + /** + * + * + *
+   * A list of tokens from the input.
+   * 
+ * + * repeated bytes tokens = 1; + * + * @return A list containing the tokens. + */ + @java.lang.Override + public java.util.List getTokensList() { + return tokens_; + } + /** + * + * + *
+   * A list of tokens from the input.
+   * 
+ * + * repeated bytes tokens = 1; + * + * @return The count of tokens. + */ + public int getTokensCount() { + return tokens_.size(); + } + /** + * + * + *
+   * A list of tokens from the input.
+   * 
+ * + * repeated bytes tokens = 1; + * + * @param index The index of the element to return. + * @return The tokens at the given index. + */ + public com.google.protobuf.ByteString getTokens(int index) { + return tokens_.get(index); + } + + public static final int TOKEN_IDS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList tokenIds_; + /** + * + * + *
+   * A list of token ids from the input.
+   * 
+ * + * repeated int64 token_ids = 2; + * + * @return A list containing the tokenIds. + */ + @java.lang.Override + public java.util.List getTokenIdsList() { + return tokenIds_; + } + /** + * + * + *
+   * A list of token ids from the input.
+   * 
+ * + * repeated int64 token_ids = 2; + * + * @return The count of tokenIds. + */ + public int getTokenIdsCount() { + return tokenIds_.size(); + } + /** + * + * + *
+   * A list of token ids from the input.
+   * 
+ * + * repeated int64 token_ids = 2; + * + * @param index The index of the element to return. + * @return The tokenIds at the given index. + */ + public long getTokenIds(int index) { + return tokenIds_.getLong(index); + } + + private int tokenIdsMemoizedSerializedSize = -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(); + for (int i = 0; i < tokens_.size(); i++) { + output.writeBytes(1, tokens_.get(i)); + } + if (getTokenIdsList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(tokenIdsMemoizedSerializedSize); + } + for (int i = 0; i < tokenIds_.size(); i++) { + output.writeInt64NoTag(tokenIds_.getLong(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 < tokens_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeBytesSizeNoTag(tokens_.get(i)); + } + size += dataSize; + size += 1 * getTokensList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < tokenIds_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag(tokenIds_.getLong(i)); + } + size += dataSize; + if (!getTokenIdsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + tokenIdsMemoizedSerializedSize = 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.aiplatform.v1.TokensInfo)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.TokensInfo other = + (com.google.cloud.aiplatform.v1.TokensInfo) obj; + + if (!getTokensList().equals(other.getTokensList())) return false; + if (!getTokenIdsList().equals(other.getTokenIdsList())) return false; + if (!getUnknownFields().equals(other.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 (getTokensCount() > 0) { + hash = (37 * hash) + TOKENS_FIELD_NUMBER; + hash = (53 * hash) + getTokensList().hashCode(); + } + if (getTokenIdsCount() > 0) { + hash = (37 * hash) + TOKEN_IDS_FIELD_NUMBER; + hash = (53 * hash) + getTokenIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.TokensInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.TokensInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.TokensInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.TokensInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.TokensInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.TokensInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.TokensInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.TokensInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.TokensInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.TokensInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.TokensInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.TokensInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.TokensInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Tokens info with a list of tokens and the corresponding list of token ids.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.TokensInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.TokensInfo) + com.google.cloud.aiplatform.v1.TokensInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1_TokensInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1_TokensInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.TokensInfo.class, + com.google.cloud.aiplatform.v1.TokensInfo.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.TokensInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tokens_ = java.util.Collections.emptyList(); + tokenIds_ = emptyLongList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1_TokensInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TokensInfo getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.TokensInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TokensInfo build() { + com.google.cloud.aiplatform.v1.TokensInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TokensInfo buildPartial() { + com.google.cloud.aiplatform.v1.TokensInfo result = + new com.google.cloud.aiplatform.v1.TokensInfo(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.aiplatform.v1.TokensInfo result) { + if (((bitField0_ & 0x00000001) != 0)) { + tokens_ = java.util.Collections.unmodifiableList(tokens_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tokens_ = tokens_; + if (((bitField0_ & 0x00000002) != 0)) { + tokenIds_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.tokenIds_ = tokenIds_; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.TokensInfo 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.aiplatform.v1.TokensInfo) { + return mergeFrom((com.google.cloud.aiplatform.v1.TokensInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.TokensInfo other) { + if (other == com.google.cloud.aiplatform.v1.TokensInfo.getDefaultInstance()) return this; + if (!other.tokens_.isEmpty()) { + if (tokens_.isEmpty()) { + tokens_ = other.tokens_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTokensIsMutable(); + tokens_.addAll(other.tokens_); + } + onChanged(); + } + if (!other.tokenIds_.isEmpty()) { + if (tokenIds_.isEmpty()) { + tokenIds_ = other.tokenIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTokenIdsIsMutable(); + tokenIds_.addAll(other.tokenIds_); + } + 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.protobuf.ByteString v = input.readBytes(); + ensureTokensIsMutable(); + tokens_.add(v); + break; + } // case 10 + case 16: + { + long v = input.readInt64(); + ensureTokenIdsIsMutable(); + tokenIds_.addLong(v); + break; + } // case 16 + case 18: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureTokenIdsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + tokenIds_.addLong(input.readInt64()); + } + input.popLimit(limit); + 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 tokens_ = + java.util.Collections.emptyList(); + + private void ensureTokensIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tokens_ = new java.util.ArrayList(tokens_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * A list of tokens from the input.
+     * 
+ * + * repeated bytes tokens = 1; + * + * @return A list containing the tokens. + */ + public java.util.List getTokensList() { + return ((bitField0_ & 0x00000001) != 0) + ? java.util.Collections.unmodifiableList(tokens_) + : tokens_; + } + /** + * + * + *
+     * A list of tokens from the input.
+     * 
+ * + * repeated bytes tokens = 1; + * + * @return The count of tokens. + */ + public int getTokensCount() { + return tokens_.size(); + } + /** + * + * + *
+     * A list of tokens from the input.
+     * 
+ * + * repeated bytes tokens = 1; + * + * @param index The index of the element to return. + * @return The tokens at the given index. + */ + public com.google.protobuf.ByteString getTokens(int index) { + return tokens_.get(index); + } + /** + * + * + *
+     * A list of tokens from the input.
+     * 
+ * + * repeated bytes tokens = 1; + * + * @param index The index to set the value at. + * @param value The tokens to set. + * @return This builder for chaining. + */ + public Builder setTokens(int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTokensIsMutable(); + tokens_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of tokens from the input.
+     * 
+ * + * repeated bytes tokens = 1; + * + * @param value The tokens to add. + * @return This builder for chaining. + */ + public Builder addTokens(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTokensIsMutable(); + tokens_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of tokens from the input.
+     * 
+ * + * repeated bytes tokens = 1; + * + * @param values The tokens to add. + * @return This builder for chaining. + */ + public Builder addAllTokens( + java.lang.Iterable values) { + ensureTokensIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tokens_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of tokens from the input.
+     * 
+ * + * repeated bytes tokens = 1; + * + * @return This builder for chaining. + */ + public Builder clearTokens() { + tokens_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private com.google.protobuf.Internal.LongList tokenIds_ = emptyLongList(); + + private void ensureTokenIdsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + tokenIds_ = mutableCopy(tokenIds_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * A list of token ids from the input.
+     * 
+ * + * repeated int64 token_ids = 2; + * + * @return A list containing the tokenIds. + */ + public java.util.List getTokenIdsList() { + return ((bitField0_ & 0x00000002) != 0) + ? java.util.Collections.unmodifiableList(tokenIds_) + : tokenIds_; + } + /** + * + * + *
+     * A list of token ids from the input.
+     * 
+ * + * repeated int64 token_ids = 2; + * + * @return The count of tokenIds. + */ + public int getTokenIdsCount() { + return tokenIds_.size(); + } + /** + * + * + *
+     * A list of token ids from the input.
+     * 
+ * + * repeated int64 token_ids = 2; + * + * @param index The index of the element to return. + * @return The tokenIds at the given index. + */ + public long getTokenIds(int index) { + return tokenIds_.getLong(index); + } + /** + * + * + *
+     * A list of token ids from the input.
+     * 
+ * + * repeated int64 token_ids = 2; + * + * @param index The index to set the value at. + * @param value The tokenIds to set. + * @return This builder for chaining. + */ + public Builder setTokenIds(int index, long value) { + + ensureTokenIdsIsMutable(); + tokenIds_.setLong(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of token ids from the input.
+     * 
+ * + * repeated int64 token_ids = 2; + * + * @param value The tokenIds to add. + * @return This builder for chaining. + */ + public Builder addTokenIds(long value) { + + ensureTokenIdsIsMutable(); + tokenIds_.addLong(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of token ids from the input.
+     * 
+ * + * repeated int64 token_ids = 2; + * + * @param values The tokenIds to add. + * @return This builder for chaining. + */ + public Builder addAllTokenIds(java.lang.Iterable values) { + ensureTokenIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tokenIds_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of token ids from the input.
+     * 
+ * + * repeated int64 token_ids = 2; + * + * @return This builder for chaining. + */ + public Builder clearTokenIds() { + tokenIds_ = emptyLongList(); + bitField0_ = (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.aiplatform.v1.TokensInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.TokensInfo) + private static final com.google.cloud.aiplatform.v1.TokensInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.TokensInfo(); + } + + public static com.google.cloud.aiplatform.v1.TokensInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TokensInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TokensInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TokensInfoOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TokensInfoOrBuilder.java new file mode 100644 index 000000000000..fe05c3c33e78 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TokensInfoOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/llm_utility_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface TokensInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.TokensInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of tokens from the input.
+   * 
+ * + * repeated bytes tokens = 1; + * + * @return A list containing the tokens. + */ + java.util.List getTokensList(); + /** + * + * + *
+   * A list of tokens from the input.
+   * 
+ * + * repeated bytes tokens = 1; + * + * @return The count of tokens. + */ + int getTokensCount(); + /** + * + * + *
+   * A list of tokens from the input.
+   * 
+ * + * repeated bytes tokens = 1; + * + * @param index The index of the element to return. + * @return The tokens at the given index. + */ + com.google.protobuf.ByteString getTokens(int index); + + /** + * + * + *
+   * A list of token ids from the input.
+   * 
+ * + * repeated int64 token_ids = 2; + * + * @return A list containing the tokenIds. + */ + java.util.List getTokenIdsList(); + /** + * + * + *
+   * A list of token ids from the input.
+   * 
+ * + * repeated int64 token_ids = 2; + * + * @return The count of tokenIds. + */ + int getTokenIdsCount(); + /** + * + * + *
+   * A list of token ids from the input.
+   * 
+ * + * repeated int64 token_ids = 2; + * + * @param index The index of the element to return. + * @return The tokenIds at the given index. + */ + long getTokenIds(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureGroupOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureGroupOperationMetadata.java new file mode 100644 index 000000000000..59c6b19eaa97 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureGroupOperationMetadata.java @@ -0,0 +1,727 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Details of operations that perform update FeatureGroup.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata} + */ +public final class UpdateFeatureGroupOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata) + UpdateFeatureGroupOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateFeatureGroupOperationMetadata.newBuilder() to construct. + private UpdateFeatureGroupOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateFeatureGroupOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateFeatureGroupOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureGroupOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureGroupOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata.class, + com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata.Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * Operation metadata for FeatureGroup.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * Operation metadata for FeatureGroup.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * Operation metadata for FeatureGroup.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata other = + (com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getUnknownFields().equals(other.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 (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of operations that perform update FeatureGroup.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata) + com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureGroupOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureGroupOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata.class, + com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureGroupOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata build() { + com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata result = + new com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.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.aiplatform.v1.UpdateFeatureGroupOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(getGenericMetadataFieldBuilder().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.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * Operation metadata for FeatureGroup.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation metadata for FeatureGroup.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation metadata for FeatureGroup.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureGroup.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureGroup.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureGroup.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureGroup.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation metadata for FeatureGroup.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * Operation metadata for FeatureGroup.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata) + private static final com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateFeatureGroupOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureGroupOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureGroupOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..e207088a8a71 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureGroupOperationMetadataOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface UpdateFeatureGroupOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation metadata for FeatureGroup.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * Operation metadata for FeatureGroup.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * Operation metadata for FeatureGroup.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureGroupRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureGroupRequest.java new file mode 100644 index 000000000000..f4fe68ba866f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureGroupRequest.java @@ -0,0 +1,1138 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [FeatureRegistryService.UpdateFeatureGroup][google.cloud.aiplatform.v1.FeatureRegistryService.UpdateFeatureGroup].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateFeatureGroupRequest} + */ +public final class UpdateFeatureGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UpdateFeatureGroupRequest) + UpdateFeatureGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateFeatureGroupRequest.newBuilder() to construct. + private UpdateFeatureGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateFeatureGroupRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateFeatureGroupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest.class, + com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest.Builder.class); + } + + public static final int FEATURE_GROUP_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.FeatureGroup featureGroup_; + /** + * + * + *
+   * Required. The FeatureGroup's `name` field is used to identify the
+   * FeatureGroup to be updated. Format:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the featureGroup field is set. + */ + @java.lang.Override + public boolean hasFeatureGroup() { + return featureGroup_ != null; + } + /** + * + * + *
+   * Required. The FeatureGroup's `name` field is used to identify the
+   * FeatureGroup to be updated. Format:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The featureGroup. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureGroup getFeatureGroup() { + return featureGroup_ == null + ? com.google.cloud.aiplatform.v1.FeatureGroup.getDefaultInstance() + : featureGroup_; + } + /** + * + * + *
+   * Required. The FeatureGroup's `name` field is used to identify the
+   * FeatureGroup to be updated. Format:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureGroupOrBuilder getFeatureGroupOrBuilder() { + return featureGroup_ == null + ? com.google.cloud.aiplatform.v1.FeatureGroup.getDefaultInstance() + : featureGroup_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Field mask is used to specify the fields to be overwritten in the
+   * FeatureGroup 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 only the non-empty fields present in the
+   * request will be overwritten. Set the update_mask to `*` to override all
+   * fields.
+   *
+   * Updatable fields:
+   *
+   *   * `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Field mask is used to specify the fields to be overwritten in the
+   * FeatureGroup 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 only the non-empty fields present in the
+   * request will be overwritten. Set the update_mask to `*` to override all
+   * fields.
+   *
+   * Updatable fields:
+   *
+   *   * `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Field mask is used to specify the fields to be overwritten in the
+   * FeatureGroup 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 only the non-empty fields present in the
+   * request will be overwritten. Set the update_mask to `*` to override all
+   * fields.
+   *
+   * Updatable fields:
+   *
+   *   * `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (featureGroup_ != null) { + output.writeMessage(1, getFeatureGroup()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (featureGroup_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFeatureGroup()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest other = + (com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest) obj; + + if (hasFeatureGroup() != other.hasFeatureGroup()) return false; + if (hasFeatureGroup()) { + if (!getFeatureGroup().equals(other.getFeatureGroup())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.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 (hasFeatureGroup()) { + hash = (37 * hash) + FEATURE_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getFeatureGroup().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureRegistryService.UpdateFeatureGroup][google.cloud.aiplatform.v1.FeatureRegistryService.UpdateFeatureGroup].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateFeatureGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UpdateFeatureGroupRequest) + com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest.class, + com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + featureGroup_ = null; + if (featureGroupBuilder_ != null) { + featureGroupBuilder_.dispose(); + featureGroupBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest build() { + com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest buildPartial() { + com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest result = + new com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.featureGroup_ = + featureGroupBuilder_ == null ? featureGroup_ : featureGroupBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.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.aiplatform.v1.UpdateFeatureGroupRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest other) { + if (other == com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest.getDefaultInstance()) + return this; + if (other.hasFeatureGroup()) { + mergeFeatureGroup(other.getFeatureGroup()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(getFeatureGroupFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().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.aiplatform.v1.FeatureGroup featureGroup_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureGroup, + com.google.cloud.aiplatform.v1.FeatureGroup.Builder, + com.google.cloud.aiplatform.v1.FeatureGroupOrBuilder> + featureGroupBuilder_; + /** + * + * + *
+     * Required. The FeatureGroup's `name` field is used to identify the
+     * FeatureGroup to be updated. Format:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the featureGroup field is set. + */ + public boolean hasFeatureGroup() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The FeatureGroup's `name` field is used to identify the
+     * FeatureGroup to be updated. Format:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The featureGroup. + */ + public com.google.cloud.aiplatform.v1.FeatureGroup getFeatureGroup() { + if (featureGroupBuilder_ == null) { + return featureGroup_ == null + ? com.google.cloud.aiplatform.v1.FeatureGroup.getDefaultInstance() + : featureGroup_; + } else { + return featureGroupBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The FeatureGroup's `name` field is used to identify the
+     * FeatureGroup to be updated. Format:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFeatureGroup(com.google.cloud.aiplatform.v1.FeatureGroup value) { + if (featureGroupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + featureGroup_ = value; + } else { + featureGroupBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureGroup's `name` field is used to identify the
+     * FeatureGroup to be updated. Format:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFeatureGroup( + com.google.cloud.aiplatform.v1.FeatureGroup.Builder builderForValue) { + if (featureGroupBuilder_ == null) { + featureGroup_ = builderForValue.build(); + } else { + featureGroupBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureGroup's `name` field is used to identify the
+     * FeatureGroup to be updated. Format:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFeatureGroup(com.google.cloud.aiplatform.v1.FeatureGroup value) { + if (featureGroupBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && featureGroup_ != null + && featureGroup_ != com.google.cloud.aiplatform.v1.FeatureGroup.getDefaultInstance()) { + getFeatureGroupBuilder().mergeFrom(value); + } else { + featureGroup_ = value; + } + } else { + featureGroupBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureGroup's `name` field is used to identify the
+     * FeatureGroup to be updated. Format:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFeatureGroup() { + bitField0_ = (bitField0_ & ~0x00000001); + featureGroup_ = null; + if (featureGroupBuilder_ != null) { + featureGroupBuilder_.dispose(); + featureGroupBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureGroup's `name` field is used to identify the
+     * FeatureGroup to be updated. Format:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureGroup.Builder getFeatureGroupBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getFeatureGroupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The FeatureGroup's `name` field is used to identify the
+     * FeatureGroup to be updated. Format:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureGroupOrBuilder getFeatureGroupOrBuilder() { + if (featureGroupBuilder_ != null) { + return featureGroupBuilder_.getMessageOrBuilder(); + } else { + return featureGroup_ == null + ? com.google.cloud.aiplatform.v1.FeatureGroup.getDefaultInstance() + : featureGroup_; + } + } + /** + * + * + *
+     * Required. The FeatureGroup's `name` field is used to identify the
+     * FeatureGroup to be updated. Format:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureGroup, + com.google.cloud.aiplatform.v1.FeatureGroup.Builder, + com.google.cloud.aiplatform.v1.FeatureGroupOrBuilder> + getFeatureGroupFieldBuilder() { + if (featureGroupBuilder_ == null) { + featureGroupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureGroup, + com.google.cloud.aiplatform.v1.FeatureGroup.Builder, + com.google.cloud.aiplatform.v1.FeatureGroupOrBuilder>( + getFeatureGroup(), getParentForChildren(), isClean()); + featureGroup_ = null; + } + return featureGroupBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureGroup 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureGroup 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureGroup 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureGroup 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureGroup 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureGroup 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureGroup 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureGroup 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureGroup 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.UpdateFeatureGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UpdateFeatureGroupRequest) + private static final com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest(); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateFeatureGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureGroupRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureGroupRequestOrBuilder.java new file mode 100644 index 000000000000..14bbad2784a1 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureGroupRequestOrBuilder.java @@ -0,0 +1,137 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface UpdateFeatureGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UpdateFeatureGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The FeatureGroup's `name` field is used to identify the
+   * FeatureGroup to be updated. Format:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the featureGroup field is set. + */ + boolean hasFeatureGroup(); + /** + * + * + *
+   * Required. The FeatureGroup's `name` field is used to identify the
+   * FeatureGroup to be updated. Format:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The featureGroup. + */ + com.google.cloud.aiplatform.v1.FeatureGroup getFeatureGroup(); + /** + * + * + *
+   * Required. The FeatureGroup's `name` field is used to identify the
+   * FeatureGroup to be updated. Format:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureGroup feature_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.FeatureGroupOrBuilder getFeatureGroupOrBuilder(); + + /** + * + * + *
+   * Field mask is used to specify the fields to be overwritten in the
+   * FeatureGroup 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 only the non-empty fields present in the
+   * request will be overwritten. Set the update_mask to `*` to override all
+   * fields.
+   *
+   * Updatable fields:
+   *
+   *   * `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Field mask is used to specify the fields to be overwritten in the
+   * FeatureGroup 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 only the non-empty fields present in the
+   * request will be overwritten. Set the update_mask to `*` to override all
+   * fields.
+   *
+   * Updatable fields:
+   *
+   *   * `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Field mask is used to specify the fields to be overwritten in the
+   * FeatureGroup 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 only the non-empty fields present in the
+   * request will be overwritten. Set the update_mask to `*` to override all
+   * fields.
+   *
+   * Updatable fields:
+   *
+   *   * `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOnlineStoreOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOnlineStoreOperationMetadata.java new file mode 100644 index 000000000000..500c194c7a2e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOnlineStoreOperationMetadata.java @@ -0,0 +1,734 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Details of operations that perform update FeatureOnlineStore.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata} + */ +public final class UpdateFeatureOnlineStoreOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata) + UpdateFeatureOnlineStoreOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateFeatureOnlineStoreOperationMetadata.newBuilder() to construct. + private UpdateFeatureOnlineStoreOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateFeatureOnlineStoreOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateFeatureOnlineStoreOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureOnlineStoreOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureOnlineStoreOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata.class, + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata.Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * Operation metadata for FeatureOnlineStore.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * Operation metadata for FeatureOnlineStore.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * Operation metadata for FeatureOnlineStore.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata other = + (com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getUnknownFields().equals(other.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 (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of operations that perform update FeatureOnlineStore.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata) + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureOnlineStoreOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureOnlineStoreOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata.class, + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureOnlineStoreOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata build() { + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata result = + new com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.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.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(getGenericMetadataFieldBuilder().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.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * Operation metadata for FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation metadata for FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation metadata for FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation metadata for FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * Operation metadata for FeatureOnlineStore.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata) + private static final com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateFeatureOnlineStoreOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOnlineStoreOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOnlineStoreOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..bcdbd68e5160 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOnlineStoreOperationMetadataOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface UpdateFeatureOnlineStoreOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation metadata for FeatureOnlineStore.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * Operation metadata for FeatureOnlineStore.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * Operation metadata for FeatureOnlineStore.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOnlineStoreRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOnlineStoreRequest.java new file mode 100644 index 000000000000..4871c166659f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOnlineStoreRequest.java @@ -0,0 +1,1177 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [FeatureOnlineStoreAdminService.UpdateFeatureOnlineStore][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.UpdateFeatureOnlineStore].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest} + */ +public final class UpdateFeatureOnlineStoreRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest) + UpdateFeatureOnlineStoreRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateFeatureOnlineStoreRequest.newBuilder() to construct. + private UpdateFeatureOnlineStoreRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateFeatureOnlineStoreRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateFeatureOnlineStoreRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureOnlineStoreRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureOnlineStoreRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest.class, + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest.Builder.class); + } + + public static final int FEATURE_ONLINE_STORE_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.FeatureOnlineStore featureOnlineStore_; + /** + * + * + *
+   * Required. The FeatureOnlineStore's `name` field is used to identify the
+   * FeatureOnlineStore to be updated. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the featureOnlineStore field is set. + */ + @java.lang.Override + public boolean hasFeatureOnlineStore() { + return featureOnlineStore_ != null; + } + /** + * + * + *
+   * Required. The FeatureOnlineStore's `name` field is used to identify the
+   * FeatureOnlineStore to be updated. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The featureOnlineStore. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStore getFeatureOnlineStore() { + return featureOnlineStore_ == null + ? com.google.cloud.aiplatform.v1.FeatureOnlineStore.getDefaultInstance() + : featureOnlineStore_; + } + /** + * + * + *
+   * Required. The FeatureOnlineStore's `name` field is used to identify the
+   * FeatureOnlineStore to be updated. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureOnlineStoreOrBuilder + getFeatureOnlineStoreOrBuilder() { + return featureOnlineStore_ == null + ? com.google.cloud.aiplatform.v1.FeatureOnlineStore.getDefaultInstance() + : featureOnlineStore_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Field mask is used to specify the fields to be overwritten in the
+   * FeatureOnlineStore 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 only the non-empty fields present in the
+   * request will be overwritten. Set the update_mask to `*` to override all
+   * fields.
+   *
+   * Updatable fields:
+   *
+   *   * `big_query_source`
+   *   * `labels`
+   *   * `sync_config`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Field mask is used to specify the fields to be overwritten in the
+   * FeatureOnlineStore 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 only the non-empty fields present in the
+   * request will be overwritten. Set the update_mask to `*` to override all
+   * fields.
+   *
+   * Updatable fields:
+   *
+   *   * `big_query_source`
+   *   * `labels`
+   *   * `sync_config`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Field mask is used to specify the fields to be overwritten in the
+   * FeatureOnlineStore 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 only the non-empty fields present in the
+   * request will be overwritten. Set the update_mask to `*` to override all
+   * fields.
+   *
+   * Updatable fields:
+   *
+   *   * `big_query_source`
+   *   * `labels`
+   *   * `sync_config`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (featureOnlineStore_ != null) { + output.writeMessage(1, getFeatureOnlineStore()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (featureOnlineStore_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFeatureOnlineStore()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest other = + (com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest) obj; + + if (hasFeatureOnlineStore() != other.hasFeatureOnlineStore()) return false; + if (hasFeatureOnlineStore()) { + if (!getFeatureOnlineStore().equals(other.getFeatureOnlineStore())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.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 (hasFeatureOnlineStore()) { + hash = (37 * hash) + FEATURE_ONLINE_STORE_FIELD_NUMBER; + hash = (53 * hash) + getFeatureOnlineStore().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureOnlineStoreAdminService.UpdateFeatureOnlineStore][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.UpdateFeatureOnlineStore].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest) + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureOnlineStoreRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureOnlineStoreRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest.class, + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + featureOnlineStore_ = null; + if (featureOnlineStoreBuilder_ != null) { + featureOnlineStoreBuilder_.dispose(); + featureOnlineStoreBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureOnlineStoreRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest build() { + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest buildPartial() { + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest result = + new com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.featureOnlineStore_ = + featureOnlineStoreBuilder_ == null + ? featureOnlineStore_ + : featureOnlineStoreBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.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.aiplatform.v1.UpdateFeatureOnlineStoreRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest other) { + if (other + == com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest.getDefaultInstance()) + return this; + if (other.hasFeatureOnlineStore()) { + mergeFeatureOnlineStore(other.getFeatureOnlineStore()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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( + getFeatureOnlineStoreFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().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.aiplatform.v1.FeatureOnlineStore featureOnlineStore_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureOnlineStore, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder, + com.google.cloud.aiplatform.v1.FeatureOnlineStoreOrBuilder> + featureOnlineStoreBuilder_; + /** + * + * + *
+     * Required. The FeatureOnlineStore's `name` field is used to identify the
+     * FeatureOnlineStore to be updated. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the featureOnlineStore field is set. + */ + public boolean hasFeatureOnlineStore() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The FeatureOnlineStore's `name` field is used to identify the
+     * FeatureOnlineStore to be updated. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The featureOnlineStore. + */ + public com.google.cloud.aiplatform.v1.FeatureOnlineStore getFeatureOnlineStore() { + if (featureOnlineStoreBuilder_ == null) { + return featureOnlineStore_ == null + ? com.google.cloud.aiplatform.v1.FeatureOnlineStore.getDefaultInstance() + : featureOnlineStore_; + } else { + return featureOnlineStoreBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The FeatureOnlineStore's `name` field is used to identify the
+     * FeatureOnlineStore to be updated. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFeatureOnlineStore(com.google.cloud.aiplatform.v1.FeatureOnlineStore value) { + if (featureOnlineStoreBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + featureOnlineStore_ = value; + } else { + featureOnlineStoreBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureOnlineStore's `name` field is used to identify the
+     * FeatureOnlineStore to be updated. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFeatureOnlineStore( + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder builderForValue) { + if (featureOnlineStoreBuilder_ == null) { + featureOnlineStore_ = builderForValue.build(); + } else { + featureOnlineStoreBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureOnlineStore's `name` field is used to identify the
+     * FeatureOnlineStore to be updated. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFeatureOnlineStore( + com.google.cloud.aiplatform.v1.FeatureOnlineStore value) { + if (featureOnlineStoreBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && featureOnlineStore_ != null + && featureOnlineStore_ + != com.google.cloud.aiplatform.v1.FeatureOnlineStore.getDefaultInstance()) { + getFeatureOnlineStoreBuilder().mergeFrom(value); + } else { + featureOnlineStore_ = value; + } + } else { + featureOnlineStoreBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureOnlineStore's `name` field is used to identify the
+     * FeatureOnlineStore to be updated. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFeatureOnlineStore() { + bitField0_ = (bitField0_ & ~0x00000001); + featureOnlineStore_ = null; + if (featureOnlineStoreBuilder_ != null) { + featureOnlineStoreBuilder_.dispose(); + featureOnlineStoreBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureOnlineStore's `name` field is used to identify the
+     * FeatureOnlineStore to be updated. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder + getFeatureOnlineStoreBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getFeatureOnlineStoreFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The FeatureOnlineStore's `name` field is used to identify the
+     * FeatureOnlineStore to be updated. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureOnlineStoreOrBuilder + getFeatureOnlineStoreOrBuilder() { + if (featureOnlineStoreBuilder_ != null) { + return featureOnlineStoreBuilder_.getMessageOrBuilder(); + } else { + return featureOnlineStore_ == null + ? com.google.cloud.aiplatform.v1.FeatureOnlineStore.getDefaultInstance() + : featureOnlineStore_; + } + } + /** + * + * + *
+     * Required. The FeatureOnlineStore's `name` field is used to identify the
+     * FeatureOnlineStore to be updated. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureOnlineStore, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder, + com.google.cloud.aiplatform.v1.FeatureOnlineStoreOrBuilder> + getFeatureOnlineStoreFieldBuilder() { + if (featureOnlineStoreBuilder_ == null) { + featureOnlineStoreBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureOnlineStore, + com.google.cloud.aiplatform.v1.FeatureOnlineStore.Builder, + com.google.cloud.aiplatform.v1.FeatureOnlineStoreOrBuilder>( + getFeatureOnlineStore(), getParentForChildren(), isClean()); + featureOnlineStore_ = null; + } + return featureOnlineStoreBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureOnlineStore 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `big_query_source`
+     *   * `labels`
+     *   * `sync_config`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureOnlineStore 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `big_query_source`
+     *   * `labels`
+     *   * `sync_config`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureOnlineStore 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `big_query_source`
+     *   * `labels`
+     *   * `sync_config`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureOnlineStore 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `big_query_source`
+     *   * `labels`
+     *   * `sync_config`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureOnlineStore 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `big_query_source`
+     *   * `labels`
+     *   * `sync_config`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureOnlineStore 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `big_query_source`
+     *   * `labels`
+     *   * `sync_config`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureOnlineStore 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `big_query_source`
+     *   * `labels`
+     *   * `sync_config`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureOnlineStore 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `big_query_source`
+     *   * `labels`
+     *   * `sync_config`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureOnlineStore 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `big_query_source`
+     *   * `labels`
+     *   * `sync_config`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest) + private static final com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest(); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateFeatureOnlineStoreRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOnlineStoreRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOnlineStoreRequestOrBuilder.java new file mode 100644 index 000000000000..a8208c2c996a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOnlineStoreRequestOrBuilder.java @@ -0,0 +1,143 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface UpdateFeatureOnlineStoreRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The FeatureOnlineStore's `name` field is used to identify the
+   * FeatureOnlineStore to be updated. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the featureOnlineStore field is set. + */ + boolean hasFeatureOnlineStore(); + /** + * + * + *
+   * Required. The FeatureOnlineStore's `name` field is used to identify the
+   * FeatureOnlineStore to be updated. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The featureOnlineStore. + */ + com.google.cloud.aiplatform.v1.FeatureOnlineStore getFeatureOnlineStore(); + /** + * + * + *
+   * Required. The FeatureOnlineStore's `name` field is used to identify the
+   * FeatureOnlineStore to be updated. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureOnlineStore feature_online_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.FeatureOnlineStoreOrBuilder getFeatureOnlineStoreOrBuilder(); + + /** + * + * + *
+   * Field mask is used to specify the fields to be overwritten in the
+   * FeatureOnlineStore 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 only the non-empty fields present in the
+   * request will be overwritten. Set the update_mask to `*` to override all
+   * fields.
+   *
+   * Updatable fields:
+   *
+   *   * `big_query_source`
+   *   * `labels`
+   *   * `sync_config`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Field mask is used to specify the fields to be overwritten in the
+   * FeatureOnlineStore 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 only the non-empty fields present in the
+   * request will be overwritten. Set the update_mask to `*` to override all
+   * fields.
+   *
+   * Updatable fields:
+   *
+   *   * `big_query_source`
+   *   * `labels`
+   *   * `sync_config`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Field mask is used to specify the fields to be overwritten in the
+   * FeatureOnlineStore 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 only the non-empty fields present in the
+   * request will be overwritten. Set the update_mask to `*` to override all
+   * fields.
+   *
+   * Updatable fields:
+   *
+   *   * `big_query_source`
+   *   * `labels`
+   *   * `sync_config`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOperationMetadata.java new file mode 100644 index 000000000000..7a8b40b831d3 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOperationMetadata.java @@ -0,0 +1,719 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Details of operations that perform update Feature.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata} + */ +public final class UpdateFeatureOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata) + UpdateFeatureOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateFeatureOperationMetadata.newBuilder() to construct. + private UpdateFeatureOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateFeatureOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateFeatureOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata.class, + com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata.Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * Operation metadata for Feature Update.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * Operation metadata for Feature Update.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * Operation metadata for Feature Update.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata other = + (com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getUnknownFields().equals(other.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 (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of operations that perform update Feature.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata) + com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata.class, + com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureRegistryServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata build() { + com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata result = + new com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.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.aiplatform.v1.UpdateFeatureOperationMetadata) { + return mergeFrom((com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata.getDefaultInstance()) + return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(getGenericMetadataFieldBuilder().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.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * Operation metadata for Feature Update.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation metadata for Feature Update.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation metadata for Feature Update.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for Feature Update.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for Feature Update.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for Feature Update.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for Feature Update.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation metadata for Feature Update.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * Operation metadata for Feature Update.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata) + private static final com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateFeatureOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..153d078b1b3d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureOperationMetadataOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_registry_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface UpdateFeatureOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation metadata for Feature Update.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * Operation metadata for Feature Update.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * Operation metadata for Feature Update.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureRequest.java index 9ab6b019eb4c..fb34f9e70153 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureRequest.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureRequest.java @@ -24,6 +24,8 @@ *
  * Request message for
  * [FeaturestoreService.UpdateFeature][google.cloud.aiplatform.v1.FeaturestoreService.UpdateFeature].
+ * Request message for
+ * [FeatureRegistryService.UpdateFeature][google.cloud.aiplatform.v1.FeatureRegistryService.UpdateFeature].
  * 
* * Protobuf type {@code google.cloud.aiplatform.v1.UpdateFeatureRequest} @@ -71,6 +73,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * updated. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` *
* * @@ -91,6 +94,7 @@ public boolean hasFeature() { * updated. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` *
* * @@ -113,6 +117,7 @@ public com.google.cloud.aiplatform.v1.Feature getFeature() { * updated. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` *
* * @@ -144,7 +149,7 @@ public com.google.cloud.aiplatform.v1.FeatureOrBuilder getFeatureOrBuilder() { * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) *
* * .google.protobuf.FieldMask update_mask = 2; @@ -171,7 +176,7 @@ public boolean hasUpdateMask() { * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) *
* * .google.protobuf.FieldMask update_mask = 2; @@ -198,7 +203,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) *
* * .google.protobuf.FieldMask update_mask = 2; @@ -392,6 +397,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * Request message for
    * [FeaturestoreService.UpdateFeature][google.cloud.aiplatform.v1.FeaturestoreService.UpdateFeature].
+   * Request message for
+   * [FeatureRegistryService.UpdateFeature][google.cloud.aiplatform.v1.FeatureRegistryService.UpdateFeature].
    * 
* * Protobuf type {@code google.cloud.aiplatform.v1.UpdateFeatureRequest} @@ -603,6 +610,7 @@ public Builder mergeFrom( * updated. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` *
* * @@ -622,6 +630,7 @@ public boolean hasFeature() { * updated. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` *
* * @@ -647,6 +656,7 @@ public com.google.cloud.aiplatform.v1.Feature getFeature() { * updated. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` *
* * @@ -674,6 +684,7 @@ public Builder setFeature(com.google.cloud.aiplatform.v1.Feature value) { * updated. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` *
* * @@ -698,6 +709,7 @@ public Builder setFeature(com.google.cloud.aiplatform.v1.Feature.Builder builder * updated. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` *
* * @@ -728,6 +740,7 @@ public Builder mergeFeature(com.google.cloud.aiplatform.v1.Feature value) { * updated. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` *
* * @@ -752,6 +765,7 @@ public Builder clearFeature() { * updated. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` *
* * @@ -771,6 +785,7 @@ public com.google.cloud.aiplatform.v1.Feature.Builder getFeatureBuilder() { * updated. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` *
* * @@ -794,6 +809,7 @@ public com.google.cloud.aiplatform.v1.FeatureOrBuilder getFeatureOrBuilder() { * updated. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` *
* * @@ -839,7 +855,7 @@ public com.google.cloud.aiplatform.v1.FeatureOrBuilder getFeatureOrBuilder() { * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) *
* * .google.protobuf.FieldMask update_mask = 2; @@ -865,7 +881,7 @@ public boolean hasUpdateMask() { * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) *
* * .google.protobuf.FieldMask update_mask = 2; @@ -897,7 +913,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) * * * .google.protobuf.FieldMask update_mask = 2; @@ -931,7 +947,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) * * * .google.protobuf.FieldMask update_mask = 2; @@ -962,7 +978,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) * * * .google.protobuf.FieldMask update_mask = 2; @@ -999,7 +1015,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) * * * .google.protobuf.FieldMask update_mask = 2; @@ -1030,7 +1046,7 @@ public Builder clearUpdateMask() { * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) * * * .google.protobuf.FieldMask update_mask = 2; @@ -1056,7 +1072,7 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) * * * .google.protobuf.FieldMask update_mask = 2; @@ -1086,7 +1102,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) * * * .google.protobuf.FieldMask update_mask = 2; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureRequestOrBuilder.java index fd34ca4cb5d2..83443fb1dc62 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureRequestOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureRequestOrBuilder.java @@ -31,6 +31,7 @@ public interface UpdateFeatureRequestOrBuilder * updated. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * * @@ -48,6 +49,7 @@ public interface UpdateFeatureRequestOrBuilder * updated. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * * @@ -65,6 +67,7 @@ public interface UpdateFeatureRequestOrBuilder * updated. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * * @@ -89,7 +92,7 @@ public interface UpdateFeatureRequestOrBuilder * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) * * * .google.protobuf.FieldMask update_mask = 2; @@ -113,7 +116,7 @@ public interface UpdateFeatureRequestOrBuilder * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) * * * .google.protobuf.FieldMask update_mask = 2; @@ -137,7 +140,7 @@ public interface UpdateFeatureRequestOrBuilder * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) * * * .google.protobuf.FieldMask update_mask = 2; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureViewOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureViewOperationMetadata.java new file mode 100644 index 000000000000..8d81aaa313cf --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureViewOperationMetadata.java @@ -0,0 +1,724 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Details of operations that perform update FeatureView.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata} + */ +public final class UpdateFeatureViewOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata) + UpdateFeatureViewOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateFeatureViewOperationMetadata.newBuilder() to construct. + private UpdateFeatureViewOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateFeatureViewOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateFeatureViewOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureViewOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureViewOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata.class, + com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata.Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * Operation metadata for FeatureView Update.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * Operation metadata for FeatureView Update.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * Operation metadata for FeatureView Update.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata other = + (com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getUnknownFields().equals(other.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 (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of operations that perform update FeatureView.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata) + com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureViewOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureViewOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata.class, + com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureViewOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata build() { + com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata result = + new com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.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.aiplatform.v1.UpdateFeatureViewOperationMetadata) { + return mergeFrom((com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata.getDefaultInstance()) + return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(getGenericMetadataFieldBuilder().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.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * Operation metadata for FeatureView Update.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation metadata for FeatureView Update.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation metadata for FeatureView Update.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureView Update.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureView Update.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureView Update.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for FeatureView Update.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation metadata for FeatureView Update.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * Operation metadata for FeatureView Update.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata) + private static final com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateFeatureViewOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureViewOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureViewOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..e01c9b2beb23 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureViewOperationMetadataOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface UpdateFeatureViewOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation metadata for FeatureView Update.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * Operation metadata for FeatureView Update.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * Operation metadata for FeatureView Update.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureViewRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureViewRequest.java new file mode 100644 index 000000000000..f23279375432 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureViewRequest.java @@ -0,0 +1,1138 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [FeatureOnlineStoreAdminService.UpdateFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.UpdateFeatureView].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateFeatureViewRequest} + */ +public final class UpdateFeatureViewRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UpdateFeatureViewRequest) + UpdateFeatureViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateFeatureViewRequest.newBuilder() to construct. + private UpdateFeatureViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateFeatureViewRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateFeatureViewRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest.class, + com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest.Builder.class); + } + + public static final int FEATURE_VIEW_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.FeatureView featureView_; + /** + * + * + *
+   * Required. The FeatureView's `name` field is used to identify the
+   * FeatureView to be updated. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the featureView field is set. + */ + @java.lang.Override + public boolean hasFeatureView() { + return featureView_ != null; + } + /** + * + * + *
+   * Required. The FeatureView's `name` field is used to identify the
+   * FeatureView to be updated. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The featureView. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureView getFeatureView() { + return featureView_ == null + ? com.google.cloud.aiplatform.v1.FeatureView.getDefaultInstance() + : featureView_; + } + /** + * + * + *
+   * Required. The FeatureView's `name` field is used to identify the
+   * FeatureView to be updated. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FeatureViewOrBuilder getFeatureViewOrBuilder() { + return featureView_ == null + ? com.google.cloud.aiplatform.v1.FeatureView.getDefaultInstance() + : featureView_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Field mask is used to specify the fields to be overwritten in the
+   * FeatureView 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 only the non-empty fields present in the
+   * request will be overwritten. Set the update_mask to `*` to override all
+   * fields.
+   *
+   * Updatable fields:
+   *
+   *   * `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Field mask is used to specify the fields to be overwritten in the
+   * FeatureView 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 only the non-empty fields present in the
+   * request will be overwritten. Set the update_mask to `*` to override all
+   * fields.
+   *
+   * Updatable fields:
+   *
+   *   * `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Field mask is used to specify the fields to be overwritten in the
+   * FeatureView 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 only the non-empty fields present in the
+   * request will be overwritten. Set the update_mask to `*` to override all
+   * fields.
+   *
+   * Updatable fields:
+   *
+   *   * `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (featureView_ != null) { + output.writeMessage(1, getFeatureView()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (featureView_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFeatureView()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest other = + (com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest) obj; + + if (hasFeatureView() != other.hasFeatureView()) return false; + if (hasFeatureView()) { + if (!getFeatureView().equals(other.getFeatureView())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.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 (hasFeatureView()) { + hash = (37 * hash) + FEATURE_VIEW_FIELD_NUMBER; + hash = (53 * hash) + getFeatureView().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [FeatureOnlineStoreAdminService.UpdateFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.UpdateFeatureView].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateFeatureViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UpdateFeatureViewRequest) + com.google.cloud.aiplatform.v1.UpdateFeatureViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest.class, + com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + featureView_ = null; + if (featureViewBuilder_ != null) { + featureViewBuilder_.dispose(); + featureViewBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateFeatureViewRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest build() { + com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest buildPartial() { + com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest result = + new com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.featureView_ = + featureViewBuilder_ == null ? featureView_ : featureViewBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.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.aiplatform.v1.UpdateFeatureViewRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest other) { + if (other == com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest.getDefaultInstance()) + return this; + if (other.hasFeatureView()) { + mergeFeatureView(other.getFeatureView()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(getFeatureViewFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().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.aiplatform.v1.FeatureView featureView_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView, + com.google.cloud.aiplatform.v1.FeatureView.Builder, + com.google.cloud.aiplatform.v1.FeatureViewOrBuilder> + featureViewBuilder_; + /** + * + * + *
+     * Required. The FeatureView's `name` field is used to identify the
+     * FeatureView to be updated. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the featureView field is set. + */ + public boolean hasFeatureView() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The FeatureView's `name` field is used to identify the
+     * FeatureView to be updated. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The featureView. + */ + public com.google.cloud.aiplatform.v1.FeatureView getFeatureView() { + if (featureViewBuilder_ == null) { + return featureView_ == null + ? com.google.cloud.aiplatform.v1.FeatureView.getDefaultInstance() + : featureView_; + } else { + return featureViewBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The FeatureView's `name` field is used to identify the
+     * FeatureView to be updated. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFeatureView(com.google.cloud.aiplatform.v1.FeatureView value) { + if (featureViewBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + featureView_ = value; + } else { + featureViewBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureView's `name` field is used to identify the
+     * FeatureView to be updated. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFeatureView( + com.google.cloud.aiplatform.v1.FeatureView.Builder builderForValue) { + if (featureViewBuilder_ == null) { + featureView_ = builderForValue.build(); + } else { + featureViewBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureView's `name` field is used to identify the
+     * FeatureView to be updated. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFeatureView(com.google.cloud.aiplatform.v1.FeatureView value) { + if (featureViewBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && featureView_ != null + && featureView_ != com.google.cloud.aiplatform.v1.FeatureView.getDefaultInstance()) { + getFeatureViewBuilder().mergeFrom(value); + } else { + featureView_ = value; + } + } else { + featureViewBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureView's `name` field is used to identify the
+     * FeatureView to be updated. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFeatureView() { + bitField0_ = (bitField0_ & ~0x00000001); + featureView_ = null; + if (featureViewBuilder_ != null) { + featureViewBuilder_.dispose(); + featureViewBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The FeatureView's `name` field is used to identify the
+     * FeatureView to be updated. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureView.Builder getFeatureViewBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getFeatureViewFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The FeatureView's `name` field is used to identify the
+     * FeatureView to be updated. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.FeatureViewOrBuilder getFeatureViewOrBuilder() { + if (featureViewBuilder_ != null) { + return featureViewBuilder_.getMessageOrBuilder(); + } else { + return featureView_ == null + ? com.google.cloud.aiplatform.v1.FeatureView.getDefaultInstance() + : featureView_; + } + } + /** + * + * + *
+     * Required. The FeatureView's `name` field is used to identify the
+     * FeatureView to be updated. Format:
+     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView, + com.google.cloud.aiplatform.v1.FeatureView.Builder, + com.google.cloud.aiplatform.v1.FeatureViewOrBuilder> + getFeatureViewFieldBuilder() { + if (featureViewBuilder_ == null) { + featureViewBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FeatureView, + com.google.cloud.aiplatform.v1.FeatureView.Builder, + com.google.cloud.aiplatform.v1.FeatureViewOrBuilder>( + getFeatureView(), getParentForChildren(), isClean()); + featureView_ = null; + } + return featureViewBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureView 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureView 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureView 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureView 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureView 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureView 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureView 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureView 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Field mask is used to specify the fields to be overwritten in the
+     * FeatureView 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 only the non-empty fields present in the
+     * request will be overwritten. Set the update_mask to `*` to override all
+     * fields.
+     *
+     * Updatable fields:
+     *
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.UpdateFeatureViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UpdateFeatureViewRequest) + private static final com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest(); + } + + public static com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateFeatureViewRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureViewRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureViewRequestOrBuilder.java new file mode 100644 index 000000000000..52495e30c67a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateFeatureViewRequestOrBuilder.java @@ -0,0 +1,137 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface UpdateFeatureViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UpdateFeatureViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The FeatureView's `name` field is used to identify the
+   * FeatureView to be updated. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the featureView field is set. + */ + boolean hasFeatureView(); + /** + * + * + *
+   * Required. The FeatureView's `name` field is used to identify the
+   * FeatureView to be updated. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The featureView. + */ + com.google.cloud.aiplatform.v1.FeatureView getFeatureView(); + /** + * + * + *
+   * Required. The FeatureView's `name` field is used to identify the
+   * FeatureView to be updated. Format:
+   * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.FeatureView feature_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.FeatureViewOrBuilder getFeatureViewOrBuilder(); + + /** + * + * + *
+   * Field mask is used to specify the fields to be overwritten in the
+   * FeatureView 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 only the non-empty fields present in the
+   * request will be overwritten. Set the update_mask to `*` to override all
+   * fields.
+   *
+   * Updatable fields:
+   *
+   *   * `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Field mask is used to specify the fields to be overwritten in the
+   * FeatureView 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 only the non-empty fields present in the
+   * request will be overwritten. Set the update_mask to `*` to override all
+   * fields.
+   *
+   * Updatable fields:
+   *
+   *   * `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Field mask is used to specify the fields to be overwritten in the
+   * FeatureView 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 only the non-empty fields present in the
+   * request will be overwritten. Set the update_mask to `*` to override all
+   * fields.
+   *
+   * Updatable fields:
+   *
+   *   * `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/custom_job.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/custom_job.proto index 49bb9790b1fd..b129738b6d59 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/custom_job.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/custom_job.proto @@ -181,6 +181,12 @@ message CustomJobSpec { // * AIP_TENSORBOARD_LOG_DIR = `//logs/` GcsDestination base_output_directory = 6; + // The ID of the location to store protected artifacts. e.g. us-central1. + // Populate only when the location is different than CustomJob location. + // List of supported locations: + // https://cloud.google.com/vertex-ai/docs/general/locations + string protected_artifact_location_id = 19; + // Optional. The name of a Vertex AI // [Tensorboard][google.cloud.aiplatform.v1.Tensorboard] resource to which // this CustomJob will upload Tensorboard logs. Format: diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature.proto index 327ec57d301d..126a5a5aa6e7 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature.proto @@ -29,13 +29,15 @@ option java_package = "com.google.cloud.aiplatform.v1"; option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; option ruby_package = "Google::Cloud::AIPlatform::V1"; -// Feature Metadata information that describes an attribute of an entity type. -// For example, apple is an entity type, and color is a feature that describes -// apple. +// Feature Metadata information. +// For example, color is a feature that describes an apple. message Feature { option (google.api.resource) = { type: "aiplatform.googleapis.com/Feature" pattern: "projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}" + pattern: "projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}" + plural: "features" + singular: "feature" }; // A list of historical @@ -69,6 +71,7 @@ message Feature { [(google.api.field_behavior) = OUTPUT_ONLY]; } + // Only applicable for Vertex AI Legacy Feature Store. // An enum representing the value type of a feature. enum ValueType { // The value type is unspecified. @@ -105,6 +108,7 @@ message Feature { // Immutable. Name of the Feature. // Format: // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + // `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` // // The last part feature is assigned by the client. The feature can be up to // 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, @@ -115,17 +119,17 @@ message Feature { // Description of the Feature. string description = 2; - // Required. Immutable. Type of Feature value. - ValueType value_type = 3 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; + // Immutable. Only applicable for Vertex AI Feature Store (Legacy). + // Type of Feature value. + ValueType value_type = 3 [(google.api.field_behavior) = IMMUTABLE]; - // Output only. Timestamp when this EntityType was created. + // Output only. Only applicable for Vertex AI Feature Store (Legacy). + // Timestamp when this EntityType was created. google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Timestamp when this EntityType was most recently updated. + // Output only. Only applicable for Vertex AI Feature Store (Legacy). + // Timestamp when this EntityType was most recently updated. google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -146,8 +150,10 @@ message Feature { // "overwrite" update happens. string etag = 7; - // Optional. If not set, use the monitoring_config defined for the EntityType - // this Feature belongs to. Only Features with type + // Optional. Only applicable for Vertex AI Feature Store (Legacy). + // If not set, use the monitoring_config defined for the EntityType this + // Feature belongs to. + // Only Features with type // ([Feature.ValueType][google.cloud.aiplatform.v1.Feature.ValueType]) BOOL, // STRING, DOUBLE or INT64 can enable monitoring. // @@ -155,8 +161,13 @@ message Feature { // config on EntityType. bool disable_monitoring = 12 [(google.api.field_behavior) = OPTIONAL]; - // Output only. The list of historical stats and anomalies with specified - // objectives. + // Output only. Only applicable for Vertex AI Feature Store (Legacy). + // The list of historical stats and anomalies with specified objectives. repeated MonitoringStatsAnomaly monitoring_stats_anomalies = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Only applicable for Vertex AI Feature Store. + // The name of the BigQuery Table/View columnn hosting data for this version. + // If no value is provided, will use feature_id. + string version_column_name = 106; } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_group.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_group.proto new file mode 100644 index 000000000000..afe8c9ebd752 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_group.proto @@ -0,0 +1,95 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/io.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "FeatureGroupProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// Vertex AI Feature Group. +message FeatureGroup { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/FeatureGroup" + pattern: "projects/{project}/locations/{location}/featureGroups/{feature_group}" + plural: "featureGroups" + singular: "featureGroup" + }; + + // Input source type for BigQuery Tables and Views. + message BigQuery { + // Required. Immutable. The BigQuery source URI that points to either a + // BigQuery Table or View. + BigQuerySource big_query_source = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Optional. Columns to construct entity_id / row keys. Currently only + // supports 1 entity_id_column. If not provided defaults to `entity_id`. + repeated string entity_id_columns = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + oneof source { + // Indicates that features for this group come from BigQuery Table/View. + // By default treats the source as a sparse time series source, which is + // required to have an entity_id and a feature_timestamp column in the + // source. + BigQuery big_query = 7; + } + + // Output only. Name of the FeatureGroup. Format: + // `projects/{project}/locations/{location}/featureGroups/{featureGroup}` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this FeatureGroup was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this FeatureGroup was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Used to perform consistent read-modify-write updates. If not set, + // a blind "overwrite" update happens. + string etag = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The labels with user-defined metadata to organize your + // FeatureGroup. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // + // See https://goo.gl/xmQnxf for more information on and examples of labels. + // No more than 64 user labels can be associated with one + // FeatureGroup(System labels are excluded)." System reserved label keys + // are prefixed with "aiplatform.googleapis.com/" and are immutable. + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the FeatureGroup. + string description = 6 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_online_store.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_online_store.proto new file mode 100644 index 000000000000..38e7169973b0 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_online_store.proto @@ -0,0 +1,118 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "FeatureOnlineStoreProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// Vertex AI Feature Online Store provides a centralized repository for serving +// ML features and embedding indexes at low latency. The Feature Online Store is +// a top-level container. +message FeatureOnlineStore { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/FeatureOnlineStore" + pattern: "projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}" + }; + + message Bigtable { + message AutoScaling { + // Required. The minimum number of nodes to scale down to. Must be greater + // than or equal to 1. + int32 min_node_count = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The maximum number of nodes to scale up to. Must be greater + // than or equal to min_node_count, and less than or equal to 10 times of + // 'min_node_count'. + int32 max_node_count = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A percentage of the cluster's CPU capacity. Can be from 10% + // to 80%. When a cluster's CPU utilization exceeds the target that you + // have set, Bigtable immediately adds nodes to the cluster. When CPU + // utilization is substantially lower than the target, Bigtable removes + // nodes. If not set will default to 50%. + int32 cpu_utilization_target = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Autoscaling config applied to Bigtable Instance. + AutoScaling auto_scaling = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Possible states a featureOnlineStore can have. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // State when the featureOnlineStore configuration is not being updated and + // the fields reflect the current configuration of the featureOnlineStore. + // The featureOnlineStore is usable in this state. + STABLE = 1; + + // The state of the featureOnlineStore configuration when it is being + // updated. During an update, the fields reflect either the original + // configuration or the updated configuration of the featureOnlineStore. The + // featureOnlineStore is still usable in this state. + UPDATING = 2; + } + + oneof storage_type { + // Contains settings for the Cloud Bigtable instance that will be created + // to serve featureValues for all FeatureViews under this + // FeatureOnlineStore. + Bigtable bigtable = 8; + } + + // Output only. Name of the FeatureOnlineStore. Format: + // `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this FeatureOnlineStore was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this FeatureOnlineStore was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Used to perform consistent read-modify-write updates. If not set, + // a blind "overwrite" update happens. + string etag = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The labels with user-defined metadata to organize your + // FeatureOnlineStore. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // + // See https://goo.gl/xmQnxf for more information on and examples of labels. + // No more than 64 user labels can be associated with one + // FeatureOnlineStore(System labels are excluded)." System reserved label keys + // are prefixed with "aiplatform.googleapis.com/" and are immutable. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. State of the featureOnlineStore. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_online_store_admin_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_online_store_admin_service.proto new file mode 100644 index 000000000000..8733cb31c2f3 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_online_store_admin_service.proto @@ -0,0 +1,618 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/feature_online_store.proto"; +import "google/cloud/aiplatform/v1/feature_view.proto"; +import "google/cloud/aiplatform/v1/feature_view_sync.proto"; +import "google/cloud/aiplatform/v1/operation.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "FeatureOnlineStoreAdminServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// The service that handles CRUD and List for resources for +// FeatureOnlineStore. +service FeatureOnlineStoreAdminService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new FeatureOnlineStore in a given project and location. + rpc CreateFeatureOnlineStore(CreateFeatureOnlineStoreRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/featureOnlineStores" + body: "feature_online_store" + }; + option (google.api.method_signature) = + "parent,feature_online_store,feature_online_store_id"; + option (google.longrunning.operation_info) = { + response_type: "FeatureOnlineStore" + metadata_type: "CreateFeatureOnlineStoreOperationMetadata" + }; + } + + // Gets details of a single FeatureOnlineStore. + rpc GetFeatureOnlineStore(GetFeatureOnlineStoreRequest) + returns (FeatureOnlineStore) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/featureOnlineStores/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists FeatureOnlineStores in a given project and location. + rpc ListFeatureOnlineStores(ListFeatureOnlineStoresRequest) + returns (ListFeatureOnlineStoresResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/featureOnlineStores" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates the parameters of a single FeatureOnlineStore. + rpc UpdateFeatureOnlineStore(UpdateFeatureOnlineStoreRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{feature_online_store.name=projects/*/locations/*/featureOnlineStores/*}" + body: "feature_online_store" + }; + option (google.api.method_signature) = "feature_online_store,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "FeatureOnlineStore" + metadata_type: "UpdateFeatureOnlineStoreOperationMetadata" + }; + } + + // Deletes a single FeatureOnlineStore. The FeatureOnlineStore must not + // contain any FeatureViews. + rpc DeleteFeatureOnlineStore(DeleteFeatureOnlineStoreRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/featureOnlineStores/*}" + }; + option (google.api.method_signature) = "name,force"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // Creates a new FeatureView in a given FeatureOnlineStore. + rpc CreateFeatureView(CreateFeatureViewRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/featureOnlineStores/*}/featureViews" + body: "feature_view" + }; + option (google.api.method_signature) = + "parent,feature_view,feature_view_id"; + option (google.longrunning.operation_info) = { + response_type: "FeatureView" + metadata_type: "CreateFeatureViewOperationMetadata" + }; + } + + // Gets details of a single FeatureView. + rpc GetFeatureView(GetFeatureViewRequest) returns (FeatureView) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists FeatureViews in a given FeatureOnlineStore. + rpc ListFeatureViews(ListFeatureViewsRequest) + returns (ListFeatureViewsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/featureOnlineStores/*}/featureViews" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates the parameters of a single FeatureView. + rpc UpdateFeatureView(UpdateFeatureViewRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{feature_view.name=projects/*/locations/*/featureOnlineStores/*/featureViews/*}" + body: "feature_view" + }; + option (google.api.method_signature) = "feature_view,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "FeatureView" + metadata_type: "UpdateFeatureViewOperationMetadata" + }; + } + + // Deletes a single FeatureView. + rpc DeleteFeatureView(DeleteFeatureViewRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // Triggers on-demand sync for the FeatureView. + rpc SyncFeatureView(SyncFeatureViewRequest) + returns (SyncFeatureViewResponse) { + option (google.api.http) = { + post: "/v1/{feature_view=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:sync" + body: "*" + }; + option (google.api.method_signature) = "feature_view"; + } + + // Gets details of a single FeatureViewSync. + rpc GetFeatureViewSync(GetFeatureViewSyncRequest) returns (FeatureViewSync) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/featureViewSyncs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists FeatureViewSyncs in a given FeatureView. + rpc ListFeatureViewSyncs(ListFeatureViewSyncsRequest) + returns (ListFeatureViewSyncsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/featureOnlineStores/*/featureViews/*}/featureViewSyncs" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request message for +// [FeatureOnlineStoreAdminService.CreateFeatureOnlineStore][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.CreateFeatureOnlineStore]. +message CreateFeatureOnlineStoreRequest { + // Required. The resource name of the Location to create FeatureOnlineStores. + // Format: + // `projects/{project}/locations/{location}'` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "aiplatform.googleapis.com/FeatureOnlineStore" + } + ]; + + // Required. The FeatureOnlineStore to create. + FeatureOnlineStore feature_online_store = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for this FeatureOnlineStore, which will become the + // final component of the FeatureOnlineStore's resource name. + // + // This value may be up to 60 characters, and valid characters are + // `[a-z0-9_]`. The first character cannot be a number. + // + // The value must be unique within the project and location. + string feature_online_store_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [FeatureOnlineStoreAdminService.GetFeatureOnlineStore][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.GetFeatureOnlineStore]. +message GetFeatureOnlineStoreRequest { + // Required. The name of the FeatureOnlineStore resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/FeatureOnlineStore" + } + ]; +} + +// Request message for +// [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]. +message ListFeatureOnlineStoresRequest { + // Required. The resource name of the Location to list FeatureOnlineStores. + // Format: + // `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "aiplatform.googleapis.com/FeatureOnlineStore" + } + ]; + + // Lists the FeatureOnlineStores that match the filter expression. The + // following fields are supported: + // + // * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. + // Values must be + // in RFC 3339 format. + // * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. + // Values must be + // in RFC 3339 format. + // * `labels`: Supports key-value equality and key presence. + // + // Examples: + // + // * `create_time > "2020-01-01" OR update_time > "2020-01-01"` + // FeatureOnlineStores created or updated after 2020-01-01. + // * `labels.env = "prod"` + // FeatureOnlineStores with label "env" set to "prod". + string filter = 2; + + // The maximum number of FeatureOnlineStores to return. The service may return + // fewer than this value. If unspecified, at most 100 FeatureOnlineStores will + // be returned. The maximum value is 100; any value greater than 100 will be + // coerced to 100. + int32 page_size = 3; + + // A page token, received from a previous + // [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores] + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores] + // must match the call that provided the page token. + string page_token = 4; + + // A comma-separated list of fields to order by, sorted in ascending order. + // Use "desc" after a field name for descending. + // Supported Fields: + // + // * `create_time` + // * `update_time` + string order_by = 5; +} + +// Response message for +// [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]. +message ListFeatureOnlineStoresResponse { + // The FeatureOnlineStores matching the request. + repeated FeatureOnlineStore feature_online_stores = 1; + + // A token, which can be sent as + // [ListFeatureOnlineStoresRequest.page_token][google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest.page_token] + // to retrieve the next page. If this field is omitted, there are no + // subsequent pages. + string next_page_token = 2; +} + +// Request message for +// [FeatureOnlineStoreAdminService.UpdateFeatureOnlineStore][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.UpdateFeatureOnlineStore]. +message UpdateFeatureOnlineStoreRequest { + // Required. The FeatureOnlineStore's `name` field is used to identify the + // FeatureOnlineStore to be updated. Format: + // `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}` + FeatureOnlineStore feature_online_store = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Field mask is used to specify the fields to be overwritten in the + // FeatureOnlineStore 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 only the non-empty fields present in the + // request will be overwritten. Set the update_mask to `*` to override all + // fields. + // + // Updatable fields: + // + // * `big_query_source` + // * `labels` + // * `sync_config` + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for +// [FeatureOnlineStoreAdminService.DeleteFeatureOnlineStore][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.DeleteFeatureOnlineStore]. +message DeleteFeatureOnlineStoreRequest { + // Required. The name of the FeatureOnlineStore to be deleted. + // Format: + // `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/FeatureOnlineStore" + } + ]; + + // If set to true, any FeatureViews and Features for this FeatureOnlineStore + // will also be deleted. (Otherwise, the request will only work if the + // FeatureOnlineStore has no FeatureViews.) + bool force = 2; +} + +// Request message for +// [FeatureOnlineStoreAdminService.CreateFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.CreateFeatureView]. +message CreateFeatureViewRequest { + // Required. The resource name of the FeatureOnlineStore to create + // FeatureViews. Format: + // `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/FeatureOnlineStore" + } + ]; + + // Required. The FeatureView to create. + FeatureView feature_view = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the FeatureView, which will become the final + // component of the FeatureView's resource name. + // + // This value may be up to 60 characters, and valid characters are + // `[a-z0-9_]`. The first character cannot be a number. + // + // The value must be unique within a FeatureOnlineStore. + string feature_view_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Immutable. If set to true, one on demand sync will be run immediately, + // regardless whether the + // [FeatureView.sync_config][google.cloud.aiplatform.v1.FeatureView.sync_config] + // is configured or not. + bool run_sync_immediately = 4 [(google.api.field_behavior) = IMMUTABLE]; +} + +// Request message for +// [FeatureOnlineStoreAdminService.GetFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.GetFeatureView]. +message GetFeatureViewRequest { + // Required. The name of the FeatureView resource. + // Format: + // `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/FeatureView" + } + ]; +} + +// Request message for +// [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]. +message ListFeatureViewsRequest { + // Required. The resource name of the FeatureOnlineStore to list FeatureViews. + // Format: + // `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "aiplatform.googleapis.com/FeatureView" + } + ]; + + // Lists the FeatureViews that match the filter expression. The following + // filters are supported: + // + // * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. + // Values must be in RFC 3339 format. + // * `update_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. + // Values must be in RFC 3339 format. + // * `labels`: Supports key-value equality as well as key presence. + // + // Examples: + // + // * `create_time > \"2020-01-31T15:30:00.000000Z\" OR + // update_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViews + // created or updated after 2020-01-31T15:30:00.000000Z. + // * `labels.active = yes AND labels.env = prod` --> FeatureViews having both + // (active: yes) and (env: prod) labels. + // * `labels.env: *` --> Any FeatureView which has a label with 'env' as the + // key. + string filter = 2; + + // The maximum number of FeatureViews to return. The service may return fewer + // than this value. If unspecified, at most 1000 FeatureViews will be + // returned. The maximum value is 1000; any value greater than 1000 will be + // coerced to 1000. + int32 page_size = 3; + + // A page token, received from a previous + // [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews] + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews] + // must match the call that provided the page token. + string page_token = 4; + + // A comma-separated list of fields to order by, sorted in ascending order. + // Use "desc" after a field name for descending. + // + // Supported fields: + // + // * `feature_view_id` + // * `create_time` + // * `update_time` + string order_by = 5; +} + +// Response message for +// [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]. +message ListFeatureViewsResponse { + // The FeatureViews matching the request. + repeated FeatureView feature_views = 1; + + // A token, which can be sent as + // [ListFeatureViewsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewsRequest.page_token] + // to retrieve the next page. If this field is omitted, there are no + // subsequent pages. + string next_page_token = 2; +} + +// Request message for +// [FeatureOnlineStoreAdminService.UpdateFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.UpdateFeatureView]. +message UpdateFeatureViewRequest { + // Required. The FeatureView's `name` field is used to identify the + // FeatureView to be updated. Format: + // `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}` + FeatureView feature_view = 1 [(google.api.field_behavior) = REQUIRED]; + + // Field mask is used to specify the fields to be overwritten in the + // FeatureView 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 only the non-empty fields present in the + // request will be overwritten. Set the update_mask to `*` to override all + // fields. + // + // Updatable fields: + // + // * `labels` + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for [FeatureOnlineStoreAdminService.DeleteFeatureViews][]. +message DeleteFeatureViewRequest { + // Required. The name of the FeatureView to be deleted. + // Format: + // `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/FeatureView" + } + ]; +} + +// Details of operations that perform create FeatureOnlineStore. +message CreateFeatureOnlineStoreOperationMetadata { + // Operation metadata for FeatureOnlineStore. + GenericOperationMetadata generic_metadata = 1; +} + +// Details of operations that perform update FeatureOnlineStore. +message UpdateFeatureOnlineStoreOperationMetadata { + // Operation metadata for FeatureOnlineStore. + GenericOperationMetadata generic_metadata = 1; +} + +// Details of operations that perform create FeatureView. +message CreateFeatureViewOperationMetadata { + // Operation metadata for FeatureView Create. + GenericOperationMetadata generic_metadata = 1; +} + +// Details of operations that perform update FeatureView. +message UpdateFeatureViewOperationMetadata { + // Operation metadata for FeatureView Update. + GenericOperationMetadata generic_metadata = 1; +} + +// Request message for +// [FeatureOnlineStoreAdminService.SyncFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.SyncFeatureView]. +message SyncFeatureViewRequest { + // Required. Format: + // `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}` + string feature_view = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/FeatureView" + } + ]; +} + +// Respose message for +// [FeatureOnlineStoreAdminService.SyncFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.SyncFeatureView]. +message SyncFeatureViewResponse { + // Format: + // `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}` + string feature_view_sync = 1; +} + +// Request message for +// [FeatureOnlineStoreAdminService.GetFeatureViewSync][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.GetFeatureViewSync]. +message GetFeatureViewSyncRequest { + // Required. The name of the FeatureViewSync resource. + // Format: + // `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/FeatureViewSync" + } + ]; +} + +// Request message for +// [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]. +message ListFeatureViewSyncsRequest { + // Required. The resource name of the FeatureView to list FeatureViewSyncs. + // Format: + // `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/FeatureView" + } + ]; + + // Lists the FeatureViewSyncs that match the filter expression. The following + // filters are supported: + // + // * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. + // Values must be in RFC 3339 format. + // + // Examples: + // + // * `create_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViewSyncs + // created after 2020-01-31T15:30:00.000000Z. + string filter = 2; + + // The maximum number of FeatureViewSyncs to return. The service may return + // fewer than this value. If unspecified, at most 1000 FeatureViewSyncs will + // be returned. The maximum value is 1000; any value greater than 1000 will be + // coerced to 1000. + int32 page_size = 3; + + // A page token, received from a previous + // [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs] + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs] + // must match the call that provided the page token. + string page_token = 4; + + // A comma-separated list of fields to order by, sorted in ascending order. + // Use "desc" after a field name for descending. + // + // Supported fields: + // + // * `create_time` + string order_by = 5; +} + +// Response message for +// [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]. +message ListFeatureViewSyncsResponse { + // The FeatureViewSyncs matching the request. + repeated FeatureViewSync feature_view_syncs = 1; + + // A token, which can be sent as + // [ListFeatureViewSyncsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest.page_token] + // to retrieve the next page. If this field is omitted, there are no + // subsequent pages. + string next_page_token = 2; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_online_store_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_online_store_service.proto new file mode 100644 index 000000000000..957b4ade4fe5 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_online_store_service.proto @@ -0,0 +1,121 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/featurestore_online_service.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "FeatureOnlineStoreServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +service FeatureOnlineStoreService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Fetch feature values under a FeatureView. + rpc FetchFeatureValues(FetchFeatureValuesRequest) + returns (FetchFeatureValuesResponse) { + option (google.api.http) = { + post: "/v1/{feature_view=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:fetchFeatureValues" + body: "*" + }; + option (google.api.method_signature) = "feature_view, data_key"; + } +} + +// Format of the data in the Feature View. +enum FeatureViewDataFormat { + // Not set. Will be treated as the KeyValue format. + FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED = 0; + + // Return response data in key-value format. + KEY_VALUE = 1; + + // Return response data in proto Struct format. + PROTO_STRUCT = 2; +} + +// Lookup key for a feature view. +message FeatureViewDataKey { + oneof key_oneof { + // String key to use for lookup. + string key = 1; + } +} + +// Request message for +// [FeatureOnlineStoreService.FetchFeatureValues][google.cloud.aiplatform.v1.FeatureOnlineStoreService.FetchFeatureValues]. +// All the features under the requested feature view will be returned. +message FetchFeatureValuesRequest { + // Required. FeatureView resource format + // `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}` + string feature_view = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/FeatureView" + } + ]; + + // Optional. The request key to fetch feature values for. + FeatureViewDataKey data_key = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Response data format. If not set, + // [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1.FeatureViewDataFormat.KEY_VALUE] + // will be used. + FeatureViewDataFormat data_format = 7 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [FeatureOnlineStoreService.FetchFeatureValues][google.cloud.aiplatform.v1.FeatureOnlineStoreService.FetchFeatureValues] +message FetchFeatureValuesResponse { + // Response structure in the format of key (feature name) and (feature) value + // pair. + message FeatureNameValuePairList { + // Feature name & value pair. + message FeatureNameValuePair { + oneof data { + // Feature value. + FeatureValue value = 2; + } + + // Feature short name. + string name = 1; + } + + // List of feature names and values. + repeated FeatureNameValuePair features = 1; + } + + oneof format { + // Feature values in KeyValue format. + FeatureNameValuePairList key_values = 3; + + // Feature values in proto Struct format. + google.protobuf.Struct proto_struct = 2; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_registry_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_registry_service.proto new file mode 100644 index 000000000000..e02ca56c1966 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_registry_service.proto @@ -0,0 +1,333 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/feature.proto"; +import "google/cloud/aiplatform/v1/feature_group.proto"; +import "google/cloud/aiplatform/v1/featurestore_service.proto"; +import "google/cloud/aiplatform/v1/operation.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "FeatureRegistryServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// The service that handles CRUD and List for resources for +// FeatureRegistry. +service FeatureRegistryService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new FeatureGroup in a given project and location. + rpc CreateFeatureGroup(CreateFeatureGroupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/featureGroups" + body: "feature_group" + }; + option (google.api.method_signature) = + "parent,feature_group,feature_group_id"; + option (google.longrunning.operation_info) = { + response_type: "FeatureGroup" + metadata_type: "CreateFeatureGroupOperationMetadata" + }; + } + + // Gets details of a single FeatureGroup. + rpc GetFeatureGroup(GetFeatureGroupRequest) returns (FeatureGroup) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/featureGroups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists FeatureGroups in a given project and location. + rpc ListFeatureGroups(ListFeatureGroupsRequest) + returns (ListFeatureGroupsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/featureGroups" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates the parameters of a single FeatureGroup. + rpc UpdateFeatureGroup(UpdateFeatureGroupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{feature_group.name=projects/*/locations/*/featureGroups/*}" + body: "feature_group" + }; + option (google.api.method_signature) = "feature_group,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "FeatureGroup" + metadata_type: "UpdateFeatureGroupOperationMetadata" + }; + } + + // Deletes a single FeatureGroup. + rpc DeleteFeatureGroup(DeleteFeatureGroupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/featureGroups/*}" + }; + option (google.api.method_signature) = "name,force"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // Creates a new Feature in a given FeatureGroup. + rpc CreateFeature(CreateFeatureRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/featureGroups/*}/features" + body: "feature" + }; + option (google.api.method_signature) = "parent,feature,feature_id"; + option (google.longrunning.operation_info) = { + response_type: "Feature" + metadata_type: "CreateFeatureOperationMetadata" + }; + } + + // Gets details of a single Feature. + rpc GetFeature(GetFeatureRequest) returns (Feature) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/featureGroups/*/features/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Features in a given FeatureGroup. + rpc ListFeatures(ListFeaturesRequest) returns (ListFeaturesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/featureGroups/*}/features" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates the parameters of a single Feature. + rpc UpdateFeature(UpdateFeatureRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{feature.name=projects/*/locations/*/featureGroups/*/features/*}" + body: "feature" + }; + option (google.api.method_signature) = "feature,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Feature" + metadata_type: "UpdateFeatureOperationMetadata" + }; + } + + // Deletes a single Feature. + rpc DeleteFeature(DeleteFeatureRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/featureGroups/*/features/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } +} + +// Request message for +// [FeatureRegistryService.CreateFeatureGroup][google.cloud.aiplatform.v1.FeatureRegistryService.CreateFeatureGroup]. +message CreateFeatureGroupRequest { + // Required. The resource name of the Location to create FeatureGroups. + // Format: + // `projects/{project}/locations/{location}'` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "aiplatform.googleapis.com/FeatureGroup" + } + ]; + + // Required. The FeatureGroup to create. + FeatureGroup feature_group = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for this FeatureGroup, which will become the final + // component of the FeatureGroup's resource name. + // + // This value may be up to 60 characters, and valid characters are + // `[a-z0-9_]`. The first character cannot be a number. + // + // The value must be unique within the project and location. + string feature_group_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [FeatureRegistryService.GetFeatureGroup][google.cloud.aiplatform.v1.FeatureRegistryService.GetFeatureGroup]. +message GetFeatureGroupRequest { + // Required. The name of the FeatureGroup resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/FeatureGroup" + } + ]; +} + +// Request message for +// [FeatureRegistryService.ListFeatureGroups][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatureGroups]. +message ListFeatureGroupsRequest { + // Required. The resource name of the Location to list FeatureGroups. + // Format: + // `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "aiplatform.googleapis.com/FeatureGroup" + } + ]; + + // Lists the FeatureGroups that match the filter expression. The + // following fields are supported: + // + // * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. + // Values must be + // in RFC 3339 format. + // * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. + // Values must be + // in RFC 3339 format. + // * `labels`: Supports key-value equality and key presence. + // + // Examples: + // + // * `create_time > "2020-01-01" OR update_time > "2020-01-01"` + // FeatureGroups created or updated after 2020-01-01. + // * `labels.env = "prod"` + // FeatureGroups with label "env" set to "prod". + string filter = 2; + + // The maximum number of FeatureGroups to return. The service may return + // fewer than this value. If unspecified, at most 100 FeatureGroups will + // be returned. The maximum value is 100; any value greater than 100 will be + // coerced to 100. + int32 page_size = 3; + + // A page token, received from a previous + // [FeatureGroupAdminService.ListFeatureGroups][] call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // [FeatureGroupAdminService.ListFeatureGroups][] must + // match the call that provided the page token. + string page_token = 4; + + // A comma-separated list of fields to order by, sorted in ascending order. + // Use "desc" after a field name for descending. + // Supported Fields: + // + // * `create_time` + // * `update_time` + string order_by = 5; +} + +// Response message for +// [FeatureRegistryService.ListFeatureGroups][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatureGroups]. +message ListFeatureGroupsResponse { + // The FeatureGroups matching the request. + repeated FeatureGroup feature_groups = 1; + + // A token, which can be sent as + // [ListFeatureGroupsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureGroupsRequest.page_token] + // to retrieve the next page. If this field is omitted, there are no + // subsequent pages. + string next_page_token = 2; +} + +// Request message for +// [FeatureRegistryService.UpdateFeatureGroup][google.cloud.aiplatform.v1.FeatureRegistryService.UpdateFeatureGroup]. +message UpdateFeatureGroupRequest { + // Required. The FeatureGroup's `name` field is used to identify the + // FeatureGroup to be updated. Format: + // `projects/{project}/locations/{location}/featureGroups/{feature_group}` + FeatureGroup feature_group = 1 [(google.api.field_behavior) = REQUIRED]; + + // Field mask is used to specify the fields to be overwritten in the + // FeatureGroup 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 only the non-empty fields present in the + // request will be overwritten. Set the update_mask to `*` to override all + // fields. + // + // Updatable fields: + // + // * `labels` + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for +// [FeatureRegistryService.DeleteFeatureGroup][google.cloud.aiplatform.v1.FeatureRegistryService.DeleteFeatureGroup]. +message DeleteFeatureGroupRequest { + // Required. The name of the FeatureGroup to be deleted. + // Format: + // `projects/{project}/locations/{location}/featureGroups/{feature_group}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/FeatureGroup" + } + ]; + + // If set to true, any Features under this FeatureGroup + // will also be deleted. (Otherwise, the request will only work if the + // FeatureGroup has no Features.) + bool force = 2; +} + +// Details of operations that perform create FeatureGroup. +message CreateFeatureGroupOperationMetadata { + // Operation metadata for FeatureGroup. + GenericOperationMetadata generic_metadata = 1; +} + +// Details of operations that perform update FeatureGroup. +message UpdateFeatureGroupOperationMetadata { + // Operation metadata for FeatureGroup. + GenericOperationMetadata generic_metadata = 1; +} + +// Details of operations that perform create FeatureGroup. +message CreateRegistryFeatureOperationMetadata { + // Operation metadata for Feature. + GenericOperationMetadata generic_metadata = 1; +} + +// Details of operations that perform update Feature. +message UpdateFeatureOperationMetadata { + // Operation metadata for Feature Update. + GenericOperationMetadata generic_metadata = 1; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_view.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_view.proto new file mode 100644 index 000000000000..e1aa9978d7eb --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_view.proto @@ -0,0 +1,123 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "FeatureViewProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// FeatureView is representation of values that the FeatureOnlineStore will +// serve based on its syncConfig. +message FeatureView { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/FeatureView" + pattern: "projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}" + }; + + message BigQuerySource { + // Required. The BigQuery view URI that will be materialized on each sync + // trigger based on FeatureView.SyncConfig. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Columns to construct entity_id / row keys. Start by supporting + // 1 only. + repeated string entity_id_columns = 2 + [(google.api.field_behavior) = REQUIRED]; + } + + message SyncConfig { + // Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled + // runs. To explicitly set a timezone to the cron tab, apply a prefix in + // the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}". + // The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone + // database. For example, "CRON_TZ=America/New_York 1 * * * *", or + // "TZ=America/New_York 1 * * * *". + string cron = 1; + } + + // A Feature Registry source for features that need to be synced to Online + // Store. + message FeatureRegistrySource { + // Features belonging to a single feature group that will be + // synced to Online Store. + message FeatureGroup { + // Required. Identifier of the feature group. + string feature_group_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Identifiers of features under the feature group. + repeated string feature_ids = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Required. List of features that need to be synced to Online Store. + repeated FeatureGroup feature_groups = 1 + [(google.api.field_behavior) = REQUIRED]; + } + + oneof source { + // Optional. Configures how data is supposed to be extracted from a BigQuery + // source to be loaded onto the FeatureOnlineStore. + BigQuerySource big_query_source = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configures the features from a Feature Registry source that + // need to be loaded onto the FeatureOnlineStore. + FeatureRegistrySource feature_registry_source = 9 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Output only. Name of the FeatureView. Format: + // `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this FeatureView was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this FeatureView was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Used to perform consistent read-modify-write updates. If not set, + // a blind "overwrite" update happens. + string etag = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The labels with user-defined metadata to organize your + // FeatureViews. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // + // See https://goo.gl/xmQnxf for more information on and examples of labels. + // No more than 64 user labels can be associated with one + // FeatureOnlineStore(System labels are excluded)." System reserved label keys + // are prefixed with "aiplatform.googleapis.com/" and are immutable. + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Configures when data is to be synced/updated for this FeatureView. At the + // end of the sync the latest featureValues for each entityId of this + // FeatureView are made ready for online serving. + SyncConfig sync_config = 7; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_view_sync.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_view_sync.proto new file mode 100644 index 000000000000..278d1a995d42 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/feature_view_sync.proto @@ -0,0 +1,57 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/type/interval.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "FeatureViewSyncProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::Aiplatform::V1"; + +// FeatureViewSync is a representation of sync operation which copies data from +// data source to Feature View in Online Store. +message FeatureViewSync { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/FeatureViewSync" + pattern: "projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/feature_view_sync" + }; + + // Output only. Name of the FeatureViewSync. Format: + // `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when this FeatureViewSync is created. Creation of a + // FeatureViewSync means that the job is pending / waiting for sufficient + // resources but may not have started the actual data transfer yet. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when this FeatureViewSync is finished. + google.type.Interval run_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Final status of the FeatureViewSync. + google.rpc.Status final_status = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/featurestore_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/featurestore_service.proto index 424be12a6fc0..c40bd984faef 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/featurestore_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/featurestore_service.proto @@ -950,10 +950,14 @@ message DeleteEntityTypeRequest { // Request message for // [FeaturestoreService.CreateFeature][google.cloud.aiplatform.v1.FeaturestoreService.CreateFeature]. +// Request message for +// [FeatureRegistryService.CreateFeature][google.cloud.aiplatform.v1.FeatureRegistryService.CreateFeature]. message CreateFeatureRequest { - // Required. The resource name of the EntityType to create a Feature. - // Format: + // Required. The resource name of the EntityType or FeatureGroup to create a + // Feature. Format for entity_type as parent: // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + // Format for feature_group as parent: + // `projects/{project}/locations/{location}/featureGroups/{feature_group}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -970,7 +974,7 @@ message CreateFeatureRequest { // This value may be up to 128 characters, and valid characters are // `[a-z0-9_]`. The first character cannot be a number. // - // The value must be unique within an EntityType. + // The value must be unique within an EntityType/FeatureGroup. string feature_id = 3 [(google.api.field_behavior) = REQUIRED]; } @@ -1005,10 +1009,14 @@ message BatchCreateFeaturesResponse { // Request message for // [FeaturestoreService.GetFeature][google.cloud.aiplatform.v1.FeaturestoreService.GetFeature]. +// Request message for +// [FeatureRegistryService.GetFeature][google.cloud.aiplatform.v1.FeatureRegistryService.GetFeature]. message GetFeatureRequest { // Required. The name of the Feature resource. - // Format: + // Format for entity_type as parent: // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + // Format for feature_group as parent: + // `projects/{project}/locations/{location}/featureGroups/{feature_group}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1019,10 +1027,14 @@ message GetFeatureRequest { // Request message for // [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]. +// Request message for +// [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]. message ListFeaturesRequest { // Required. The resource name of the Location to list Features. - // Format: + // Format for entity_type as parent: // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + // Format for feature_group as parent: + // `projects/{project}/locations/{location}/featureGroups/{feature_group}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1060,10 +1072,14 @@ message ListFeaturesRequest { // A page token, received from a previous // [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures] + // call or + // [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures] // call. Provide this to retrieve the subsequent page. // // When paginating, all other parameters provided to // [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures] + // or or + // [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures] // must match the call that provided the page token. string page_token = 4; @@ -1072,7 +1088,7 @@ message ListFeaturesRequest { // Supported fields: // // * `feature_id` - // * `value_type` + // * `value_type` (Not supported for FeatureRegistry Feature) // * `create_time` // * `update_time` string order_by = 5; @@ -1080,6 +1096,7 @@ message ListFeaturesRequest { // Mask specifying which fields to read. google.protobuf.FieldMask read_mask = 6; + // Only applicable for Vertex AI Feature Store (Legacy). // If set, return the most recent // [ListFeaturesRequest.latest_stats_count][google.cloud.aiplatform.v1.ListFeaturesRequest.latest_stats_count] // of stats for each Feature in response. Valid value is [0, 10]. If number of @@ -1091,6 +1108,8 @@ message ListFeaturesRequest { // Response message for // [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]. +// Response message for +// [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]. message ListFeaturesResponse { // The Features matching the request. repeated Feature features = 1; @@ -1216,11 +1235,14 @@ message SearchFeaturesResponse { // Request message for // [FeaturestoreService.UpdateFeature][google.cloud.aiplatform.v1.FeaturestoreService.UpdateFeature]. +// Request message for +// [FeatureRegistryService.UpdateFeature][google.cloud.aiplatform.v1.FeatureRegistryService.UpdateFeature]. message UpdateFeatureRequest { // Required. The Feature's `name` field is used to identify the Feature to be // updated. // Format: // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + // `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` Feature feature = 1 [(google.api.field_behavior) = REQUIRED]; // Field mask is used to specify the fields to be overwritten in the @@ -1235,16 +1257,19 @@ message UpdateFeatureRequest { // // * `description` // * `labels` - // * `disable_monitoring` + // * `disable_monitoring` (Not supported for FeatureRegistry Feature) google.protobuf.FieldMask update_mask = 2; } // Request message for // [FeaturestoreService.DeleteFeature][google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeature]. +// Request message for +// [FeatureRegistryService.DeleteFeature][google.cloud.aiplatform.v1.FeatureRegistryService.DeleteFeature]. message DeleteFeatureRequest { // Required. The name of the Features to be deleted. // Format: // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + // `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/index.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/index.proto index 1dfaca9b8ac1..6766741240e7 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/index.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/index.proto @@ -142,6 +142,55 @@ message IndexDatapoint { repeated string deny_list = 3; } + // This field allows restricts to be based on numeric comparisons rather + // than categorical tokens. + message NumericRestriction { + // Which comparison operator to use. Should be specified for queries only; + // specifying this for a datapoint is an error. + // + // Datapoints for which Operator is true relative to the query's Value + // field will be allowlisted. + enum Operator { + // Default value of the enum. + OPERATOR_UNSPECIFIED = 0; + + // Datapoints are eligible iff their value is < the query's. + LESS = 1; + + // Datapoints are eligible iff their value is <= the query's. + LESS_EQUAL = 2; + + // Datapoints are eligible iff their value is == the query's. + EQUAL = 3; + + // Datapoints are eligible iff their value is >= the query's. + GREATER_EQUAL = 4; + + // Datapoints are eligible iff their value is > the query's. + GREATER = 5; + } + + // The type of Value must be consistent for all datapoints with a given + // namespace name. This is verified at runtime. + oneof Value { + // Represents 64 bit integer. + int64 value_int = 2; + + // Represents 32 bit float. + float value_float = 3; + + // Represents 64 bit float. + double value_double = 4; + } + + // The namespace of this restriction. e.g.: cost. + string namespace = 1; + + // This MUST be specified for queries and must NOT be specified for + // datapoints. + Operator op = 5; + } + // Crowding tag is a constraint on a neighbor list produced by nearest // neighbor search requiring that no more than some value k' of the k // neighbors returned have the same value of crowding_attribute. @@ -167,6 +216,12 @@ message IndexDatapoint { // https://cloud.google.com/vertex-ai/docs/matching-engine/filtering repeated Restriction restricts = 4 [(google.api.field_behavior) = OPTIONAL]; + // Optional. List of Restrict of the datapoint, used to perform "restricted + // searches" where boolean rule are used to filter the subset of the database + // eligible for matching. This uses numeric comparisons. + repeated NumericRestriction numeric_restricts = 6 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. CrowdingTag of the datapoint, the number of neighbors to return // in each crowding can be configured during query. CrowdingTag crowding_tag = 5 [(google.api.field_behavior) = OPTIONAL]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/index_endpoint.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/index_endpoint.proto index cca3fc3d5dd5..d8daf55aff5e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/index_endpoint.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/index_endpoint.proto @@ -190,10 +190,11 @@ message DeployedIndex { [(google.api.field_behavior) = OPTIONAL]; // Optional. A description of resources that are dedicated to the - // DeployedIndex, and that need a higher degree of manual configuration. If - // min_replica_count is not set, the default value is 2 (we don't provide SLA - // when min_replica_count=1). If max_replica_count is not set, the default - // value is min_replica_count. The max allowed replica count is 1000. + // DeployedIndex, and that need a higher degree of manual configuration. The + // field min_replica_count must be set to a value strictly greater than 0, or + // else validation will fail. We don't provide SLA when min_replica_count=1. + // If max_replica_count is not set, the default value is min_replica_count. + // The max allowed replica count is 1000. // // Available machine types for SMALL shard: // e2-standard-2 and all machine types available for MEDIUM and LARGE shard. diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/llm_utility_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/llm_utility_service.proto new file mode 100644 index 000000000000..3cd98bd08371 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/llm_utility_service.proto @@ -0,0 +1,100 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/prediction_service.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "LlmUtilityServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// Service for LLM related utility functions. +service LlmUtilityService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Perform a token counting. + rpc CountTokens(CountTokensRequest) returns (CountTokensResponse) { + option (google.api.http) = { + post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:countTokens" + body: "*" + additional_bindings { + post: "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:countTokens" + body: "*" + } + }; + option (google.api.method_signature) = "endpoint,instances"; + } + + // Return a list of tokens based on the input text. + rpc ComputeTokens(ComputeTokensRequest) returns (ComputeTokensResponse) { + option (google.api.http) = { + post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:computeTokens" + body: "*" + additional_bindings { + post: "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:computeTokens" + body: "*" + } + }; + option (google.api.method_signature) = "endpoint,instances"; + } +} + +// Request message for ComputeTokens RPC call. +message ComputeTokensRequest { + // Required. The name of the Endpoint requested to get lists of tokens and + // token ids. + string endpoint = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Endpoint" + } + ]; + + // Required. The instances that are the input to token computing API call. + // Schema is identical to the prediction schema of the text model, even for + // the non-text models, like chat models, or Codey models. + repeated google.protobuf.Value instances = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Tokens info with a list of tokens and the corresponding list of token ids. +message TokensInfo { + // A list of tokens from the input. + repeated bytes tokens = 1; + + // A list of token ids from the input. + repeated int64 token_ids = 2; +} + +// Response message for ComputeTokens RPC call. +message ComputeTokensResponse { + // Lists of tokens info from the input. A ComputeTokensRequest could have + // multiple instances with a prompt in each instance. We also need to return + // lists of tokens info for the request with multiple instances. + repeated TokensInfo tokens_info = 1; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/machine_resources.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/machine_resources.proto index 2a307e51f809..041ea2e3d0ad 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/machine_resources.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/machine_resources.proto @@ -52,6 +52,10 @@ message MachineSpec { // The number of accelerators to attach to the machine. int32 accelerator_count = 3; + + // Immutable. The topology of the TPUs. Corresponds to the TPU topologies + // available from GKE. (Example: tpu_topology: "2x2x1"). + string tpu_topology = 4 [(google.api.field_behavior) = IMMUTABLE]; } // A description of resources that are dedicated to a DeployedModel, and diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model.proto index 47db405be7f7..05d3ce28380c 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model.proto @@ -22,6 +22,7 @@ import "google/cloud/aiplatform/v1/deployed_model_ref.proto"; import "google/cloud/aiplatform/v1/encryption_spec.proto"; import "google/cloud/aiplatform/v1/env_var.proto"; import "google/cloud/aiplatform/v1/explanation.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; @@ -690,6 +691,21 @@ message ModelContainerSpec { // [`AIP_DEPLOYED_MODEL_ID` environment // variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) string health_route = 7 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Deployment timeout. + // Limit for deployment timeout is 2 hours. + google.protobuf.Duration deployment_timeout = 10 + [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The amount of the VM memory to reserve as the shared memory for + // the model in megabytes. + int64 shared_memory_size_mb = 11 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Specification for Kubernetes startup probe. + Probe startup_probe = 12 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Specification for Kubernetes readiness probe. + Probe health_probe = 13 [(google.api.field_behavior) = IMMUTABLE]; } // Represents a network port in a container. @@ -730,3 +746,35 @@ message ModelSourceInfo { // pertains to the original. bool copy = 2; } + +// Probe describes a health check to be performed against a container to +// determine whether it is alive or ready to receive traffic. +message Probe { + // ExecAction specifies a command to execute. + message ExecAction { + // Command is the command line to execute inside the container, the working + // directory for the command is root ('/') in the container's filesystem. + // The command is simply exec'd, it is not run inside a shell, so + // traditional shell instructions ('|', etc) won't work. To use a shell, you + // need to explicitly call out to that shell. Exit status of 0 is treated as + // live/healthy and non-zero is unhealthy. + repeated string command = 1; + } + + oneof probe_type { + // Exec specifies the action to take. + ExecAction exec = 1; + } + + // How often (in seconds) to perform the probe. Default to 10 seconds. + // Minimum value is 1. Must be less than timeout_seconds. + // + // Maps to Kubernetes probe argument 'periodSeconds'. + int32 period_seconds = 2; + + // Number of seconds after which the probe times out. Defaults to 1 second. + // Minimum value is 1. Must be greater or equal to period_seconds. + // + // Maps to Kubernetes probe argument 'timeoutSeconds'. + int32 timeout_seconds = 3; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/prediction_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/prediction_service.proto index 52b5d6df6154..881f981799ed 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/prediction_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/prediction_service.proto @@ -312,3 +312,31 @@ message ExplainResponse { // [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions]. repeated google.protobuf.Value predictions = 3; } + +// Request message for [PredictionService.CountTokens][]. +message CountTokensRequest { + // Required. The name of the Endpoint requested to perform token counting. + // Format: + // `projects/{project}/locations/{location}/endpoints/{endpoint}` + string endpoint = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Endpoint" + } + ]; + + // Required. The instances that are the input to token counting call. + // Schema is identical to the prediction schema of the underlying model. + repeated google.protobuf.Value instances = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for [PredictionService.CountTokens][]. +message CountTokensResponse { + // The total number of tokens counted across all instances from the request. + int32 total_tokens = 1; + + // The total number of billable characters counted across all instances from + // the request. + int32 total_billable_characters = 2; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/study.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/study.proto index d4e33d3f678c..6e39f3f40381 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/study.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/study.proto @@ -21,6 +21,7 @@ import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1"; option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; @@ -213,6 +214,17 @@ message TrialContext { repeated Trial.Parameter parameters = 2; } +// Time-based Constraint for Study +message StudyTimeConstraint { + oneof constraint { + // Counts the wallclock time passed since the creation of this Study. + google.protobuf.Duration max_duration = 1; + + // Compares the wallclock time to this time. Must use UTC timezone. + google.protobuf.Timestamp end_time = 2; + } +} + // Represents specification of a Study. message StudySpec { // Represents a metric to optimize. @@ -504,6 +516,62 @@ message StudySpec { optional bool update_all_stopped_trials = 6; } + // The configuration (stopping conditions) for automated stopping of a Study. + // Conditions include trial budgets, time budgets, and convergence detection. + message StudyStoppingConfig { + // If true, a Study enters STOPPING_ASAP whenever it would normally enters + // STOPPING state. + // + // The bottom line is: set to true if you want to interrupt on-going + // evaluations of Trials as soon as the study stopping condition is met. + // (Please see Study.State documentation for the source of truth). + google.protobuf.BoolValue should_stop_asap = 1; + + // Each "stopping rule" in this proto specifies an "if" condition. Before + // Vizier would generate a new suggestion, it first checks each specified + // stopping rule, from top to bottom in this list. + // Note that the first few rules (e.g. minimum_runtime_constraint, + // min_num_trials) will prevent other stopping rules from being evaluated + // until they are met. For example, setting `min_num_trials=5` and + // `always_stop_after= 1 hour` means that the Study will ONLY stop after it + // has 5 COMPLETED trials, even if more than an hour has passed since its + // creation. It follows the first applicable rule (whose "if" condition is + // satisfied) to make a stopping decision. If none of the specified rules + // are applicable, then Vizier decides that the study should not stop. + // If Vizier decides that the study should stop, the study enters + // STOPPING state (or STOPPING_ASAP if should_stop_asap = true). + // IMPORTANT: The automatic study state transition happens precisely as + // described above; that is, deleting trials or updating StudyConfig NEVER + // automatically moves the study state back to ACTIVE. If you want to + // _resume_ a Study that was stopped, 1) change the stopping conditions if + // necessary, 2) activate the study, and then 3) ask for suggestions. + // If the specified time or duration has not passed, do not stop the + // study. + StudyTimeConstraint minimum_runtime_constraint = 2; + + // If the specified time or duration has passed, stop the study. + StudyTimeConstraint maximum_runtime_constraint = 3; + + // If there are fewer than this many COMPLETED trials, do not stop the + // study. + google.protobuf.Int32Value min_num_trials = 4; + + // If there are more than this many trials, stop the study. + google.protobuf.Int32Value max_num_trials = 5; + + // If the objective value has not improved for this many consecutive + // trials, stop the study. + // + // WARNING: Effective only for single-objective studies. + google.protobuf.Int32Value max_num_trials_no_progress = 6; + + // If the objective value has not improved for this much time, stop the + // study. + // + // WARNING: Effective only for single-objective studies. + google.protobuf.Duration max_duration_no_progress = 7; + } + // The available search algorithms for the Study. enum Algorithm { // The default algorithm used by Vertex AI for [hyperparameter @@ -589,6 +657,10 @@ message StudySpec { // Describe which measurement selection type will be used MeasurementSelectionType measurement_selection_type = 7; + + // Conditions for automated stopping of a Study. Enable automated stopping by + // configuring at least one condition. + optional StudyStoppingConfig study_stopping_config = 11; } // A message representing a Measurement of a Trial. A Measurement contains diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchDeletePipelineJobsRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchDeletePipelineJobsRequest.java new file mode 100644 index 000000000000..7492468ba2d1 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchDeletePipelineJobsRequest.java @@ -0,0 +1,1002 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/pipeline_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [PipelineService.BatchDeletePipelineJobs][google.cloud.aiplatform.v1beta1.PipelineService.BatchDeletePipelineJobs].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest} + */ +public final class BatchDeletePipelineJobsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest) + BatchDeletePipelineJobsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchDeletePipelineJobsRequest.newBuilder() to construct. + private BatchDeletePipelineJobsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchDeletePipelineJobsRequest() { + parent_ = ""; + names_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchDeletePipelineJobsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_BatchDeletePipelineJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_BatchDeletePipelineJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest.class, + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The name of the PipelineJobs' parent resource.
+   * 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. The name of the PipelineJobs' parent resource.
+   * 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 NAMES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Required. The names of the PipelineJobs to delete.
+   * A maximum of 32 PipelineJobs can be deleted in a batch.
+   * Format:
+   * `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList getNamesList() { + return names_; + } + /** + * + * + *
+   * Required. The names of the PipelineJobs to delete.
+   * A maximum of 32 PipelineJobs can be deleted in a batch.
+   * Format:
+   * `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + * + * + *
+   * Required. The names of the PipelineJobs to delete.
+   * A maximum of 32 PipelineJobs can be deleted in a batch.
+   * Format:
+   * `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + * + * + *
+   * Required. The names of the PipelineJobs to delete.
+   * A maximum of 32 PipelineJobs can be deleted in a batch.
+   * Format:
+   * `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString getNamesBytes(int index) { + return names_.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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < names_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, names_.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(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + { + int dataSize = 0; + for (int i = 0; i < names_.size(); i++) { + dataSize += computeStringSizeNoTag(names_.getRaw(i)); + } + size += dataSize; + size += 1 * getNamesList().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.aiplatform.v1beta1.BatchDeletePipelineJobsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest other = + (com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getNamesList().equals(other.getNamesList())) return false; + if (!getUnknownFields().equals(other.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 (getNamesCount() > 0) { + hash = (37 * hash) + NAMES_FIELD_NUMBER; + hash = (53 * hash) + getNamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [PipelineService.BatchDeletePipelineJobs][google.cloud.aiplatform.v1beta1.PipelineService.BatchDeletePipelineJobs].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest) + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_BatchDeletePipelineJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_BatchDeletePipelineJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest.class, + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + names_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_BatchDeletePipelineJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest build() { + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest result = + new com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + names_.makeImmutable(); + result.names_ = names_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest other) { + if (other + == com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.names_.isEmpty()) { + if (names_.isEmpty()) { + names_ = other.names_; + bitField0_ |= 0x00000002; + } else { + ensureNamesIsMutable(); + names_.addAll(other.names_); + } + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNamesIsMutable(); + names_.add(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 bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the PipelineJobs' parent resource.
+     * 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. The name of the PipelineJobs' parent resource.
+     * 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. The name of the PipelineJobs' parent resource.
+     * 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. The name of the PipelineJobs' parent resource.
+     * 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. The name of the PipelineJobs' parent resource.
+     * 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 com.google.protobuf.LazyStringArrayList names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureNamesIsMutable() { + if (!names_.isModifiable()) { + names_ = new com.google.protobuf.LazyStringArrayList(names_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Required. The names of the PipelineJobs to delete.
+     * A maximum of 32 PipelineJobs can be deleted in a batch.
+     * Format:
+     * `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList getNamesList() { + names_.makeImmutable(); + return names_; + } + /** + * + * + *
+     * Required. The names of the PipelineJobs to delete.
+     * A maximum of 32 PipelineJobs can be deleted in a batch.
+     * Format:
+     * `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + * + * + *
+     * Required. The names of the PipelineJobs to delete.
+     * A maximum of 32 PipelineJobs can be deleted in a batch.
+     * Format:
+     * `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + * + * + *
+     * Required. The names of the PipelineJobs to delete.
+     * A maximum of 32 PipelineJobs can be deleted in a batch.
+     * Format:
+     * `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString getNamesBytes(int index) { + return names_.getByteString(index); + } + /** + * + * + *
+     * Required. The names of the PipelineJobs to delete.
+     * A maximum of 32 PipelineJobs can be deleted in a batch.
+     * Format:
+     * `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The names to set. + * @return This builder for chaining. + */ + public Builder setNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The names of the PipelineJobs to delete.
+     * A maximum of 32 PipelineJobs can be deleted in a batch.
+     * Format:
+     * `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The names to add. + * @return This builder for chaining. + */ + public Builder addNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The names of the PipelineJobs to delete.
+     * A maximum of 32 PipelineJobs can be deleted in a batch.
+     * Format:
+     * `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param values The names to add. + * @return This builder for chaining. + */ + public Builder addAllNames(java.lang.Iterable values) { + ensureNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, names_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The names of the PipelineJobs to delete.
+     * A maximum of 32 PipelineJobs can be deleted in a batch.
+     * Format:
+     * `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearNames() { + names_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The names of the PipelineJobs to delete.
+     * A maximum of 32 PipelineJobs can be deleted in a batch.
+     * Format:
+     * `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the names to add. + * @return This builder for chaining. + */ + public Builder addNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNamesIsMutable(); + names_.add(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.aiplatform.v1beta1.BatchDeletePipelineJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest) + private static final com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchDeletePipelineJobsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchDeletePipelineJobsRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchDeletePipelineJobsRequestOrBuilder.java new file mode 100644 index 000000000000..9536b6aa6634 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchDeletePipelineJobsRequestOrBuilder.java @@ -0,0 +1,127 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/pipeline_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface BatchDeletePipelineJobsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the PipelineJobs' parent resource.
+   * 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. The name of the PipelineJobs' parent resource.
+   * 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(); + + /** + * + * + *
+   * Required. The names of the PipelineJobs to delete.
+   * A maximum of 32 PipelineJobs can be deleted in a batch.
+   * Format:
+   * `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the names. + */ + java.util.List getNamesList(); + /** + * + * + *
+   * Required. The names of the PipelineJobs to delete.
+   * A maximum of 32 PipelineJobs can be deleted in a batch.
+   * Format:
+   * `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of names. + */ + int getNamesCount(); + /** + * + * + *
+   * Required. The names of the PipelineJobs to delete.
+   * A maximum of 32 PipelineJobs can be deleted in a batch.
+   * Format:
+   * `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + java.lang.String getNames(int index); + /** + * + * + *
+   * Required. The names of the PipelineJobs to delete.
+   * A maximum of 32 PipelineJobs can be deleted in a batch.
+   * Format:
+   * `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + com.google.protobuf.ByteString getNamesBytes(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchDeletePipelineJobsResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchDeletePipelineJobsResponse.java new file mode 100644 index 000000000000..bd98c4ac80bb --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchDeletePipelineJobsResponse.java @@ -0,0 +1,959 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/pipeline_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Response message for
+ * [PipelineService.BatchDeletePipelineJobs][google.cloud.aiplatform.v1beta1.PipelineService.BatchDeletePipelineJobs].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse} + */ +public final class BatchDeletePipelineJobsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse) + BatchDeletePipelineJobsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchDeletePipelineJobsResponse.newBuilder() to construct. + private BatchDeletePipelineJobsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchDeletePipelineJobsResponse() { + pipelineJobs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchDeletePipelineJobsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_BatchDeletePipelineJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_BatchDeletePipelineJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse.class, + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse.Builder.class); + } + + public static final int PIPELINE_JOBS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List pipelineJobs_; + /** + * + * + *
+   * PipelineJobs deleted.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + @java.lang.Override + public java.util.List getPipelineJobsList() { + return pipelineJobs_; + } + /** + * + * + *
+   * PipelineJobs deleted.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + @java.lang.Override + public java.util.List + getPipelineJobsOrBuilderList() { + return pipelineJobs_; + } + /** + * + * + *
+   * PipelineJobs deleted.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + @java.lang.Override + public int getPipelineJobsCount() { + return pipelineJobs_.size(); + } + /** + * + * + *
+   * PipelineJobs deleted.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.PipelineJob getPipelineJobs(int index) { + return pipelineJobs_.get(index); + } + /** + * + * + *
+   * PipelineJobs deleted.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.PipelineJobOrBuilder getPipelineJobsOrBuilder( + int index) { + return pipelineJobs_.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 < pipelineJobs_.size(); i++) { + output.writeMessage(1, pipelineJobs_.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 < pipelineJobs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, pipelineJobs_.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.aiplatform.v1beta1.BatchDeletePipelineJobsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse other = + (com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse) obj; + + if (!getPipelineJobsList().equals(other.getPipelineJobsList())) return false; + if (!getUnknownFields().equals(other.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 (getPipelineJobsCount() > 0) { + hash = (37 * hash) + PIPELINE_JOBS_FIELD_NUMBER; + hash = (53 * hash) + getPipelineJobsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [PipelineService.BatchDeletePipelineJobs][google.cloud.aiplatform.v1beta1.PipelineService.BatchDeletePipelineJobs].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse) + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_BatchDeletePipelineJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_BatchDeletePipelineJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse.class, + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (pipelineJobsBuilder_ == null) { + pipelineJobs_ = java.util.Collections.emptyList(); + } else { + pipelineJobs_ = null; + pipelineJobsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_BatchDeletePipelineJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse build() { + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse buildPartial() { + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse result = + new com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse result) { + if (pipelineJobsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + pipelineJobs_ = java.util.Collections.unmodifiableList(pipelineJobs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pipelineJobs_ = pipelineJobs_; + } else { + result.pipelineJobs_ = pipelineJobsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse 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.aiplatform.v1beta1.BatchDeletePipelineJobsResponse) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse other) { + if (other + == com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse + .getDefaultInstance()) return this; + if (pipelineJobsBuilder_ == null) { + if (!other.pipelineJobs_.isEmpty()) { + if (pipelineJobs_.isEmpty()) { + pipelineJobs_ = other.pipelineJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePipelineJobsIsMutable(); + pipelineJobs_.addAll(other.pipelineJobs_); + } + onChanged(); + } + } else { + if (!other.pipelineJobs_.isEmpty()) { + if (pipelineJobsBuilder_.isEmpty()) { + pipelineJobsBuilder_.dispose(); + pipelineJobsBuilder_ = null; + pipelineJobs_ = other.pipelineJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + pipelineJobsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPipelineJobsFieldBuilder() + : null; + } else { + pipelineJobsBuilder_.addAllMessages(other.pipelineJobs_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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.aiplatform.v1beta1.PipelineJob m = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.PipelineJob.parser(), + extensionRegistry); + if (pipelineJobsBuilder_ == null) { + ensurePipelineJobsIsMutable(); + pipelineJobs_.add(m); + } else { + pipelineJobsBuilder_.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 pipelineJobs_ = + java.util.Collections.emptyList(); + + private void ensurePipelineJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pipelineJobs_ = + new java.util.ArrayList(pipelineJobs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.PipelineJob, + com.google.cloud.aiplatform.v1beta1.PipelineJob.Builder, + com.google.cloud.aiplatform.v1beta1.PipelineJobOrBuilder> + pipelineJobsBuilder_; + + /** + * + * + *
+     * PipelineJobs deleted.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + public java.util.List getPipelineJobsList() { + if (pipelineJobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(pipelineJobs_); + } else { + return pipelineJobsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * PipelineJobs deleted.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + public int getPipelineJobsCount() { + if (pipelineJobsBuilder_ == null) { + return pipelineJobs_.size(); + } else { + return pipelineJobsBuilder_.getCount(); + } + } + /** + * + * + *
+     * PipelineJobs deleted.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + public com.google.cloud.aiplatform.v1beta1.PipelineJob getPipelineJobs(int index) { + if (pipelineJobsBuilder_ == null) { + return pipelineJobs_.get(index); + } else { + return pipelineJobsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * PipelineJobs deleted.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + public Builder setPipelineJobs( + int index, com.google.cloud.aiplatform.v1beta1.PipelineJob value) { + if (pipelineJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePipelineJobsIsMutable(); + pipelineJobs_.set(index, value); + onChanged(); + } else { + pipelineJobsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * PipelineJobs deleted.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + public Builder setPipelineJobs( + int index, com.google.cloud.aiplatform.v1beta1.PipelineJob.Builder builderForValue) { + if (pipelineJobsBuilder_ == null) { + ensurePipelineJobsIsMutable(); + pipelineJobs_.set(index, builderForValue.build()); + onChanged(); + } else { + pipelineJobsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * PipelineJobs deleted.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + public Builder addPipelineJobs(com.google.cloud.aiplatform.v1beta1.PipelineJob value) { + if (pipelineJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePipelineJobsIsMutable(); + pipelineJobs_.add(value); + onChanged(); + } else { + pipelineJobsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * PipelineJobs deleted.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + public Builder addPipelineJobs( + int index, com.google.cloud.aiplatform.v1beta1.PipelineJob value) { + if (pipelineJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePipelineJobsIsMutable(); + pipelineJobs_.add(index, value); + onChanged(); + } else { + pipelineJobsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * PipelineJobs deleted.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + public Builder addPipelineJobs( + com.google.cloud.aiplatform.v1beta1.PipelineJob.Builder builderForValue) { + if (pipelineJobsBuilder_ == null) { + ensurePipelineJobsIsMutable(); + pipelineJobs_.add(builderForValue.build()); + onChanged(); + } else { + pipelineJobsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * PipelineJobs deleted.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + public Builder addPipelineJobs( + int index, com.google.cloud.aiplatform.v1beta1.PipelineJob.Builder builderForValue) { + if (pipelineJobsBuilder_ == null) { + ensurePipelineJobsIsMutable(); + pipelineJobs_.add(index, builderForValue.build()); + onChanged(); + } else { + pipelineJobsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * PipelineJobs deleted.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + public Builder addAllPipelineJobs( + java.lang.Iterable values) { + if (pipelineJobsBuilder_ == null) { + ensurePipelineJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pipelineJobs_); + onChanged(); + } else { + pipelineJobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * PipelineJobs deleted.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + public Builder clearPipelineJobs() { + if (pipelineJobsBuilder_ == null) { + pipelineJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + pipelineJobsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * PipelineJobs deleted.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + public Builder removePipelineJobs(int index) { + if (pipelineJobsBuilder_ == null) { + ensurePipelineJobsIsMutable(); + pipelineJobs_.remove(index); + onChanged(); + } else { + pipelineJobsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * PipelineJobs deleted.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + public com.google.cloud.aiplatform.v1beta1.PipelineJob.Builder getPipelineJobsBuilder( + int index) { + return getPipelineJobsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * PipelineJobs deleted.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + public com.google.cloud.aiplatform.v1beta1.PipelineJobOrBuilder getPipelineJobsOrBuilder( + int index) { + if (pipelineJobsBuilder_ == null) { + return pipelineJobs_.get(index); + } else { + return pipelineJobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * PipelineJobs deleted.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + public java.util.List + getPipelineJobsOrBuilderList() { + if (pipelineJobsBuilder_ != null) { + return pipelineJobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pipelineJobs_); + } + } + /** + * + * + *
+     * PipelineJobs deleted.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + public com.google.cloud.aiplatform.v1beta1.PipelineJob.Builder addPipelineJobsBuilder() { + return getPipelineJobsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1beta1.PipelineJob.getDefaultInstance()); + } + /** + * + * + *
+     * PipelineJobs deleted.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + public com.google.cloud.aiplatform.v1beta1.PipelineJob.Builder addPipelineJobsBuilder( + int index) { + return getPipelineJobsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1beta1.PipelineJob.getDefaultInstance()); + } + /** + * + * + *
+     * PipelineJobs deleted.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + public java.util.List + getPipelineJobsBuilderList() { + return getPipelineJobsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.PipelineJob, + com.google.cloud.aiplatform.v1beta1.PipelineJob.Builder, + com.google.cloud.aiplatform.v1beta1.PipelineJobOrBuilder> + getPipelineJobsFieldBuilder() { + if (pipelineJobsBuilder_ == null) { + pipelineJobsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.PipelineJob, + com.google.cloud.aiplatform.v1beta1.PipelineJob.Builder, + com.google.cloud.aiplatform.v1beta1.PipelineJobOrBuilder>( + pipelineJobs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + pipelineJobs_ = null; + } + return pipelineJobsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse) + private static final com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse(); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchDeletePipelineJobsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchDeletePipelineJobsResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchDeletePipelineJobsResponseOrBuilder.java new file mode 100644 index 000000000000..e2ef8cd65791 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchDeletePipelineJobsResponseOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/pipeline_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface BatchDeletePipelineJobsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * PipelineJobs deleted.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + java.util.List getPipelineJobsList(); + /** + * + * + *
+   * PipelineJobs deleted.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + com.google.cloud.aiplatform.v1beta1.PipelineJob getPipelineJobs(int index); + /** + * + * + *
+   * PipelineJobs deleted.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + int getPipelineJobsCount(); + /** + * + * + *
+   * PipelineJobs deleted.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + java.util.List + getPipelineJobsOrBuilderList(); + /** + * + * + *
+   * PipelineJobs deleted.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.PipelineJob pipeline_jobs = 1; + */ + com.google.cloud.aiplatform.v1beta1.PipelineJobOrBuilder getPipelineJobsOrBuilder(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ComputeTokensRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ComputeTokensRequest.java new file mode 100644 index 000000000000..f7a31eb9556e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ComputeTokensRequest.java @@ -0,0 +1,1219 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/llm_utility_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for ComputeTokens RPC call.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ComputeTokensRequest} + */ +public final class ComputeTokensRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ComputeTokensRequest) + ComputeTokensRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ComputeTokensRequest.newBuilder() to construct. + private ComputeTokensRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ComputeTokensRequest() { + endpoint_ = ""; + instances_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ComputeTokensRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ComputeTokensRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ComputeTokensRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest.class, + com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest.Builder.class); + } + + public static final int ENDPOINT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object endpoint_ = ""; + /** + * + * + *
+   * Required. The name of the Endpoint requested to get lists of tokens and
+   * token ids.
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + @java.lang.Override + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Endpoint requested to get lists of tokens and
+   * token ids.
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List instances_; + /** + * + * + *
+   * Required. The instances that are the input to token computing API call.
+   * Schema is identical to the prediction schema of the text model, even for
+   * the non-text models, like chat models, or Codey models.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getInstancesList() { + return instances_; + } + /** + * + * + *
+   * Required. The instances that are the input to token computing API call.
+   * Schema is identical to the prediction schema of the text model, even for
+   * the non-text models, like chat models, or Codey models.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getInstancesOrBuilderList() { + return instances_; + } + /** + * + * + *
+   * Required. The instances that are the input to token computing API call.
+   * Schema is identical to the prediction schema of the text model, even for
+   * the non-text models, like chat models, or Codey models.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getInstancesCount() { + return instances_.size(); + } + /** + * + * + *
+   * Required. The instances that are the input to token computing API call.
+   * Schema is identical to the prediction schema of the text model, even for
+   * the non-text models, like chat models, or Codey models.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.Value getInstances(int index) { + return instances_.get(index); + } + /** + * + * + *
+   * Required. The instances that are the input to token computing API call.
+   * Schema is identical to the prediction schema of the text model, even for
+   * the non-text models, like chat models, or Codey models.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index) { + return instances_.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(endpoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, endpoint_); + } + for (int i = 0; i < instances_.size(); i++) { + output.writeMessage(2, instances_.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(endpoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, endpoint_); + } + for (int i = 0; i < instances_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, instances_.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.aiplatform.v1beta1.ComputeTokensRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest other = + (com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest) obj; + + if (!getEndpoint().equals(other.getEndpoint())) return false; + if (!getInstancesList().equals(other.getInstancesList())) return false; + if (!getUnknownFields().equals(other.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) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + if (getInstancesCount() > 0) { + hash = (37 * hash) + INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getInstancesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 ComputeTokens RPC call.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ComputeTokensRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ComputeTokensRequest) + com.google.cloud.aiplatform.v1beta1.ComputeTokensRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ComputeTokensRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ComputeTokensRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest.class, + com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpoint_ = ""; + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + } else { + instances_ = null; + instancesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ComputeTokensRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest build() { + com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest result = + new com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest result) { + if (instancesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + instances_ = java.util.Collections.unmodifiableList(instances_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.instances_ = instances_; + } else { + result.instances_ = instancesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpoint_ = endpoint_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest.getDefaultInstance()) + return this; + if (!other.getEndpoint().isEmpty()) { + endpoint_ = other.endpoint_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (instancesBuilder_ == null) { + if (!other.instances_.isEmpty()) { + if (instances_.isEmpty()) { + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureInstancesIsMutable(); + instances_.addAll(other.instances_); + } + onChanged(); + } + } else { + if (!other.instances_.isEmpty()) { + if (instancesBuilder_.isEmpty()) { + instancesBuilder_.dispose(); + instancesBuilder_ = null; + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000002); + instancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInstancesFieldBuilder() + : null; + } else { + instancesBuilder_.addAllMessages(other.instances_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + endpoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.protobuf.Value m = + input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(m); + } else { + instancesBuilder_.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 endpoint_ = ""; + /** + * + * + *
+     * Required. The name of the Endpoint requested to get lists of tokens and
+     * token ids.
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Endpoint requested to get lists of tokens and
+     * token ids.
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Endpoint requested to get lists of tokens and
+     * token ids.
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + endpoint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Endpoint requested to get lists of tokens and
+     * token ids.
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEndpoint() { + endpoint_ = getDefaultInstance().getEndpoint(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Endpoint requested to get lists of tokens and
+     * token ids.
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + endpoint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List instances_ = + java.util.Collections.emptyList(); + + private void ensureInstancesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + instances_ = new java.util.ArrayList(instances_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + instancesBuilder_; + + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getInstancesList() { + if (instancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(instances_); + } else { + return instancesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getInstancesCount() { + if (instancesBuilder_ == null) { + return instances_.size(); + } else { + return instancesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Value getInstances(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstances(int index, com.google.protobuf.Value value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.set(index, value); + onChanged(); + } else { + instancesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstances(int index, com.google.protobuf.Value.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.set(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addInstances(com.google.protobuf.Value value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(value); + onChanged(); + } else { + instancesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addInstances(int index, com.google.protobuf.Value value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(index, value); + onChanged(); + } else { + instancesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addInstances(com.google.protobuf.Value.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addInstances(int index, com.google.protobuf.Value.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInstances() { + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + instancesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeInstances(int index) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.remove(index); + onChanged(); + } else { + instancesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Value.Builder getInstancesBuilder(int index) { + return getInstancesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getInstancesOrBuilderList() { + if (instancesBuilder_ != null) { + return instancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(instances_); + } + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Value.Builder addInstancesBuilder() { + return getInstancesFieldBuilder().addBuilder(com.google.protobuf.Value.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Value.Builder addInstancesBuilder(int index) { + return getInstancesFieldBuilder() + .addBuilder(index, com.google.protobuf.Value.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The instances that are the input to token computing API call.
+     * Schema is identical to the prediction schema of the text model, even for
+     * the non-text models, like chat models, or Codey models.
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getInstancesBuilderList() { + return getInstancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getInstancesFieldBuilder() { + if (instancesBuilder_ == null) { + instancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + instances_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + instances_ = null; + } + return instancesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ComputeTokensRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ComputeTokensRequest) + private static final com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComputeTokensRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ComputeTokensRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ComputeTokensRequestOrBuilder.java new file mode 100644 index 000000000000..0cec294810f3 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ComputeTokensRequestOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/llm_utility_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface ComputeTokensRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ComputeTokensRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Endpoint requested to get lists of tokens and
+   * token ids.
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + java.lang.String getEndpoint(); + /** + * + * + *
+   * Required. The name of the Endpoint requested to get lists of tokens and
+   * token ids.
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + com.google.protobuf.ByteString getEndpointBytes(); + + /** + * + * + *
+   * Required. The instances that are the input to token computing API call.
+   * Schema is identical to the prediction schema of the text model, even for
+   * the non-text models, like chat models, or Codey models.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getInstancesList(); + /** + * + * + *
+   * Required. The instances that are the input to token computing API call.
+   * Schema is identical to the prediction schema of the text model, even for
+   * the non-text models, like chat models, or Codey models.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.Value getInstances(int index); + /** + * + * + *
+   * Required. The instances that are the input to token computing API call.
+   * Schema is identical to the prediction schema of the text model, even for
+   * the non-text models, like chat models, or Codey models.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getInstancesCount(); + /** + * + * + *
+   * Required. The instances that are the input to token computing API call.
+   * Schema is identical to the prediction schema of the text model, even for
+   * the non-text models, like chat models, or Codey models.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getInstancesOrBuilderList(); + /** + * + * + *
+   * Required. The instances that are the input to token computing API call.
+   * Schema is identical to the prediction schema of the text model, even for
+   * the non-text models, like chat models, or Codey models.
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ComputeTokensResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ComputeTokensResponse.java new file mode 100644 index 000000000000..5330587730f8 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ComputeTokensResponse.java @@ -0,0 +1,985 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/llm_utility_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Response message for ComputeTokens RPC call.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ComputeTokensResponse} + */ +public final class ComputeTokensResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ComputeTokensResponse) + ComputeTokensResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ComputeTokensResponse.newBuilder() to construct. + private ComputeTokensResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ComputeTokensResponse() { + tokensInfo_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ComputeTokensResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ComputeTokensResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ComputeTokensResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse.class, + com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse.Builder.class); + } + + public static final int TOKENS_INFO_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List tokensInfo_; + /** + * + * + *
+   * Lists of tokens info from the input. A ComputeTokensRequest could have
+   * multiple instances with a prompt in each instance. We also need to return
+   * lists of tokens info for the request with multiple instances.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + @java.lang.Override + public java.util.List getTokensInfoList() { + return tokensInfo_; + } + /** + * + * + *
+   * Lists of tokens info from the input. A ComputeTokensRequest could have
+   * multiple instances with a prompt in each instance. We also need to return
+   * lists of tokens info for the request with multiple instances.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + @java.lang.Override + public java.util.List + getTokensInfoOrBuilderList() { + return tokensInfo_; + } + /** + * + * + *
+   * Lists of tokens info from the input. A ComputeTokensRequest could have
+   * multiple instances with a prompt in each instance. We also need to return
+   * lists of tokens info for the request with multiple instances.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + @java.lang.Override + public int getTokensInfoCount() { + return tokensInfo_.size(); + } + /** + * + * + *
+   * Lists of tokens info from the input. A ComputeTokensRequest could have
+   * multiple instances with a prompt in each instance. We also need to return
+   * lists of tokens info for the request with multiple instances.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TokensInfo getTokensInfo(int index) { + return tokensInfo_.get(index); + } + /** + * + * + *
+   * Lists of tokens info from the input. A ComputeTokensRequest could have
+   * multiple instances with a prompt in each instance. We also need to return
+   * lists of tokens info for the request with multiple instances.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TokensInfoOrBuilder getTokensInfoOrBuilder(int index) { + return tokensInfo_.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 < tokensInfo_.size(); i++) { + output.writeMessage(1, tokensInfo_.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 < tokensInfo_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, tokensInfo_.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.aiplatform.v1beta1.ComputeTokensResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse other = + (com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse) obj; + + if (!getTokensInfoList().equals(other.getTokensInfoList())) return false; + if (!getUnknownFields().equals(other.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 (getTokensInfoCount() > 0) { + hash = (37 * hash) + TOKENS_INFO_FIELD_NUMBER; + hash = (53 * hash) + getTokensInfoList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 ComputeTokens RPC call.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ComputeTokensResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ComputeTokensResponse) + com.google.cloud.aiplatform.v1beta1.ComputeTokensResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ComputeTokensResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ComputeTokensResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse.class, + com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (tokensInfoBuilder_ == null) { + tokensInfo_ = java.util.Collections.emptyList(); + } else { + tokensInfo_ = null; + tokensInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ComputeTokensResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse build() { + com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse buildPartial() { + com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse result = + new com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse result) { + if (tokensInfoBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + tokensInfo_ = java.util.Collections.unmodifiableList(tokensInfo_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tokensInfo_ = tokensInfo_; + } else { + result.tokensInfo_ = tokensInfoBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse 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.aiplatform.v1beta1.ComputeTokensResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse other) { + if (other == com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse.getDefaultInstance()) + return this; + if (tokensInfoBuilder_ == null) { + if (!other.tokensInfo_.isEmpty()) { + if (tokensInfo_.isEmpty()) { + tokensInfo_ = other.tokensInfo_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTokensInfoIsMutable(); + tokensInfo_.addAll(other.tokensInfo_); + } + onChanged(); + } + } else { + if (!other.tokensInfo_.isEmpty()) { + if (tokensInfoBuilder_.isEmpty()) { + tokensInfoBuilder_.dispose(); + tokensInfoBuilder_ = null; + tokensInfo_ = other.tokensInfo_; + bitField0_ = (bitField0_ & ~0x00000001); + tokensInfoBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTokensInfoFieldBuilder() + : null; + } else { + tokensInfoBuilder_.addAllMessages(other.tokensInfo_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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.aiplatform.v1beta1.TokensInfo m = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.TokensInfo.parser(), extensionRegistry); + if (tokensInfoBuilder_ == null) { + ensureTokensInfoIsMutable(); + tokensInfo_.add(m); + } else { + tokensInfoBuilder_.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 tokensInfo_ = + java.util.Collections.emptyList(); + + private void ensureTokensInfoIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tokensInfo_ = + new java.util.ArrayList(tokensInfo_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.TokensInfo, + com.google.cloud.aiplatform.v1beta1.TokensInfo.Builder, + com.google.cloud.aiplatform.v1beta1.TokensInfoOrBuilder> + tokensInfoBuilder_; + + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + public java.util.List getTokensInfoList() { + if (tokensInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(tokensInfo_); + } else { + return tokensInfoBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + public int getTokensInfoCount() { + if (tokensInfoBuilder_ == null) { + return tokensInfo_.size(); + } else { + return tokensInfoBuilder_.getCount(); + } + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + public com.google.cloud.aiplatform.v1beta1.TokensInfo getTokensInfo(int index) { + if (tokensInfoBuilder_ == null) { + return tokensInfo_.get(index); + } else { + return tokensInfoBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + public Builder setTokensInfo(int index, com.google.cloud.aiplatform.v1beta1.TokensInfo value) { + if (tokensInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTokensInfoIsMutable(); + tokensInfo_.set(index, value); + onChanged(); + } else { + tokensInfoBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + public Builder setTokensInfo( + int index, com.google.cloud.aiplatform.v1beta1.TokensInfo.Builder builderForValue) { + if (tokensInfoBuilder_ == null) { + ensureTokensInfoIsMutable(); + tokensInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + tokensInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + public Builder addTokensInfo(com.google.cloud.aiplatform.v1beta1.TokensInfo value) { + if (tokensInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTokensInfoIsMutable(); + tokensInfo_.add(value); + onChanged(); + } else { + tokensInfoBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + public Builder addTokensInfo(int index, com.google.cloud.aiplatform.v1beta1.TokensInfo value) { + if (tokensInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTokensInfoIsMutable(); + tokensInfo_.add(index, value); + onChanged(); + } else { + tokensInfoBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + public Builder addTokensInfo( + com.google.cloud.aiplatform.v1beta1.TokensInfo.Builder builderForValue) { + if (tokensInfoBuilder_ == null) { + ensureTokensInfoIsMutable(); + tokensInfo_.add(builderForValue.build()); + onChanged(); + } else { + tokensInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + public Builder addTokensInfo( + int index, com.google.cloud.aiplatform.v1beta1.TokensInfo.Builder builderForValue) { + if (tokensInfoBuilder_ == null) { + ensureTokensInfoIsMutable(); + tokensInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + tokensInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + public Builder addAllTokensInfo( + java.lang.Iterable values) { + if (tokensInfoBuilder_ == null) { + ensureTokensInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tokensInfo_); + onChanged(); + } else { + tokensInfoBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + public Builder clearTokensInfo() { + if (tokensInfoBuilder_ == null) { + tokensInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tokensInfoBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + public Builder removeTokensInfo(int index) { + if (tokensInfoBuilder_ == null) { + ensureTokensInfoIsMutable(); + tokensInfo_.remove(index); + onChanged(); + } else { + tokensInfoBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + public com.google.cloud.aiplatform.v1beta1.TokensInfo.Builder getTokensInfoBuilder(int index) { + return getTokensInfoFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + public com.google.cloud.aiplatform.v1beta1.TokensInfoOrBuilder getTokensInfoOrBuilder( + int index) { + if (tokensInfoBuilder_ == null) { + return tokensInfo_.get(index); + } else { + return tokensInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + public java.util.List + getTokensInfoOrBuilderList() { + if (tokensInfoBuilder_ != null) { + return tokensInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tokensInfo_); + } + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + public com.google.cloud.aiplatform.v1beta1.TokensInfo.Builder addTokensInfoBuilder() { + return getTokensInfoFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1beta1.TokensInfo.getDefaultInstance()); + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + public com.google.cloud.aiplatform.v1beta1.TokensInfo.Builder addTokensInfoBuilder(int index) { + return getTokensInfoFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1beta1.TokensInfo.getDefaultInstance()); + } + /** + * + * + *
+     * Lists of tokens info from the input. A ComputeTokensRequest could have
+     * multiple instances with a prompt in each instance. We also need to return
+     * lists of tokens info for the request with multiple instances.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + public java.util.List + getTokensInfoBuilderList() { + return getTokensInfoFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.TokensInfo, + com.google.cloud.aiplatform.v1beta1.TokensInfo.Builder, + com.google.cloud.aiplatform.v1beta1.TokensInfoOrBuilder> + getTokensInfoFieldBuilder() { + if (tokensInfoBuilder_ == null) { + tokensInfoBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.TokensInfo, + com.google.cloud.aiplatform.v1beta1.TokensInfo.Builder, + com.google.cloud.aiplatform.v1beta1.TokensInfoOrBuilder>( + tokensInfo_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + tokensInfo_ = null; + } + return tokensInfoBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ComputeTokensResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ComputeTokensResponse) + private static final com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse(); + } + + public static com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComputeTokensResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ComputeTokensResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ComputeTokensResponseOrBuilder.java new file mode 100644 index 000000000000..828f35a76fab --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ComputeTokensResponseOrBuilder.java @@ -0,0 +1,87 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/llm_utility_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface ComputeTokensResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ComputeTokensResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Lists of tokens info from the input. A ComputeTokensRequest could have
+   * multiple instances with a prompt in each instance. We also need to return
+   * lists of tokens info for the request with multiple instances.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + java.util.List getTokensInfoList(); + /** + * + * + *
+   * Lists of tokens info from the input. A ComputeTokensRequest could have
+   * multiple instances with a prompt in each instance. We also need to return
+   * lists of tokens info for the request with multiple instances.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + com.google.cloud.aiplatform.v1beta1.TokensInfo getTokensInfo(int index); + /** + * + * + *
+   * Lists of tokens info from the input. A ComputeTokensRequest could have
+   * multiple instances with a prompt in each instance. We also need to return
+   * lists of tokens info for the request with multiple instances.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + int getTokensInfoCount(); + /** + * + * + *
+   * Lists of tokens info from the input. A ComputeTokensRequest could have
+   * multiple instances with a prompt in each instance. We also need to return
+   * lists of tokens info for the request with multiple instances.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + java.util.List + getTokensInfoOrBuilderList(); + /** + * + * + *
+   * Lists of tokens info from the input. A ComputeTokensRequest could have
+   * multiple instances with a prompt in each instance. We also need to return
+   * lists of tokens info for the request with multiple instances.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TokensInfo tokens_info = 1; + */ + com.google.cloud.aiplatform.v1beta1.TokensInfoOrBuilder getTokensInfoOrBuilder(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateFeatureRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateFeatureRequest.java index 165dfe86b4c7..c6d84c86953e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateFeatureRequest.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateFeatureRequest.java @@ -71,6 +71,16 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; /** + * + * + *
+   * Required. The resource name of the EntityType or FeatureGroup to create a
+   * Feature. Format for entity_type as parent:
+   * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+   * 
+ * * * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @@ -90,6 +100,16 @@ public java.lang.String getParent() { } } /** + * + * + *
+   * Required. The resource name of the EntityType or FeatureGroup to create a
+   * Feature. Format for entity_type as parent:
+   * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+   * 
+ * * * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @@ -631,6 +651,16 @@ public Builder mergeFrom( private java.lang.Object parent_ = ""; /** + * + * + *
+     * Required. The resource name of the EntityType or FeatureGroup to create a
+     * Feature. Format for entity_type as parent:
+     * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+     * 
+ * * * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @@ -649,6 +679,16 @@ public java.lang.String getParent() { } } /** + * + * + *
+     * Required. The resource name of the EntityType or FeatureGroup to create a
+     * Feature. Format for entity_type as parent:
+     * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+     * 
+ * * * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @@ -667,6 +707,16 @@ public com.google.protobuf.ByteString getParentBytes() { } } /** + * + * + *
+     * Required. The resource name of the EntityType or FeatureGroup to create a
+     * Feature. Format for entity_type as parent:
+     * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+     * 
+ * * * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @@ -684,6 +734,16 @@ public Builder setParent(java.lang.String value) { return this; } /** + * + * + *
+     * Required. The resource name of the EntityType or FeatureGroup to create a
+     * Feature. Format for entity_type as parent:
+     * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+     * 
+ * * * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @@ -697,6 +757,16 @@ public Builder clearParent() { return this; } /** + * + * + *
+     * Required. The resource name of the EntityType or FeatureGroup to create a
+     * Feature. Format for entity_type as parent:
+     * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
+     * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+     * 
+ * * * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateFeatureRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateFeatureRequestOrBuilder.java index 05b81f3a447c..d4bfff276c3d 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateFeatureRequestOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateFeatureRequestOrBuilder.java @@ -24,6 +24,16 @@ public interface CreateFeatureRequestOrBuilder com.google.protobuf.MessageOrBuilder { /** + * + * + *
+   * Required. The resource name of the EntityType or FeatureGroup to create a
+   * Feature. Format for entity_type as parent:
+   * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+   * 
+ * * * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @@ -32,6 +42,16 @@ public interface CreateFeatureRequestOrBuilder */ java.lang.String getParent(); /** + * + * + *
+   * Required. The resource name of the EntityType or FeatureGroup to create a
+   * Feature. Format for entity_type as parent:
+   * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
+   * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
+   * 
+ * * * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CustomJobProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CustomJobProto.java index 8dbd3e926d16..f1a7d6b6c41f 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CustomJobProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CustomJobProto.java @@ -102,7 +102,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "isEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:" + "i\352Af\n#aiplatform.googleapis.com/CustomJo" + "b\022?projects/{project}/locations/{locatio" - + "n}/customJobs/{custom_job}\"\317\005\n\rCustomJob" + + "n}/customJobs/{custom_job}\"\367\005\n\rCustomJob" + "Spec\022U\n\026persistent_resource_id\030\016 \001(\tB5\342A" + "\001\001\372A.\n,aiplatform.googleapis.com/Persist" + "entResource\022P\n\021worker_pool_specs\030\001 \003(\0132/" @@ -113,7 +113,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "B\'\342A\001\001\372A \n\036compute.googleapis.com/Networ" + "k\022 \n\022reserved_ip_ranges\030\r \003(\tB\004\342A\001\001\022N\n\025b" + "ase_output_directory\030\006 \001(\0132/.google.clou" - + "d.aiplatform.v1beta1.GcsDestination\022C\n\013t" + + "d.aiplatform.v1beta1.GcsDestination\022&\n\036p" + + "rotected_artifact_location_id\030\023 \001(\t\022C\n\013t" + "ensorboard\030\007 \001(\tB.\342A\001\001\372A\'\n%aiplatform.go" + "ogleapis.com/Tensorboard\022\037\n\021enable_web_a" + "ccess\030\n \001(\010B\004\342A\001\001\022%\n\027enable_dashboard_ac" @@ -217,6 +218,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Network", "ReservedIpRanges", "BaseOutputDirectory", + "ProtectedArtifactLocationId", "Tensorboard", "EnableWebAccess", "EnableDashboardAccess", diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CustomJobSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CustomJobSpec.java index bfeb8536370d..271caa51f512 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CustomJobSpec.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CustomJobSpec.java @@ -43,6 +43,7 @@ private CustomJobSpec() { serviceAccount_ = ""; network_ = ""; reservedIpRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + protectedArtifactLocationId_ = ""; tensorboard_ = ""; experiment_ = ""; experimentRun_ = ""; @@ -620,6 +621,63 @@ public com.google.cloud.aiplatform.v1beta1.GcsDestination getBaseOutputDirectory : baseOutputDirectory_; } + public static final int PROTECTED_ARTIFACT_LOCATION_ID_FIELD_NUMBER = 19; + + @SuppressWarnings("serial") + private volatile java.lang.Object protectedArtifactLocationId_ = ""; + /** + * + * + *
+   * The ID of the location to store protected artifacts. e.g. us-central1.
+   * Populate only when the location is different than CustomJob location.
+   * List of supported locations:
+   * https://cloud.google.com/vertex-ai/docs/general/locations
+   * 
+ * + * string protected_artifact_location_id = 19; + * + * @return The protectedArtifactLocationId. + */ + @java.lang.Override + public java.lang.String getProtectedArtifactLocationId() { + java.lang.Object ref = protectedArtifactLocationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protectedArtifactLocationId_ = s; + return s; + } + } + /** + * + * + *
+   * The ID of the location to store protected artifacts. e.g. us-central1.
+   * Populate only when the location is different than CustomJob location.
+   * List of supported locations:
+   * https://cloud.google.com/vertex-ai/docs/general/locations
+   * 
+ * + * string protected_artifact_location_id = 19; + * + * @return The bytes for protectedArtifactLocationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProtectedArtifactLocationIdBytes() { + java.lang.Object ref = protectedArtifactLocationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protectedArtifactLocationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int TENSORBOARD_FIELD_NUMBER = 7; @SuppressWarnings("serial") @@ -904,6 +962,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(experimentRun_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 18, experimentRun_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protectedArtifactLocationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, protectedArtifactLocationId_); + } getUnknownFields().writeTo(output); } @@ -954,6 +1015,11 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(experimentRun_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, experimentRun_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protectedArtifactLocationId_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 19, protectedArtifactLocationId_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -983,6 +1049,8 @@ public boolean equals(final java.lang.Object obj) { if (hasBaseOutputDirectory()) { if (!getBaseOutputDirectory().equals(other.getBaseOutputDirectory())) return false; } + if (!getProtectedArtifactLocationId().equals(other.getProtectedArtifactLocationId())) + return false; if (!getTensorboard().equals(other.getTensorboard())) return false; if (getEnableWebAccess() != other.getEnableWebAccess()) return false; if (getEnableDashboardAccess() != other.getEnableDashboardAccess()) return false; @@ -1021,6 +1089,8 @@ public int hashCode() { hash = (37 * hash) + BASE_OUTPUT_DIRECTORY_FIELD_NUMBER; hash = (53 * hash) + getBaseOutputDirectory().hashCode(); } + hash = (37 * hash) + PROTECTED_ARTIFACT_LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getProtectedArtifactLocationId().hashCode(); hash = (37 * hash) + TENSORBOARD_FIELD_NUMBER; hash = (53 * hash) + getTensorboard().hashCode(); hash = (37 * hash) + ENABLE_WEB_ACCESS_FIELD_NUMBER; @@ -1191,6 +1261,7 @@ public Builder clear() { baseOutputDirectoryBuilder_.dispose(); baseOutputDirectoryBuilder_ = null; } + protectedArtifactLocationId_ = ""; tensorboard_ = ""; enableWebAccess_ = false; enableDashboardAccess_ = false; @@ -1269,18 +1340,21 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.CustomJobSpec res : baseOutputDirectoryBuilder_.build(); } if (((from_bitField0_ & 0x00000080) != 0)) { - result.tensorboard_ = tensorboard_; + result.protectedArtifactLocationId_ = protectedArtifactLocationId_; } if (((from_bitField0_ & 0x00000100) != 0)) { - result.enableWebAccess_ = enableWebAccess_; + result.tensorboard_ = tensorboard_; } if (((from_bitField0_ & 0x00000200) != 0)) { - result.enableDashboardAccess_ = enableDashboardAccess_; + result.enableWebAccess_ = enableWebAccess_; } if (((from_bitField0_ & 0x00000400) != 0)) { - result.experiment_ = experiment_; + result.enableDashboardAccess_ = enableDashboardAccess_; } if (((from_bitField0_ & 0x00000800) != 0)) { + result.experiment_ = experiment_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { result.experimentRun_ = experimentRun_; } } @@ -1389,9 +1463,14 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.CustomJobSpec other if (other.hasBaseOutputDirectory()) { mergeBaseOutputDirectory(other.getBaseOutputDirectory()); } + if (!other.getProtectedArtifactLocationId().isEmpty()) { + protectedArtifactLocationId_ = other.protectedArtifactLocationId_; + bitField0_ |= 0x00000080; + onChanged(); + } if (!other.getTensorboard().isEmpty()) { tensorboard_ = other.tensorboard_; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); } if (other.getEnableWebAccess() != false) { @@ -1402,12 +1481,12 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.CustomJobSpec other } if (!other.getExperiment().isEmpty()) { experiment_ = other.experiment_; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); } if (!other.getExperimentRun().isEmpty()) { experimentRun_ = other.experimentRun_; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -1478,13 +1557,13 @@ public Builder mergeFrom( case 58: { tensorboard_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 58 case 80: { enableWebAccess_ = input.readBool(); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 80 case 106: @@ -1503,21 +1582,27 @@ public Builder mergeFrom( case 128: { enableDashboardAccess_ = input.readBool(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; break; } // case 128 case 138: { experiment_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; break; } // case 138 case 146: { experimentRun_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; break; } // case 146 + case 154: + { + protectedArtifactLocationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 154 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3218,6 +3303,127 @@ public Builder clearBaseOutputDirectory() { return baseOutputDirectoryBuilder_; } + private java.lang.Object protectedArtifactLocationId_ = ""; + /** + * + * + *
+     * The ID of the location to store protected artifacts. e.g. us-central1.
+     * Populate only when the location is different than CustomJob location.
+     * List of supported locations:
+     * https://cloud.google.com/vertex-ai/docs/general/locations
+     * 
+ * + * string protected_artifact_location_id = 19; + * + * @return The protectedArtifactLocationId. + */ + public java.lang.String getProtectedArtifactLocationId() { + java.lang.Object ref = protectedArtifactLocationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protectedArtifactLocationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The ID of the location to store protected artifacts. e.g. us-central1.
+     * Populate only when the location is different than CustomJob location.
+     * List of supported locations:
+     * https://cloud.google.com/vertex-ai/docs/general/locations
+     * 
+ * + * string protected_artifact_location_id = 19; + * + * @return The bytes for protectedArtifactLocationId. + */ + public com.google.protobuf.ByteString getProtectedArtifactLocationIdBytes() { + java.lang.Object ref = protectedArtifactLocationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protectedArtifactLocationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The ID of the location to store protected artifacts. e.g. us-central1.
+     * Populate only when the location is different than CustomJob location.
+     * List of supported locations:
+     * https://cloud.google.com/vertex-ai/docs/general/locations
+     * 
+ * + * string protected_artifact_location_id = 19; + * + * @param value The protectedArtifactLocationId to set. + * @return This builder for chaining. + */ + public Builder setProtectedArtifactLocationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + protectedArtifactLocationId_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The ID of the location to store protected artifacts. e.g. us-central1.
+     * Populate only when the location is different than CustomJob location.
+     * List of supported locations:
+     * https://cloud.google.com/vertex-ai/docs/general/locations
+     * 
+ * + * string protected_artifact_location_id = 19; + * + * @return This builder for chaining. + */ + public Builder clearProtectedArtifactLocationId() { + protectedArtifactLocationId_ = getDefaultInstance().getProtectedArtifactLocationId(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * The ID of the location to store protected artifacts. e.g. us-central1.
+     * Populate only when the location is different than CustomJob location.
+     * List of supported locations:
+     * https://cloud.google.com/vertex-ai/docs/general/locations
+     * 
+ * + * string protected_artifact_location_id = 19; + * + * @param value The bytes for protectedArtifactLocationId to set. + * @return This builder for chaining. + */ + public Builder setProtectedArtifactLocationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + protectedArtifactLocationId_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + private java.lang.Object tensorboard_ = ""; /** * @@ -3295,7 +3501,7 @@ public Builder setTensorboard(java.lang.String value) { throw new NullPointerException(); } tensorboard_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3317,7 +3523,7 @@ public Builder setTensorboard(java.lang.String value) { */ public Builder clearTensorboard() { tensorboard_ = getDefaultInstance().getTensorboard(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } @@ -3344,7 +3550,7 @@ public Builder setTensorboardBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); tensorboard_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3400,7 +3606,7 @@ public boolean getEnableWebAccess() { public Builder setEnableWebAccess(boolean value) { enableWebAccess_ = value; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3426,7 +3632,7 @@ public Builder setEnableWebAccess(boolean value) { * @return This builder for chaining. */ public Builder clearEnableWebAccess() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); enableWebAccess_ = false; onChanged(); return this; @@ -3481,7 +3687,7 @@ public boolean getEnableDashboardAccess() { public Builder setEnableDashboardAccess(boolean value) { enableDashboardAccess_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3506,7 +3712,7 @@ public Builder setEnableDashboardAccess(boolean value) { * @return This builder for chaining. */ public Builder clearEnableDashboardAccess() { - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); enableDashboardAccess_ = false; onChanged(); return this; @@ -3586,7 +3792,7 @@ public Builder setExperiment(java.lang.String value) { throw new NullPointerException(); } experiment_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -3607,7 +3813,7 @@ public Builder setExperiment(java.lang.String value) { */ public Builder clearExperiment() { experiment_ = getDefaultInstance().getExperiment(); - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); onChanged(); return this; } @@ -3633,7 +3839,7 @@ public Builder setExperimentBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); experiment_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -3712,7 +3918,7 @@ public Builder setExperimentRun(java.lang.String value) { throw new NullPointerException(); } experimentRun_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -3733,7 +3939,7 @@ public Builder setExperimentRun(java.lang.String value) { */ public Builder clearExperimentRun() { experimentRun_ = getDefaultInstance().getExperimentRun(); - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00001000); onChanged(); return this; } @@ -3759,7 +3965,7 @@ public Builder setExperimentRunBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); experimentRun_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CustomJobSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CustomJobSpecOrBuilder.java index 6575af157fce..c8b4336355b2 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CustomJobSpecOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CustomJobSpecOrBuilder.java @@ -432,6 +432,37 @@ com.google.cloud.aiplatform.v1beta1.WorkerPoolSpecOrBuilder getWorkerPoolSpecsOr */ com.google.cloud.aiplatform.v1beta1.GcsDestinationOrBuilder getBaseOutputDirectoryOrBuilder(); + /** + * + * + *
+   * The ID of the location to store protected artifacts. e.g. us-central1.
+   * Populate only when the location is different than CustomJob location.
+   * List of supported locations:
+   * https://cloud.google.com/vertex-ai/docs/general/locations
+   * 
+ * + * string protected_artifact_location_id = 19; + * + * @return The protectedArtifactLocationId. + */ + java.lang.String getProtectedArtifactLocationId(); + /** + * + * + *
+   * The ID of the location to store protected artifacts. e.g. us-central1.
+   * Populate only when the location is different than CustomJob location.
+   * List of supported locations:
+   * https://cloud.google.com/vertex-ai/docs/general/locations
+   * 
+ * + * string protected_artifact_location_id = 19; + * + * @return The bytes for protectedArtifactLocationId. + */ + com.google.protobuf.ByteString getProtectedArtifactLocationIdBytes(); + /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedIndex.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedIndex.java index b27ff21da4c7..9c542874e3d5 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedIndex.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedIndex.java @@ -528,10 +528,11 @@ public com.google.cloud.aiplatform.v1beta1.AutomaticResources getAutomaticResour * *
    * Optional. A description of resources that are dedicated to the
-   * DeployedIndex, and that need a higher degree of manual configuration. If
-   * min_replica_count is not set, the default value is 2 (we don't provide SLA
-   * when min_replica_count=1). If max_replica_count is not set, the default
-   * value is min_replica_count. The max allowed replica count is 1000.
+   * DeployedIndex, and that need a higher degree of manual configuration. The
+   * field min_replica_count must be set to a value strictly greater than 0, or
+   * else validation will fail. We don't provide SLA when min_replica_count=1.
+   * If max_replica_count is not set, the default value is min_replica_count.
+   * The max allowed replica count is 1000.
    *
    * Available machine types for SMALL shard:
    * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -561,10 +562,11 @@ public boolean hasDedicatedResources() {
    *
    * 
    * Optional. A description of resources that are dedicated to the
-   * DeployedIndex, and that need a higher degree of manual configuration. If
-   * min_replica_count is not set, the default value is 2 (we don't provide SLA
-   * when min_replica_count=1). If max_replica_count is not set, the default
-   * value is min_replica_count. The max allowed replica count is 1000.
+   * DeployedIndex, and that need a higher degree of manual configuration. The
+   * field min_replica_count must be set to a value strictly greater than 0, or
+   * else validation will fail. We don't provide SLA when min_replica_count=1.
+   * If max_replica_count is not set, the default value is min_replica_count.
+   * The max allowed replica count is 1000.
    *
    * Available machine types for SMALL shard:
    * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -596,10 +598,11 @@ public com.google.cloud.aiplatform.v1beta1.DedicatedResources getDedicatedResour
    *
    * 
    * Optional. A description of resources that are dedicated to the
-   * DeployedIndex, and that need a higher degree of manual configuration. If
-   * min_replica_count is not set, the default value is 2 (we don't provide SLA
-   * when min_replica_count=1). If max_replica_count is not set, the default
-   * value is min_replica_count. The max allowed replica count is 1000.
+   * DeployedIndex, and that need a higher degree of manual configuration. The
+   * field min_replica_count must be set to a value strictly greater than 0, or
+   * else validation will fail. We don't provide SLA when min_replica_count=1.
+   * If max_replica_count is not set, the default value is min_replica_count.
+   * The max allowed replica count is 1000.
    *
    * Available machine types for SMALL shard:
    * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -2957,10 +2960,11 @@ public Builder clearAutomaticResources() {
      *
      * 
      * Optional. A description of resources that are dedicated to the
-     * DeployedIndex, and that need a higher degree of manual configuration. If
-     * min_replica_count is not set, the default value is 2 (we don't provide SLA
-     * when min_replica_count=1). If max_replica_count is not set, the default
-     * value is min_replica_count. The max allowed replica count is 1000.
+     * DeployedIndex, and that need a higher degree of manual configuration. The
+     * field min_replica_count must be set to a value strictly greater than 0, or
+     * else validation will fail. We don't provide SLA when min_replica_count=1.
+     * If max_replica_count is not set, the default value is min_replica_count.
+     * The max allowed replica count is 1000.
      *
      * Available machine types for SMALL shard:
      * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -2989,10 +2993,11 @@ public boolean hasDedicatedResources() {
      *
      * 
      * Optional. A description of resources that are dedicated to the
-     * DeployedIndex, and that need a higher degree of manual configuration. If
-     * min_replica_count is not set, the default value is 2 (we don't provide SLA
-     * when min_replica_count=1). If max_replica_count is not set, the default
-     * value is min_replica_count. The max allowed replica count is 1000.
+     * DeployedIndex, and that need a higher degree of manual configuration. The
+     * field min_replica_count must be set to a value strictly greater than 0, or
+     * else validation will fail. We don't provide SLA when min_replica_count=1.
+     * If max_replica_count is not set, the default value is min_replica_count.
+     * The max allowed replica count is 1000.
      *
      * Available machine types for SMALL shard:
      * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -3027,10 +3032,11 @@ public com.google.cloud.aiplatform.v1beta1.DedicatedResources getDedicatedResour
      *
      * 
      * Optional. A description of resources that are dedicated to the
-     * DeployedIndex, and that need a higher degree of manual configuration. If
-     * min_replica_count is not set, the default value is 2 (we don't provide SLA
-     * when min_replica_count=1). If max_replica_count is not set, the default
-     * value is min_replica_count. The max allowed replica count is 1000.
+     * DeployedIndex, and that need a higher degree of manual configuration. The
+     * field min_replica_count must be set to a value strictly greater than 0, or
+     * else validation will fail. We don't provide SLA when min_replica_count=1.
+     * If max_replica_count is not set, the default value is min_replica_count.
+     * The max allowed replica count is 1000.
      *
      * Available machine types for SMALL shard:
      * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -3068,10 +3074,11 @@ public Builder setDedicatedResources(
      *
      * 
      * Optional. A description of resources that are dedicated to the
-     * DeployedIndex, and that need a higher degree of manual configuration. If
-     * min_replica_count is not set, the default value is 2 (we don't provide SLA
-     * when min_replica_count=1). If max_replica_count is not set, the default
-     * value is min_replica_count. The max allowed replica count is 1000.
+     * DeployedIndex, and that need a higher degree of manual configuration. The
+     * field min_replica_count must be set to a value strictly greater than 0, or
+     * else validation will fail. We don't provide SLA when min_replica_count=1.
+     * If max_replica_count is not set, the default value is min_replica_count.
+     * The max allowed replica count is 1000.
      *
      * Available machine types for SMALL shard:
      * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -3106,10 +3113,11 @@ public Builder setDedicatedResources(
      *
      * 
      * Optional. A description of resources that are dedicated to the
-     * DeployedIndex, and that need a higher degree of manual configuration. If
-     * min_replica_count is not set, the default value is 2 (we don't provide SLA
-     * when min_replica_count=1). If max_replica_count is not set, the default
-     * value is min_replica_count. The max allowed replica count is 1000.
+     * DeployedIndex, and that need a higher degree of manual configuration. The
+     * field min_replica_count must be set to a value strictly greater than 0, or
+     * else validation will fail. We don't provide SLA when min_replica_count=1.
+     * If max_replica_count is not set, the default value is min_replica_count.
+     * The max allowed replica count is 1000.
      *
      * Available machine types for SMALL shard:
      * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -3151,10 +3159,11 @@ public Builder mergeDedicatedResources(
      *
      * 
      * Optional. A description of resources that are dedicated to the
-     * DeployedIndex, and that need a higher degree of manual configuration. If
-     * min_replica_count is not set, the default value is 2 (we don't provide SLA
-     * when min_replica_count=1). If max_replica_count is not set, the default
-     * value is min_replica_count. The max allowed replica count is 1000.
+     * DeployedIndex, and that need a higher degree of manual configuration. The
+     * field min_replica_count must be set to a value strictly greater than 0, or
+     * else validation will fail. We don't provide SLA when min_replica_count=1.
+     * If max_replica_count is not set, the default value is min_replica_count.
+     * The max allowed replica count is 1000.
      *
      * Available machine types for SMALL shard:
      * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -3188,10 +3197,11 @@ public Builder clearDedicatedResources() {
      *
      * 
      * Optional. A description of resources that are dedicated to the
-     * DeployedIndex, and that need a higher degree of manual configuration. If
-     * min_replica_count is not set, the default value is 2 (we don't provide SLA
-     * when min_replica_count=1). If max_replica_count is not set, the default
-     * value is min_replica_count. The max allowed replica count is 1000.
+     * DeployedIndex, and that need a higher degree of manual configuration. The
+     * field min_replica_count must be set to a value strictly greater than 0, or
+     * else validation will fail. We don't provide SLA when min_replica_count=1.
+     * If max_replica_count is not set, the default value is min_replica_count.
+     * The max allowed replica count is 1000.
      *
      * Available machine types for SMALL shard:
      * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -3221,10 +3231,11 @@ public Builder clearDedicatedResources() {
      *
      * 
      * Optional. A description of resources that are dedicated to the
-     * DeployedIndex, and that need a higher degree of manual configuration. If
-     * min_replica_count is not set, the default value is 2 (we don't provide SLA
-     * when min_replica_count=1). If max_replica_count is not set, the default
-     * value is min_replica_count. The max allowed replica count is 1000.
+     * DeployedIndex, and that need a higher degree of manual configuration. The
+     * field min_replica_count must be set to a value strictly greater than 0, or
+     * else validation will fail. We don't provide SLA when min_replica_count=1.
+     * If max_replica_count is not set, the default value is min_replica_count.
+     * The max allowed replica count is 1000.
      *
      * Available machine types for SMALL shard:
      * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -3258,10 +3269,11 @@ public Builder clearDedicatedResources() {
      *
      * 
      * Optional. A description of resources that are dedicated to the
-     * DeployedIndex, and that need a higher degree of manual configuration. If
-     * min_replica_count is not set, the default value is 2 (we don't provide SLA
-     * when min_replica_count=1). If max_replica_count is not set, the default
-     * value is min_replica_count. The max allowed replica count is 1000.
+     * DeployedIndex, and that need a higher degree of manual configuration. The
+     * field min_replica_count must be set to a value strictly greater than 0, or
+     * else validation will fail. We don't provide SLA when min_replica_count=1.
+     * If max_replica_count is not set, the default value is min_replica_count.
+     * The max allowed replica count is 1000.
      *
      * Available machine types for SMALL shard:
      * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedIndexOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedIndexOrBuilder.java
index 0cf486b14a5b..76ac4218d161 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedIndexOrBuilder.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedIndexOrBuilder.java
@@ -347,10 +347,11 @@ public interface DeployedIndexOrBuilder
    *
    * 
    * Optional. A description of resources that are dedicated to the
-   * DeployedIndex, and that need a higher degree of manual configuration. If
-   * min_replica_count is not set, the default value is 2 (we don't provide SLA
-   * when min_replica_count=1). If max_replica_count is not set, the default
-   * value is min_replica_count. The max allowed replica count is 1000.
+   * DeployedIndex, and that need a higher degree of manual configuration. The
+   * field min_replica_count must be set to a value strictly greater than 0, or
+   * else validation will fail. We don't provide SLA when min_replica_count=1.
+   * If max_replica_count is not set, the default value is min_replica_count.
+   * The max allowed replica count is 1000.
    *
    * Available machine types for SMALL shard:
    * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -377,10 +378,11 @@ public interface DeployedIndexOrBuilder
    *
    * 
    * Optional. A description of resources that are dedicated to the
-   * DeployedIndex, and that need a higher degree of manual configuration. If
-   * min_replica_count is not set, the default value is 2 (we don't provide SLA
-   * when min_replica_count=1). If max_replica_count is not set, the default
-   * value is min_replica_count. The max allowed replica count is 1000.
+   * DeployedIndex, and that need a higher degree of manual configuration. The
+   * field min_replica_count must be set to a value strictly greater than 0, or
+   * else validation will fail. We don't provide SLA when min_replica_count=1.
+   * If max_replica_count is not set, the default value is min_replica_count.
+   * The max allowed replica count is 1000.
    *
    * Available machine types for SMALL shard:
    * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
@@ -407,10 +409,11 @@ public interface DeployedIndexOrBuilder
    *
    * 
    * Optional. A description of resources that are dedicated to the
-   * DeployedIndex, and that need a higher degree of manual configuration. If
-   * min_replica_count is not set, the default value is 2 (we don't provide SLA
-   * when min_replica_count=1). If max_replica_count is not set, the default
-   * value is min_replica_count. The max allowed replica count is 1000.
+   * DeployedIndex, and that need a higher degree of manual configuration. The
+   * field min_replica_count must be set to a value strictly greater than 0, or
+   * else validation will fail. We don't provide SLA when min_replica_count=1.
+   * If max_replica_count is not set, the default value is min_replica_count.
+   * The max allowed replica count is 1000.
    *
    * Available machine types for SMALL shard:
    * e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplainResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplainResponse.java
index 9646a3bc5e32..c4c519ee5297 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplainResponse.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplainResponse.java
@@ -1375,7 +1375,7 @@ public int getConcurrentExplanationsCount() {
    *
    * 
    * This field stores the results of the explanations run in parallel with
-   * the default explanation strategy/method.
+   * The default explanation strategy/method.
    * 
* * @@ -1403,7 +1403,7 @@ public boolean containsConcurrentExplanations(java.lang.String key) { * *
    * This field stores the results of the explanations run in parallel with
-   * the default explanation strategy/method.
+   * The default explanation strategy/method.
    * 
* * @@ -1422,7 +1422,7 @@ public boolean containsConcurrentExplanations(java.lang.String key) { * *
    * This field stores the results of the explanations run in parallel with
-   * the default explanation strategy/method.
+   * The default explanation strategy/method.
    * 
* * @@ -1449,7 +1449,7 @@ public boolean containsConcurrentExplanations(java.lang.String key) { * *
    * This field stores the results of the explanations run in parallel with
-   * the default explanation strategy/method.
+   * The default explanation strategy/method.
    * 
* * @@ -2643,7 +2643,7 @@ public int getConcurrentExplanationsCount() { * *
      * This field stores the results of the explanations run in parallel with
-     * the default explanation strategy/method.
+     * The default explanation strategy/method.
      * 
* * @@ -2671,7 +2671,7 @@ public boolean containsConcurrentExplanations(java.lang.String key) { * *
      * This field stores the results of the explanations run in parallel with
-     * the default explanation strategy/method.
+     * The default explanation strategy/method.
      * 
* * @@ -2690,7 +2690,7 @@ public boolean containsConcurrentExplanations(java.lang.String key) { * *
      * This field stores the results of the explanations run in parallel with
-     * the default explanation strategy/method.
+     * The default explanation strategy/method.
      * 
* * @@ -2718,7 +2718,7 @@ public boolean containsConcurrentExplanations(java.lang.String key) { * *
      * This field stores the results of the explanations run in parallel with
-     * the default explanation strategy/method.
+     * The default explanation strategy/method.
      * 
* * @@ -2751,7 +2751,7 @@ public Builder clearConcurrentExplanations() { * *
      * This field stores the results of the explanations run in parallel with
-     * the default explanation strategy/method.
+     * The default explanation strategy/method.
      * 
* * @@ -2779,7 +2779,7 @@ public Builder removeConcurrentExplanations(java.lang.String key) { * *
      * This field stores the results of the explanations run in parallel with
-     * the default explanation strategy/method.
+     * The default explanation strategy/method.
      * 
* * @@ -2804,7 +2804,7 @@ public Builder putConcurrentExplanations( * *
      * This field stores the results of the explanations run in parallel with
-     * the default explanation strategy/method.
+     * The default explanation strategy/method.
      * 
* * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplainResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplainResponseOrBuilder.java index bd2fb604c2ca..ce6e8daee4cd 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplainResponseOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplainResponseOrBuilder.java @@ -105,7 +105,7 @@ public interface ExplainResponseOrBuilder * *
    * This field stores the results of the explanations run in parallel with
-   * the default explanation strategy/method.
+   * The default explanation strategy/method.
    * 
* * @@ -118,7 +118,7 @@ public interface ExplainResponseOrBuilder * *
    * This field stores the results of the explanations run in parallel with
-   * the default explanation strategy/method.
+   * The default explanation strategy/method.
    * 
* * @@ -137,7 +137,7 @@ public interface ExplainResponseOrBuilder * *
    * This field stores the results of the explanations run in parallel with
-   * the default explanation strategy/method.
+   * The default explanation strategy/method.
    * 
* * @@ -153,7 +153,7 @@ public interface ExplainResponseOrBuilder * *
    * This field stores the results of the explanations run in parallel with
-   * the default explanation strategy/method.
+   * The default explanation strategy/method.
    * 
* * @@ -171,7 +171,7 @@ public interface ExplainResponseOrBuilder * *
    * This field stores the results of the explanations run in parallel with
-   * the default explanation strategy/method.
+   * The default explanation strategy/method.
    * 
* * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Feature.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Feature.java index ea1a88cf45ea..b43ef956ff4d 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Feature.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Feature.java @@ -22,9 +22,8 @@ * * *
- * Feature Metadata information that describes an attribute of an entity type.
- * For example, apple is an entity type, and color is a feature that describes
- * apple.
+ * Feature Metadata information.
+ * For example, color is a feature that describes an apple.
  * 
* * Protobuf type {@code google.cloud.aiplatform.v1beta1.Feature} @@ -46,6 +45,7 @@ private Feature() { etag_ = ""; monitoringStats_ = java.util.Collections.emptyList(); monitoringStatsAnomalies_ = java.util.Collections.emptyList(); + versionColumnName_ = ""; } @java.lang.Override @@ -84,6 +84,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * * *
+   * Only applicable for Vertex AI Legacy Feature Store.
    * An enum representing the value type of a feature.
    * 
* @@ -1573,6 +1574,7 @@ public com.google.protobuf.Parser getParserForType() { * Immutable. Name of the Feature. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * The last part feature is assigned by the client. The feature can be up to * 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, @@ -1603,6 +1605,7 @@ public java.lang.String getName() { * Immutable. Name of the Feature. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * The last part feature is assigned by the client. The feature can be up to * 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, @@ -1684,7 +1687,8 @@ public com.google.protobuf.ByteString getDescriptionBytes() { * * *
-   * Immutable. Type of Feature value.
+   * Immutable. Only applicable for Vertex AI Feature Store (Legacy).
+   * Type of Feature value.
    * 
* * @@ -1701,7 +1705,8 @@ public int getValueTypeValue() { * * *
-   * Immutable. Type of Feature value.
+   * Immutable. Only applicable for Vertex AI Feature Store (Legacy).
+   * Type of Feature value.
    * 
* * @@ -1725,7 +1730,8 @@ public com.google.cloud.aiplatform.v1beta1.Feature.ValueType getValueType() { * * *
-   * Output only. Timestamp when this EntityType was created.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was created.
    * 
* * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1741,7 +1747,8 @@ public boolean hasCreateTime() { * * *
-   * Output only. Timestamp when this EntityType was created.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was created.
    * 
* * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1757,7 +1764,8 @@ public com.google.protobuf.Timestamp getCreateTime() { * * *
-   * Output only. Timestamp when this EntityType was created.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was created.
    * 
* * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1774,7 +1782,8 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *
-   * Output only. Timestamp when this EntityType was most recently updated.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was most recently updated.
    * 
* * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1790,7 +1799,8 @@ public boolean hasUpdateTime() { * * *
-   * Output only. Timestamp when this EntityType was most recently updated.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was most recently updated.
    * 
* * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1806,7 +1816,8 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * *
-   * Output only. Timestamp when this EntityType was most recently updated.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was most recently updated.
    * 
* * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2018,9 +2029,11 @@ public com.google.protobuf.ByteString getEtagBytes() { * * *
-   * Optional. Deprecated: The custom monitoring configuration for this Feature,
-   * if not set, use the monitoring_config defined for the EntityType this
-   * Feature belongs to. Only Features with type
+   * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+   * Deprecated: The custom monitoring configuration for this Feature, if not
+   * set, use the monitoring_config defined for the EntityType this Feature
+   * belongs to.
+   * Only Features with type
    * ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
    * BOOL, STRING, DOUBLE or INT64 can enable monitoring.
    *
@@ -2037,7 +2050,7 @@ public com.google.protobuf.ByteString getEtagBytes() {
    * 
    *
    * @deprecated google.cloud.aiplatform.v1beta1.Feature.monitoring_config is deprecated. See
-   *     google/cloud/aiplatform/v1beta1/feature.proto;l=161
+   *     google/cloud/aiplatform/v1beta1/feature.proto;l=167
    * @return Whether the monitoringConfig field is set.
    */
   @java.lang.Override
@@ -2049,9 +2062,11 @@ public boolean hasMonitoringConfig() {
    *
    *
    * 
-   * Optional. Deprecated: The custom monitoring configuration for this Feature,
-   * if not set, use the monitoring_config defined for the EntityType this
-   * Feature belongs to. Only Features with type
+   * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+   * Deprecated: The custom monitoring configuration for this Feature, if not
+   * set, use the monitoring_config defined for the EntityType this Feature
+   * belongs to.
+   * Only Features with type
    * ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
    * BOOL, STRING, DOUBLE or INT64 can enable monitoring.
    *
@@ -2068,7 +2083,7 @@ public boolean hasMonitoringConfig() {
    * 
    *
    * @deprecated google.cloud.aiplatform.v1beta1.Feature.monitoring_config is deprecated. See
-   *     google/cloud/aiplatform/v1beta1/feature.proto;l=161
+   *     google/cloud/aiplatform/v1beta1/feature.proto;l=167
    * @return The monitoringConfig.
    */
   @java.lang.Override
@@ -2082,9 +2097,11 @@ public com.google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig getMonit
    *
    *
    * 
-   * Optional. Deprecated: The custom monitoring configuration for this Feature,
-   * if not set, use the monitoring_config defined for the EntityType this
-   * Feature belongs to. Only Features with type
+   * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+   * Deprecated: The custom monitoring configuration for this Feature, if not
+   * set, use the monitoring_config defined for the EntityType this Feature
+   * belongs to.
+   * Only Features with type
    * ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
    * BOOL, STRING, DOUBLE or INT64 can enable monitoring.
    *
@@ -2115,8 +2132,10 @@ public com.google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig getMonit
    *
    *
    * 
-   * Optional. If not set, use the monitoring_config defined for the EntityType
-   * this Feature belongs to. Only Features with type
+   * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+   * If not set, use the monitoring_config defined for the EntityType this
+   * Feature belongs to.
+   * Only Features with type
    * ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
    * BOOL, STRING, DOUBLE or INT64 can enable monitoring.
    *
@@ -2141,7 +2160,8 @@ public boolean getDisableMonitoring() {
    *
    *
    * 
-   * Output only. A list of historical
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * A list of historical
    * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
    * stats requested by user, sorted by
    * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -2161,7 +2181,8 @@ public boolean getDisableMonitoring() {
    *
    *
    * 
-   * Output only. A list of historical
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * A list of historical
    * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
    * stats requested by user, sorted by
    * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -2181,7 +2202,8 @@ public boolean getDisableMonitoring() {
    *
    *
    * 
-   * Output only. A list of historical
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * A list of historical
    * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
    * stats requested by user, sorted by
    * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -2200,7 +2222,8 @@ public int getMonitoringStatsCount() {
    *
    *
    * 
-   * Output only. A list of historical
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * A list of historical
    * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
    * stats requested by user, sorted by
    * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -2219,7 +2242,8 @@ public com.google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly getMonitoringStat
    *
    *
    * 
-   * Output only. A list of historical
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * A list of historical
    * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
    * stats requested by user, sorted by
    * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -2245,8 +2269,8 @@ public com.google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly getMonitoringStat
    *
    *
    * 
-   * Output only. The list of historical stats and anomalies with specified
-   * objectives.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * The list of historical stats and anomalies with specified objectives.
    * 
* * @@ -2262,8 +2286,8 @@ public com.google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly getMonitoringStat * * *
-   * Output only. The list of historical stats and anomalies with specified
-   * objectives.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * The list of historical stats and anomalies with specified objectives.
    * 
* * @@ -2280,8 +2304,8 @@ public com.google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly getMonitoringStat * * *
-   * Output only. The list of historical stats and anomalies with specified
-   * objectives.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * The list of historical stats and anomalies with specified objectives.
    * 
* * @@ -2296,8 +2320,8 @@ public int getMonitoringStatsAnomaliesCount() { * * *
-   * Output only. The list of historical stats and anomalies with specified
-   * objectives.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * The list of historical stats and anomalies with specified objectives.
    * 
* * @@ -2313,8 +2337,8 @@ public int getMonitoringStatsAnomaliesCount() { * * *
-   * Output only. The list of historical stats and anomalies with specified
-   * objectives.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * The list of historical stats and anomalies with specified objectives.
    * 
* * @@ -2327,6 +2351,61 @@ public int getMonitoringStatsAnomaliesCount() { return monitoringStatsAnomalies_.get(index); } + public static final int VERSION_COLUMN_NAME_FIELD_NUMBER = 106; + + @SuppressWarnings("serial") + private volatile java.lang.Object versionColumnName_ = ""; + /** + * + * + *
+   * Only applicable for Vertex AI Feature Store.
+   * The name of the BigQuery Table/View columnn hosting data for this version.
+   * If no value is provided, will use feature_id.
+   * 
+ * + * string version_column_name = 106; + * + * @return The versionColumnName. + */ + @java.lang.Override + public java.lang.String getVersionColumnName() { + java.lang.Object ref = versionColumnName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + versionColumnName_ = s; + return s; + } + } + /** + * + * + *
+   * Only applicable for Vertex AI Feature Store.
+   * The name of the BigQuery Table/View columnn hosting data for this version.
+   * If no value is provided, will use feature_id.
+   * 
+ * + * string version_column_name = 106; + * + * @return The bytes for versionColumnName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionColumnNameBytes() { + java.lang.Object ref = versionColumnName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + versionColumnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2375,6 +2454,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (disableMonitoring_ != false) { output.writeBool(12, disableMonitoring_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(versionColumnName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 106, versionColumnName_); + } getUnknownFields().writeTo(output); } @@ -2428,6 +2510,9 @@ public int getSerializedSize() { if (disableMonitoring_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(12, disableMonitoring_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(versionColumnName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(106, versionColumnName_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2465,6 +2550,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMonitoringStatsList().equals(other.getMonitoringStatsList())) return false; if (!getMonitoringStatsAnomaliesList().equals(other.getMonitoringStatsAnomaliesList())) return false; + if (!getVersionColumnName().equals(other.getVersionColumnName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2510,6 +2596,8 @@ public int hashCode() { hash = (37 * hash) + MONITORING_STATS_ANOMALIES_FIELD_NUMBER; hash = (53 * hash) + getMonitoringStatsAnomaliesList().hashCode(); } + hash = (37 * hash) + VERSION_COLUMN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getVersionColumnName().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2614,9 +2702,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Feature Metadata information that describes an attribute of an entity type.
-   * For example, apple is an entity type, and color is a feature that describes
-   * apple.
+   * Feature Metadata information.
+   * For example, color is a feature that describes an apple.
    * 
* * Protobuf type {@code google.cloud.aiplatform.v1beta1.Feature} @@ -2706,6 +2793,7 @@ public Builder clear() { monitoringStatsAnomaliesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000400); + versionColumnName_ = ""; return this; } @@ -2794,6 +2882,9 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.Feature result) { if (((from_bitField0_ & 0x00000100) != 0)) { result.disableMonitoring_ = disableMonitoring_; } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.versionColumnName_ = versionColumnName_; + } } @java.lang.Override @@ -2927,6 +3018,11 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.Feature other) { } } } + if (!other.getVersionColumnName().isEmpty()) { + versionColumnName_ = other.versionColumnName_; + bitField0_ |= 0x00000800; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -3042,6 +3138,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000100; break; } // case 96 + case 850: + { + versionColumnName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 850 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3069,6 +3171,7 @@ public Builder mergeFrom( * Immutable. Name of the Feature. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * The last part feature is assigned by the client. The feature can be up to * 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, @@ -3098,6 +3201,7 @@ public java.lang.String getName() { * Immutable. Name of the Feature. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * The last part feature is assigned by the client. The feature can be up to * 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, @@ -3127,6 +3231,7 @@ public com.google.protobuf.ByteString getNameBytes() { * Immutable. Name of the Feature. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * The last part feature is assigned by the client. The feature can be up to * 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, @@ -3155,6 +3260,7 @@ public Builder setName(java.lang.String value) { * Immutable. Name of the Feature. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * The last part feature is assigned by the client. The feature can be up to * 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, @@ -3179,6 +3285,7 @@ public Builder clearName() { * Immutable. Name of the Feature. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * The last part feature is assigned by the client. The feature can be up to * 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, @@ -3313,7 +3420,8 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { * * *
-     * Immutable. Type of Feature value.
+     * Immutable. Only applicable for Vertex AI Feature Store (Legacy).
+     * Type of Feature value.
      * 
* * @@ -3330,7 +3438,8 @@ public int getValueTypeValue() { * * *
-     * Immutable. Type of Feature value.
+     * Immutable. Only applicable for Vertex AI Feature Store (Legacy).
+     * Type of Feature value.
      * 
* * @@ -3350,7 +3459,8 @@ public Builder setValueTypeValue(int value) { * * *
-     * Immutable. Type of Feature value.
+     * Immutable. Only applicable for Vertex AI Feature Store (Legacy).
+     * Type of Feature value.
      * 
* * @@ -3371,7 +3481,8 @@ public com.google.cloud.aiplatform.v1beta1.Feature.ValueType getValueType() { * * *
-     * Immutable. Type of Feature value.
+     * Immutable. Only applicable for Vertex AI Feature Store (Legacy).
+     * Type of Feature value.
      * 
* * @@ -3394,7 +3505,8 @@ public Builder setValueType(com.google.cloud.aiplatform.v1beta1.Feature.ValueTyp * * *
-     * Immutable. Type of Feature value.
+     * Immutable. Only applicable for Vertex AI Feature Store (Legacy).
+     * Type of Feature value.
      * 
* * @@ -3420,7 +3532,8 @@ public Builder clearValueType() { * * *
-     * Output only. Timestamp when this EntityType was created.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was created.
      * 
* * @@ -3436,7 +3549,8 @@ public boolean hasCreateTime() { * * *
-     * Output only. Timestamp when this EntityType was created.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was created.
      * 
* * @@ -3458,7 +3572,8 @@ public com.google.protobuf.Timestamp getCreateTime() { * * *
-     * Output only. Timestamp when this EntityType was created.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was created.
      * 
* * @@ -3482,7 +3597,8 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. Timestamp when this EntityType was created.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was created.
      * 
* * @@ -3503,7 +3619,8 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
-     * Output only. Timestamp when this EntityType was created.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was created.
      * 
* * @@ -3530,7 +3647,8 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. Timestamp when this EntityType was created.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was created.
      * 
* * @@ -3551,7 +3669,8 @@ public Builder clearCreateTime() { * * *
-     * Output only. Timestamp when this EntityType was created.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was created.
      * 
* * @@ -3567,7 +3686,8 @@ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { * * *
-     * Output only. Timestamp when this EntityType was created.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was created.
      * 
* * @@ -3587,7 +3707,8 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *
-     * Output only. Timestamp when this EntityType was created.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was created.
      * 
* * @@ -3621,7 +3742,8 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *
-     * Output only. Timestamp when this EntityType was most recently updated.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was most recently updated.
      * 
* * @@ -3637,7 +3759,8 @@ public boolean hasUpdateTime() { * * *
-     * Output only. Timestamp when this EntityType was most recently updated.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was most recently updated.
      * 
* * @@ -3659,7 +3782,8 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * *
-     * Output only. Timestamp when this EntityType was most recently updated.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was most recently updated.
      * 
* * @@ -3683,7 +3807,8 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. Timestamp when this EntityType was most recently updated.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was most recently updated.
      * 
* * @@ -3704,7 +3829,8 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
-     * Output only. Timestamp when this EntityType was most recently updated.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was most recently updated.
      * 
* * @@ -3731,7 +3857,8 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. Timestamp when this EntityType was most recently updated.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was most recently updated.
      * 
* * @@ -3752,7 +3879,8 @@ public Builder clearUpdateTime() { * * *
-     * Output only. Timestamp when this EntityType was most recently updated.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was most recently updated.
      * 
* * @@ -3768,7 +3896,8 @@ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { * * *
-     * Output only. Timestamp when this EntityType was most recently updated.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was most recently updated.
      * 
* * @@ -3788,7 +3917,8 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *
-     * Output only. Timestamp when this EntityType was most recently updated.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * Timestamp when this EntityType was most recently updated.
      * 
* * @@ -4166,9 +4296,11 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. Deprecated: The custom monitoring configuration for this Feature,
-     * if not set, use the monitoring_config defined for the EntityType this
-     * Feature belongs to. Only Features with type
+     * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+     * Deprecated: The custom monitoring configuration for this Feature, if not
+     * set, use the monitoring_config defined for the EntityType this Feature
+     * belongs to.
+     * Only Features with type
      * ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
      * BOOL, STRING, DOUBLE or INT64 can enable monitoring.
      *
@@ -4185,7 +4317,7 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) {
      * 
      *
      * @deprecated google.cloud.aiplatform.v1beta1.Feature.monitoring_config is deprecated. See
-     *     google/cloud/aiplatform/v1beta1/feature.proto;l=161
+     *     google/cloud/aiplatform/v1beta1/feature.proto;l=167
      * @return Whether the monitoringConfig field is set.
      */
     @java.lang.Deprecated
@@ -4196,9 +4328,11 @@ public boolean hasMonitoringConfig() {
      *
      *
      * 
-     * Optional. Deprecated: The custom monitoring configuration for this Feature,
-     * if not set, use the monitoring_config defined for the EntityType this
-     * Feature belongs to. Only Features with type
+     * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+     * Deprecated: The custom monitoring configuration for this Feature, if not
+     * set, use the monitoring_config defined for the EntityType this Feature
+     * belongs to.
+     * Only Features with type
      * ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
      * BOOL, STRING, DOUBLE or INT64 can enable monitoring.
      *
@@ -4215,7 +4349,7 @@ public boolean hasMonitoringConfig() {
      * 
      *
      * @deprecated google.cloud.aiplatform.v1beta1.Feature.monitoring_config is deprecated. See
-     *     google/cloud/aiplatform/v1beta1/feature.proto;l=161
+     *     google/cloud/aiplatform/v1beta1/feature.proto;l=167
      * @return The monitoringConfig.
      */
     @java.lang.Deprecated
@@ -4232,9 +4366,11 @@ public com.google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig getMonit
      *
      *
      * 
-     * Optional. Deprecated: The custom monitoring configuration for this Feature,
-     * if not set, use the monitoring_config defined for the EntityType this
-     * Feature belongs to. Only Features with type
+     * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+     * Deprecated: The custom monitoring configuration for this Feature, if not
+     * set, use the monitoring_config defined for the EntityType this Feature
+     * belongs to.
+     * Only Features with type
      * ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
      * BOOL, STRING, DOUBLE or INT64 can enable monitoring.
      *
@@ -4269,9 +4405,11 @@ public Builder setMonitoringConfig(
      *
      *
      * 
-     * Optional. Deprecated: The custom monitoring configuration for this Feature,
-     * if not set, use the monitoring_config defined for the EntityType this
-     * Feature belongs to. Only Features with type
+     * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+     * Deprecated: The custom monitoring configuration for this Feature, if not
+     * set, use the monitoring_config defined for the EntityType this Feature
+     * belongs to.
+     * Only Features with type
      * ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
      * BOOL, STRING, DOUBLE or INT64 can enable monitoring.
      *
@@ -4303,9 +4441,11 @@ public Builder setMonitoringConfig(
      *
      *
      * 
-     * Optional. Deprecated: The custom monitoring configuration for this Feature,
-     * if not set, use the monitoring_config defined for the EntityType this
-     * Feature belongs to. Only Features with type
+     * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+     * Deprecated: The custom monitoring configuration for this Feature, if not
+     * set, use the monitoring_config defined for the EntityType this Feature
+     * belongs to.
+     * Only Features with type
      * ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
      * BOOL, STRING, DOUBLE or INT64 can enable monitoring.
      *
@@ -4345,9 +4485,11 @@ public Builder mergeMonitoringConfig(
      *
      *
      * 
-     * Optional. Deprecated: The custom monitoring configuration for this Feature,
-     * if not set, use the monitoring_config defined for the EntityType this
-     * Feature belongs to. Only Features with type
+     * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+     * Deprecated: The custom monitoring configuration for this Feature, if not
+     * set, use the monitoring_config defined for the EntityType this Feature
+     * belongs to.
+     * Only Features with type
      * ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
      * BOOL, STRING, DOUBLE or INT64 can enable monitoring.
      *
@@ -4378,9 +4520,11 @@ public Builder clearMonitoringConfig() {
      *
      *
      * 
-     * Optional. Deprecated: The custom monitoring configuration for this Feature,
-     * if not set, use the monitoring_config defined for the EntityType this
-     * Feature belongs to. Only Features with type
+     * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+     * Deprecated: The custom monitoring configuration for this Feature, if not
+     * set, use the monitoring_config defined for the EntityType this Feature
+     * belongs to.
+     * Only Features with type
      * ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
      * BOOL, STRING, DOUBLE or INT64 can enable monitoring.
      *
@@ -4407,9 +4551,11 @@ public Builder clearMonitoringConfig() {
      *
      *
      * 
-     * Optional. Deprecated: The custom monitoring configuration for this Feature,
-     * if not set, use the monitoring_config defined for the EntityType this
-     * Feature belongs to. Only Features with type
+     * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+     * Deprecated: The custom monitoring configuration for this Feature, if not
+     * set, use the monitoring_config defined for the EntityType this Feature
+     * belongs to.
+     * Only Features with type
      * ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
      * BOOL, STRING, DOUBLE or INT64 can enable monitoring.
      *
@@ -4440,9 +4586,11 @@ public Builder clearMonitoringConfig() {
      *
      *
      * 
-     * Optional. Deprecated: The custom monitoring configuration for this Feature,
-     * if not set, use the monitoring_config defined for the EntityType this
-     * Feature belongs to. Only Features with type
+     * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+     * Deprecated: The custom monitoring configuration for this Feature, if not
+     * set, use the monitoring_config defined for the EntityType this Feature
+     * belongs to.
+     * Only Features with type
      * ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
      * BOOL, STRING, DOUBLE or INT64 can enable monitoring.
      *
@@ -4480,8 +4628,10 @@ public Builder clearMonitoringConfig() {
      *
      *
      * 
-     * Optional. If not set, use the monitoring_config defined for the EntityType
-     * this Feature belongs to. Only Features with type
+     * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+     * If not set, use the monitoring_config defined for the EntityType this
+     * Feature belongs to.
+     * Only Features with type
      * ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
      * BOOL, STRING, DOUBLE or INT64 can enable monitoring.
      *
@@ -4501,8 +4651,10 @@ public boolean getDisableMonitoring() {
      *
      *
      * 
-     * Optional. If not set, use the monitoring_config defined for the EntityType
-     * this Feature belongs to. Only Features with type
+     * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+     * If not set, use the monitoring_config defined for the EntityType this
+     * Feature belongs to.
+     * Only Features with type
      * ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
      * BOOL, STRING, DOUBLE or INT64 can enable monitoring.
      *
@@ -4526,8 +4678,10 @@ public Builder setDisableMonitoring(boolean value) {
      *
      *
      * 
-     * Optional. If not set, use the monitoring_config defined for the EntityType
-     * this Feature belongs to. Only Features with type
+     * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+     * If not set, use the monitoring_config defined for the EntityType this
+     * Feature belongs to.
+     * Only Features with type
      * ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
      * BOOL, STRING, DOUBLE or INT64 can enable monitoring.
      *
@@ -4568,7 +4722,8 @@ private void ensureMonitoringStatsIsMutable() {
      *
      *
      * 
-     * Output only. A list of historical
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * A list of historical
      * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
      * stats requested by user, sorted by
      * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -4591,7 +4746,8 @@ private void ensureMonitoringStatsIsMutable() {
      *
      *
      * 
-     * Output only. A list of historical
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * A list of historical
      * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
      * stats requested by user, sorted by
      * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -4613,7 +4769,8 @@ public int getMonitoringStatsCount() {
      *
      *
      * 
-     * Output only. A list of historical
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * A list of historical
      * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
      * stats requested by user, sorted by
      * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -4635,7 +4792,8 @@ public com.google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly getMonitoringStat
      *
      *
      * 
-     * Output only. A list of historical
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * A list of historical
      * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
      * stats requested by user, sorted by
      * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -4664,7 +4822,8 @@ public Builder setMonitoringStats(
      *
      *
      * 
-     * Output only. A list of historical
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * A list of historical
      * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
      * stats requested by user, sorted by
      * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -4691,7 +4850,8 @@ public Builder setMonitoringStats(
      *
      *
      * 
-     * Output only. A list of historical
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * A list of historical
      * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
      * stats requested by user, sorted by
      * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -4720,7 +4880,8 @@ public Builder addMonitoringStats(
      *
      *
      * 
-     * Output only. A list of historical
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * A list of historical
      * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
      * stats requested by user, sorted by
      * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -4749,7 +4910,8 @@ public Builder addMonitoringStats(
      *
      *
      * 
-     * Output only. A list of historical
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * A list of historical
      * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
      * stats requested by user, sorted by
      * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -4775,7 +4937,8 @@ public Builder addMonitoringStats(
      *
      *
      * 
-     * Output only. A list of historical
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * A list of historical
      * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
      * stats requested by user, sorted by
      * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -4802,7 +4965,8 @@ public Builder addMonitoringStats(
      *
      *
      * 
-     * Output only. A list of historical
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * A list of historical
      * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
      * stats requested by user, sorted by
      * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -4829,7 +4993,8 @@ public Builder addAllMonitoringStats(
      *
      *
      * 
-     * Output only. A list of historical
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * A list of historical
      * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
      * stats requested by user, sorted by
      * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -4854,7 +5019,8 @@ public Builder clearMonitoringStats() {
      *
      *
      * 
-     * Output only. A list of historical
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * A list of historical
      * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
      * stats requested by user, sorted by
      * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -4879,7 +5045,8 @@ public Builder removeMonitoringStats(int index) {
      *
      *
      * 
-     * Output only. A list of historical
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * A list of historical
      * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
      * stats requested by user, sorted by
      * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -4898,7 +5065,8 @@ public Builder removeMonitoringStats(int index) {
      *
      *
      * 
-     * Output only. A list of historical
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * A list of historical
      * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
      * stats requested by user, sorted by
      * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -4921,7 +5089,8 @@ public Builder removeMonitoringStats(int index) {
      *
      *
      * 
-     * Output only. A list of historical
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * A list of historical
      * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
      * stats requested by user, sorted by
      * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -4945,7 +5114,8 @@ public Builder removeMonitoringStats(int index) {
      *
      *
      * 
-     * Output only. A list of historical
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * A list of historical
      * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
      * stats requested by user, sorted by
      * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -4965,7 +5135,8 @@ public Builder removeMonitoringStats(int index) {
      *
      *
      * 
-     * Output only. A list of historical
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * A list of historical
      * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
      * stats requested by user, sorted by
      * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -4986,7 +5157,8 @@ public Builder removeMonitoringStats(int index) {
      *
      *
      * 
-     * Output only. A list of historical
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * A list of historical
      * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
      * stats requested by user, sorted by
      * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -5045,8 +5217,8 @@ private void ensureMonitoringStatsAnomaliesIsMutable() {
      *
      *
      * 
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -5065,8 +5237,8 @@ private void ensureMonitoringStatsAnomaliesIsMutable() { * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -5084,8 +5256,8 @@ public int getMonitoringStatsAnomaliesCount() { * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -5104,8 +5276,8 @@ public int getMonitoringStatsAnomaliesCount() { * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -5130,8 +5302,8 @@ public Builder setMonitoringStatsAnomalies( * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -5155,8 +5327,8 @@ public Builder setMonitoringStatsAnomalies( * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -5181,8 +5353,8 @@ public Builder addMonitoringStatsAnomalies( * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -5207,8 +5379,8 @@ public Builder addMonitoringStatsAnomalies( * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -5231,8 +5403,8 @@ public Builder addMonitoringStatsAnomalies( * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -5256,8 +5428,8 @@ public Builder addMonitoringStatsAnomalies( * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -5281,8 +5453,8 @@ public Builder addAllMonitoringStatsAnomalies( * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -5303,8 +5475,8 @@ public Builder clearMonitoringStatsAnomalies() { * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -5325,8 +5497,8 @@ public Builder removeMonitoringStatsAnomalies(int index) { * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -5341,8 +5513,8 @@ public Builder removeMonitoringStatsAnomalies(int index) { * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -5361,8 +5533,8 @@ public Builder removeMonitoringStatsAnomalies(int index) { * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -5382,8 +5554,8 @@ public Builder removeMonitoringStatsAnomalies(int index) { * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -5401,8 +5573,8 @@ public Builder removeMonitoringStatsAnomalies(int index) { * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -5421,8 +5593,8 @@ public Builder removeMonitoringStatsAnomalies(int index) { * * *
-     * Output only. The list of historical stats and anomalies with specified
-     * objectives.
+     * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+     * The list of historical stats and anomalies with specified objectives.
      * 
* * @@ -5455,6 +5627,122 @@ public Builder removeMonitoringStatsAnomalies(int index) { return monitoringStatsAnomaliesBuilder_; } + private java.lang.Object versionColumnName_ = ""; + /** + * + * + *
+     * Only applicable for Vertex AI Feature Store.
+     * The name of the BigQuery Table/View columnn hosting data for this version.
+     * If no value is provided, will use feature_id.
+     * 
+ * + * string version_column_name = 106; + * + * @return The versionColumnName. + */ + public java.lang.String getVersionColumnName() { + java.lang.Object ref = versionColumnName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + versionColumnName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Only applicable for Vertex AI Feature Store.
+     * The name of the BigQuery Table/View columnn hosting data for this version.
+     * If no value is provided, will use feature_id.
+     * 
+ * + * string version_column_name = 106; + * + * @return The bytes for versionColumnName. + */ + public com.google.protobuf.ByteString getVersionColumnNameBytes() { + java.lang.Object ref = versionColumnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + versionColumnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Only applicable for Vertex AI Feature Store.
+     * The name of the BigQuery Table/View columnn hosting data for this version.
+     * If no value is provided, will use feature_id.
+     * 
+ * + * string version_column_name = 106; + * + * @param value The versionColumnName to set. + * @return This builder for chaining. + */ + public Builder setVersionColumnName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + versionColumnName_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Only applicable for Vertex AI Feature Store.
+     * The name of the BigQuery Table/View columnn hosting data for this version.
+     * If no value is provided, will use feature_id.
+     * 
+ * + * string version_column_name = 106; + * + * @return This builder for chaining. + */ + public Builder clearVersionColumnName() { + versionColumnName_ = getDefaultInstance().getVersionColumnName(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + /** + * + * + *
+     * Only applicable for Vertex AI Feature Store.
+     * The name of the BigQuery Table/View columnn hosting data for this version.
+     * If no value is provided, will use feature_id.
+     * 
+ * + * string version_column_name = 106; + * + * @param value The bytes for versionColumnName to set. + * @return This builder for chaining. + */ + public Builder setVersionColumnNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + versionColumnName_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStore.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStore.java index 9092169cd5a7..4d462259aeda 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStore.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStore.java @@ -1835,7 +1835,7 @@ public interface OptimizedOrBuilder * * *
-   * Optimized storage type to replace lightning
+   * Optimized storage type
    * 
* * Protobuf type {@code google.cloud.aiplatform.v1beta1.FeatureOnlineStore.Optimized} @@ -2030,7 +2030,7 @@ protected Builder newBuilderForType( * * *
-     * Optimized storage type to replace lightning
+     * Optimized storage type
      * 
* * Protobuf type {@code google.cloud.aiplatform.v1beta1.FeatureOnlineStore.Optimized} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreServiceProto.java index 484330a8de65..005eceb49f9a 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreServiceProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreServiceProto.java @@ -27,6 +27,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_FeatureViewDataKey_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_FeatureViewDataKey_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1beta1_FetchFeatureValuesRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -91,79 +95,87 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ogle/api/field_behavior.proto\032\031google/ap" + "i/resource.proto\032Agoogle/cloud/aiplatfor" + "m/v1beta1/featurestore_online_service.pr" - + "oto\032\034google/protobuf/struct.proto\"\222\002\n\031Fe" - + "tchFeatureValuesRequest\022\014\n\002id\030\003 \001(\tH\000\022D\n" - + "\014feature_view\030\001 \001(\tB.\342A\001\002\372A\'\n%aiplatform" - + ".googleapis.com/FeatureView\022Q\n\006format\030\005 " - + "\001(\0162A.google.cloud.aiplatform.v1beta1.Fe" - + "tchFeatureValuesRequest.Format\"A\n\006Format" - + "\022\026\n\022FORMAT_UNSPECIFIED\020\000\022\r\n\tKEY_VALUE\020\001\022" - + "\020\n\014PROTO_STRUCT\020\002B\013\n\tentity_id\"\313\003\n\032Fetch" - + "FeatureValuesResponse\022j\n\nkey_values\030\003 \001(" - + "\0132T.google.cloud.aiplatform.v1beta1.Fetc" - + "hFeatureValuesResponse.FeatureNameValueP" - + "airListH\000\022/\n\014proto_struct\030\002 \001(\0132\027.google" - + ".protobuf.StructH\000\032\205\002\n\030FeatureNameValueP" - + "airList\022{\n\010features\030\001 \003(\0132i.google.cloud" - + ".aiplatform.v1beta1.FetchFeatureValuesRe" - + "sponse.FeatureNameValuePairList.FeatureN" - + "ameValuePair\032l\n\024FeatureNameValuePair\022>\n\005" - + "value\030\002 \001(\0132-.google.cloud.aiplatform.v1" - + "beta1.FeatureValueH\000\022\014\n\004name\030\001 \001(\tB\006\n\004da" - + "taB\010\n\006format\"\216\005\n\024NearestNeighborQuery\022\031\n" - + "\tentity_id\030\001 \001(\tB\004\342A\001\001H\000\022Z\n\tembedding\030\002 " - + "\001(\0132?.google.cloud.aiplatform.v1beta1.Ne" - + "arestNeighborQuery.EmbeddingB\004\342A\001\001H\000\022\034\n\016" - + "neighbor_count\030\003 \001(\005B\004\342A\001\001\022`\n\016string_fil" - + "ters\030\004 \003(\0132B.google.cloud.aiplatform.v1b" - + "eta1.NearestNeighborQuery.StringFilterB\004" - + "\342A\001\001\0223\n%per_crowding_attribute_neighbor_" - + "count\030\005 \001(\005B\004\342A\001\001\022Z\n\nparameters\030\007 \001(\0132@." - + "google.cloud.aiplatform.v1beta1.NearestN" - + "eighborQuery.ParametersB\004\342A\001\001\032 \n\tEmbeddi" - + "ng\022\023\n\005value\030\001 \003(\002B\004\342A\001\001\032Y\n\014StringFilter\022" - + "\022\n\004name\030\001 \001(\tB\004\342A\001\002\022\032\n\014allow_tokens\030\002 \003(" - + "\tB\004\342A\001\001\022\031\n\013deny_tokens\030\003 \003(\tB\004\342A\001\001\032e\n\nPa" - + "rameters\022-\n\037approximate_neighbor_candida" - + "tes\030\001 \001(\005B\004\342A\001\001\022(\n\032leaf_nodes_search_fra" - + "ction\030\002 \001(\001B\004\342A\001\001B\n\n\010instance\"\322\001\n\034Search" - + "NearestEntitiesRequest\022D\n\014feature_view\030\001" - + " \001(\tB.\342A\001\002\372A\'\n%aiplatform.googleapis.com" - + "/FeatureView\022J\n\005query\030\002 \001(\01325.google.clo" - + "ud.aiplatform.v1beta1.NearestNeighborQue" - + "ryB\004\342A\001\002\022 \n\022return_full_entity\030\003 \001(\010B\004\342A" - + "\001\001\"\353\001\n\020NearestNeighbors\022M\n\tneighbors\030\001 \003" - + "(\0132:.google.cloud.aiplatform.v1beta1.Nea" - + "restNeighbors.Neighbor\032\207\001\n\010Neighbor\022\021\n\te" - + "ntity_id\030\001 \001(\t\022\020\n\010distance\030\002 \001(\001\022V\n\021enti" - + "ty_key_values\030\003 \001(\0132;.google.cloud.aipla" - + "tform.v1beta1.FetchFeatureValuesResponse" - + "\"m\n\035SearchNearestEntitiesResponse\022L\n\021nea" - + "rest_neighbors\030\001 \001(\01321.google.cloud.aipl" - + "atform.v1beta1.NearestNeighbors2\220\005\n\031Feat" - + "ureOnlineStoreService\022\224\002\n\022FetchFeatureVa" - + "lues\022:.google.cloud.aiplatform.v1beta1.F" - + "etchFeatureValuesRequest\032;.google.cloud." - + "aiplatform.v1beta1.FetchFeatureValuesRes" - + "ponse\"\204\001\332A\020feature_view, id\202\323\344\223\002k\"f/v1be" - + "ta1/{feature_view=projects/*/locations/*" - + "/featureOnlineStores/*/featureViews/*}:f" - + "etchFeatureValues:\001*\022\214\002\n\025SearchNearestEn" - + "tities\022=.google.cloud.aiplatform.v1beta1" - + ".SearchNearestEntitiesRequest\032>.google.c" - + "loud.aiplatform.v1beta1.SearchNearestEnt" - + "itiesResponse\"t\202\323\344\223\002n\"i/v1beta1/{feature" - + "_view=projects/*/locations/*/featureOnli" - + "neStores/*/featureViews/*}:searchNearest" - + "Entities:\001*\032M\312A\031aiplatform.googleapis.co" - + "m\322A.https://www.googleapis.com/auth/clou" - + "d-platformB\365\001\n#com.google.cloud.aiplatfo" - + "rm.v1beta1B\036FeatureOnlineStoreServicePro" - + "toP\001ZCcloud.google.com/go/aiplatform/api" - + "v1beta1/aiplatformpb;aiplatformpb\252\002\037Goog" - + "le.Cloud.AIPlatform.V1Beta1\312\002\037Google\\Clo" - + "ud\\AIPlatform\\V1beta1\352\002\"Google::Cloud::A" - + "IPlatform::V1beta1b\006proto3" + + "oto\032\034google/protobuf/struct.proto\"0\n\022Fea" + + "tureViewDataKey\022\r\n\003key\030\001 \001(\tH\000B\013\n\tkey_on" + + "eof\"\276\003\n\031FetchFeatureValuesRequest\022\020\n\002id\030" + + "\003 \001(\tB\002\030\001H\000\022D\n\014feature_view\030\001 \001(\tB.\342A\001\002\372" + + "A\'\n%aiplatform.googleapis.com/FeatureVie" + + "w\022K\n\010data_key\030\006 \001(\01323.google.cloud.aipla" + + "tform.v1beta1.FeatureViewDataKeyB\004\342A\001\001\022Q" + + "\n\013data_format\030\007 \001(\01626.google.cloud.aipla" + + "tform.v1beta1.FeatureViewDataFormatB\004\342A\001" + + "\001\022U\n\006format\030\005 \001(\0162A.google.cloud.aiplatf" + + "orm.v1beta1.FetchFeatureValuesRequest.Fo" + + "rmatB\002\030\001\"E\n\006Format\022\026\n\022FORMAT_UNSPECIFIED" + + "\020\000\022\r\n\tKEY_VALUE\020\001\022\020\n\014PROTO_STRUCT\020\002\032\002\030\001B" + + "\013\n\tentity_id\"\313\003\n\032FetchFeatureValuesRespo" + + "nse\022j\n\nkey_values\030\003 \001(\0132T.google.cloud.a" + + "iplatform.v1beta1.FetchFeatureValuesResp" + + "onse.FeatureNameValuePairListH\000\022/\n\014proto" + + "_struct\030\002 \001(\0132\027.google.protobuf.StructH\000" + + "\032\205\002\n\030FeatureNameValuePairList\022{\n\010feature" + + "s\030\001 \003(\0132i.google.cloud.aiplatform.v1beta" + + "1.FetchFeatureValuesResponse.FeatureName" + + "ValuePairList.FeatureNameValuePair\032l\n\024Fe" + + "atureNameValuePair\022>\n\005value\030\002 \001(\0132-.goog" + + "le.cloud.aiplatform.v1beta1.FeatureValue" + + "H\000\022\014\n\004name\030\001 \001(\tB\006\n\004dataB\010\n\006format\"\216\005\n\024N" + + "earestNeighborQuery\022\031\n\tentity_id\030\001 \001(\tB\004" + + "\342A\001\001H\000\022Z\n\tembedding\030\002 \001(\0132?.google.cloud" + + ".aiplatform.v1beta1.NearestNeighborQuery" + + ".EmbeddingB\004\342A\001\001H\000\022\034\n\016neighbor_count\030\003 \001" + + "(\005B\004\342A\001\001\022`\n\016string_filters\030\004 \003(\0132B.googl" + + "e.cloud.aiplatform.v1beta1.NearestNeighb" + + "orQuery.StringFilterB\004\342A\001\001\0223\n%per_crowdi" + + "ng_attribute_neighbor_count\030\005 \001(\005B\004\342A\001\001\022" + + "Z\n\nparameters\030\007 \001(\0132@.google.cloud.aipla" + + "tform.v1beta1.NearestNeighborQuery.Param" + + "etersB\004\342A\001\001\032 \n\tEmbedding\022\023\n\005value\030\001 \003(\002B" + + "\004\342A\001\001\032Y\n\014StringFilter\022\022\n\004name\030\001 \001(\tB\004\342A\001" + + "\002\022\032\n\014allow_tokens\030\002 \003(\tB\004\342A\001\001\022\031\n\013deny_to" + + "kens\030\003 \003(\tB\004\342A\001\001\032e\n\nParameters\022-\n\037approx" + + "imate_neighbor_candidates\030\001 \001(\005B\004\342A\001\001\022(\n" + + "\032leaf_nodes_search_fraction\030\002 \001(\001B\004\342A\001\001B" + + "\n\n\010instance\"\322\001\n\034SearchNearestEntitiesReq" + + "uest\022D\n\014feature_view\030\001 \001(\tB.\342A\001\002\372A\'\n%aip" + + "latform.googleapis.com/FeatureView\022J\n\005qu" + + "ery\030\002 \001(\01325.google.cloud.aiplatform.v1be" + + "ta1.NearestNeighborQueryB\004\342A\001\002\022 \n\022return" + + "_full_entity\030\003 \001(\010B\004\342A\001\001\"\353\001\n\020NearestNeig" + + "hbors\022M\n\tneighbors\030\001 \003(\0132:.google.cloud." + + "aiplatform.v1beta1.NearestNeighbors.Neig" + + "hbor\032\207\001\n\010Neighbor\022\021\n\tentity_id\030\001 \001(\t\022\020\n\010" + + "distance\030\002 \001(\001\022V\n\021entity_key_values\030\003 \001(" + + "\0132;.google.cloud.aiplatform.v1beta1.Fetc" + + "hFeatureValuesResponse\"m\n\035SearchNearestE" + + "ntitiesResponse\022L\n\021nearest_neighbors\030\001 \001" + + "(\01321.google.cloud.aiplatform.v1beta1.Nea" + + "restNeighbors*b\n\025FeatureViewDataFormat\022(" + + "\n$FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED\020\000" + + "\022\r\n\tKEY_VALUE\020\001\022\020\n\014PROTO_STRUCT\020\0022\226\005\n\031Fe" + + "atureOnlineStoreService\022\232\002\n\022FetchFeature" + + "Values\022:.google.cloud.aiplatform.v1beta1" + + ".FetchFeatureValuesRequest\032;.google.clou" + + "d.aiplatform.v1beta1.FetchFeatureValuesR" + + "esponse\"\212\001\332A\026feature_view, data_key\202\323\344\223\002" + + "k\"f/v1beta1/{feature_view=projects/*/loc" + + "ations/*/featureOnlineStores/*/featureVi" + + "ews/*}:fetchFeatureValues:\001*\022\214\002\n\025SearchN" + + "earestEntities\022=.google.cloud.aiplatform" + + ".v1beta1.SearchNearestEntitiesRequest\032>." + + "google.cloud.aiplatform.v1beta1.SearchNe" + + "arestEntitiesResponse\"t\202\323\344\223\002n\"i/v1beta1/" + + "{feature_view=projects/*/locations/*/fea" + + "tureOnlineStores/*/featureViews/*}:searc" + + "hNearestEntities:\001*\032M\312A\031aiplatform.googl" + + "eapis.com\322A.https://www.googleapis.com/a" + + "uth/cloud-platformB\365\001\n#com.google.cloud." + + "aiplatform.v1beta1B\036FeatureOnlineStoreSe" + + "rviceProtoP\001ZCcloud.google.com/go/aiplat" + + "form/apiv1beta1/aiplatformpb;aiplatformp" + + "b\252\002\037Google.Cloud.AIPlatform.V1Beta1\312\002\037Go" + + "ogle\\Cloud\\AIPlatform\\V1beta1\352\002\"Google::" + + "Cloud::AIPlatform::V1beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -176,16 +188,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.aiplatform.v1beta1.FeaturestoreOnlineServiceProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), }); - internal_static_google_cloud_aiplatform_v1beta1_FetchFeatureValuesRequest_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_FeatureViewDataKey_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_FeatureViewDataKey_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_FeatureViewDataKey_descriptor, + new java.lang.String[] { + "Key", "KeyOneof", + }); + internal_static_google_cloud_aiplatform_v1beta1_FetchFeatureValuesRequest_descriptor = + getDescriptor().getMessageTypes().get(1); internal_static_google_cloud_aiplatform_v1beta1_FetchFeatureValuesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_FetchFeatureValuesRequest_descriptor, new java.lang.String[] { - "Id", "FeatureView", "Format", "EntityId", + "Id", "FeatureView", "DataKey", "DataFormat", "Format", "EntityId", }); internal_static_google_cloud_aiplatform_v1beta1_FetchFeatureValuesResponse_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_aiplatform_v1beta1_FetchFeatureValuesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_FetchFeatureValuesResponse_descriptor, @@ -213,7 +233,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Value", "Name", "Data", }); internal_static_google_cloud_aiplatform_v1beta1_NearestNeighborQuery_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(3); internal_static_google_cloud_aiplatform_v1beta1_NearestNeighborQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_NearestNeighborQuery_descriptor, @@ -257,7 +277,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ApproximateNeighborCandidates", "LeafNodesSearchFraction", }); internal_static_google_cloud_aiplatform_v1beta1_SearchNearestEntitiesRequest_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(4); internal_static_google_cloud_aiplatform_v1beta1_SearchNearestEntitiesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_SearchNearestEntitiesRequest_descriptor, @@ -265,7 +285,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FeatureView", "Query", "ReturnFullEntity", }); internal_static_google_cloud_aiplatform_v1beta1_NearestNeighbors_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_aiplatform_v1beta1_NearestNeighbors_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_NearestNeighbors_descriptor, @@ -283,7 +303,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EntityId", "Distance", "EntityKeyValues", }); internal_static_google_cloud_aiplatform_v1beta1_SearchNearestEntitiesResponse_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_google_cloud_aiplatform_v1beta1_SearchNearestEntitiesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_SearchNearestEntitiesResponse_descriptor, diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOrBuilder.java index ad6f970bbb59..d746e75abc77 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOrBuilder.java @@ -30,6 +30,7 @@ public interface FeatureOrBuilder * Immutable. Name of the Feature. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * The last part feature is assigned by the client. The feature can be up to * 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, @@ -49,6 +50,7 @@ public interface FeatureOrBuilder * Immutable. Name of the Feature. * Format: * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + * `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` * * The last part feature is assigned by the client. The feature can be up to * 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, @@ -91,7 +93,8 @@ public interface FeatureOrBuilder * * *
-   * Immutable. Type of Feature value.
+   * Immutable. Only applicable for Vertex AI Feature Store (Legacy).
+   * Type of Feature value.
    * 
* * @@ -105,7 +108,8 @@ public interface FeatureOrBuilder * * *
-   * Immutable. Type of Feature value.
+   * Immutable. Only applicable for Vertex AI Feature Store (Legacy).
+   * Type of Feature value.
    * 
* * @@ -120,7 +124,8 @@ public interface FeatureOrBuilder * * *
-   * Output only. Timestamp when this EntityType was created.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was created.
    * 
* * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -133,7 +138,8 @@ public interface FeatureOrBuilder * * *
-   * Output only. Timestamp when this EntityType was created.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was created.
    * 
* * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -146,7 +152,8 @@ public interface FeatureOrBuilder * * *
-   * Output only. Timestamp when this EntityType was created.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was created.
    * 
* * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -158,7 +165,8 @@ public interface FeatureOrBuilder * * *
-   * Output only. Timestamp when this EntityType was most recently updated.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was most recently updated.
    * 
* * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -171,7 +179,8 @@ public interface FeatureOrBuilder * * *
-   * Output only. Timestamp when this EntityType was most recently updated.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was most recently updated.
    * 
* * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -184,7 +193,8 @@ public interface FeatureOrBuilder * * *
-   * Output only. Timestamp when this EntityType was most recently updated.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * Timestamp when this EntityType was most recently updated.
    * 
* * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -331,9 +341,11 @@ java.lang.String getLabelsOrDefault( * * *
-   * Optional. Deprecated: The custom monitoring configuration for this Feature,
-   * if not set, use the monitoring_config defined for the EntityType this
-   * Feature belongs to. Only Features with type
+   * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+   * Deprecated: The custom monitoring configuration for this Feature, if not
+   * set, use the monitoring_config defined for the EntityType this Feature
+   * belongs to.
+   * Only Features with type
    * ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
    * BOOL, STRING, DOUBLE or INT64 can enable monitoring.
    *
@@ -350,7 +362,7 @@ java.lang.String getLabelsOrDefault(
    * 
    *
    * @deprecated google.cloud.aiplatform.v1beta1.Feature.monitoring_config is deprecated. See
-   *     google/cloud/aiplatform/v1beta1/feature.proto;l=161
+   *     google/cloud/aiplatform/v1beta1/feature.proto;l=167
    * @return Whether the monitoringConfig field is set.
    */
   @java.lang.Deprecated
@@ -359,9 +371,11 @@ java.lang.String getLabelsOrDefault(
    *
    *
    * 
-   * Optional. Deprecated: The custom monitoring configuration for this Feature,
-   * if not set, use the monitoring_config defined for the EntityType this
-   * Feature belongs to. Only Features with type
+   * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+   * Deprecated: The custom monitoring configuration for this Feature, if not
+   * set, use the monitoring_config defined for the EntityType this Feature
+   * belongs to.
+   * Only Features with type
    * ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
    * BOOL, STRING, DOUBLE or INT64 can enable monitoring.
    *
@@ -378,7 +392,7 @@ java.lang.String getLabelsOrDefault(
    * 
    *
    * @deprecated google.cloud.aiplatform.v1beta1.Feature.monitoring_config is deprecated. See
-   *     google/cloud/aiplatform/v1beta1/feature.proto;l=161
+   *     google/cloud/aiplatform/v1beta1/feature.proto;l=167
    * @return The monitoringConfig.
    */
   @java.lang.Deprecated
@@ -387,9 +401,11 @@ java.lang.String getLabelsOrDefault(
    *
    *
    * 
-   * Optional. Deprecated: The custom monitoring configuration for this Feature,
-   * if not set, use the monitoring_config defined for the EntityType this
-   * Feature belongs to. Only Features with type
+   * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+   * Deprecated: The custom monitoring configuration for this Feature, if not
+   * set, use the monitoring_config defined for the EntityType this Feature
+   * belongs to.
+   * Only Features with type
    * ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
    * BOOL, STRING, DOUBLE or INT64 can enable monitoring.
    *
@@ -413,8 +429,10 @@ java.lang.String getLabelsOrDefault(
    *
    *
    * 
-   * Optional. If not set, use the monitoring_config defined for the EntityType
-   * this Feature belongs to. Only Features with type
+   * Optional. Only applicable for Vertex AI Feature Store (Legacy).
+   * If not set, use the monitoring_config defined for the EntityType this
+   * Feature belongs to.
+   * Only Features with type
    * ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
    * BOOL, STRING, DOUBLE or INT64 can enable monitoring.
    *
@@ -432,7 +450,8 @@ java.lang.String getLabelsOrDefault(
    *
    *
    * 
-   * Output only. A list of historical
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * A list of historical
    * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
    * stats requested by user, sorted by
    * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -448,7 +467,8 @@ java.lang.String getLabelsOrDefault(
    *
    *
    * 
-   * Output only. A list of historical
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * A list of historical
    * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
    * stats requested by user, sorted by
    * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -464,7 +484,8 @@ java.lang.String getLabelsOrDefault(
    *
    *
    * 
-   * Output only. A list of historical
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * A list of historical
    * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
    * stats requested by user, sorted by
    * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -480,7 +501,8 @@ java.lang.String getLabelsOrDefault(
    *
    *
    * 
-   * Output only. A list of historical
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * A list of historical
    * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
    * stats requested by user, sorted by
    * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -497,7 +519,8 @@ java.lang.String getLabelsOrDefault(
    *
    *
    * 
-   * Output only. A list of historical
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * A list of historical
    * [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
    * stats requested by user, sorted by
    * [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
@@ -515,8 +538,8 @@ com.google.cloud.aiplatform.v1beta1.FeatureStatsAnomalyOrBuilder getMonitoringSt
    *
    *
    * 
-   * Output only. The list of historical stats and anomalies with specified
-   * objectives.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * The list of historical stats and anomalies with specified objectives.
    * 
* * @@ -529,8 +552,8 @@ com.google.cloud.aiplatform.v1beta1.FeatureStatsAnomalyOrBuilder getMonitoringSt * * *
-   * Output only. The list of historical stats and anomalies with specified
-   * objectives.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * The list of historical stats and anomalies with specified objectives.
    * 
* * @@ -543,8 +566,8 @@ com.google.cloud.aiplatform.v1beta1.Feature.MonitoringStatsAnomaly getMonitoring * * *
-   * Output only. The list of historical stats and anomalies with specified
-   * objectives.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * The list of historical stats and anomalies with specified objectives.
    * 
* * @@ -556,8 +579,8 @@ com.google.cloud.aiplatform.v1beta1.Feature.MonitoringStatsAnomaly getMonitoring * * *
-   * Output only. The list of historical stats and anomalies with specified
-   * objectives.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * The list of historical stats and anomalies with specified objectives.
    * 
* * @@ -571,8 +594,8 @@ com.google.cloud.aiplatform.v1beta1.Feature.MonitoringStatsAnomaly getMonitoring * * *
-   * Output only. The list of historical stats and anomalies with specified
-   * objectives.
+   * Output only. Only applicable for Vertex AI Feature Store (Legacy).
+   * The list of historical stats and anomalies with specified objectives.
    * 
* * @@ -581,4 +604,33 @@ com.google.cloud.aiplatform.v1beta1.Feature.MonitoringStatsAnomaly getMonitoring */ com.google.cloud.aiplatform.v1beta1.Feature.MonitoringStatsAnomalyOrBuilder getMonitoringStatsAnomaliesOrBuilder(int index); + + /** + * + * + *
+   * Only applicable for Vertex AI Feature Store.
+   * The name of the BigQuery Table/View columnn hosting data for this version.
+   * If no value is provided, will use feature_id.
+   * 
+ * + * string version_column_name = 106; + * + * @return The versionColumnName. + */ + java.lang.String getVersionColumnName(); + /** + * + * + *
+   * Only applicable for Vertex AI Feature Store.
+   * The name of the BigQuery Table/View columnn hosting data for this version.
+   * If no value is provided, will use feature_id.
+   * 
+ * + * string version_column_name = 106; + * + * @return The bytes for versionColumnName. + */ + com.google.protobuf.ByteString getVersionColumnNameBytes(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureProto.java index de3635247269..e8b8e94e14cb 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureProto.java @@ -55,7 +55,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "tform/v1beta1/feature_monitoring_stats.p" + "roto\032=google/cloud/aiplatform/v1beta1/fe" + "aturestore_monitoring.proto\032\037google/prot" - + "obuf/timestamp.proto\"\243\013\n\007Feature\022\022\n\004name" + + "obuf/timestamp.proto\"\300\013\n\007Feature\022\022\n\004name" + "\030\001 \001(\tB\004\342A\001\005\022\023\n\013description\030\002 \001(\t\022L\n\nval" + "ue_type\030\003 \001(\01622.google.cloud.aiplatform." + "v1beta1.Feature.ValueTypeB\004\342A\001\005\0225\n\013creat" @@ -71,33 +71,34 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "loud.aiplatform.v1beta1.FeatureStatsAnom" + "alyB\004\342A\001\003\022i\n\032monitoring_stats_anomalies\030" + "\013 \003(\0132?.google.cloud.aiplatform.v1beta1." - + "Feature.MonitoringStatsAnomalyB\004\342A\001\003\032\263\002\n" - + "\026MonitoringStatsAnomaly\022b\n\tobjective\030\001 \001" - + "(\0162I.google.cloud.aiplatform.v1beta1.Fea" - + "ture.MonitoringStatsAnomaly.ObjectiveB\004\342" - + "A\001\003\022Y\n\025feature_stats_anomaly\030\002 \001(\01324.goo" - + "gle.cloud.aiplatform.v1beta1.FeatureStat" - + "sAnomalyB\004\342A\001\003\"Z\n\tObjective\022\031\n\025OBJECTIVE" - + "_UNSPECIFIED\020\000\022\033\n\027IMPORT_FEATURE_ANALYSI" - + "S\020\001\022\025\n\021SNAPSHOT_ANALYSIS\020\002\032-\n\013LabelsEntr" - + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\244\001\n\tVa" - + "lueType\022\032\n\026VALUE_TYPE_UNSPECIFIED\020\000\022\010\n\004B" - + "OOL\020\001\022\016\n\nBOOL_ARRAY\020\002\022\n\n\006DOUBLE\020\003\022\020\n\014DOU" - + "BLE_ARRAY\020\004\022\t\n\005INT64\020\t\022\017\n\013INT64_ARRAY\020\n\022" - + "\n\n\006STRING\020\013\022\020\n\014STRING_ARRAY\020\014\022\t\n\005BYTES\020\r" - + ":\207\002\352A\203\002\n!aiplatform.googleapis.com/Featu" - + "re\022qprojects/{project}/locations/{locati" - + "on}/featurestores/{featurestore}/entityT" - + "ypes/{entity_type}/features/{feature}\022Xp" - + "rojects/{project}/locations/{location}/f" - + "eatureGroups/{feature_group}/features/{f" - + "eature}*\010features2\007featureB\343\001\n#com.googl" - + "e.cloud.aiplatform.v1beta1B\014FeatureProto" - + "P\001ZCcloud.google.com/go/aiplatform/apiv1" - + "beta1/aiplatformpb;aiplatformpb\252\002\037Google" - + ".Cloud.AIPlatform.V1Beta1\312\002\037Google\\Cloud" - + "\\AIPlatform\\V1beta1\352\002\"Google::Cloud::AIP" - + "latform::V1beta1b\006proto3" + + "Feature.MonitoringStatsAnomalyB\004\342A\001\003\022\033\n\023" + + "version_column_name\030j \001(\t\032\263\002\n\026Monitoring" + + "StatsAnomaly\022b\n\tobjective\030\001 \001(\0162I.google" + + ".cloud.aiplatform.v1beta1.Feature.Monito" + + "ringStatsAnomaly.ObjectiveB\004\342A\001\003\022Y\n\025feat" + + "ure_stats_anomaly\030\002 \001(\01324.google.cloud.a" + + "iplatform.v1beta1.FeatureStatsAnomalyB\004\342" + + "A\001\003\"Z\n\tObjective\022\031\n\025OBJECTIVE_UNSPECIFIE" + + "D\020\000\022\033\n\027IMPORT_FEATURE_ANALYSIS\020\001\022\025\n\021SNAP" + + "SHOT_ANALYSIS\020\002\032-\n\013LabelsEntry\022\013\n\003key\030\001 " + + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\244\001\n\tValueType\022\032\n\026" + + "VALUE_TYPE_UNSPECIFIED\020\000\022\010\n\004BOOL\020\001\022\016\n\nBO" + + "OL_ARRAY\020\002\022\n\n\006DOUBLE\020\003\022\020\n\014DOUBLE_ARRAY\020\004" + + "\022\t\n\005INT64\020\t\022\017\n\013INT64_ARRAY\020\n\022\n\n\006STRING\020\013" + + "\022\020\n\014STRING_ARRAY\020\014\022\t\n\005BYTES\020\r:\207\002\352A\203\002\n!ai" + + "platform.googleapis.com/Feature\022qproject" + + "s/{project}/locations/{location}/feature" + + "stores/{featurestore}/entityTypes/{entit" + + "y_type}/features/{feature}\022Xprojects/{pr" + + "oject}/locations/{location}/featureGroup" + + "s/{feature_group}/features/{feature}*\010fe" + + "atures2\007featureB\343\001\n#com.google.cloud.aip" + + "latform.v1beta1B\014FeatureProtoP\001ZCcloud.g" + + "oogle.com/go/aiplatform/apiv1beta1/aipla" + + "tformpb;aiplatformpb\252\002\037Google.Cloud.AIPl" + + "atform.V1Beta1\312\002\037Google\\Cloud\\AIPlatform" + + "\\V1beta1\352\002\"Google::Cloud::AIPlatform::V1" + + "beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -126,6 +127,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DisableMonitoring", "MonitoringStats", "MonitoringStatsAnomalies", + "VersionColumnName", }); internal_static_google_cloud_aiplatform_v1beta1_Feature_MonitoringStatsAnomaly_descriptor = internal_static_google_cloud_aiplatform_v1beta1_Feature_descriptor.getNestedTypes().get(0); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureViewDataFormat.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureViewDataFormat.java new file mode 100644 index 000000000000..3082a5917dd6 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureViewDataFormat.java @@ -0,0 +1,181 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/feature_online_store_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Format of the data in the Feature View.
+ * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1beta1.FeatureViewDataFormat} + */ +public enum FeatureViewDataFormat implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not set. Will be treated as the KeyValue format.
+   * 
+ * + * FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED = 0; + */ + FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED(0), + /** + * + * + *
+   * Return response data in key-value format.
+   * 
+ * + * KEY_VALUE = 1; + */ + KEY_VALUE(1), + /** + * + * + *
+   * Return response data in proto Struct format.
+   * 
+ * + * PROTO_STRUCT = 2; + */ + PROTO_STRUCT(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not set. Will be treated as the KeyValue format.
+   * 
+ * + * FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED = 0; + */ + public static final int FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Return response data in key-value format.
+   * 
+ * + * KEY_VALUE = 1; + */ + public static final int KEY_VALUE_VALUE = 1; + /** + * + * + *
+   * Return response data in proto Struct format.
+   * 
+ * + * PROTO_STRUCT = 2; + */ + public static final int PROTO_STRUCT_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 FeatureViewDataFormat 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 FeatureViewDataFormat forNumber(int value) { + switch (value) { + case 0: + return FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED; + case 1: + return KEY_VALUE; + case 2: + return PROTO_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 FeatureViewDataFormat findValueByNumber(int number) { + return FeatureViewDataFormat.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.aiplatform.v1beta1.FeatureOnlineStoreServiceProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final FeatureViewDataFormat[] VALUES = values(); + + public static FeatureViewDataFormat 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 FeatureViewDataFormat(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.FeatureViewDataFormat) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureViewDataKey.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureViewDataKey.java new file mode 100644 index 000000000000..b00dcc216ce2 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureViewDataKey.java @@ -0,0 +1,756 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/feature_online_store_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Lookup key for a feature view.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.FeatureViewDataKey} + */ +public final class FeatureViewDataKey extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.FeatureViewDataKey) + FeatureViewDataKeyOrBuilder { + private static final long serialVersionUID = 0L; + // Use FeatureViewDataKey.newBuilder() to construct. + private FeatureViewDataKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FeatureViewDataKey() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FeatureViewDataKey(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_FeatureViewDataKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_FeatureViewDataKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey.class, + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey.Builder.class); + } + + private int keyOneofCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object keyOneof_; + + public enum KeyOneofCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + KEY(1), + KEYONEOF_NOT_SET(0); + private final int value; + + private KeyOneofCase(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 KeyOneofCase valueOf(int value) { + return forNumber(value); + } + + public static KeyOneofCase forNumber(int value) { + switch (value) { + case 1: + return KEY; + case 0: + return KEYONEOF_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public KeyOneofCase getKeyOneofCase() { + return KeyOneofCase.forNumber(keyOneofCase_); + } + + public static final int KEY_FIELD_NUMBER = 1; + /** + * + * + *
+   * String key to use for lookup.
+   * 
+ * + * string key = 1; + * + * @return Whether the key field is set. + */ + public boolean hasKey() { + return keyOneofCase_ == 1; + } + /** + * + * + *
+   * String key to use for lookup.
+   * 
+ * + * string key = 1; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = ""; + if (keyOneofCase_ == 1) { + ref = keyOneof_; + } + if (ref instanceof java.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 (keyOneofCase_ == 1) { + keyOneof_ = s; + } + return s; + } + } + /** + * + * + *
+   * String key to use for lookup.
+   * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = ""; + if (keyOneofCase_ == 1) { + ref = keyOneof_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (keyOneofCase_ == 1) { + keyOneof_ = 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 (keyOneofCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, keyOneof_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (keyOneofCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, keyOneof_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey other = + (com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey) obj; + + if (!getKeyOneofCase().equals(other.getKeyOneofCase())) return false; + switch (keyOneofCase_) { + case 1: + if (!getKey().equals(other.getKey())) 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 (keyOneofCase_) { + case 1: + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Lookup key for a feature view.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.FeatureViewDataKey} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.FeatureViewDataKey) + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_FeatureViewDataKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_FeatureViewDataKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey.class, + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keyOneofCase_ = 0; + keyOneof_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.FeatureOnlineStoreServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_FeatureViewDataKey_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey build() { + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey buildPartial() { + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey result = + new com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey result) { + result.keyOneofCase_ = keyOneofCase_; + result.keyOneof_ = this.keyOneof_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey other) { + if (other == com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey.getDefaultInstance()) + return this; + switch (other.getKeyOneofCase()) { + case KEY: + { + keyOneofCase_ = 1; + keyOneof_ = other.keyOneof_; + onChanged(); + break; + } + case KEYONEOF_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(); + keyOneofCase_ = 1; + keyOneof_ = 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 keyOneofCase_ = 0; + private java.lang.Object keyOneof_; + + public KeyOneofCase getKeyOneofCase() { + return KeyOneofCase.forNumber(keyOneofCase_); + } + + public Builder clearKeyOneof() { + keyOneofCase_ = 0; + keyOneof_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * String key to use for lookup.
+     * 
+ * + * string key = 1; + * + * @return Whether the key field is set. + */ + @java.lang.Override + public boolean hasKey() { + return keyOneofCase_ == 1; + } + /** + * + * + *
+     * String key to use for lookup.
+     * 
+ * + * string key = 1; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = ""; + if (keyOneofCase_ == 1) { + ref = keyOneof_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (keyOneofCase_ == 1) { + keyOneof_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * String key to use for lookup.
+     * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = ""; + if (keyOneofCase_ == 1) { + ref = keyOneof_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (keyOneofCase_ == 1) { + keyOneof_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * String key to use for lookup.
+     * 
+ * + * string key = 1; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + keyOneofCase_ = 1; + keyOneof_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * String key to use for lookup.
+     * 
+ * + * string key = 1; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + if (keyOneofCase_ == 1) { + keyOneofCase_ = 0; + keyOneof_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * String key to use for lookup.
+     * 
+ * + * string key = 1; + * + * @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); + keyOneofCase_ = 1; + keyOneof_ = 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.aiplatform.v1beta1.FeatureViewDataKey) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.FeatureViewDataKey) + private static final com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey(); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FeatureViewDataKey parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureViewDataKeyOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureViewDataKeyOrBuilder.java new file mode 100644 index 000000000000..a0d61cfd0f4d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureViewDataKeyOrBuilder.java @@ -0,0 +1,64 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/feature_online_store_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface FeatureViewDataKeyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.FeatureViewDataKey) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * String key to use for lookup.
+   * 
+ * + * string key = 1; + * + * @return Whether the key field is set. + */ + boolean hasKey(); + /** + * + * + *
+   * String key to use for lookup.
+   * 
+ * + * string key = 1; + * + * @return The key. + */ + java.lang.String getKey(); + /** + * + * + *
+   * String key to use for lookup.
+   * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey.KeyOneofCase getKeyOneofCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FetchFeatureValuesRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FetchFeatureValuesRequest.java index 415846ead1d5..63174ae438ab 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FetchFeatureValuesRequest.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FetchFeatureValuesRequest.java @@ -41,6 +41,7 @@ private FetchFeatureValuesRequest(com.google.protobuf.GeneratedMessageV3.Builder private FetchFeatureValuesRequest() { featureView_ = ""; + dataFormat_ = 0; format_ = 0; } @@ -74,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * Protobuf enum {@code google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format} */ + @java.lang.Deprecated public enum Format implements com.google.protobuf.ProtocolMessageEnum { /** * @@ -233,6 +235,7 @@ public enum EntityIdCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { + @java.lang.Deprecated ID(3), ENTITYID_NOT_SET(0); private final int value; @@ -279,10 +282,13 @@ public EntityIdCase getEntityIdCase() { * fetch feature values for. *
* - * string id = 3; + * string id = 3 [deprecated = true]; * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.id is deprecated. See + * google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=104 * @return Whether the id field is set. */ + @java.lang.Deprecated public boolean hasId() { return entityIdCase_ == 3; } @@ -294,10 +300,13 @@ public boolean hasId() { * fetch feature values for. *
* - * string id = 3; + * string id = 3 [deprecated = true]; * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.id is deprecated. See + * google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=104 * @return The id. */ + @java.lang.Deprecated public java.lang.String getId() { java.lang.Object ref = ""; if (entityIdCase_ == 3) { @@ -322,10 +331,13 @@ public java.lang.String getId() { * fetch feature values for. *
* - * string id = 3; + * string id = 3 [deprecated = true]; * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.id is deprecated. See + * google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=104 * @return The bytes for id. */ + @java.lang.Deprecated public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = ""; if (entityIdCase_ == 3) { @@ -400,6 +412,107 @@ public com.google.protobuf.ByteString getFeatureViewBytes() { } } + public static final int DATA_KEY_FIELD_NUMBER = 6; + private com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey dataKey_; + /** + * + * + *
+   * Optional. The request key to fetch feature values for.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataKey field is set. + */ + @java.lang.Override + public boolean hasDataKey() { + return dataKey_ != null; + } + /** + * + * + *
+   * Optional. The request key to fetch feature values for.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataKey. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey getDataKey() { + return dataKey_ == null + ? com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey.getDefaultInstance() + : dataKey_; + } + /** + * + * + *
+   * Optional. The request key to fetch feature values for.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureViewDataKeyOrBuilder getDataKeyOrBuilder() { + return dataKey_ == null + ? com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey.getDefaultInstance() + : dataKey_; + } + + public static final int DATA_FORMAT_FIELD_NUMBER = 7; + private int dataFormat_ = 0; + /** + * + * + *
+   * Optional. Response data format. If not set,
+   * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1beta1.FeatureViewDataFormat.KEY_VALUE]
+   * will be used.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + @java.lang.Override + public int getDataFormatValue() { + return dataFormat_; + } + /** + * + * + *
+   * Optional. Response data format. If not set,
+   * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1beta1.FeatureViewDataFormat.KEY_VALUE]
+   * will be used.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureViewDataFormat getDataFormat() { + com.google.cloud.aiplatform.v1beta1.FeatureViewDataFormat result = + com.google.cloud.aiplatform.v1beta1.FeatureViewDataFormat.forNumber(dataFormat_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.FeatureViewDataFormat.UNRECOGNIZED + : result; + } + public static final int FORMAT_FIELD_NUMBER = 5; private int format_ = 0; /** @@ -407,13 +520,20 @@ public com.google.protobuf.ByteString getFeatureViewBytes() { * *
    * Specify response data format. If not set, KeyValue format will be used.
+   * Deprecated. Use
+   * [FetchFeatureValuesRequest.data_format][google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.data_format].
    * 
* - * .google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format format = 5; + * + * .google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format format = 5 [deprecated = true]; + * * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.format is deprecated. See + * google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=128 * @return The enum numeric value on the wire for format. */ @java.lang.Override + @java.lang.Deprecated public int getFormatValue() { return format_; } @@ -422,13 +542,20 @@ public int getFormatValue() { * *
    * Specify response data format. If not set, KeyValue format will be used.
+   * Deprecated. Use
+   * [FetchFeatureValuesRequest.data_format][google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.data_format].
    * 
* - * .google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format format = 5; + * + * .google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format format = 5 [deprecated = true]; + * * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.format is deprecated. See + * google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=128 * @return The format. */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format getFormat() { com.google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format result = com.google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format.forNumber(format_); @@ -462,6 +589,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(5, format_); } + if (dataKey_ != null) { + output.writeMessage(6, getDataKey()); + } + if (dataFormat_ + != com.google.cloud.aiplatform.v1beta1.FeatureViewDataFormat + .FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, dataFormat_); + } getUnknownFields().writeTo(output); } @@ -482,6 +618,15 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, format_); } + if (dataKey_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getDataKey()); + } + if (dataFormat_ + != com.google.cloud.aiplatform.v1beta1.FeatureViewDataFormat + .FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, dataFormat_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -499,6 +644,11 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest) obj; if (!getFeatureView().equals(other.getFeatureView())) return false; + if (hasDataKey() != other.hasDataKey()) return false; + if (hasDataKey()) { + if (!getDataKey().equals(other.getDataKey())) return false; + } + if (dataFormat_ != other.dataFormat_) return false; if (format_ != other.format_) return false; if (!getEntityIdCase().equals(other.getEntityIdCase())) return false; switch (entityIdCase_) { @@ -521,6 +671,12 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + FEATURE_VIEW_FIELD_NUMBER; hash = (53 * hash) + getFeatureView().hashCode(); + if (hasDataKey()) { + hash = (37 * hash) + DATA_KEY_FIELD_NUMBER; + hash = (53 * hash) + getDataKey().hashCode(); + } + hash = (37 * hash) + DATA_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + dataFormat_; hash = (37 * hash) + FORMAT_FIELD_NUMBER; hash = (53 * hash) + format_; switch (entityIdCase_) { @@ -674,6 +830,12 @@ public Builder clear() { super.clear(); bitField0_ = 0; featureView_ = ""; + dataKey_ = null; + if (dataKeyBuilder_ != null) { + dataKeyBuilder_.dispose(); + dataKeyBuilder_ = null; + } + dataFormat_ = 0; format_ = 0; entityIdCase_ = 0; entityId_ = null; @@ -720,6 +882,12 @@ private void buildPartial0( result.featureView_ = featureView_; } if (((from_bitField0_ & 0x00000004) != 0)) { + result.dataKey_ = dataKeyBuilder_ == null ? dataKey_ : dataKeyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.dataFormat_ = dataFormat_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { result.format_ = format_; } } @@ -782,6 +950,12 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.FetchFeatureValuesR bitField0_ |= 0x00000002; onChanged(); } + if (other.hasDataKey()) { + mergeDataKey(other.getDataKey()); + } + if (other.dataFormat_ != 0) { + setDataFormatValue(other.getDataFormatValue()); + } if (other.format_ != 0) { setFormatValue(other.getFormatValue()); } @@ -840,9 +1014,21 @@ public Builder mergeFrom( case 40: { format_ = input.readEnum(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000010; break; } // case 40 + case 50: + { + input.readMessage(getDataKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 50 + case 56: + { + dataFormat_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 56 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -884,11 +1070,14 @@ public Builder clearEntityId() { * fetch feature values for. *
* - * string id = 3; + * string id = 3 [deprecated = true]; * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.id is deprecated. See + * google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=104 * @return Whether the id field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasId() { return entityIdCase_ == 3; } @@ -900,11 +1089,14 @@ public boolean hasId() { * fetch feature values for. *
* - * string id = 3; + * string id = 3 [deprecated = true]; * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.id is deprecated. See + * google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=104 * @return The id. */ @java.lang.Override + @java.lang.Deprecated public java.lang.String getId() { java.lang.Object ref = ""; if (entityIdCase_ == 3) { @@ -929,11 +1121,14 @@ public java.lang.String getId() { * fetch feature values for. *
* - * string id = 3; + * string id = 3 [deprecated = true]; * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.id is deprecated. See + * google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=104 * @return The bytes for id. */ @java.lang.Override + @java.lang.Deprecated public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = ""; if (entityIdCase_ == 3) { @@ -958,11 +1153,14 @@ public com.google.protobuf.ByteString getIdBytes() { * fetch feature values for. *
* - * string id = 3; + * string id = 3 [deprecated = true]; * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.id is deprecated. See + * google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=104 * @param value The id to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setId(java.lang.String value) { if (value == null) { throw new NullPointerException(); @@ -980,10 +1178,13 @@ public Builder setId(java.lang.String value) { * fetch feature values for. *
* - * string id = 3; + * string id = 3 [deprecated = true]; * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.id is deprecated. See + * google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=104 * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearId() { if (entityIdCase_ == 3) { entityIdCase_ = 0; @@ -1000,11 +1201,14 @@ public Builder clearId() { * fetch feature values for. *
* - * string id = 3; + * string id = 3 [deprecated = true]; * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.id is deprecated. See + * google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=104 * @param value The bytes for id to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -1137,19 +1341,341 @@ public Builder setFeatureViewBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey dataKey_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey, + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey.Builder, + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKeyOrBuilder> + dataKeyBuilder_; + /** + * + * + *
+     * Optional. The request key to fetch feature values for.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataKey field is set. + */ + public boolean hasDataKey() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. The request key to fetch feature values for.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataKey. + */ + public com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey getDataKey() { + if (dataKeyBuilder_ == null) { + return dataKey_ == null + ? com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey.getDefaultInstance() + : dataKey_; + } else { + return dataKeyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The request key to fetch feature values for.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataKey(com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey value) { + if (dataKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataKey_ = value; + } else { + dataKeyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The request key to fetch feature values for.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataKey( + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey.Builder builderForValue) { + if (dataKeyBuilder_ == null) { + dataKey_ = builderForValue.build(); + } else { + dataKeyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The request key to fetch feature values for.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDataKey(com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey value) { + if (dataKeyBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && dataKey_ != null + && dataKey_ + != com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey.getDefaultInstance()) { + getDataKeyBuilder().mergeFrom(value); + } else { + dataKey_ = value; + } + } else { + dataKeyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The request key to fetch feature values for.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDataKey() { + bitField0_ = (bitField0_ & ~0x00000004); + dataKey_ = null; + if (dataKeyBuilder_ != null) { + dataKeyBuilder_.dispose(); + dataKeyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The request key to fetch feature values for.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey.Builder getDataKeyBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getDataKeyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The request key to fetch feature values for.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.FeatureViewDataKeyOrBuilder getDataKeyOrBuilder() { + if (dataKeyBuilder_ != null) { + return dataKeyBuilder_.getMessageOrBuilder(); + } else { + return dataKey_ == null + ? com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey.getDefaultInstance() + : dataKey_; + } + } + /** + * + * + *
+     * Optional. The request key to fetch feature values for.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey, + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey.Builder, + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKeyOrBuilder> + getDataKeyFieldBuilder() { + if (dataKeyBuilder_ == null) { + dataKeyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey, + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey.Builder, + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKeyOrBuilder>( + getDataKey(), getParentForChildren(), isClean()); + dataKey_ = null; + } + return dataKeyBuilder_; + } + + private int dataFormat_ = 0; + /** + * + * + *
+     * Optional. Response data format. If not set,
+     * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1beta1.FeatureViewDataFormat.KEY_VALUE]
+     * will be used.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + @java.lang.Override + public int getDataFormatValue() { + return dataFormat_; + } + /** + * + * + *
+     * Optional. Response data format. If not set,
+     * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1beta1.FeatureViewDataFormat.KEY_VALUE]
+     * will be used.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for dataFormat to set. + * @return This builder for chaining. + */ + public Builder setDataFormatValue(int value) { + dataFormat_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Response data format. If not set,
+     * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1beta1.FeatureViewDataFormat.KEY_VALUE]
+     * will be used.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureViewDataFormat getDataFormat() { + com.google.cloud.aiplatform.v1beta1.FeatureViewDataFormat result = + com.google.cloud.aiplatform.v1beta1.FeatureViewDataFormat.forNumber(dataFormat_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.FeatureViewDataFormat.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Response data format. If not set,
+     * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1beta1.FeatureViewDataFormat.KEY_VALUE]
+     * will be used.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The dataFormat to set. + * @return This builder for chaining. + */ + public Builder setDataFormat(com.google.cloud.aiplatform.v1beta1.FeatureViewDataFormat value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + dataFormat_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Response data format. If not set,
+     * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1beta1.FeatureViewDataFormat.KEY_VALUE]
+     * will be used.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDataFormat() { + bitField0_ = (bitField0_ & ~0x00000008); + dataFormat_ = 0; + onChanged(); + return this; + } + private int format_ = 0; /** * * *
      * Specify response data format. If not set, KeyValue format will be used.
+     * Deprecated. Use
+     * [FetchFeatureValuesRequest.data_format][google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.data_format].
      * 
* - * .google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format format = 5; + * + * .google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format format = 5 [deprecated = true]; + * * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.format is deprecated. + * See google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=128 * @return The enum numeric value on the wire for format. */ @java.lang.Override + @java.lang.Deprecated public int getFormatValue() { return format_; } @@ -1158,16 +1684,23 @@ public int getFormatValue() { * *
      * Specify response data format. If not set, KeyValue format will be used.
+     * Deprecated. Use
+     * [FetchFeatureValuesRequest.data_format][google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.data_format].
      * 
* - * .google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format format = 5; + * + * .google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format format = 5 [deprecated = true]; + * * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.format is deprecated. + * See google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=128 * @param value The enum numeric value on the wire for format to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setFormatValue(int value) { format_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1176,13 +1709,20 @@ public Builder setFormatValue(int value) { * *
      * Specify response data format. If not set, KeyValue format will be used.
+     * Deprecated. Use
+     * [FetchFeatureValuesRequest.data_format][google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.data_format].
      * 
* - * .google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format format = 5; + * + * .google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format format = 5 [deprecated = true]; + * * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.format is deprecated. + * See google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=128 * @return The format. */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format getFormat() { com.google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format result = com.google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format.forNumber(format_); @@ -1195,19 +1735,26 @@ public com.google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format getF * *
      * Specify response data format. If not set, KeyValue format will be used.
+     * Deprecated. Use
+     * [FetchFeatureValuesRequest.data_format][google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.data_format].
      * 
* - * .google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format format = 5; + * + * .google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format format = 5 [deprecated = true]; + * * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.format is deprecated. + * See google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=128 * @param value The format to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setFormat( com.google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000010; format_ = value.getNumber(); onChanged(); return this; @@ -1217,14 +1764,21 @@ public Builder setFormat( * *
      * Specify response data format. If not set, KeyValue format will be used.
+     * Deprecated. Use
+     * [FetchFeatureValuesRequest.data_format][google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.data_format].
      * 
* - * .google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format format = 5; + * + * .google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format format = 5 [deprecated = true]; + * * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.format is deprecated. + * See google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=128 * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearFormat() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000010); format_ = 0; onChanged(); return this; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FetchFeatureValuesRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FetchFeatureValuesRequestOrBuilder.java index 44b05a1a7964..277ebc44184d 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FetchFeatureValuesRequestOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FetchFeatureValuesRequestOrBuilder.java @@ -31,10 +31,13 @@ public interface FetchFeatureValuesRequestOrBuilder * fetch feature values for. *
* - * string id = 3; + * string id = 3 [deprecated = true]; * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.id is deprecated. See + * google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=104 * @return Whether the id field is set. */ + @java.lang.Deprecated boolean hasId(); /** * @@ -44,10 +47,13 @@ public interface FetchFeatureValuesRequestOrBuilder * fetch feature values for. *
* - * string id = 3; + * string id = 3 [deprecated = true]; * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.id is deprecated. See + * google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=104 * @return The id. */ + @java.lang.Deprecated java.lang.String getId(); /** * @@ -57,10 +63,13 @@ public interface FetchFeatureValuesRequestOrBuilder * fetch feature values for. *
* - * string id = 3; + * string id = 3 [deprecated = true]; * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.id is deprecated. See + * google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=104 * @return The bytes for id. */ + @java.lang.Deprecated com.google.protobuf.ByteString getIdBytes(); /** @@ -94,29 +103,117 @@ public interface FetchFeatureValuesRequestOrBuilder */ com.google.protobuf.ByteString getFeatureViewBytes(); + /** + * + * + *
+   * Optional. The request key to fetch feature values for.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataKey field is set. + */ + boolean hasDataKey(); + /** + * + * + *
+   * Optional. The request key to fetch feature values for.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataKey. + */ + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey getDataKey(); + /** + * + * + *
+   * Optional. The request key to fetch feature values for.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1beta1.FeatureViewDataKeyOrBuilder getDataKeyOrBuilder(); + + /** + * + * + *
+   * Optional. Response data format. If not set,
+   * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1beta1.FeatureViewDataFormat.KEY_VALUE]
+   * will be used.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + int getDataFormatValue(); + /** + * + * + *
+   * Optional. Response data format. If not set,
+   * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1beta1.FeatureViewDataFormat.KEY_VALUE]
+   * will be used.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + com.google.cloud.aiplatform.v1beta1.FeatureViewDataFormat getDataFormat(); + /** * * *
    * Specify response data format. If not set, KeyValue format will be used.
+   * Deprecated. Use
+   * [FetchFeatureValuesRequest.data_format][google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.data_format].
    * 
* - * .google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format format = 5; + * + * .google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format format = 5 [deprecated = true]; + * * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.format is deprecated. See + * google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=128 * @return The enum numeric value on the wire for format. */ + @java.lang.Deprecated int getFormatValue(); /** * * *
    * Specify response data format. If not set, KeyValue format will be used.
+   * Deprecated. Use
+   * [FetchFeatureValuesRequest.data_format][google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.data_format].
    * 
* - * .google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format format = 5; + * + * .google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format format = 5 [deprecated = true]; + * * + * @deprecated google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.format is deprecated. See + * google/cloud/aiplatform/v1beta1/feature_online_store_service.proto;l=128 * @return The format. */ + @java.lang.Deprecated com.google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.Format getFormat(); com.google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.EntityIdCase getEntityIdCase(); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetFeatureRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetFeatureRequest.java index afe8612aaf4b..1e58519f21c1 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetFeatureRequest.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetFeatureRequest.java @@ -74,8 +74,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The name of the Feature resource.
-   * Format:
+   * Format for entity_type as parent:
    * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
    * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
    * 
* @@ -102,8 +103,9 @@ public java.lang.String getName() { * *
    * Required. The name of the Feature resource.
-   * Format:
+   * Format for entity_type as parent:
    * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
    * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
    * 
* @@ -478,8 +480,9 @@ public Builder mergeFrom( * *
      * Required. The name of the Feature resource.
-     * Format:
+     * Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
      * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* @@ -505,8 +508,9 @@ public java.lang.String getName() { * *
      * Required. The name of the Feature resource.
-     * Format:
+     * Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
      * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* @@ -532,8 +536,9 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. The name of the Feature resource.
-     * Format:
+     * Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
      * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* @@ -558,8 +563,9 @@ public Builder setName(java.lang.String value) { * *
      * Required. The name of the Feature resource.
-     * Format:
+     * Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
      * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* @@ -580,8 +586,9 @@ public Builder clearName() { * *
      * Required. The name of the Feature resource.
-     * Format:
+     * Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
      * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetFeatureRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetFeatureRequestOrBuilder.java index 6964f3c511cf..d9ea790bdb25 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetFeatureRequestOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetFeatureRequestOrBuilder.java @@ -28,8 +28,9 @@ public interface GetFeatureRequestOrBuilder * *
    * Required. The name of the Feature resource.
-   * Format:
+   * Format for entity_type as parent:
    * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
    * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
    * 
* @@ -45,8 +46,9 @@ public interface GetFeatureRequestOrBuilder * *
    * Required. The name of the Feature resource.
-   * Format:
+   * Format for entity_type as parent:
    * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
    * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
    * 
* diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexDatapoint.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexDatapoint.java index a41bd1c0241c..6682beced2f0 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexDatapoint.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexDatapoint.java @@ -41,6 +41,7 @@ private IndexDatapoint() { datapointId_ = ""; featureVector_ = emptyFloatList(); restricts_ = java.util.Collections.emptyList(); + numericRestricts_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -1371,165 +1372,700 @@ public com.google.protobuf.Parser getParserForType() { } } - public interface CrowdingTagOrBuilder + public interface NumericRestrictionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction) com.google.protobuf.MessageOrBuilder { /** * * *
-     * The attribute value used for crowding.  The maximum number of neighbors
-     * to return per crowding attribute value
-     * (per_crowding_attribute_num_neighbors) is configured per-query. This
-     * field is ignored if per_crowding_attribute_num_neighbors is larger than
-     * the total number of neighbors to return for a given query.
+     * Represents 64 bit integer.
      * 
* - * string crowding_attribute = 1; + * int64 value_int = 2; * - * @return The crowdingAttribute. + * @return Whether the valueInt field is set. */ - java.lang.String getCrowdingAttribute(); + boolean hasValueInt(); /** * * *
-     * The attribute value used for crowding.  The maximum number of neighbors
-     * to return per crowding attribute value
-     * (per_crowding_attribute_num_neighbors) is configured per-query. This
-     * field is ignored if per_crowding_attribute_num_neighbors is larger than
-     * the total number of neighbors to return for a given query.
+     * Represents 64 bit integer.
      * 
* - * string crowding_attribute = 1; + * int64 value_int = 2; * - * @return The bytes for crowdingAttribute. + * @return The valueInt. */ - com.google.protobuf.ByteString getCrowdingAttributeBytes(); + long getValueInt(); + + /** + * + * + *
+     * Represents 32 bit float.
+     * 
+ * + * float value_float = 3; + * + * @return Whether the valueFloat field is set. + */ + boolean hasValueFloat(); + /** + * + * + *
+     * Represents 32 bit float.
+     * 
+ * + * float value_float = 3; + * + * @return The valueFloat. + */ + float getValueFloat(); + + /** + * + * + *
+     * Represents 64 bit float.
+     * 
+ * + * double value_double = 4; + * + * @return Whether the valueDouble field is set. + */ + boolean hasValueDouble(); + /** + * + * + *
+     * Represents 64 bit float.
+     * 
+ * + * double value_double = 4; + * + * @return The valueDouble. + */ + double getValueDouble(); + + /** + * + * + *
+     * The namespace of this restriction. e.g.: cost.
+     * 
+ * + * string namespace = 1; + * + * @return The namespace. + */ + java.lang.String getNamespace(); + /** + * + * + *
+     * The namespace of this restriction. e.g.: cost.
+     * 
+ * + * string namespace = 1; + * + * @return The bytes for namespace. + */ + com.google.protobuf.ByteString getNamespaceBytes(); + + /** + * + * + *
+     * This MUST be specified for queries and must NOT be specified for
+     * datapoints.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator op = 5; + * + * + * @return The enum numeric value on the wire for op. + */ + int getOpValue(); + /** + * + * + *
+     * This MUST be specified for queries and must NOT be specified for
+     * datapoints.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator op = 5; + * + * + * @return The op. + */ + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator getOp(); + + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.ValueCase getValueCase(); } /** * * *
-   * Crowding tag is a constraint on a neighbor list produced by nearest
-   * neighbor search requiring that no more than some value k' of the k
-   * neighbors returned have the same value of crowding_attribute.
+   * This field allows restricts to be based on numeric comparisons rather
+   * than categorical tokens.
    * 
* - * Protobuf type {@code google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag} + * Protobuf type {@code google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction} */ - public static final class CrowdingTag extends com.google.protobuf.GeneratedMessageV3 + public static final class NumericRestriction extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) - CrowdingTagOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction) + NumericRestrictionOrBuilder { private static final long serialVersionUID = 0L; - // Use CrowdingTag.newBuilder() to construct. - private CrowdingTag(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use NumericRestriction.newBuilder() to construct. + private NumericRestriction(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private CrowdingTag() { - crowdingAttribute_ = ""; + private NumericRestriction() { + namespace_ = ""; + op_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CrowdingTag(); + return new NumericRestriction(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.aiplatform.v1beta1.IndexProto - .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_descriptor; + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_NumericRestriction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.aiplatform.v1beta1.IndexProto - .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_fieldAccessorTable + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_NumericRestriction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.class, - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.Builder.class); + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.class, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Builder.class); } - public static final int CROWDING_ATTRIBUTE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object crowdingAttribute_ = ""; /** * * *
-     * The attribute value used for crowding.  The maximum number of neighbors
-     * to return per crowding attribute value
-     * (per_crowding_attribute_num_neighbors) is configured per-query. This
-     * field is ignored if per_crowding_attribute_num_neighbors is larger than
-     * the total number of neighbors to return for a given query.
-     * 
- * - * string crowding_attribute = 1; - * - * @return The crowdingAttribute. - */ - @java.lang.Override - public java.lang.String getCrowdingAttribute() { - java.lang.Object ref = crowdingAttribute_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - crowdingAttribute_ = s; - return s; - } - } - /** + * Which comparison operator to use. Should be specified for queries only; + * specifying this for a datapoint is an error. * - * - *
-     * The attribute value used for crowding.  The maximum number of neighbors
-     * to return per crowding attribute value
-     * (per_crowding_attribute_num_neighbors) is configured per-query. This
-     * field is ignored if per_crowding_attribute_num_neighbors is larger than
-     * the total number of neighbors to return for a given query.
+     * Datapoints for which Operator is true relative to the query's Value
+     * field will be allowlisted.
      * 
* - * string crowding_attribute = 1; - * - * @return The bytes for crowdingAttribute. + * Protobuf enum {@code + * google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator} */ - @java.lang.Override - public com.google.protobuf.ByteString getCrowdingAttributeBytes() { - java.lang.Object ref = crowdingAttribute_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - crowdingAttribute_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public enum Operator implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Default value of the enum.
+       * 
+ * + * OPERATOR_UNSPECIFIED = 0; + */ + OPERATOR_UNSPECIFIED(0), + /** + * + * + *
+       * Datapoints are eligible iff their value is < the query's.
+       * 
+ * + * LESS = 1; + */ + LESS(1), + /** + * + * + *
+       * Datapoints are eligible iff their value is <= the query's.
+       * 
+ * + * LESS_EQUAL = 2; + */ + LESS_EQUAL(2), + /** + * + * + *
+       * Datapoints are eligible iff their value is == the query's.
+       * 
+ * + * EQUAL = 3; + */ + EQUAL(3), + /** + * + * + *
+       * Datapoints are eligible iff their value is >= the query's.
+       * 
+ * + * GREATER_EQUAL = 4; + */ + GREATER_EQUAL(4), + /** + * + * + *
+       * Datapoints are eligible iff their value is > the query's.
+       * 
+ * + * GREATER = 5; + */ + GREATER(5), + UNRECOGNIZED(-1), + ; - private byte memoizedIsInitialized = -1; + /** + * + * + *
+       * Default value of the enum.
+       * 
+ * + * OPERATOR_UNSPECIFIED = 0; + */ + public static final int OPERATOR_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Datapoints are eligible iff their value is < the query's.
+       * 
+ * + * LESS = 1; + */ + public static final int LESS_VALUE = 1; + /** + * + * + *
+       * Datapoints are eligible iff their value is <= the query's.
+       * 
+ * + * LESS_EQUAL = 2; + */ + public static final int LESS_EQUAL_VALUE = 2; + /** + * + * + *
+       * Datapoints are eligible iff their value is == the query's.
+       * 
+ * + * EQUAL = 3; + */ + public static final int EQUAL_VALUE = 3; + /** + * + * + *
+       * Datapoints are eligible iff their value is >= the query's.
+       * 
+ * + * GREATER_EQUAL = 4; + */ + public static final int GREATER_EQUAL_VALUE = 4; + /** + * + * + *
+       * Datapoints are eligible iff their value is > the query's.
+       * 
+ * + * GREATER = 5; + */ + public static final int GREATER_VALUE = 5; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } - memoizedIsInitialized = 1; - return true; + /** + * @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 Operator 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 Operator forNumber(int value) { + switch (value) { + case 0: + return OPERATOR_UNSPECIFIED; + case 1: + return LESS; + case 2: + return LESS_EQUAL; + case 3: + return EQUAL; + case 4: + return GREATER_EQUAL; + case 5: + return GREATER; + 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 Operator findValueByNumber(int number) { + return Operator.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.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Operator[] VALUES = values(); + + public static Operator 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 Operator(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator) + } + + 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 { + VALUE_INT(2), + VALUE_FLOAT(3), + VALUE_DOUBLE(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 2: + return VALUE_INT; + case 3: + return VALUE_FLOAT; + case 4: + return VALUE_DOUBLE; + 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 VALUE_INT_FIELD_NUMBER = 2; + /** + * + * + *
+     * Represents 64 bit integer.
+     * 
+ * + * int64 value_int = 2; + * + * @return Whether the valueInt field is set. + */ + @java.lang.Override + public boolean hasValueInt() { + return valueCase_ == 2; + } + /** + * + * + *
+     * Represents 64 bit integer.
+     * 
+ * + * int64 value_int = 2; + * + * @return The valueInt. + */ + @java.lang.Override + public long getValueInt() { + if (valueCase_ == 2) { + return (java.lang.Long) value_; + } + return 0L; + } + + public static final int VALUE_FLOAT_FIELD_NUMBER = 3; + /** + * + * + *
+     * Represents 32 bit float.
+     * 
+ * + * float value_float = 3; + * + * @return Whether the valueFloat field is set. + */ + @java.lang.Override + public boolean hasValueFloat() { + return valueCase_ == 3; + } + /** + * + * + *
+     * Represents 32 bit float.
+     * 
+ * + * float value_float = 3; + * + * @return The valueFloat. + */ + @java.lang.Override + public float getValueFloat() { + if (valueCase_ == 3) { + return (java.lang.Float) value_; + } + return 0F; + } + + public static final int VALUE_DOUBLE_FIELD_NUMBER = 4; + /** + * + * + *
+     * Represents 64 bit float.
+     * 
+ * + * double value_double = 4; + * + * @return Whether the valueDouble field is set. + */ + @java.lang.Override + public boolean hasValueDouble() { + return valueCase_ == 4; + } + /** + * + * + *
+     * Represents 64 bit float.
+     * 
+ * + * double value_double = 4; + * + * @return The valueDouble. + */ + @java.lang.Override + public double getValueDouble() { + if (valueCase_ == 4) { + return (java.lang.Double) value_; + } + return 0D; + } + + public static final int NAMESPACE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object namespace_ = ""; + /** + * + * + *
+     * The namespace of this restriction. e.g.: cost.
+     * 
+ * + * string namespace = 1; + * + * @return The namespace. + */ + @java.lang.Override + public java.lang.String getNamespace() { + java.lang.Object ref = namespace_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespace_ = s; + return s; + } + } + /** + * + * + *
+     * The namespace of this restriction. e.g.: cost.
+     * 
+ * + * string namespace = 1; + * + * @return The bytes for namespace. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNamespaceBytes() { + java.lang.Object ref = namespace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + namespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OP_FIELD_NUMBER = 5; + private int op_ = 0; + /** + * + * + *
+     * This MUST be specified for queries and must NOT be specified for
+     * datapoints.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator op = 5; + * + * + * @return The enum numeric value on the wire for op. + */ + @java.lang.Override + public int getOpValue() { + return op_; + } + /** + * + * + *
+     * This MUST be specified for queries and must NOT be specified for
+     * datapoints.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator op = 5; + * + * + * @return The op. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator getOp() { + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator result = + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator.forNumber( + op_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator + .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(crowdingAttribute_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, crowdingAttribute_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namespace_); + } + if (valueCase_ == 2) { + output.writeInt64(2, (long) ((java.lang.Long) value_)); + } + if (valueCase_ == 3) { + output.writeFloat(3, (float) ((java.lang.Float) value_)); + } + if (valueCase_ == 4) { + output.writeDouble(4, (double) ((java.lang.Double) value_)); + } + if (op_ + != com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator + .OPERATOR_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, op_); } getUnknownFields().writeTo(output); } @@ -1540,8 +2076,29 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(crowdingAttribute_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, crowdingAttribute_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namespace_); + } + if (valueCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 2, (long) ((java.lang.Long) value_)); + } + if (valueCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeFloatSize( + 3, (float) ((java.lang.Float) value_)); + } + if (valueCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 4, (double) ((java.lang.Double) value_)); + } + if (op_ + != com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator + .OPERATOR_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, op_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -1553,13 +2110,30 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag)) { + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction)) { return super.equals(obj); } - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag other = - (com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) obj; + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction other = + (com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction) obj; - if (!getCrowdingAttribute().equals(other.getCrowdingAttribute())) return false; + if (!getNamespace().equals(other.getNamespace())) return false; + if (op_ != other.op_) return false; + if (!getValueCase().equals(other.getValueCase())) return false; + switch (valueCase_) { + case 2: + if (getValueInt() != other.getValueInt()) return false; + break; + case 3: + if (java.lang.Float.floatToIntBits(getValueFloat()) + != java.lang.Float.floatToIntBits(other.getValueFloat())) return false; + break; + case 4: + if (java.lang.Double.doubleToLongBits(getValueDouble()) + != java.lang.Double.doubleToLongBits(other.getValueDouble())) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1571,78 +2145,100 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CROWDING_ATTRIBUTE_FIELD_NUMBER; - hash = (53 * hash) + getCrowdingAttribute().hashCode(); + hash = (37 * hash) + NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getNamespace().hashCode(); + hash = (37 * hash) + OP_FIELD_NUMBER; + hash = (53 * hash) + op_; + switch (valueCase_) { + case 2: + hash = (37 * hash) + VALUE_INT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getValueInt()); + break; + case 3: + hash = (37 * hash) + VALUE_FLOAT_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getValueFloat()); + break; + case 4: + hash = (37 * hash) + VALUE_DOUBLE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getValueDouble())); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1660,7 +2256,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag prototype) { + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -1679,34 +2275,35 @@ protected Builder newBuilderForType( * * *
-     * Crowding tag is a constraint on a neighbor list produced by nearest
-     * neighbor search requiring that no more than some value k' of the k
-     * neighbors returned have the same value of crowding_attribute.
+     * This field allows restricts to be based on numeric comparisons rather
+     * than categorical tokens.
      * 
* - * Protobuf type {@code google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag} + * Protobuf type {@code google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTagOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction) + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestrictionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.aiplatform.v1beta1.IndexProto - .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_descriptor; + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_NumericRestriction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.aiplatform.v1beta1.IndexProto - .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_fieldAccessorTable + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_NumericRestriction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.class, - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.Builder.class); + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.class, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Builder + .class); } - // Construct using com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.newBuilder() + // Construct using + // com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -1717,25 +2314,30 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - crowdingAttribute_ = ""; + namespace_ = ""; + op_ = 0; + valueCase_ = 0; + value_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.aiplatform.v1beta1.IndexProto - .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_descriptor; + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_NumericRestriction_descriptor; } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction getDefaultInstanceForType() { - return com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.getDefaultInstance(); + return com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction + .getDefaultInstance(); } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag build() { - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag result = buildPartial(); + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction build() { + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -1743,24 +2345,34 @@ public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag build() { } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag buildPartial() { - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag result = - new com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag(this); + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction buildPartial() { + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction result = + new com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction(this); if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0( - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag result) { + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.crowdingAttribute_ = crowdingAttribute_; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.namespace_ = namespace_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.op_ = op_; } } + private void buildPartialOneofs( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction result) { + result.valueCase_ = valueCase_; + result.value_ = this.value_; + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -1798,8 +2410,10 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) { - return mergeFrom((com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) other); + if (other + instanceof com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction) other); } else { super.mergeFrom(other); return this; @@ -1807,15 +2421,39 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag other) { + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction other) { if (other - == com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.getDefaultInstance()) - return this; - if (!other.getCrowdingAttribute().isEmpty()) { - crowdingAttribute_ = other.crowdingAttribute_; - bitField0_ |= 0x00000001; + == com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction + .getDefaultInstance()) return this; + if (!other.getNamespace().isEmpty()) { + namespace_ = other.namespace_; + bitField0_ |= 0x00000008; onChanged(); } + if (other.op_ != 0) { + setOpValue(other.getOpValue()); + } + switch (other.getValueCase()) { + case VALUE_INT: + { + setValueInt(other.getValueInt()); + break; + } + case VALUE_FLOAT: + { + setValueFloat(other.getValueFloat()); + break; + } + case VALUE_DOUBLE: + { + setValueDouble(other.getValueDouble()); + break; + } + case VALUE_NOT_SET: + { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1844,10 +2482,34 @@ public Builder mergeFrom( break; case 10: { - crowdingAttribute_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; + namespace_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; break; } // case 10 + case 16: + { + value_ = input.readInt64(); + valueCase_ = 2; + break; + } // case 16 + case 29: + { + value_ = input.readFloat(); + valueCase_ = 3; + break; + } // case 29 + case 33: + { + value_ = input.readDouble(); + valueCase_ = 4; + break; + } // case 33 + case 40: + { + op_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1865,30 +2527,250 @@ public Builder mergeFrom( 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 java.lang.Object crowdingAttribute_ = ""; /** * * *
-       * The attribute value used for crowding.  The maximum number of neighbors
-       * to return per crowding attribute value
-       * (per_crowding_attribute_num_neighbors) is configured per-query. This
-       * field is ignored if per_crowding_attribute_num_neighbors is larger than
-       * the total number of neighbors to return for a given query.
+       * Represents 64 bit integer.
        * 
* - * string crowding_attribute = 1; + * int64 value_int = 2; * - * @return The crowdingAttribute. + * @return Whether the valueInt field is set. */ - public java.lang.String getCrowdingAttribute() { - java.lang.Object ref = crowdingAttribute_; + public boolean hasValueInt() { + return valueCase_ == 2; + } + /** + * + * + *
+       * Represents 64 bit integer.
+       * 
+ * + * int64 value_int = 2; + * + * @return The valueInt. + */ + public long getValueInt() { + if (valueCase_ == 2) { + return (java.lang.Long) value_; + } + return 0L; + } + /** + * + * + *
+       * Represents 64 bit integer.
+       * 
+ * + * int64 value_int = 2; + * + * @param value The valueInt to set. + * @return This builder for chaining. + */ + public Builder setValueInt(long value) { + + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Represents 64 bit integer.
+       * 
+ * + * int64 value_int = 2; + * + * @return This builder for chaining. + */ + public Builder clearValueInt() { + if (valueCase_ == 2) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Represents 32 bit float.
+       * 
+ * + * float value_float = 3; + * + * @return Whether the valueFloat field is set. + */ + public boolean hasValueFloat() { + return valueCase_ == 3; + } + /** + * + * + *
+       * Represents 32 bit float.
+       * 
+ * + * float value_float = 3; + * + * @return The valueFloat. + */ + public float getValueFloat() { + if (valueCase_ == 3) { + return (java.lang.Float) value_; + } + return 0F; + } + /** + * + * + *
+       * Represents 32 bit float.
+       * 
+ * + * float value_float = 3; + * + * @param value The valueFloat to set. + * @return This builder for chaining. + */ + public Builder setValueFloat(float value) { + + valueCase_ = 3; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Represents 32 bit float.
+       * 
+ * + * float value_float = 3; + * + * @return This builder for chaining. + */ + public Builder clearValueFloat() { + if (valueCase_ == 3) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Represents 64 bit float.
+       * 
+ * + * double value_double = 4; + * + * @return Whether the valueDouble field is set. + */ + public boolean hasValueDouble() { + return valueCase_ == 4; + } + /** + * + * + *
+       * Represents 64 bit float.
+       * 
+ * + * double value_double = 4; + * + * @return The valueDouble. + */ + public double getValueDouble() { + if (valueCase_ == 4) { + return (java.lang.Double) value_; + } + return 0D; + } + /** + * + * + *
+       * Represents 64 bit float.
+       * 
+ * + * double value_double = 4; + * + * @param value The valueDouble to set. + * @return This builder for chaining. + */ + public Builder setValueDouble(double value) { + + valueCase_ = 4; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Represents 64 bit float.
+       * 
+ * + * double value_double = 4; + * + * @return This builder for chaining. + */ + public Builder clearValueDouble() { + if (valueCase_ == 4) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + private java.lang.Object namespace_ = ""; + /** + * + * + *
+       * The namespace of this restriction. e.g.: cost.
+       * 
+ * + * string namespace = 1; + * + * @return The namespace. + */ + public java.lang.String getNamespace() { + java.lang.Object ref = namespace_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - crowdingAttribute_ = s; + namespace_ = s; return s; } else { return (java.lang.String) ref; @@ -1898,23 +2780,19 @@ public java.lang.String getCrowdingAttribute() { * * *
-       * The attribute value used for crowding.  The maximum number of neighbors
-       * to return per crowding attribute value
-       * (per_crowding_attribute_num_neighbors) is configured per-query. This
-       * field is ignored if per_crowding_attribute_num_neighbors is larger than
-       * the total number of neighbors to return for a given query.
+       * The namespace of this restriction. e.g.: cost.
        * 
* - * string crowding_attribute = 1; + * string namespace = 1; * - * @return The bytes for crowdingAttribute. + * @return The bytes for namespace. */ - public com.google.protobuf.ByteString getCrowdingAttributeBytes() { - java.lang.Object ref = crowdingAttribute_; + public com.google.protobuf.ByteString getNamespaceBytes() { + java.lang.Object ref = namespace_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - crowdingAttribute_ = b; + namespace_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -1924,24 +2802,20 @@ public com.google.protobuf.ByteString getCrowdingAttributeBytes() { * * *
-       * The attribute value used for crowding.  The maximum number of neighbors
-       * to return per crowding attribute value
-       * (per_crowding_attribute_num_neighbors) is configured per-query. This
-       * field is ignored if per_crowding_attribute_num_neighbors is larger than
-       * the total number of neighbors to return for a given query.
+       * The namespace of this restriction. e.g.: cost.
        * 
* - * string crowding_attribute = 1; + * string namespace = 1; * - * @param value The crowdingAttribute to set. + * @param value The namespace to set. * @return This builder for chaining. */ - public Builder setCrowdingAttribute(java.lang.String value) { + public Builder setNamespace(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - crowdingAttribute_ = value; - bitField0_ |= 0x00000001; + namespace_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1949,20 +2823,16 @@ public Builder setCrowdingAttribute(java.lang.String value) { * * *
-       * The attribute value used for crowding.  The maximum number of neighbors
-       * to return per crowding attribute value
-       * (per_crowding_attribute_num_neighbors) is configured per-query. This
-       * field is ignored if per_crowding_attribute_num_neighbors is larger than
-       * the total number of neighbors to return for a given query.
+       * The namespace of this restriction. e.g.: cost.
        * 
* - * string crowding_attribute = 1; + * string namespace = 1; * * @return This builder for chaining. */ - public Builder clearCrowdingAttribute() { - crowdingAttribute_ = getDefaultInstance().getCrowdingAttribute(); - bitField0_ = (bitField0_ & ~0x00000001); + public Builder clearNamespace() { + namespace_ = getDefaultInstance().getNamespace(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -1970,25 +2840,127 @@ public Builder clearCrowdingAttribute() { * * *
-       * The attribute value used for crowding.  The maximum number of neighbors
-       * to return per crowding attribute value
-       * (per_crowding_attribute_num_neighbors) is configured per-query. This
-       * field is ignored if per_crowding_attribute_num_neighbors is larger than
-       * the total number of neighbors to return for a given query.
+       * The namespace of this restriction. e.g.: cost.
        * 
* - * string crowding_attribute = 1; + * string namespace = 1; * - * @param value The bytes for crowdingAttribute to set. + * @param value The bytes for namespace to set. * @return This builder for chaining. */ - public Builder setCrowdingAttributeBytes(com.google.protobuf.ByteString value) { + public Builder setNamespaceBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - crowdingAttribute_ = value; - bitField0_ |= 0x00000001; + namespace_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int op_ = 0; + /** + * + * + *
+       * This MUST be specified for queries and must NOT be specified for
+       * datapoints.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator op = 5; + * + * + * @return The enum numeric value on the wire for op. + */ + @java.lang.Override + public int getOpValue() { + return op_; + } + /** + * + * + *
+       * This MUST be specified for queries and must NOT be specified for
+       * datapoints.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator op = 5; + * + * + * @param value The enum numeric value on the wire for op to set. + * @return This builder for chaining. + */ + public Builder setOpValue(int value) { + op_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * This MUST be specified for queries and must NOT be specified for
+       * datapoints.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator op = 5; + * + * + * @return The op. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator + getOp() { + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator result = + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator + .forNumber(op_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * This MUST be specified for queries and must NOT be specified for
+       * datapoints.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator op = 5; + * + * + * @param value The op to set. + * @return This builder for chaining. + */ + public Builder setOp( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + op_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * This MUST be specified for queries and must NOT be specified for
+       * datapoints.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Operator op = 5; + * + * + * @return This builder for chaining. + */ + public Builder clearOp() { + bitField0_ = (bitField0_ & ~0x00000010); + op_ = 0; onChanged(); return this; } @@ -2005,26 +2977,27 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction) } - // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) - private static final com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction) + private static final com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag(); + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction(); } - public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public CrowdingTag parsePartialFrom( + public NumericRestriction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -2044,152 +3017,841 @@ public CrowdingTag parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public static final int DATAPOINT_ID_FIELD_NUMBER = 1; + public interface CrowdingTagOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) + com.google.protobuf.MessageOrBuilder { - @SuppressWarnings("serial") - private volatile java.lang.Object datapointId_ = ""; - /** - * - * - *
-   * Required. Unique identifier of the datapoint.
-   * 
- * - * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The datapointId. - */ - @java.lang.Override - public java.lang.String getDatapointId() { - java.lang.Object ref = datapointId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - datapointId_ = s; - return s; - } + /** + * + * + *
+     * The attribute value used for crowding.  The maximum number of neighbors
+     * to return per crowding attribute value
+     * (per_crowding_attribute_num_neighbors) is configured per-query. This
+     * field is ignored if per_crowding_attribute_num_neighbors is larger than
+     * the total number of neighbors to return for a given query.
+     * 
+ * + * string crowding_attribute = 1; + * + * @return The crowdingAttribute. + */ + java.lang.String getCrowdingAttribute(); + /** + * + * + *
+     * The attribute value used for crowding.  The maximum number of neighbors
+     * to return per crowding attribute value
+     * (per_crowding_attribute_num_neighbors) is configured per-query. This
+     * field is ignored if per_crowding_attribute_num_neighbors is larger than
+     * the total number of neighbors to return for a given query.
+     * 
+ * + * string crowding_attribute = 1; + * + * @return The bytes for crowdingAttribute. + */ + com.google.protobuf.ByteString getCrowdingAttributeBytes(); } /** * * *
-   * Required. Unique identifier of the datapoint.
+   * Crowding tag is a constraint on a neighbor list produced by nearest
+   * neighbor search requiring that no more than some value k' of the k
+   * neighbors returned have the same value of crowding_attribute.
    * 
* - * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for datapointId. + * Protobuf type {@code google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag} */ - @java.lang.Override - public com.google.protobuf.ByteString getDatapointIdBytes() { - java.lang.Object ref = datapointId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - datapointId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final class CrowdingTag extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) + CrowdingTagOrBuilder { + private static final long serialVersionUID = 0L; + // Use CrowdingTag.newBuilder() to construct. + private CrowdingTag(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - } - public static final int FEATURE_VECTOR_FIELD_NUMBER = 2; + private CrowdingTag() { + crowdingAttribute_ = ""; + } - @SuppressWarnings("serial") - private com.google.protobuf.Internal.FloatList featureVector_; - /** - * - * - *
-   * Required. Feature embedding vector. An array of numbers with the length of
-   * [NearestNeighborSearchConfig.dimensions].
-   * 
- * - * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the featureVector. - */ - @java.lang.Override - public java.util.List getFeatureVectorList() { - return featureVector_; - } - /** - * - * - *
-   * Required. Feature embedding vector. An array of numbers with the length of
-   * [NearestNeighborSearchConfig.dimensions].
-   * 
- * - * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of featureVector. - */ - public int getFeatureVectorCount() { - return featureVector_.size(); - } - /** - * - * - *
-   * Required. Feature embedding vector. An array of numbers with the length of
-   * [NearestNeighborSearchConfig.dimensions].
-   * 
- * - * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the element to return. - * @return The featureVector at the given index. - */ - public float getFeatureVector(int index) { - return featureVector_.getFloat(index); - } + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CrowdingTag(); + } - private int featureVectorMemoizedSerializedSize = -1; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_descriptor; + } - public static final int RESTRICTS_FIELD_NUMBER = 4; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.class, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.Builder.class); + } - @SuppressWarnings("serial") - private java.util.List restricts_; - /** - * - * - *
-   * Optional. List of Restrict of the datapoint, used to perform "restricted
-   * searches" where boolean rule are used to filter the subset of the database
-   * eligible for matching. This uses categorical tokens. See:
-   * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
-   * 
- * - * - * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getRestrictsList() { - return restricts_; - } - /** - * + public static final int CROWDING_ATTRIBUTE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object crowdingAttribute_ = ""; + /** + * + * + *
+     * The attribute value used for crowding.  The maximum number of neighbors
+     * to return per crowding attribute value
+     * (per_crowding_attribute_num_neighbors) is configured per-query. This
+     * field is ignored if per_crowding_attribute_num_neighbors is larger than
+     * the total number of neighbors to return for a given query.
+     * 
+ * + * string crowding_attribute = 1; + * + * @return The crowdingAttribute. + */ + @java.lang.Override + public java.lang.String getCrowdingAttribute() { + java.lang.Object ref = crowdingAttribute_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + crowdingAttribute_ = s; + return s; + } + } + /** + * + * + *
+     * The attribute value used for crowding.  The maximum number of neighbors
+     * to return per crowding attribute value
+     * (per_crowding_attribute_num_neighbors) is configured per-query. This
+     * field is ignored if per_crowding_attribute_num_neighbors is larger than
+     * the total number of neighbors to return for a given query.
+     * 
+ * + * string crowding_attribute = 1; + * + * @return The bytes for crowdingAttribute. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCrowdingAttributeBytes() { + java.lang.Object ref = crowdingAttribute_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + crowdingAttribute_ = 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(crowdingAttribute_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, crowdingAttribute_); + } + 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(crowdingAttribute_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, crowdingAttribute_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag other = + (com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) obj; + + if (!getCrowdingAttribute().equals(other.getCrowdingAttribute())) return false; + if (!getUnknownFields().equals(other.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) + CROWDING_ATTRIBUTE_FIELD_NUMBER; + hash = (53 * hash) + getCrowdingAttribute().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Crowding tag is a constraint on a neighbor list produced by nearest
+     * neighbor search requiring that no more than some value k' of the k
+     * neighbors returned have the same value of crowding_attribute.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTagOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.class, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + crowdingAttribute_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag build() { + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag buildPartial() { + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag result = + new com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.crowdingAttribute_ = crowdingAttribute_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag other) { + if (other + == com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.getDefaultInstance()) + return this; + if (!other.getCrowdingAttribute().isEmpty()) { + crowdingAttribute_ = other.crowdingAttribute_; + 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: + { + crowdingAttribute_ = 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 crowdingAttribute_ = ""; + /** + * + * + *
+       * The attribute value used for crowding.  The maximum number of neighbors
+       * to return per crowding attribute value
+       * (per_crowding_attribute_num_neighbors) is configured per-query. This
+       * field is ignored if per_crowding_attribute_num_neighbors is larger than
+       * the total number of neighbors to return for a given query.
+       * 
+ * + * string crowding_attribute = 1; + * + * @return The crowdingAttribute. + */ + public java.lang.String getCrowdingAttribute() { + java.lang.Object ref = crowdingAttribute_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + crowdingAttribute_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The attribute value used for crowding.  The maximum number of neighbors
+       * to return per crowding attribute value
+       * (per_crowding_attribute_num_neighbors) is configured per-query. This
+       * field is ignored if per_crowding_attribute_num_neighbors is larger than
+       * the total number of neighbors to return for a given query.
+       * 
+ * + * string crowding_attribute = 1; + * + * @return The bytes for crowdingAttribute. + */ + public com.google.protobuf.ByteString getCrowdingAttributeBytes() { + java.lang.Object ref = crowdingAttribute_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + crowdingAttribute_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The attribute value used for crowding.  The maximum number of neighbors
+       * to return per crowding attribute value
+       * (per_crowding_attribute_num_neighbors) is configured per-query. This
+       * field is ignored if per_crowding_attribute_num_neighbors is larger than
+       * the total number of neighbors to return for a given query.
+       * 
+ * + * string crowding_attribute = 1; + * + * @param value The crowdingAttribute to set. + * @return This builder for chaining. + */ + public Builder setCrowdingAttribute(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + crowdingAttribute_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The attribute value used for crowding.  The maximum number of neighbors
+       * to return per crowding attribute value
+       * (per_crowding_attribute_num_neighbors) is configured per-query. This
+       * field is ignored if per_crowding_attribute_num_neighbors is larger than
+       * the total number of neighbors to return for a given query.
+       * 
+ * + * string crowding_attribute = 1; + * + * @return This builder for chaining. + */ + public Builder clearCrowdingAttribute() { + crowdingAttribute_ = getDefaultInstance().getCrowdingAttribute(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The attribute value used for crowding.  The maximum number of neighbors
+       * to return per crowding attribute value
+       * (per_crowding_attribute_num_neighbors) is configured per-query. This
+       * field is ignored if per_crowding_attribute_num_neighbors is larger than
+       * the total number of neighbors to return for a given query.
+       * 
+ * + * string crowding_attribute = 1; + * + * @param value The bytes for crowdingAttribute to set. + * @return This builder for chaining. + */ + public Builder setCrowdingAttributeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + crowdingAttribute_ = 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.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) + private static final com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag(); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CrowdingTag parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int DATAPOINT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object datapointId_ = ""; + /** + * + * + *
+   * Required. Unique identifier of the datapoint.
+   * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datapointId. + */ + @java.lang.Override + public java.lang.String getDatapointId() { + java.lang.Object ref = datapointId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datapointId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Unique identifier of the datapoint.
+   * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datapointId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatapointIdBytes() { + java.lang.Object ref = datapointId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datapointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEATURE_VECTOR_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.FloatList featureVector_; + /** + * + * + *
+   * Required. Feature embedding vector. An array of numbers with the length of
+   * [NearestNeighborSearchConfig.dimensions].
+   * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the featureVector. + */ + @java.lang.Override + public java.util.List getFeatureVectorList() { + return featureVector_; + } + /** + * + * + *
+   * Required. Feature embedding vector. An array of numbers with the length of
+   * [NearestNeighborSearchConfig.dimensions].
+   * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of featureVector. + */ + public int getFeatureVectorCount() { + return featureVector_.size(); + } + /** + * + * + *
+   * Required. Feature embedding vector. An array of numbers with the length of
+   * [NearestNeighborSearchConfig.dimensions].
+   * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The featureVector at the given index. + */ + public float getFeatureVector(int index) { + return featureVector_.getFloat(index); + } + + private int featureVectorMemoizedSerializedSize = -1; + + public static final int RESTRICTS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List restricts_; + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses categorical tokens. See:
+   * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getRestrictsList() { + return restricts_; + } + /** + * * *
    * Optional. List of Restrict of the datapoint, used to perform "restricted
@@ -2264,6 +3926,102 @@ public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction getRestric
     return restricts_.get(index);
   }
 
+  public static final int NUMERIC_RESTRICTS_FIELD_NUMBER = 6;
+
+  @SuppressWarnings("serial")
+  private java.util.List
+      numericRestricts_;
+  /**
+   *
+   *
+   * 
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses numeric comparisons.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getNumericRestrictsList() { + return numericRestricts_; + } + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses numeric comparisons.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestrictionOrBuilder> + getNumericRestrictsOrBuilderList() { + return numericRestricts_; + } + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses numeric comparisons.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getNumericRestrictsCount() { + return numericRestricts_.size(); + } + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses numeric comparisons.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction getNumericRestricts( + int index) { + return numericRestricts_.get(index); + } + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses numeric comparisons.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestrictionOrBuilder + getNumericRestrictsOrBuilder(int index) { + return numericRestricts_.get(index); + } + public static final int CROWDING_TAG_FIELD_NUMBER = 5; private com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag crowdingTag_; /** @@ -2355,6 +4113,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (crowdingTag_ != null) { output.writeMessage(5, getCrowdingTag()); } + for (int i = 0; i < numericRestricts_.size(); i++) { + output.writeMessage(6, numericRestricts_.get(i)); + } getUnknownFields().writeTo(output); } @@ -2383,6 +4144,9 @@ public int getSerializedSize() { if (crowdingTag_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCrowdingTag()); } + for (int i = 0; i < numericRestricts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, numericRestricts_.get(i)); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2402,6 +4166,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDatapointId().equals(other.getDatapointId())) return false; if (!getFeatureVectorList().equals(other.getFeatureVectorList())) return false; if (!getRestrictsList().equals(other.getRestrictsList())) return false; + if (!getNumericRestrictsList().equals(other.getNumericRestrictsList())) return false; if (hasCrowdingTag() != other.hasCrowdingTag()) return false; if (hasCrowdingTag()) { if (!getCrowdingTag().equals(other.getCrowdingTag())) return false; @@ -2427,6 +4192,10 @@ public int hashCode() { hash = (37 * hash) + RESTRICTS_FIELD_NUMBER; hash = (53 * hash) + getRestrictsList().hashCode(); } + if (getNumericRestrictsCount() > 0) { + hash = (37 * hash) + NUMERIC_RESTRICTS_FIELD_NUMBER; + hash = (53 * hash) + getNumericRestrictsList().hashCode(); + } if (hasCrowdingTag()) { hash = (37 * hash) + CROWDING_TAG_FIELD_NUMBER; hash = (53 * hash) + getCrowdingTag().hashCode(); @@ -2521,571 +4290,1087 @@ public static Builder newBuilder(com.google.cloud.aiplatform.v1beta1.IndexDatapo return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 datapoint of Index.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.IndexDatapoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.IndexDatapoint) + com.google.cloud.aiplatform.v1beta1.IndexDatapointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.class, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.IndexDatapoint.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + datapointId_ = ""; + featureVector_ = emptyFloatList(); + if (restrictsBuilder_ == null) { + restricts_ = java.util.Collections.emptyList(); + } else { + restricts_ = null; + restrictsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (numericRestrictsBuilder_ == null) { + numericRestricts_ = java.util.Collections.emptyList(); + } else { + numericRestricts_ = null; + numericRestrictsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + crowdingTag_ = null; + if (crowdingTagBuilder_ != null) { + crowdingTagBuilder_.dispose(); + crowdingTagBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.IndexDatapoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint build() { + com.google.cloud.aiplatform.v1beta1.IndexDatapoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint buildPartial() { + com.google.cloud.aiplatform.v1beta1.IndexDatapoint result = + new com.google.cloud.aiplatform.v1beta1.IndexDatapoint(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint result) { + if (((bitField0_ & 0x00000002) != 0)) { + featureVector_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.featureVector_ = featureVector_; + if (restrictsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + restricts_ = java.util.Collections.unmodifiableList(restricts_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.restricts_ = restricts_; + } else { + result.restricts_ = restrictsBuilder_.build(); + } + if (numericRestrictsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + numericRestricts_ = java.util.Collections.unmodifiableList(numericRestricts_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.numericRestricts_ = numericRestricts_; + } else { + result.numericRestricts_ = numericRestrictsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.IndexDatapoint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.datapointId_ = datapointId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.crowdingTag_ = + crowdingTagBuilder_ == null ? crowdingTag_ : crowdingTagBuilder_.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 - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A datapoint of Index.
-   * 
- * - * Protobuf type {@code google.cloud.aiplatform.v1beta1.IndexDatapoint} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.IndexDatapoint) - com.google.cloud.aiplatform.v1beta1.IndexDatapointOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.aiplatform.v1beta1.IndexProto - .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_descriptor; + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.aiplatform.v1beta1.IndexProto - .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.class, - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Builder.class); + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.IndexDatapoint) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.IndexDatapoint) other); + } else { + super.mergeFrom(other); + return this; + } } - // Construct using com.google.cloud.aiplatform.v1beta1.IndexDatapoint.newBuilder() - private Builder() {} + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.IndexDatapoint other) { + if (other == com.google.cloud.aiplatform.v1beta1.IndexDatapoint.getDefaultInstance()) + return this; + if (!other.getDatapointId().isEmpty()) { + datapointId_ = other.datapointId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.featureVector_.isEmpty()) { + if (featureVector_.isEmpty()) { + featureVector_ = other.featureVector_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureFeatureVectorIsMutable(); + featureVector_.addAll(other.featureVector_); + } + onChanged(); + } + if (restrictsBuilder_ == null) { + if (!other.restricts_.isEmpty()) { + if (restricts_.isEmpty()) { + restricts_ = other.restricts_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRestrictsIsMutable(); + restricts_.addAll(other.restricts_); + } + onChanged(); + } + } else { + if (!other.restricts_.isEmpty()) { + if (restrictsBuilder_.isEmpty()) { + restrictsBuilder_.dispose(); + restrictsBuilder_ = null; + restricts_ = other.restricts_; + bitField0_ = (bitField0_ & ~0x00000004); + restrictsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRestrictsFieldBuilder() + : null; + } else { + restrictsBuilder_.addAllMessages(other.restricts_); + } + } + } + if (numericRestrictsBuilder_ == null) { + if (!other.numericRestricts_.isEmpty()) { + if (numericRestricts_.isEmpty()) { + numericRestricts_ = other.numericRestricts_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureNumericRestrictsIsMutable(); + numericRestricts_.addAll(other.numericRestricts_); + } + onChanged(); + } + } else { + if (!other.numericRestricts_.isEmpty()) { + if (numericRestrictsBuilder_.isEmpty()) { + numericRestrictsBuilder_.dispose(); + numericRestrictsBuilder_ = null; + numericRestricts_ = other.numericRestricts_; + bitField0_ = (bitField0_ & ~0x00000008); + numericRestrictsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNumericRestrictsFieldBuilder() + : null; + } else { + numericRestrictsBuilder_.addAllMessages(other.numericRestricts_); + } + } + } + if (other.hasCrowdingTag()) { + mergeCrowdingTag(other.getCrowdingTag()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); + @java.lang.Override + public final boolean isInitialized() { + return true; } @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - datapointId_ = ""; - featureVector_ = emptyFloatList(); - if (restrictsBuilder_ == null) { - restricts_ = java.util.Collections.emptyList(); + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + datapointId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: + { + float v = input.readFloat(); + ensureFeatureVectorIsMutable(); + featureVector_.addFloat(v); + break; + } // case 21 + case 18: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureFeatureVectorIsMutable(); + while (input.getBytesUntilLimit() > 0) { + featureVector_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } // case 18 + case 34: + { + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction m = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.parser(), + extensionRegistry); + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + restricts_.add(m); + } else { + restrictsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + input.readMessage(getCrowdingTagFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction m = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction + .parser(), + extensionRegistry); + if (numericRestrictsBuilder_ == null) { + ensureNumericRestrictsIsMutable(); + numericRestricts_.add(m); + } else { + numericRestrictsBuilder_.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.lang.Object datapointId_ = ""; + /** + * + * + *
+     * Required. Unique identifier of the datapoint.
+     * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datapointId. + */ + public java.lang.String getDatapointId() { + java.lang.Object ref = datapointId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datapointId_ = s; + return s; } else { - restricts_ = null; - restrictsBuilder_.clear(); + return (java.lang.String) ref; } - bitField0_ = (bitField0_ & ~0x00000004); - crowdingTag_ = null; - if (crowdingTagBuilder_ != null) { - crowdingTagBuilder_.dispose(); - crowdingTagBuilder_ = null; + } + /** + * + * + *
+     * Required. Unique identifier of the datapoint.
+     * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datapointId. + */ + public com.google.protobuf.ByteString getDatapointIdBytes() { + java.lang.Object ref = datapointId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datapointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - return this; } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.aiplatform.v1beta1.IndexProto - .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_descriptor; + /** + * + * + *
+     * Required. Unique identifier of the datapoint.
+     * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The datapointId to set. + * @return This builder for chaining. + */ + public Builder setDatapointId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + datapointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.IndexDatapoint getDefaultInstanceForType() { - return com.google.cloud.aiplatform.v1beta1.IndexDatapoint.getDefaultInstance(); + /** + * + * + *
+     * Required. Unique identifier of the datapoint.
+     * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDatapointId() { + datapointId_ = getDefaultInstance().getDatapointId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; } - - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.IndexDatapoint build() { - com.google.cloud.aiplatform.v1beta1.IndexDatapoint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + /** + * + * + *
+     * Required. Unique identifier of the datapoint.
+     * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for datapointId to set. + * @return This builder for chaining. + */ + public Builder setDatapointIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - return result; + checkByteStringIsUtf8(value); + datapointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.IndexDatapoint buildPartial() { - com.google.cloud.aiplatform.v1beta1.IndexDatapoint result = - new com.google.cloud.aiplatform.v1beta1.IndexDatapoint(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + private com.google.protobuf.Internal.FloatList featureVector_ = emptyFloatList(); - private void buildPartialRepeatedFields( - com.google.cloud.aiplatform.v1beta1.IndexDatapoint result) { - if (((bitField0_ & 0x00000002) != 0)) { - featureVector_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.featureVector_ = featureVector_; - if (restrictsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - restricts_ = java.util.Collections.unmodifiableList(restricts_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.restricts_ = restricts_; - } else { - result.restricts_ = restrictsBuilder_.build(); + private void ensureFeatureVectorIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + featureVector_ = mutableCopy(featureVector_); + bitField0_ |= 0x00000002; } } - - private void buildPartial0(com.google.cloud.aiplatform.v1beta1.IndexDatapoint result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.datapointId_ = datapointId_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.crowdingTag_ = - crowdingTagBuilder_ == null ? crowdingTag_ : crowdingTagBuilder_.build(); - } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the featureVector. + */ + public java.util.List getFeatureVectorList() { + return ((bitField0_ & 0x00000002) != 0) + ? java.util.Collections.unmodifiableList(featureVector_) + : featureVector_; } - - @java.lang.Override - public Builder clone() { - return super.clone(); + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of featureVector. + */ + public int getFeatureVectorCount() { + return featureVector_.size(); + } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The featureVector at the given index. + */ + public float getFeatureVector(int index) { + return featureVector_.getFloat(index); } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The featureVector to set. + * @return This builder for chaining. + */ + public Builder setFeatureVector(int index, float value) { - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + ensureFeatureVectorIsMutable(); + featureVector_.setFloat(index, value); + onChanged(); + return this; } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The featureVector to add. + * @return This builder for chaining. + */ + public Builder addFeatureVector(float value) { - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + ensureFeatureVectorIsMutable(); + featureVector_.addFloat(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The featureVector to add. + * @return This builder for chaining. + */ + public Builder addAllFeatureVector(java.lang.Iterable values) { + ensureFeatureVectorIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, featureVector_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFeatureVector() { + featureVector_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + private java.util.List + restricts_ = java.util.Collections.emptyList(); + + private void ensureRestrictsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + restricts_ = + new java.util.ArrayList( + restricts_); + bitField0_ |= 0x00000004; + } } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.RestrictionOrBuilder> + restrictsBuilder_; - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getRestrictsList() { + if (restrictsBuilder_ == null) { + return java.util.Collections.unmodifiableList(restricts_); + } else { + return restrictsBuilder_.getMessageList(); + } } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.aiplatform.v1beta1.IndexDatapoint) { - return mergeFrom((com.google.cloud.aiplatform.v1beta1.IndexDatapoint) other); + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getRestrictsCount() { + if (restrictsBuilder_ == null) { + return restricts_.size(); } else { - super.mergeFrom(other); - return this; + return restrictsBuilder_.getCount(); } } - - public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.IndexDatapoint other) { - if (other == com.google.cloud.aiplatform.v1beta1.IndexDatapoint.getDefaultInstance()) - return this; - if (!other.getDatapointId().isEmpty()) { - datapointId_ = other.datapointId_; - bitField0_ |= 0x00000001; - onChanged(); + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction getRestricts(int index) { + if (restrictsBuilder_ == null) { + return restricts_.get(index); + } else { + return restrictsBuilder_.getMessage(index); } - if (!other.featureVector_.isEmpty()) { - if (featureVector_.isEmpty()) { - featureVector_ = other.featureVector_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureFeatureVectorIsMutable(); - featureVector_.addAll(other.featureVector_); + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRestricts( + int index, com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction value) { + if (restrictsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureRestrictsIsMutable(); + restricts_.set(index, value); onChanged(); + } else { + restrictsBuilder_.setMessage(index, value); } + return this; + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRestricts( + int index, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder builderForValue) { if (restrictsBuilder_ == null) { - if (!other.restricts_.isEmpty()) { - if (restricts_.isEmpty()) { - restricts_ = other.restricts_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureRestrictsIsMutable(); - restricts_.addAll(other.restricts_); - } - onChanged(); - } + ensureRestrictsIsMutable(); + restricts_.set(index, builderForValue.build()); + onChanged(); } else { - if (!other.restricts_.isEmpty()) { - if (restrictsBuilder_.isEmpty()) { - restrictsBuilder_.dispose(); - restrictsBuilder_ = null; - restricts_ = other.restricts_; - bitField0_ = (bitField0_ & ~0x00000004); - restrictsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRestrictsFieldBuilder() - : null; - } else { - restrictsBuilder_.addAllMessages(other.restricts_); - } - } - } - if (other.hasCrowdingTag()) { - mergeCrowdingTag(other.getCrowdingTag()); + restrictsBuilder_.setMessage(index, builderForValue.build()); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); return this; } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - datapointId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 21: - { - float v = input.readFloat(); - ensureFeatureVectorIsMutable(); - featureVector_.addFloat(v); - break; - } // case 21 - case 18: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureFeatureVectorIsMutable(); - while (input.getBytesUntilLimit() > 0) { - featureVector_.addFloat(input.readFloat()); - } - input.popLimit(limit); - break; - } // case 18 - case 34: - { - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction m = - input.readMessage( - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.parser(), - extensionRegistry); - if (restrictsBuilder_ == null) { - ensureRestrictsIsMutable(); - restricts_.add(m); - } else { - restrictsBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: - { - input.readMessage(getCrowdingTagFieldBuilder().getBuilder(), extensionRegistry); - 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 { + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addRestricts( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction value) { + if (restrictsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestrictsIsMutable(); + restricts_.add(value); onChanged(); - } // finally + } else { + restrictsBuilder_.addMessage(value); + } return this; } - - private int bitField0_; - - private java.lang.Object datapointId_ = ""; /** * * *
-     * Required. Unique identifier of the datapoint.
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The datapointId. + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public java.lang.String getDatapointId() { - java.lang.Object ref = datapointId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - datapointId_ = s; - return s; + public Builder addRestricts( + int index, com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction value) { + if (restrictsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestrictsIsMutable(); + restricts_.add(index, value); + onChanged(); } else { - return (java.lang.String) ref; + restrictsBuilder_.addMessage(index, value); } + return this; } /** * * *
-     * Required. Unique identifier of the datapoint.
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for datapointId. + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.protobuf.ByteString getDatapointIdBytes() { - java.lang.Object ref = datapointId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - datapointId_ = b; - return b; + public Builder addRestricts( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder builderForValue) { + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + restricts_.add(builderForValue.build()); + onChanged(); } else { - return (com.google.protobuf.ByteString) ref; + restrictsBuilder_.addMessage(builderForValue.build()); } + return this; } /** * * *
-     * Required. Unique identifier of the datapoint.
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The datapointId to set. - * @return This builder for chaining. + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setDatapointId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder addRestricts( + int index, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder builderForValue) { + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + restricts_.add(index, builderForValue.build()); + onChanged(); + } else { + restrictsBuilder_.addMessage(index, builderForValue.build()); } - datapointId_ = value; - bitField0_ |= 0x00000001; - onChanged(); return this; } /** * * *
-     * Required. Unique identifier of the datapoint.
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearDatapointId() { - datapointId_ = getDefaultInstance().getDatapointId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); + public Builder addAllRestricts( + java.lang.Iterable + values) { + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, restricts_); + onChanged(); + } else { + restrictsBuilder_.addAllMessages(values); + } return this; } /** * * *
-     * Required. Unique identifier of the datapoint.
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for datapointId to set. - * @return This builder for chaining. + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setDatapointIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearRestricts() { + if (restrictsBuilder_ == null) { + restricts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + restrictsBuilder_.clear(); } - checkByteStringIsUtf8(value); - datapointId_ = value; - bitField0_ |= 0x00000001; - onChanged(); return this; } - - private com.google.protobuf.Internal.FloatList featureVector_ = emptyFloatList(); - - private void ensureFeatureVectorIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - featureVector_ = mutableCopy(featureVector_); - bitField0_ |= 0x00000002; - } - } /** * * *
-     * Required. Feature embedding vector. An array of numbers with the length of
-     * [NearestNeighborSearchConfig.dimensions].
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the featureVector. + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public java.util.List getFeatureVectorList() { - return ((bitField0_ & 0x00000002) != 0) - ? java.util.Collections.unmodifiableList(featureVector_) - : featureVector_; + public Builder removeRestricts(int index) { + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + restricts_.remove(index); + onChanged(); + } else { + restrictsBuilder_.remove(index); + } + return this; } /** * * *
-     * Required. Feature embedding vector. An array of numbers with the length of
-     * [NearestNeighborSearchConfig.dimensions].
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of featureVector. + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public int getFeatureVectorCount() { - return featureVector_.size(); + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder + getRestrictsBuilder(int index) { + return getRestrictsFieldBuilder().getBuilder(index); } /** * * *
-     * Required. Feature embedding vector. An array of numbers with the length of
-     * [NearestNeighborSearchConfig.dimensions].
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the element to return. - * @return The featureVector at the given index. + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public float getFeatureVector(int index) { - return featureVector_.getFloat(index); + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.RestrictionOrBuilder + getRestrictsOrBuilder(int index) { + if (restrictsBuilder_ == null) { + return restricts_.get(index); + } else { + return restrictsBuilder_.getMessageOrBuilder(index); + } } /** * * *
-     * Required. Feature embedding vector. An array of numbers with the length of
-     * [NearestNeighborSearchConfig.dimensions].
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index to set the value at. - * @param value The featureVector to set. - * @return This builder for chaining. + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setFeatureVector(int index, float value) { - - ensureFeatureVectorIsMutable(); - featureVector_.setFloat(index, value); - onChanged(); - return this; + public java.util.List< + ? extends com.google.cloud.aiplatform.v1beta1.IndexDatapoint.RestrictionOrBuilder> + getRestrictsOrBuilderList() { + if (restrictsBuilder_ != null) { + return restrictsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(restricts_); + } } /** * * *
-     * Required. Feature embedding vector. An array of numbers with the length of
-     * [NearestNeighborSearchConfig.dimensions].
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The featureVector to add. - * @return This builder for chaining. + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder addFeatureVector(float value) { - - ensureFeatureVectorIsMutable(); - featureVector_.addFloat(value); - onChanged(); - return this; + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder + addRestrictsBuilder() { + return getRestrictsFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.getDefaultInstance()); } /** * * *
-     * Required. Feature embedding vector. An array of numbers with the length of
-     * [NearestNeighborSearchConfig.dimensions].
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param values The featureVector to add. - * @return This builder for chaining. + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder addAllFeatureVector(java.lang.Iterable values) { - ensureFeatureVectorIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, featureVector_); - onChanged(); - return this; + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder + addRestrictsBuilder(int index) { + return getRestrictsFieldBuilder() + .addBuilder( + index, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.getDefaultInstance()); } /** * * *
-     * Required. Feature embedding vector. An array of numbers with the length of
-     * [NearestNeighborSearchConfig.dimensions].
+     * Optional. List of Restrict of the datapoint, used to perform "restricted
+     * searches" where boolean rule are used to filter the subset of the database
+     * eligible for matching. This uses categorical tokens. See:
+     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      * 
* - * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearFeatureVector() { - featureVector_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; + public java.util.List + getRestrictsBuilderList() { + return getRestrictsFieldBuilder().getBuilderList(); } - private java.util.List - restricts_ = java.util.Collections.emptyList(); + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.RestrictionOrBuilder> + getRestrictsFieldBuilder() { + if (restrictsBuilder_ == null) { + restrictsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.RestrictionOrBuilder>( + restricts_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + restricts_ = null; + } + return restrictsBuilder_; + } - private void ensureRestrictsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - restricts_ = - new java.util.ArrayList( - restricts_); - bitField0_ |= 0x00000004; + private java.util.List + numericRestricts_ = java.util.Collections.emptyList(); + + private void ensureNumericRestrictsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + numericRestricts_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction>( + numericRestricts_); + bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction, - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder, - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.RestrictionOrBuilder> - restrictsBuilder_; + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Builder, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestrictionOrBuilder> + numericRestrictsBuilder_; /** * @@ -3093,20 +5378,19 @@ private void ensureRestrictsIsMutable() { *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List - getRestrictsList() { - if (restrictsBuilder_ == null) { - return java.util.Collections.unmodifiableList(restricts_); + public java.util.List + getNumericRestrictsList() { + if (numericRestrictsBuilder_ == null) { + return java.util.Collections.unmodifiableList(numericRestricts_); } else { - return restrictsBuilder_.getMessageList(); + return numericRestrictsBuilder_.getMessageList(); } } /** @@ -3115,19 +5399,18 @@ private void ensureRestrictsIsMutable() { *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public int getRestrictsCount() { - if (restrictsBuilder_ == null) { - return restricts_.size(); + public int getNumericRestrictsCount() { + if (numericRestrictsBuilder_ == null) { + return numericRestricts_.size(); } else { - return restrictsBuilder_.getCount(); + return numericRestrictsBuilder_.getCount(); } } /** @@ -3136,19 +5419,19 @@ public int getRestrictsCount() { *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction getRestricts(int index) { - if (restrictsBuilder_ == null) { - return restricts_.get(index); + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction + getNumericRestricts(int index) { + if (numericRestrictsBuilder_ == null) { + return numericRestricts_.get(index); } else { - return restrictsBuilder_.getMessage(index); + return numericRestrictsBuilder_.getMessage(index); } } /** @@ -3157,25 +5440,24 @@ public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction getRestric *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setRestricts( - int index, com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction value) { - if (restrictsBuilder_ == null) { + public Builder setNumericRestricts( + int index, com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction value) { + if (numericRestrictsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureRestrictsIsMutable(); - restricts_.set(index, value); + ensureNumericRestrictsIsMutable(); + numericRestricts_.set(index, value); onChanged(); } else { - restrictsBuilder_.setMessage(index, value); + numericRestrictsBuilder_.setMessage(index, value); } return this; } @@ -3185,23 +5467,23 @@ public Builder setRestricts( *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setRestricts( + public Builder setNumericRestricts( int index, - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder builderForValue) { - if (restrictsBuilder_ == null) { - ensureRestrictsIsMutable(); - restricts_.set(index, builderForValue.build()); + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Builder + builderForValue) { + if (numericRestrictsBuilder_ == null) { + ensureNumericRestrictsIsMutable(); + numericRestricts_.set(index, builderForValue.build()); onChanged(); } else { - restrictsBuilder_.setMessage(index, builderForValue.build()); + numericRestrictsBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -3211,25 +5493,24 @@ public Builder setRestricts( *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addRestricts( - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction value) { - if (restrictsBuilder_ == null) { + public Builder addNumericRestricts( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction value) { + if (numericRestrictsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureRestrictsIsMutable(); - restricts_.add(value); + ensureNumericRestrictsIsMutable(); + numericRestricts_.add(value); onChanged(); } else { - restrictsBuilder_.addMessage(value); + numericRestrictsBuilder_.addMessage(value); } return this; } @@ -3239,25 +5520,24 @@ public Builder addRestricts( *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addRestricts( - int index, com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction value) { - if (restrictsBuilder_ == null) { + public Builder addNumericRestricts( + int index, com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction value) { + if (numericRestrictsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureRestrictsIsMutable(); - restricts_.add(index, value); + ensureNumericRestrictsIsMutable(); + numericRestricts_.add(index, value); onChanged(); } else { - restrictsBuilder_.addMessage(index, value); + numericRestrictsBuilder_.addMessage(index, value); } return this; } @@ -3267,22 +5547,22 @@ public Builder addRestricts( *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addRestricts( - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder builderForValue) { - if (restrictsBuilder_ == null) { - ensureRestrictsIsMutable(); - restricts_.add(builderForValue.build()); + public Builder addNumericRestricts( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Builder + builderForValue) { + if (numericRestrictsBuilder_ == null) { + ensureNumericRestrictsIsMutable(); + numericRestricts_.add(builderForValue.build()); onChanged(); } else { - restrictsBuilder_.addMessage(builderForValue.build()); + numericRestrictsBuilder_.addMessage(builderForValue.build()); } return this; } @@ -3292,23 +5572,23 @@ public Builder addRestricts( *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addRestricts( + public Builder addNumericRestricts( int index, - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder builderForValue) { - if (restrictsBuilder_ == null) { - ensureRestrictsIsMutable(); - restricts_.add(index, builderForValue.build()); + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Builder + builderForValue) { + if (numericRestrictsBuilder_ == null) { + ensureNumericRestrictsIsMutable(); + numericRestricts_.add(index, builderForValue.build()); onChanged(); } else { - restrictsBuilder_.addMessage(index, builderForValue.build()); + numericRestrictsBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -3318,23 +5598,23 @@ public Builder addRestricts( *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addAllRestricts( - java.lang.Iterable + public Builder addAllNumericRestricts( + java.lang.Iterable< + ? extends com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction> values) { - if (restrictsBuilder_ == null) { - ensureRestrictsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, restricts_); + if (numericRestrictsBuilder_ == null) { + ensureNumericRestrictsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, numericRestricts_); onChanged(); } else { - restrictsBuilder_.addAllMessages(values); + numericRestrictsBuilder_.addAllMessages(values); } return this; } @@ -3344,21 +5624,20 @@ public Builder addAllRestricts( *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearRestricts() { - if (restrictsBuilder_ == null) { - restricts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + public Builder clearNumericRestricts() { + if (numericRestrictsBuilder_ == null) { + numericRestricts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { - restrictsBuilder_.clear(); + numericRestrictsBuilder_.clear(); } return this; } @@ -3368,21 +5647,20 @@ public Builder clearRestricts() { *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder removeRestricts(int index) { - if (restrictsBuilder_ == null) { - ensureRestrictsIsMutable(); - restricts_.remove(index); + public Builder removeNumericRestricts(int index) { + if (numericRestrictsBuilder_ == null) { + ensureNumericRestrictsIsMutable(); + numericRestricts_.remove(index); onChanged(); } else { - restrictsBuilder_.remove(index); + numericRestrictsBuilder_.remove(index); } return this; } @@ -3392,17 +5670,16 @@ public Builder removeRestricts(int index) { *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder - getRestrictsBuilder(int index) { - return getRestrictsFieldBuilder().getBuilder(index); + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Builder + getNumericRestrictsBuilder(int index) { + return getNumericRestrictsFieldBuilder().getBuilder(index); } /** * @@ -3410,20 +5687,19 @@ public Builder removeRestricts(int index) { *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.RestrictionOrBuilder - getRestrictsOrBuilder(int index) { - if (restrictsBuilder_ == null) { - return restricts_.get(index); + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestrictionOrBuilder + getNumericRestrictsOrBuilder(int index) { + if (numericRestrictsBuilder_ == null) { + return numericRestricts_.get(index); } else { - return restrictsBuilder_.getMessageOrBuilder(index); + return numericRestrictsBuilder_.getMessageOrBuilder(index); } } /** @@ -3432,21 +5708,21 @@ public Builder removeRestricts(int index) { *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List< - ? extends com.google.cloud.aiplatform.v1beta1.IndexDatapoint.RestrictionOrBuilder> - getRestrictsOrBuilderList() { - if (restrictsBuilder_ != null) { - return restrictsBuilder_.getMessageOrBuilderList(); + ? extends + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestrictionOrBuilder> + getNumericRestrictsOrBuilderList() { + if (numericRestrictsBuilder_ != null) { + return numericRestrictsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(restricts_); + return java.util.Collections.unmodifiableList(numericRestricts_); } } /** @@ -3455,19 +5731,19 @@ public Builder removeRestricts(int index) { *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder - addRestrictsBuilder() { - return getRestrictsFieldBuilder() + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Builder + addNumericRestrictsBuilder() { + return getNumericRestrictsFieldBuilder() .addBuilder( - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.getDefaultInstance()); + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction + .getDefaultInstance()); } /** * @@ -3475,20 +5751,20 @@ public Builder removeRestricts(int index) { *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder - addRestrictsBuilder(int index) { - return getRestrictsFieldBuilder() + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Builder + addNumericRestrictsBuilder(int index) { + return getNumericRestrictsFieldBuilder() .addBuilder( index, - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.getDefaultInstance()); + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction + .getDefaultInstance()); } /** * @@ -3496,34 +5772,37 @@ public Builder removeRestricts(int index) { *
      * Optional. List of Restrict of the datapoint, used to perform "restricted
      * searches" where boolean rule are used to filter the subset of the database
-     * eligible for matching. This uses categorical tokens. See:
-     * https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * eligible for matching. This uses numeric comparisons.
      * 
* * - * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List - getRestrictsBuilderList() { - return getRestrictsFieldBuilder().getBuilderList(); + public java.util.List< + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Builder> + getNumericRestrictsBuilderList() { + return getNumericRestrictsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction, - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder, - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.RestrictionOrBuilder> - getRestrictsFieldBuilder() { - if (restrictsBuilder_ == null) { - restrictsBuilder_ = + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Builder, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestrictionOrBuilder> + getNumericRestrictsFieldBuilder() { + if (numericRestrictsBuilder_ == null) { + numericRestrictsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction, - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder, - com.google.cloud.aiplatform.v1beta1.IndexDatapoint.RestrictionOrBuilder>( - restricts_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); - restricts_ = null; + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction.Builder, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestrictionOrBuilder>( + numericRestricts_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + numericRestricts_ = null; } - return restrictsBuilder_; + return numericRestrictsBuilder_; } private com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag crowdingTag_; @@ -3547,7 +5826,7 @@ public Builder removeRestricts(int index) { * @return Whether the crowdingTag field is set. */ public boolean hasCrowdingTag() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -3594,7 +5873,7 @@ public Builder setCrowdingTag( } else { crowdingTagBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -3617,7 +5896,7 @@ public Builder setCrowdingTag( } else { crowdingTagBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -3636,7 +5915,7 @@ public Builder setCrowdingTag( public Builder mergeCrowdingTag( com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag value) { if (crowdingTagBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) + if (((bitField0_ & 0x00000010) != 0) && crowdingTag_ != null && crowdingTag_ != com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag @@ -3648,7 +5927,7 @@ public Builder mergeCrowdingTag( } else { crowdingTagBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -3665,7 +5944,7 @@ public Builder mergeCrowdingTag( *
*/ public Builder clearCrowdingTag() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); crowdingTag_ = null; if (crowdingTagBuilder_ != null) { crowdingTagBuilder_.dispose(); @@ -3688,7 +5967,7 @@ public Builder clearCrowdingTag() { */ public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.Builder getCrowdingTagBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return getCrowdingTagFieldBuilder().getBuilder(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexDatapointOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexDatapointOrBuilder.java index a3c864feff5e..d75157da909a 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexDatapointOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexDatapointOrBuilder.java @@ -167,6 +167,82 @@ public interface IndexDatapointOrBuilder com.google.cloud.aiplatform.v1beta1.IndexDatapoint.RestrictionOrBuilder getRestrictsOrBuilder( int index); + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses numeric comparisons.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getNumericRestrictsList(); + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses numeric comparisons.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction getNumericRestricts( + int index); + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses numeric comparisons.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getNumericRestrictsCount(); + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses numeric comparisons.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + ? extends com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestrictionOrBuilder> + getNumericRestrictsOrBuilderList(); + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted
+   * searches" where boolean rule are used to filter the subset of the database
+   * eligible for matching. This uses numeric comparisons.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestriction numeric_restricts = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.NumericRestrictionOrBuilder + getNumericRestrictsOrBuilder(int index); + /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexProto.java index 9f479c9a0513..7818d0d1bbfc 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexProto.java @@ -43,6 +43,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_Restriction_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_Restriction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_NumericRestriction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_NumericRestriction_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -90,24 +94,34 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "D_UNSPECIFIED\020\000\022\020\n\014BATCH_UPDATE\020\001\022\021\n\rSTR" + "EAM_UPDATE\020\002:]\352AZ\n\037aiplatform.googleapis" + ".com/Index\0227projects/{project}/locations" - + "/{location}/indexes/{index}\"\355\002\n\016IndexDat" + + "/{location}/indexes/{index}\"\215\006\n\016IndexDat" + "apoint\022\032\n\014datapoint_id\030\001 \001(\tB\004\342A\001\002\022\034\n\016fe" + "ature_vector\030\002 \003(\002B\004\342A\001\002\022T\n\trestricts\030\004 " + "\003(\0132;.google.cloud.aiplatform.v1beta1.In" - + "dexDatapoint.RestrictionB\004\342A\001\001\022W\n\014crowdi" - + "ng_tag\030\005 \001(\0132;.google.cloud.aiplatform.v" - + "1beta1.IndexDatapoint.CrowdingTagB\004\342A\001\001\032" - + "G\n\013Restriction\022\021\n\tnamespace\030\001 \001(\t\022\022\n\nall" - + "ow_list\030\002 \003(\t\022\021\n\tdeny_list\030\003 \003(\t\032)\n\013Crow" - + "dingTag\022\032\n\022crowding_attribute\030\001 \001(\t\"E\n\nI" - + "ndexStats\022\033\n\rvectors_count\030\001 \001(\003B\004\342A\001\003\022\032" - + "\n\014shards_count\030\002 \001(\005B\004\342A\001\003B\341\001\n#com.googl" - + "e.cloud.aiplatform.v1beta1B\nIndexProtoP\001" - + "ZCcloud.google.com/go/aiplatform/apiv1be" - + "ta1/aiplatformpb;aiplatformpb\252\002\037Google.C" - + "loud.AIPlatform.V1Beta1\312\002\037Google\\Cloud\\A" - + "IPlatform\\V1beta1\352\002\"Google::Cloud::AIPla" - + "tform::V1beta1b\006proto3" + + "dexDatapoint.RestrictionB\004\342A\001\001\022c\n\021numeri" + + "c_restricts\030\006 \003(\0132B.google.cloud.aiplatf" + + "orm.v1beta1.IndexDatapoint.NumericRestri" + + "ctionB\004\342A\001\001\022W\n\014crowding_tag\030\005 \001(\0132;.goog" + + "le.cloud.aiplatform.v1beta1.IndexDatapoi" + + "nt.CrowdingTagB\004\342A\001\001\032G\n\013Restriction\022\021\n\tn" + + "amespace\030\001 \001(\t\022\022\n\nallow_list\030\002 \003(\t\022\021\n\tde" + + "ny_list\030\003 \003(\t\032\270\002\n\022NumericRestriction\022\023\n\t" + + "value_int\030\002 \001(\003H\000\022\025\n\013value_float\030\003 \001(\002H\000" + + "\022\026\n\014value_double\030\004 \001(\001H\000\022\021\n\tnamespace\030\001 " + + "\001(\t\022W\n\002op\030\005 \001(\0162K.google.cloud.aiplatfor" + + "m.v1beta1.IndexDatapoint.NumericRestrict" + + "ion.Operator\"i\n\010Operator\022\030\n\024OPERATOR_UNS" + + "PECIFIED\020\000\022\010\n\004LESS\020\001\022\016\n\nLESS_EQUAL\020\002\022\t\n\005" + + "EQUAL\020\003\022\021\n\rGREATER_EQUAL\020\004\022\013\n\007GREATER\020\005B" + + "\007\n\005Value\032)\n\013CrowdingTag\022\032\n\022crowding_attr" + + "ibute\030\001 \001(\t\"E\n\nIndexStats\022\033\n\rvectors_cou" + + "nt\030\001 \001(\003B\004\342A\001\003\022\032\n\014shards_count\030\002 \001(\005B\004\342A" + + "\001\003B\341\001\n#com.google.cloud.aiplatform.v1bet" + + "a1B\nIndexProtoP\001ZCcloud.google.com/go/ai" + + "platform/apiv1beta1/aiplatformpb;aiplatf" + + "ormpb\252\002\037Google.Cloud.AIPlatform.V1Beta1\312" + + "\002\037Google\\Cloud\\AIPlatform\\V1beta1\352\002\"Goog" + + "le::Cloud::AIPlatform::V1beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -154,7 +168,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_descriptor, new java.lang.String[] { - "DatapointId", "FeatureVector", "Restricts", "CrowdingTag", + "DatapointId", "FeatureVector", "Restricts", "NumericRestricts", "CrowdingTag", }); internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_Restriction_descriptor = internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_descriptor @@ -166,10 +180,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Namespace", "AllowList", "DenyList", }); - internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_NumericRestriction_descriptor = internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_descriptor .getNestedTypes() .get(1); + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_NumericRestriction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_NumericRestriction_descriptor, + new java.lang.String[] { + "ValueInt", "ValueFloat", "ValueDouble", "Namespace", "Op", "Value", + }); + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_descriptor + .getNestedTypes() + .get(2); internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_descriptor, diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListFeaturesRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListFeaturesRequest.java index e5d02f920f11..5db7b898bb64 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListFeaturesRequest.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListFeaturesRequest.java @@ -77,8 +77,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The resource name of the Location to list Features.
-   * Format:
+   * Format for entity_type as parent:
    * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
    * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
    * 
* @@ -105,8 +106,9 @@ public java.lang.String getParent() { * *
    * Required. The resource name of the Location to list Features.
-   * Format:
+   * Format for entity_type as parent:
    * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
    * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
    * 
* @@ -249,10 +251,14 @@ public int getPageSize() { *
    * A page token, received from a previous
    * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures]
+   * call or
+   * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]
    * call. Provide this to retrieve the subsequent page.
    *
    * When paginating, all other parameters provided to
    * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures]
+   * or or
+   * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]
    * must match the call that provided the page token.
    * 
* @@ -278,10 +284,14 @@ public java.lang.String getPageToken() { *
    * A page token, received from a previous
    * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures]
+   * call or
+   * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]
    * call. Provide this to retrieve the subsequent page.
    *
    * When paginating, all other parameters provided to
    * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures]
+   * or or
+   * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]
    * must match the call that provided the page token.
    * 
* @@ -419,6 +429,7 @@ public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { * * *
+   * Only applicable for Vertex AI Feature Store (Legacy).
    * If set, return the most recent
    * [ListFeaturesRequest.latest_stats_count][google.cloud.aiplatform.v1beta1.ListFeaturesRequest.latest_stats_count]
    * of stats for each Feature in response. Valid value is [0, 10]. If number of
@@ -935,8 +946,9 @@ public Builder mergeFrom(
      *
      * 
      * Required. The resource name of the Location to list Features.
-     * Format:
+     * Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
      * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* @@ -962,8 +974,9 @@ public java.lang.String getParent() { * *
      * Required. The resource name of the Location to list Features.
-     * Format:
+     * Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
      * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* @@ -989,8 +1002,9 @@ public com.google.protobuf.ByteString getParentBytes() { * *
      * Required. The resource name of the Location to list Features.
-     * Format:
+     * Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
      * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* @@ -1015,8 +1029,9 @@ public Builder setParent(java.lang.String value) { * *
      * Required. The resource name of the Location to list Features.
-     * Format:
+     * Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
      * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* @@ -1037,8 +1052,9 @@ public Builder clearParent() { * *
      * Required. The resource name of the Location to list Features.
-     * Format:
+     * Format for entity_type as parent:
      * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+     * Format for feature_group as parent:
      * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
      * 
* @@ -1330,10 +1346,14 @@ public Builder clearPageSize() { *
      * A page token, received from a previous
      * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures]
+     * call or
+     * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]
      * call. Provide this to retrieve the subsequent page.
      *
      * When paginating, all other parameters provided to
      * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures]
+     * or or
+     * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]
      * must match the call that provided the page token.
      * 
* @@ -1358,10 +1378,14 @@ public java.lang.String getPageToken() { *
      * A page token, received from a previous
      * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures]
+     * call or
+     * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]
      * call. Provide this to retrieve the subsequent page.
      *
      * When paginating, all other parameters provided to
      * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures]
+     * or or
+     * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]
      * must match the call that provided the page token.
      * 
* @@ -1386,10 +1410,14 @@ public com.google.protobuf.ByteString getPageTokenBytes() { *
      * A page token, received from a previous
      * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures]
+     * call or
+     * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]
      * call. Provide this to retrieve the subsequent page.
      *
      * When paginating, all other parameters provided to
      * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures]
+     * or or
+     * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]
      * must match the call that provided the page token.
      * 
* @@ -1413,10 +1441,14 @@ public Builder setPageToken(java.lang.String value) { *
      * A page token, received from a previous
      * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures]
+     * call or
+     * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]
      * call. Provide this to retrieve the subsequent page.
      *
      * When paginating, all other parameters provided to
      * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures]
+     * or or
+     * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]
      * must match the call that provided the page token.
      * 
* @@ -1436,10 +1468,14 @@ public Builder clearPageToken() { *
      * A page token, received from a previous
      * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures]
+     * call or
+     * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]
      * call. Provide this to retrieve the subsequent page.
      *
      * When paginating, all other parameters provided to
      * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures]
+     * or or
+     * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]
      * must match the call that provided the page token.
      * 
* @@ -1784,6 +1820,7 @@ public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { * * *
+     * Only applicable for Vertex AI Feature Store (Legacy).
      * If set, return the most recent
      * [ListFeaturesRequest.latest_stats_count][google.cloud.aiplatform.v1beta1.ListFeaturesRequest.latest_stats_count]
      * of stats for each Feature in response. Valid value is [0, 10]. If number of
@@ -1804,6 +1841,7 @@ public int getLatestStatsCount() {
      *
      *
      * 
+     * Only applicable for Vertex AI Feature Store (Legacy).
      * If set, return the most recent
      * [ListFeaturesRequest.latest_stats_count][google.cloud.aiplatform.v1beta1.ListFeaturesRequest.latest_stats_count]
      * of stats for each Feature in response. Valid value is [0, 10]. If number of
@@ -1828,6 +1866,7 @@ public Builder setLatestStatsCount(int value) {
      *
      *
      * 
+     * Only applicable for Vertex AI Feature Store (Legacy).
      * If set, return the most recent
      * [ListFeaturesRequest.latest_stats_count][google.cloud.aiplatform.v1beta1.ListFeaturesRequest.latest_stats_count]
      * of stats for each Feature in response. Valid value is [0, 10]. If number of
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListFeaturesRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListFeaturesRequestOrBuilder.java
index 94be04b3377b..3d70904ef5da 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListFeaturesRequestOrBuilder.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListFeaturesRequestOrBuilder.java
@@ -28,8 +28,9 @@ public interface ListFeaturesRequestOrBuilder
    *
    * 
    * Required. The resource name of the Location to list Features.
-   * Format:
+   * Format for entity_type as parent:
    * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
    * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
    * 
* @@ -45,8 +46,9 @@ public interface ListFeaturesRequestOrBuilder * *
    * Required. The resource name of the Location to list Features.
-   * Format:
+   * Format for entity_type as parent:
    * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+   * Format for feature_group as parent:
    * `projects/{project}/locations/{location}/featureGroups/{feature_group}`
    * 
* @@ -143,10 +145,14 @@ public interface ListFeaturesRequestOrBuilder *
    * A page token, received from a previous
    * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures]
+   * call or
+   * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]
    * call. Provide this to retrieve the subsequent page.
    *
    * When paginating, all other parameters provided to
    * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures]
+   * or or
+   * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]
    * must match the call that provided the page token.
    * 
* @@ -161,10 +167,14 @@ public interface ListFeaturesRequestOrBuilder *
    * A page token, received from a previous
    * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures]
+   * call or
+   * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]
    * call. Provide this to retrieve the subsequent page.
    *
    * When paginating, all other parameters provided to
    * [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures]
+   * or or
+   * [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]
    * must match the call that provided the page token.
    * 
* @@ -252,6 +262,7 @@ public interface ListFeaturesRequestOrBuilder * * *
+   * Only applicable for Vertex AI Feature Store (Legacy).
    * If set, return the most recent
    * [ListFeaturesRequest.latest_stats_count][google.cloud.aiplatform.v1beta1.ListFeaturesRequest.latest_stats_count]
    * of stats for each Feature in response. Valid value is [0, 10]. If number of
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/LlmUtilityServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/LlmUtilityServiceProto.java
new file mode 100644
index 000000000000..8eab332a5bc3
--- /dev/null
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/LlmUtilityServiceProto.java
@@ -0,0 +1,134 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: google/cloud/aiplatform/v1beta1/llm_utility_service.proto
+
+package com.google.cloud.aiplatform.v1beta1;
+
+public final class LlmUtilityServiceProto {
+  private LlmUtilityServiceProto() {}
+
+  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_aiplatform_v1beta1_ComputeTokensRequest_descriptor;
+  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_google_cloud_aiplatform_v1beta1_ComputeTokensRequest_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_cloud_aiplatform_v1beta1_TokensInfo_descriptor;
+  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_google_cloud_aiplatform_v1beta1_TokensInfo_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_cloud_aiplatform_v1beta1_ComputeTokensResponse_descriptor;
+  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_google_cloud_aiplatform_v1beta1_ComputeTokensResponse_fieldAccessorTable;
+
+  public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+    return descriptor;
+  }
+
+  private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
+
+  static {
+    java.lang.String[] descriptorData = {
+      "\n9google/cloud/aiplatform/v1beta1/llm_ut"
+          + "ility_service.proto\022\037google.cloud.aiplat"
+          + "form.v1beta1\032\034google/api/annotations.pro"
+          + "to\032\027google/api/client.proto\032\037google/api/"
+          + "field_behavior.proto\032\031google/api/resourc"
+          + "e.proto\032\034google/protobuf/struct.proto\"\206\001"
+          + "\n\024ComputeTokensRequest\022=\n\010endpoint\030\001 \001(\t"
+          + "B+\342A\001\002\372A$\n\"aiplatform.googleapis.com/End"
+          + "point\022/\n\tinstances\030\002 \003(\0132\026.google.protob"
+          + "uf.ValueB\004\342A\001\002\"/\n\nTokensInfo\022\016\n\006tokens\030\001"
+          + " \003(\014\022\021\n\ttoken_ids\030\002 \003(\003\"Y\n\025ComputeTokens"
+          + "Response\022@\n\013tokens_info\030\001 \003(\0132+.google.c"
+          + "loud.aiplatform.v1beta1.TokensInfo2\240\003\n\021L"
+          + "lmUtilityService\022\273\002\n\rComputeTokens\0225.goo"
+          + "gle.cloud.aiplatform.v1beta1.ComputeToke"
+          + "nsRequest\0326.google.cloud.aiplatform.v1be"
+          + "ta1.ComputeTokensResponse\"\272\001\332A\022endpoint,"
+          + "instances\202\323\344\223\002\236\001\"D/v1beta1/{endpoint=pro"
+          + "jects/*/locations/*/endpoints/*}:compute"
+          + "Tokens:\001*ZS\"N/v1beta1/{endpoint=projects"
+          + "/*/locations/*/publishers/*/models/*}:co"
+          + "mputeTokens:\001*\032M\312A\031aiplatform.googleapis"
+          + ".com\322A.https://www.googleapis.com/auth/c"
+          + "loud-platformB\355\001\n#com.google.cloud.aipla"
+          + "tform.v1beta1B\026LlmUtilityServiceProtoP\001Z"
+          + "Ccloud.google.com/go/aiplatform/apiv1bet"
+          + "a1/aiplatformpb;aiplatformpb\252\002\037Google.Cl"
+          + "oud.AIPlatform.V1Beta1\312\002\037Google\\Cloud\\AI"
+          + "Platform\\V1beta1\352\002\"Google::Cloud::AIPlat"
+          + "form::V1beta1b\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.protobuf.StructProto.getDescriptor(),
+            });
+    internal_static_google_cloud_aiplatform_v1beta1_ComputeTokensRequest_descriptor =
+        getDescriptor().getMessageTypes().get(0);
+    internal_static_google_cloud_aiplatform_v1beta1_ComputeTokensRequest_fieldAccessorTable =
+        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+            internal_static_google_cloud_aiplatform_v1beta1_ComputeTokensRequest_descriptor,
+            new java.lang.String[] {
+              "Endpoint", "Instances",
+            });
+    internal_static_google_cloud_aiplatform_v1beta1_TokensInfo_descriptor =
+        getDescriptor().getMessageTypes().get(1);
+    internal_static_google_cloud_aiplatform_v1beta1_TokensInfo_fieldAccessorTable =
+        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+            internal_static_google_cloud_aiplatform_v1beta1_TokensInfo_descriptor,
+            new java.lang.String[] {
+              "Tokens", "TokenIds",
+            });
+    internal_static_google_cloud_aiplatform_v1beta1_ComputeTokensResponse_descriptor =
+        getDescriptor().getMessageTypes().get(2);
+    internal_static_google_cloud_aiplatform_v1beta1_ComputeTokensResponse_fieldAccessorTable =
+        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+            internal_static_google_cloud_aiplatform_v1beta1_ComputeTokensResponse_descriptor,
+            new java.lang.String[] {
+              "TokensInfo",
+            });
+    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);
+    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.protobuf.StructProto.getDescriptor();
+  }
+
+  // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MachineResourcesProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MachineResourcesProto.java
index 114a44d10f40..ea415cdcc893 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MachineResourcesProto.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MachineResourcesProto.java
@@ -76,38 +76,39 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "e_resources.proto\022\037google.cloud.aiplatfo"
           + "rm.v1beta1\032\037google/api/field_behavior.pr"
           + "oto\0326google/cloud/aiplatform/v1beta1/acc"
-          + "elerator_type.proto\"\226\001\n\013MachineSpec\022\032\n\014m"
+          + "elerator_type.proto\"\262\001\n\013MachineSpec\022\032\n\014m"
           + "achine_type\030\001 \001(\tB\004\342A\001\005\022P\n\020accelerator_t"
           + "ype\030\002 \001(\01620.google.cloud.aiplatform.v1be"
           + "ta1.AcceleratorTypeB\004\342A\001\005\022\031\n\021accelerator"
-          + "_count\030\003 \001(\005\"\202\002\n\022DedicatedResources\022I\n\014m"
-          + "achine_spec\030\001 \001(\0132,.google.cloud.aiplatf"
-          + "orm.v1beta1.MachineSpecB\005\342A\002\002\005\022 \n\021min_re"
-          + "plica_count\030\002 \001(\005B\005\342A\002\002\005\022\037\n\021max_replica_"
-          + "count\030\003 \001(\005B\004\342A\001\005\022^\n\030autoscaling_metric_"
-          + "specs\030\004 \003(\01326.google.cloud.aiplatform.v1"
-          + "beta1.AutoscalingMetricSpecB\004\342A\001\005\"V\n\022Aut"
-          + "omaticResources\022\037\n\021min_replica_count\030\001 \001"
-          + "(\005B\004\342A\001\005\022\037\n\021max_replica_count\030\002 \001(\005B\004\342A\001"
-          + "\005\"\253\001\n\027BatchDedicatedResources\022I\n\014machine"
-          + "_spec\030\001 \001(\0132,.google.cloud.aiplatform.v1"
-          + "beta1.MachineSpecB\005\342A\002\002\005\022$\n\026starting_rep"
-          + "lica_count\030\002 \001(\005B\004\342A\001\005\022\037\n\021max_replica_co"
-          + "unt\030\003 \001(\005B\004\342A\001\005\"0\n\021ResourcesConsumed\022\033\n\r"
-          + "replica_hours\030\001 \001(\001B\004\342A\001\003\"=\n\010DiskSpec\022\026\n"
-          + "\016boot_disk_type\030\001 \001(\t\022\031\n\021boot_disk_size_"
-          + "gb\030\002 \001(\005\"=\n\022PersistentDiskSpec\022\021\n\tdisk_t"
-          + "ype\030\001 \001(\t\022\024\n\014disk_size_gb\030\002 \001(\003\"O\n\010NfsMo"
-          + "unt\022\024\n\006server\030\001 \001(\tB\004\342A\001\002\022\022\n\004path\030\002 \001(\tB"
-          + "\004\342A\001\002\022\031\n\013mount_point\030\003 \001(\tB\004\342A\001\002\"B\n\025Auto"
-          + "scalingMetricSpec\022\031\n\013metric_name\030\001 \001(\tB\004"
-          + "\342A\001\002\022\016\n\006target\030\002 \001(\005B\354\001\n#com.google.clou"
-          + "d.aiplatform.v1beta1B\025MachineResourcesPr"
-          + "otoP\001ZCcloud.google.com/go/aiplatform/ap"
-          + "iv1beta1/aiplatformpb;aiplatformpb\252\002\037Goo"
-          + "gle.Cloud.AIPlatform.V1Beta1\312\002\037Google\\Cl"
-          + "oud\\AIPlatform\\V1beta1\352\002\"Google::Cloud::"
-          + "AIPlatform::V1beta1b\006proto3"
+          + "_count\030\003 \001(\005\022\032\n\014tpu_topology\030\004 \001(\tB\004\342A\001\005"
+          + "\"\202\002\n\022DedicatedResources\022I\n\014machine_spec\030"
+          + "\001 \001(\0132,.google.cloud.aiplatform.v1beta1."
+          + "MachineSpecB\005\342A\002\002\005\022 \n\021min_replica_count\030"
+          + "\002 \001(\005B\005\342A\002\002\005\022\037\n\021max_replica_count\030\003 \001(\005B"
+          + "\004\342A\001\005\022^\n\030autoscaling_metric_specs\030\004 \003(\0132"
+          + "6.google.cloud.aiplatform.v1beta1.Autosc"
+          + "alingMetricSpecB\004\342A\001\005\"V\n\022AutomaticResour"
+          + "ces\022\037\n\021min_replica_count\030\001 \001(\005B\004\342A\001\005\022\037\n\021"
+          + "max_replica_count\030\002 \001(\005B\004\342A\001\005\"\253\001\n\027BatchD"
+          + "edicatedResources\022I\n\014machine_spec\030\001 \001(\0132"
+          + ",.google.cloud.aiplatform.v1beta1.Machin"
+          + "eSpecB\005\342A\002\002\005\022$\n\026starting_replica_count\030\002"
+          + " \001(\005B\004\342A\001\005\022\037\n\021max_replica_count\030\003 \001(\005B\004\342"
+          + "A\001\005\"0\n\021ResourcesConsumed\022\033\n\rreplica_hour"
+          + "s\030\001 \001(\001B\004\342A\001\003\"=\n\010DiskSpec\022\026\n\016boot_disk_t"
+          + "ype\030\001 \001(\t\022\031\n\021boot_disk_size_gb\030\002 \001(\005\"=\n\022"
+          + "PersistentDiskSpec\022\021\n\tdisk_type\030\001 \001(\t\022\024\n"
+          + "\014disk_size_gb\030\002 \001(\003\"O\n\010NfsMount\022\024\n\006serve"
+          + "r\030\001 \001(\tB\004\342A\001\002\022\022\n\004path\030\002 \001(\tB\004\342A\001\002\022\031\n\013mou"
+          + "nt_point\030\003 \001(\tB\004\342A\001\002\"B\n\025AutoscalingMetri"
+          + "cSpec\022\031\n\013metric_name\030\001 \001(\tB\004\342A\001\002\022\016\n\006targ"
+          + "et\030\002 \001(\005B\354\001\n#com.google.cloud.aiplatform"
+          + ".v1beta1B\025MachineResourcesProtoP\001ZCcloud"
+          + ".google.com/go/aiplatform/apiv1beta1/aip"
+          + "latformpb;aiplatformpb\252\002\037Google.Cloud.AI"
+          + "Platform.V1Beta1\312\002\037Google\\Cloud\\AIPlatfo"
+          + "rm\\V1beta1\352\002\"Google::Cloud::AIPlatform::"
+          + "V1beta1b\006proto3"
     };
     descriptor =
         com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -122,7 +123,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_cloud_aiplatform_v1beta1_MachineSpec_descriptor,
             new java.lang.String[] {
-              "MachineType", "AcceleratorType", "AcceleratorCount",
+              "MachineType", "AcceleratorType", "AcceleratorCount", "TpuTopology",
             });
     internal_static_google_cloud_aiplatform_v1beta1_DedicatedResources_descriptor =
         getDescriptor().getMessageTypes().get(1);
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MachineSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MachineSpec.java
index 98ad29585816..7a63aa0861c2 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MachineSpec.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MachineSpec.java
@@ -40,6 +40,7 @@ private MachineSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) {
   private MachineSpec() {
     machineType_ = "";
     acceleratorType_ = 0;
+    tpuTopology_ = "";
   }
 
   @java.lang.Override
@@ -201,6 +202,59 @@ public int getAcceleratorCount() {
     return acceleratorCount_;
   }
 
+  public static final int TPU_TOPOLOGY_FIELD_NUMBER = 4;
+
+  @SuppressWarnings("serial")
+  private volatile java.lang.Object tpuTopology_ = "";
+  /**
+   *
+   *
+   * 
+   * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
+   * available from GKE. (Example: tpu_topology: "2x2x1").
+   * 
+ * + * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The tpuTopology. + */ + @java.lang.Override + public java.lang.String getTpuTopology() { + java.lang.Object ref = tpuTopology_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tpuTopology_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
+   * available from GKE. (Example: tpu_topology: "2x2x1").
+   * 
+ * + * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for tpuTopology. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTpuTopologyBytes() { + java.lang.Object ref = tpuTopology_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tpuTopology_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -226,6 +280,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (acceleratorCount_ != 0) { output.writeInt32(3, acceleratorCount_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tpuTopology_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, tpuTopology_); + } getUnknownFields().writeTo(output); } @@ -246,6 +303,9 @@ public int getSerializedSize() { if (acceleratorCount_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, acceleratorCount_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tpuTopology_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, tpuTopology_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -265,6 +325,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMachineType().equals(other.getMachineType())) return false; if (acceleratorType_ != other.acceleratorType_) return false; if (getAcceleratorCount() != other.getAcceleratorCount()) return false; + if (!getTpuTopology().equals(other.getTpuTopology())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -282,6 +343,8 @@ public int hashCode() { hash = (53 * hash) + acceleratorType_; hash = (37 * hash) + ACCELERATOR_COUNT_FIELD_NUMBER; hash = (53 * hash) + getAcceleratorCount(); + hash = (37 * hash) + TPU_TOPOLOGY_FIELD_NUMBER; + hash = (53 * hash) + getTpuTopology().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -424,6 +487,7 @@ public Builder clear() { machineType_ = ""; acceleratorType_ = 0; acceleratorCount_ = 0; + tpuTopology_ = ""; return this; } @@ -469,6 +533,9 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.MachineSpec resul if (((from_bitField0_ & 0x00000004) != 0)) { result.acceleratorCount_ = acceleratorCount_; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.tpuTopology_ = tpuTopology_; + } } @java.lang.Override @@ -528,6 +595,11 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.MachineSpec other) if (other.getAcceleratorCount() != 0) { setAcceleratorCount(other.getAcceleratorCount()); } + if (!other.getTpuTopology().isEmpty()) { + tpuTopology_ = other.tpuTopology_; + bitField0_ |= 0x00000008; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -572,6 +644,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 24 + case 34: + { + tpuTopology_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -922,6 +1000,117 @@ public Builder clearAcceleratorCount() { return this; } + private java.lang.Object tpuTopology_ = ""; + /** + * + * + *
+     * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
+     * available from GKE. (Example: tpu_topology: "2x2x1").
+     * 
+ * + * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The tpuTopology. + */ + public java.lang.String getTpuTopology() { + java.lang.Object ref = tpuTopology_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tpuTopology_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
+     * available from GKE. (Example: tpu_topology: "2x2x1").
+     * 
+ * + * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for tpuTopology. + */ + public com.google.protobuf.ByteString getTpuTopologyBytes() { + java.lang.Object ref = tpuTopology_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tpuTopology_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
+     * available from GKE. (Example: tpu_topology: "2x2x1").
+     * 
+ * + * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The tpuTopology to set. + * @return This builder for chaining. + */ + public Builder setTpuTopology(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tpuTopology_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
+     * available from GKE. (Example: tpu_topology: "2x2x1").
+     * 
+ * + * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearTpuTopology() { + tpuTopology_ = getDefaultInstance().getTpuTopology(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
+     * available from GKE. (Example: tpu_topology: "2x2x1").
+     * 
+ * + * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for tpuTopology to set. + * @return This builder for chaining. + */ + public Builder setTpuTopologyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tpuTopology_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MachineSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MachineSpecOrBuilder.java index 407441b80234..9ccb31c16b05 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MachineSpecOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MachineSpecOrBuilder.java @@ -117,4 +117,31 @@ public interface MachineSpecOrBuilder * @return The acceleratorCount. */ int getAcceleratorCount(); + + /** + * + * + *
+   * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
+   * available from GKE. (Example: tpu_topology: "2x2x1").
+   * 
+ * + * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The tpuTopology. + */ + java.lang.String getTpuTopology(); + /** + * + * + *
+   * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
+   * available from GKE. (Example: tpu_topology: "2x2x1").
+   * 
+ * + * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for tpuTopology. + */ + com.google.protobuf.ByteString getTpuTopologyBytes(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelContainerSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelContainerSpec.java index 30653d37788b..a839cf1dbe67 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelContainerSpec.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelContainerSpec.java @@ -1206,6 +1206,196 @@ public com.google.protobuf.ByteString getHealthRouteBytes() { } } + public static final int DEPLOYMENT_TIMEOUT_FIELD_NUMBER = 10; + private com.google.protobuf.Duration deploymentTimeout_; + /** + * + * + *
+   * Immutable. Deployment timeout.
+   * Limit for deployment timeout is 2 hours.
+   * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the deploymentTimeout field is set. + */ + @java.lang.Override + public boolean hasDeploymentTimeout() { + return deploymentTimeout_ != null; + } + /** + * + * + *
+   * Immutable. Deployment timeout.
+   * Limit for deployment timeout is 2 hours.
+   * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The deploymentTimeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getDeploymentTimeout() { + return deploymentTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : deploymentTimeout_; + } + /** + * + * + *
+   * Immutable. Deployment timeout.
+   * Limit for deployment timeout is 2 hours.
+   * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getDeploymentTimeoutOrBuilder() { + return deploymentTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : deploymentTimeout_; + } + + public static final int SHARED_MEMORY_SIZE_MB_FIELD_NUMBER = 11; + private long sharedMemorySizeMb_ = 0L; + /** + * + * + *
+   * Immutable. The amount of the VM memory to reserve as the shared memory for
+   * the model in megabytes.
+   * 
+ * + * int64 shared_memory_size_mb = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The sharedMemorySizeMb. + */ + @java.lang.Override + public long getSharedMemorySizeMb() { + return sharedMemorySizeMb_; + } + + public static final int STARTUP_PROBE_FIELD_NUMBER = 12; + private com.google.cloud.aiplatform.v1beta1.Probe startupProbe_; + /** + * + * + *
+   * Immutable. Specification for Kubernetes startup probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the startupProbe field is set. + */ + @java.lang.Override + public boolean hasStartupProbe() { + return startupProbe_ != null; + } + /** + * + * + *
+   * Immutable. Specification for Kubernetes startup probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The startupProbe. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Probe getStartupProbe() { + return startupProbe_ == null + ? com.google.cloud.aiplatform.v1beta1.Probe.getDefaultInstance() + : startupProbe_; + } + /** + * + * + *
+   * Immutable. Specification for Kubernetes startup probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ProbeOrBuilder getStartupProbeOrBuilder() { + return startupProbe_ == null + ? com.google.cloud.aiplatform.v1beta1.Probe.getDefaultInstance() + : startupProbe_; + } + + public static final int HEALTH_PROBE_FIELD_NUMBER = 13; + private com.google.cloud.aiplatform.v1beta1.Probe healthProbe_; + /** + * + * + *
+   * Immutable. Specification for Kubernetes readiness probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the healthProbe field is set. + */ + @java.lang.Override + public boolean hasHealthProbe() { + return healthProbe_ != null; + } + /** + * + * + *
+   * Immutable. Specification for Kubernetes readiness probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The healthProbe. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Probe getHealthProbe() { + return healthProbe_ == null + ? com.google.cloud.aiplatform.v1beta1.Probe.getDefaultInstance() + : healthProbe_; + } + /** + * + * + *
+   * Immutable. Specification for Kubernetes readiness probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ProbeOrBuilder getHealthProbeOrBuilder() { + return healthProbe_ == null + ? com.google.cloud.aiplatform.v1beta1.Probe.getDefaultInstance() + : healthProbe_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1241,6 +1431,18 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthRoute_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, healthRoute_); } + if (deploymentTimeout_ != null) { + output.writeMessage(10, getDeploymentTimeout()); + } + if (sharedMemorySizeMb_ != 0L) { + output.writeInt64(11, sharedMemorySizeMb_); + } + if (startupProbe_ != null) { + output.writeMessage(12, getStartupProbe()); + } + if (healthProbe_ != null) { + output.writeMessage(13, getHealthProbe()); + } getUnknownFields().writeTo(output); } @@ -1281,6 +1483,18 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthRoute_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, healthRoute_); } + if (deploymentTimeout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getDeploymentTimeout()); + } + if (sharedMemorySizeMb_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(11, sharedMemorySizeMb_); + } + if (startupProbe_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getStartupProbe()); + } + if (healthProbe_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getHealthProbe()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1304,6 +1518,19 @@ public boolean equals(final java.lang.Object obj) { if (!getPortsList().equals(other.getPortsList())) return false; if (!getPredictRoute().equals(other.getPredictRoute())) return false; if (!getHealthRoute().equals(other.getHealthRoute())) return false; + if (hasDeploymentTimeout() != other.hasDeploymentTimeout()) return false; + if (hasDeploymentTimeout()) { + if (!getDeploymentTimeout().equals(other.getDeploymentTimeout())) return false; + } + if (getSharedMemorySizeMb() != other.getSharedMemorySizeMb()) return false; + if (hasStartupProbe() != other.hasStartupProbe()) return false; + if (hasStartupProbe()) { + if (!getStartupProbe().equals(other.getStartupProbe())) return false; + } + if (hasHealthProbe() != other.hasHealthProbe()) return false; + if (hasHealthProbe()) { + if (!getHealthProbe().equals(other.getHealthProbe())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1337,6 +1564,20 @@ public int hashCode() { hash = (53 * hash) + getPredictRoute().hashCode(); hash = (37 * hash) + HEALTH_ROUTE_FIELD_NUMBER; hash = (53 * hash) + getHealthRoute().hashCode(); + if (hasDeploymentTimeout()) { + hash = (37 * hash) + DEPLOYMENT_TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getDeploymentTimeout().hashCode(); + } + hash = (37 * hash) + SHARED_MEMORY_SIZE_MB_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSharedMemorySizeMb()); + if (hasStartupProbe()) { + hash = (37 * hash) + STARTUP_PROBE_FIELD_NUMBER; + hash = (53 * hash) + getStartupProbe().hashCode(); + } + if (hasHealthProbe()) { + hash = (37 * hash) + HEALTH_PROBE_FIELD_NUMBER; + hash = (53 * hash) + getHealthProbe().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1498,6 +1739,22 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000010); predictRoute_ = ""; healthRoute_ = ""; + deploymentTimeout_ = null; + if (deploymentTimeoutBuilder_ != null) { + deploymentTimeoutBuilder_.dispose(); + deploymentTimeoutBuilder_ = null; + } + sharedMemorySizeMb_ = 0L; + startupProbe_ = null; + if (startupProbeBuilder_ != null) { + startupProbeBuilder_.dispose(); + startupProbeBuilder_ = null; + } + healthProbe_ = null; + if (healthProbeBuilder_ != null) { + healthProbeBuilder_.dispose(); + healthProbeBuilder_ = null; + } return this; } @@ -1574,6 +1831,23 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ModelContainerSpe if (((from_bitField0_ & 0x00000040) != 0)) { result.healthRoute_ = healthRoute_; } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.deploymentTimeout_ = + deploymentTimeoutBuilder_ == null + ? deploymentTimeout_ + : deploymentTimeoutBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.sharedMemorySizeMb_ = sharedMemorySizeMb_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.startupProbe_ = + startupProbeBuilder_ == null ? startupProbe_ : startupProbeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.healthProbe_ = + healthProbeBuilder_ == null ? healthProbe_ : healthProbeBuilder_.build(); + } } @java.lang.Override @@ -1711,6 +1985,18 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ModelContainerSpec bitField0_ |= 0x00000040; onChanged(); } + if (other.hasDeploymentTimeout()) { + mergeDeploymentTimeout(other.getDeploymentTimeout()); + } + if (other.getSharedMemorySizeMb() != 0L) { + setSharedMemorySizeMb(other.getSharedMemorySizeMb()); + } + if (other.hasStartupProbe()) { + mergeStartupProbe(other.getStartupProbe()); + } + if (other.hasHealthProbe()) { + mergeHealthProbe(other.getHealthProbe()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1795,6 +2081,31 @@ public Builder mergeFrom( bitField0_ |= 0x00000040; break; } // case 58 + case 82: + { + input.readMessage( + getDeploymentTimeoutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 82 + case 88: + { + sharedMemorySizeMb_ = input.readInt64(); + bitField0_ |= 0x00000100; + break; + } // case 88 + case 98: + { + input.readMessage(getStartupProbeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 98 + case 106: + { + input.readMessage(getHealthProbeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 106 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -5176,6 +5487,676 @@ public Builder setHealthRouteBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.Duration deploymentTimeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + deploymentTimeoutBuilder_; + /** + * + * + *
+     * Immutable. Deployment timeout.
+     * Limit for deployment timeout is 2 hours.
+     * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the deploymentTimeout field is set. + */ + public boolean hasDeploymentTimeout() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Immutable. Deployment timeout.
+     * Limit for deployment timeout is 2 hours.
+     * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The deploymentTimeout. + */ + public com.google.protobuf.Duration getDeploymentTimeout() { + if (deploymentTimeoutBuilder_ == null) { + return deploymentTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : deploymentTimeout_; + } else { + return deploymentTimeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Immutable. Deployment timeout.
+     * Limit for deployment timeout is 2 hours.
+     * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setDeploymentTimeout(com.google.protobuf.Duration value) { + if (deploymentTimeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deploymentTimeout_ = value; + } else { + deploymentTimeoutBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Deployment timeout.
+     * Limit for deployment timeout is 2 hours.
+     * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setDeploymentTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (deploymentTimeoutBuilder_ == null) { + deploymentTimeout_ = builderForValue.build(); + } else { + deploymentTimeoutBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Deployment timeout.
+     * Limit for deployment timeout is 2 hours.
+     * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeDeploymentTimeout(com.google.protobuf.Duration value) { + if (deploymentTimeoutBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && deploymentTimeout_ != null + && deploymentTimeout_ != com.google.protobuf.Duration.getDefaultInstance()) { + getDeploymentTimeoutBuilder().mergeFrom(value); + } else { + deploymentTimeout_ = value; + } + } else { + deploymentTimeoutBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Deployment timeout.
+     * Limit for deployment timeout is 2 hours.
+     * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearDeploymentTimeout() { + bitField0_ = (bitField0_ & ~0x00000080); + deploymentTimeout_ = null; + if (deploymentTimeoutBuilder_ != null) { + deploymentTimeoutBuilder_.dispose(); + deploymentTimeoutBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Deployment timeout.
+     * Limit for deployment timeout is 2 hours.
+     * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.protobuf.Duration.Builder getDeploymentTimeoutBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getDeploymentTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Immutable. Deployment timeout.
+     * Limit for deployment timeout is 2 hours.
+     * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.protobuf.DurationOrBuilder getDeploymentTimeoutOrBuilder() { + if (deploymentTimeoutBuilder_ != null) { + return deploymentTimeoutBuilder_.getMessageOrBuilder(); + } else { + return deploymentTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : deploymentTimeout_; + } + } + /** + * + * + *
+     * Immutable. Deployment timeout.
+     * Limit for deployment timeout is 2 hours.
+     * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getDeploymentTimeoutFieldBuilder() { + if (deploymentTimeoutBuilder_ == null) { + deploymentTimeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getDeploymentTimeout(), getParentForChildren(), isClean()); + deploymentTimeout_ = null; + } + return deploymentTimeoutBuilder_; + } + + private long sharedMemorySizeMb_; + /** + * + * + *
+     * Immutable. The amount of the VM memory to reserve as the shared memory for
+     * the model in megabytes.
+     * 
+ * + * int64 shared_memory_size_mb = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The sharedMemorySizeMb. + */ + @java.lang.Override + public long getSharedMemorySizeMb() { + return sharedMemorySizeMb_; + } + /** + * + * + *
+     * Immutable. The amount of the VM memory to reserve as the shared memory for
+     * the model in megabytes.
+     * 
+ * + * int64 shared_memory_size_mb = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The sharedMemorySizeMb to set. + * @return This builder for chaining. + */ + public Builder setSharedMemorySizeMb(long value) { + + sharedMemorySizeMb_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The amount of the VM memory to reserve as the shared memory for
+     * the model in megabytes.
+     * 
+ * + * int64 shared_memory_size_mb = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearSharedMemorySizeMb() { + bitField0_ = (bitField0_ & ~0x00000100); + sharedMemorySizeMb_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.Probe startupProbe_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Probe, + com.google.cloud.aiplatform.v1beta1.Probe.Builder, + com.google.cloud.aiplatform.v1beta1.ProbeOrBuilder> + startupProbeBuilder_; + /** + * + * + *
+     * Immutable. Specification for Kubernetes startup probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the startupProbe field is set. + */ + public boolean hasStartupProbe() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes startup probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The startupProbe. + */ + public com.google.cloud.aiplatform.v1beta1.Probe getStartupProbe() { + if (startupProbeBuilder_ == null) { + return startupProbe_ == null + ? com.google.cloud.aiplatform.v1beta1.Probe.getDefaultInstance() + : startupProbe_; + } else { + return startupProbeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes startup probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setStartupProbe(com.google.cloud.aiplatform.v1beta1.Probe value) { + if (startupProbeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startupProbe_ = value; + } else { + startupProbeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes startup probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setStartupProbe( + com.google.cloud.aiplatform.v1beta1.Probe.Builder builderForValue) { + if (startupProbeBuilder_ == null) { + startupProbe_ = builderForValue.build(); + } else { + startupProbeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes startup probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeStartupProbe(com.google.cloud.aiplatform.v1beta1.Probe value) { + if (startupProbeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && startupProbe_ != null + && startupProbe_ != com.google.cloud.aiplatform.v1beta1.Probe.getDefaultInstance()) { + getStartupProbeBuilder().mergeFrom(value); + } else { + startupProbe_ = value; + } + } else { + startupProbeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes startup probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearStartupProbe() { + bitField0_ = (bitField0_ & ~0x00000200); + startupProbe_ = null; + if (startupProbeBuilder_ != null) { + startupProbeBuilder_.dispose(); + startupProbeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes startup probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1beta1.Probe.Builder getStartupProbeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getStartupProbeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes startup probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1beta1.ProbeOrBuilder getStartupProbeOrBuilder() { + if (startupProbeBuilder_ != null) { + return startupProbeBuilder_.getMessageOrBuilder(); + } else { + return startupProbe_ == null + ? com.google.cloud.aiplatform.v1beta1.Probe.getDefaultInstance() + : startupProbe_; + } + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes startup probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Probe, + com.google.cloud.aiplatform.v1beta1.Probe.Builder, + com.google.cloud.aiplatform.v1beta1.ProbeOrBuilder> + getStartupProbeFieldBuilder() { + if (startupProbeBuilder_ == null) { + startupProbeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Probe, + com.google.cloud.aiplatform.v1beta1.Probe.Builder, + com.google.cloud.aiplatform.v1beta1.ProbeOrBuilder>( + getStartupProbe(), getParentForChildren(), isClean()); + startupProbe_ = null; + } + return startupProbeBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.Probe healthProbe_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Probe, + com.google.cloud.aiplatform.v1beta1.Probe.Builder, + com.google.cloud.aiplatform.v1beta1.ProbeOrBuilder> + healthProbeBuilder_; + /** + * + * + *
+     * Immutable. Specification for Kubernetes readiness probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the healthProbe field is set. + */ + public boolean hasHealthProbe() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes readiness probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The healthProbe. + */ + public com.google.cloud.aiplatform.v1beta1.Probe getHealthProbe() { + if (healthProbeBuilder_ == null) { + return healthProbe_ == null + ? com.google.cloud.aiplatform.v1beta1.Probe.getDefaultInstance() + : healthProbe_; + } else { + return healthProbeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes readiness probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setHealthProbe(com.google.cloud.aiplatform.v1beta1.Probe value) { + if (healthProbeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + healthProbe_ = value; + } else { + healthProbeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes readiness probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setHealthProbe( + com.google.cloud.aiplatform.v1beta1.Probe.Builder builderForValue) { + if (healthProbeBuilder_ == null) { + healthProbe_ = builderForValue.build(); + } else { + healthProbeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes readiness probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeHealthProbe(com.google.cloud.aiplatform.v1beta1.Probe value) { + if (healthProbeBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && healthProbe_ != null + && healthProbe_ != com.google.cloud.aiplatform.v1beta1.Probe.getDefaultInstance()) { + getHealthProbeBuilder().mergeFrom(value); + } else { + healthProbe_ = value; + } + } else { + healthProbeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes readiness probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearHealthProbe() { + bitField0_ = (bitField0_ & ~0x00000400); + healthProbe_ = null; + if (healthProbeBuilder_ != null) { + healthProbeBuilder_.dispose(); + healthProbeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes readiness probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1beta1.Probe.Builder getHealthProbeBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getHealthProbeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes readiness probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1beta1.ProbeOrBuilder getHealthProbeOrBuilder() { + if (healthProbeBuilder_ != null) { + return healthProbeBuilder_.getMessageOrBuilder(); + } else { + return healthProbe_ == null + ? com.google.cloud.aiplatform.v1beta1.Probe.getDefaultInstance() + : healthProbe_; + } + } + /** + * + * + *
+     * Immutable. Specification for Kubernetes readiness probe.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Probe, + com.google.cloud.aiplatform.v1beta1.Probe.Builder, + com.google.cloud.aiplatform.v1beta1.ProbeOrBuilder> + getHealthProbeFieldBuilder() { + if (healthProbeBuilder_ == null) { + healthProbeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Probe, + com.google.cloud.aiplatform.v1beta1.Probe.Builder, + com.google.cloud.aiplatform.v1beta1.ProbeOrBuilder>( + getHealthProbe(), getParentForChildren(), isClean()); + healthProbe_ = null; + } + return healthProbeBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelContainerSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelContainerSpecOrBuilder.java index 8aa3b59ba020..f0997cb0ee8e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelContainerSpecOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelContainerSpecOrBuilder.java @@ -1016,4 +1016,144 @@ public interface ModelContainerSpecOrBuilder * @return The bytes for healthRoute. */ com.google.protobuf.ByteString getHealthRouteBytes(); + + /** + * + * + *
+   * Immutable. Deployment timeout.
+   * Limit for deployment timeout is 2 hours.
+   * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the deploymentTimeout field is set. + */ + boolean hasDeploymentTimeout(); + /** + * + * + *
+   * Immutable. Deployment timeout.
+   * Limit for deployment timeout is 2 hours.
+   * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The deploymentTimeout. + */ + com.google.protobuf.Duration getDeploymentTimeout(); + /** + * + * + *
+   * Immutable. Deployment timeout.
+   * Limit for deployment timeout is 2 hours.
+   * 
+ * + * + * .google.protobuf.Duration deployment_timeout = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.protobuf.DurationOrBuilder getDeploymentTimeoutOrBuilder(); + + /** + * + * + *
+   * Immutable. The amount of the VM memory to reserve as the shared memory for
+   * the model in megabytes.
+   * 
+ * + * int64 shared_memory_size_mb = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The sharedMemorySizeMb. + */ + long getSharedMemorySizeMb(); + + /** + * + * + *
+   * Immutable. Specification for Kubernetes startup probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the startupProbe field is set. + */ + boolean hasStartupProbe(); + /** + * + * + *
+   * Immutable. Specification for Kubernetes startup probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The startupProbe. + */ + com.google.cloud.aiplatform.v1beta1.Probe getStartupProbe(); + /** + * + * + *
+   * Immutable. Specification for Kubernetes startup probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe startup_probe = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.aiplatform.v1beta1.ProbeOrBuilder getStartupProbeOrBuilder(); + + /** + * + * + *
+   * Immutable. Specification for Kubernetes readiness probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the healthProbe field is set. + */ + boolean hasHealthProbe(); + /** + * + * + *
+   * Immutable. Specification for Kubernetes readiness probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The healthProbe. + */ + com.google.cloud.aiplatform.v1beta1.Probe getHealthProbe(); + /** + * + * + *
+   * Immutable. Specification for Kubernetes readiness probe.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Probe health_probe = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.aiplatform.v1beta1.ProbeOrBuilder getHealthProbeOrBuilder(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelProto.java index 85c9b47ec5be..d645022f09c7 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelProto.java @@ -63,6 +63,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_ModelSourceInfo_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_ModelSourceInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_Probe_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_Probe_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_Probe_ExecAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_Probe_ExecAction_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -80,86 +88,97 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ogle/cloud/aiplatform/v1beta1/encryption" + "_spec.proto\032-google/cloud/aiplatform/v1b" + "eta1/env_var.proto\0321google/cloud/aiplatf" - + "orm/v1beta1/explanation.proto\032\034google/pr" - + "otobuf/struct.proto\032\037google/protobuf/tim" - + "estamp.proto\"\345\020\n\005Model\022\014\n\004name\030\001 \001(\t\022\031\n\n" - + "version_id\030\034 \001(\tB\005\342A\002\005\003\022\027\n\017version_alias" - + "es\030\035 \003(\t\022=\n\023version_create_time\030\037 \001(\0132\032." - + "google.protobuf.TimestampB\004\342A\001\003\022=\n\023versi" - + "on_update_time\030 \001(\0132\032.google.protobuf.T" - + "imestampB\004\342A\001\003\022\032\n\014display_name\030\002 \001(\tB\004\342A" - + "\001\002\022\023\n\013description\030\003 \001(\t\022\033\n\023version_descr" - + "iption\030\036 \001(\t\022J\n\020predict_schemata\030\004 \001(\01320" - + ".google.cloud.aiplatform.v1beta1.Predict" - + "Schemata\022!\n\023metadata_schema_uri\030\005 \001(\tB\004\342" - + "A\001\005\022.\n\010metadata\030\006 \001(\0132\026.google.protobuf." - + "ValueB\004\342A\001\005\022[\n\030supported_export_formats\030" - + "\024 \003(\01323.google.cloud.aiplatform.v1beta1." - + "Model.ExportFormatB\004\342A\001\003\022N\n\021training_pip" - + "eline\030\007 \001(\tB3\342A\001\003\372A,\n*aiplatform.googlea" - + "pis.com/TrainingPipeline\022Q\n\016container_sp" - + "ec\030\t \001(\01323.google.cloud.aiplatform.v1bet" - + "a1.ModelContainerSpecB\004\342A\001\004\022\032\n\014artifact_" - + "uri\030\032 \001(\tB\004\342A\001\005\022r\n$supported_deployment_" - + "resources_types\030\n \003(\0162>.google.cloud.aip" - + "latform.v1beta1.Model.DeploymentResource" - + "sTypeB\004\342A\001\003\022-\n\037supported_input_storage_f" - + "ormats\030\013 \003(\tB\004\342A\001\003\022.\n supported_output_s" - + "torage_formats\030\014 \003(\tB\004\342A\001\003\0225\n\013create_tim" - + "e\030\r \001(\0132\032.google.protobuf.TimestampB\004\342A\001" - + "\003\0225\n\013update_time\030\016 \001(\0132\032.google.protobuf" - + ".TimestampB\004\342A\001\003\022P\n\017deployed_models\030\017 \003(" - + "\01321.google.cloud.aiplatform.v1beta1.Depl" - + "oyedModelRefB\004\342A\001\003\022J\n\020explanation_spec\030\027" - + " \001(\01320.google.cloud.aiplatform.v1beta1.E" - + "xplanationSpec\022\014\n\004etag\030\020 \001(\t\022B\n\006labels\030\021" - + " \003(\01322.google.cloud.aiplatform.v1beta1.M" - + "odel.LabelsEntry\022H\n\017encryption_spec\030\030 \001(" - + "\0132/.google.cloud.aiplatform.v1beta1.Encr" - + "yptionSpec\022Q\n\021model_source_info\030& \001(\01320." - + "google.cloud.aiplatform.v1beta1.ModelSou" - + "rceInfoB\004\342A\001\003\022[\n\023original_model_info\030\" \001" - + "(\01328.google.cloud.aiplatform.v1beta1.Mod" - + "el.OriginalModelInfoB\004\342A\001\003\022\037\n\021metadata_a" - + "rtifact\030, \001(\tB\004\342A\001\003\032\334\001\n\014ExportFormat\022\020\n\002" - + "id\030\001 \001(\tB\004\342A\001\003\022h\n\023exportable_contents\030\002 " - + "\003(\0162E.google.cloud.aiplatform.v1beta1.Mo" - + "del.ExportFormat.ExportableContentB\004\342A\001\003" - + "\"P\n\021ExportableContent\022\"\n\036EXPORTABLE_CONT" - + "ENT_UNSPECIFIED\020\000\022\014\n\010ARTIFACT\020\001\022\t\n\005IMAGE" - + "\020\002\032L\n\021OriginalModelInfo\0227\n\005model\030\001 \001(\tB(" - + "\342A\001\003\372A!\n\037aiplatform.googleapis.com/Model" - + "\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " - + "\001(\t:\0028\001\"\214\001\n\027DeploymentResourcesType\022)\n%D" - + "EPLOYMENT_RESOURCES_TYPE_UNSPECIFIED\020\000\022\027" - + "\n\023DEDICATED_RESOURCES\020\001\022\027\n\023AUTOMATIC_RES" - + "OURCES\020\002\022\024\n\020SHARED_RESOURCES\020\003:\\\352AY\n\037aip" - + "latform.googleapis.com/Model\0226projects/{" - + "project}/locations/{location}/models/{mo" - + "del}\")\n\023LargeModelReference\022\022\n\004name\030\001 \001(" - + "\tB\004\342A\001\002\"~\n\017PredictSchemata\022!\n\023instance_s" - + "chema_uri\030\001 \001(\tB\004\342A\001\005\022#\n\025parameters_sche" - + "ma_uri\030\002 \001(\tB\004\342A\001\005\022#\n\025prediction_schema_" - + "uri\030\003 \001(\tB\004\342A\001\005\"\212\002\n\022ModelContainerSpec\022\030" - + "\n\timage_uri\030\001 \001(\tB\005\342A\002\002\005\022\025\n\007command\030\002 \003(" - + "\tB\004\342A\001\005\022\022\n\004args\030\003 \003(\tB\004\342A\001\005\022:\n\003env\030\004 \003(\013" - + "2\'.google.cloud.aiplatform.v1beta1.EnvVa" - + "rB\004\342A\001\005\022:\n\005ports\030\005 \003(\0132%.google.cloud.ai" - + "platform.v1beta1.PortB\004\342A\001\005\022\033\n\rpredict_r" - + "oute\030\006 \001(\tB\004\342A\001\005\022\032\n\014health_route\030\007 \001(\tB\004" - + "\342A\001\005\"\036\n\004Port\022\026\n\016container_port\030\003 \001(\005\"\353\001\n" - + "\017ModelSourceInfo\022U\n\013source_type\030\001 \001(\0162@." - + "google.cloud.aiplatform.v1beta1.ModelSou" - + "rceInfo.ModelSourceType\022\014\n\004copy\030\002 \001(\010\"s\n" - + "\017ModelSourceType\022!\n\035MODEL_SOURCE_TYPE_UN" - + "SPECIFIED\020\000\022\n\n\006AUTOML\020\001\022\n\n\006CUSTOM\020\002\022\010\n\004B" - + "QML\020\003\022\020\n\014MODEL_GARDEN\020\004\022\t\n\005GENIE\020\005B\341\001\n#c" - + "om.google.cloud.aiplatform.v1beta1B\nMode" - + "lProtoP\001ZCcloud.google.com/go/aiplatform" - + "/apiv1beta1/aiplatformpb;aiplatformpb\252\002\037" - + "Google.Cloud.AIPlatform.V1Beta1\312\002\037Google" - + "\\Cloud\\AIPlatform\\V1beta1\352\002\"Google::Clou" - + "d::AIPlatform::V1beta1b\006proto3" + + "orm/v1beta1/explanation.proto\032\036google/pr" + + "otobuf/duration.proto\032\034google/protobuf/s" + + "truct.proto\032\037google/protobuf/timestamp.p" + + "roto\"\345\020\n\005Model\022\014\n\004name\030\001 \001(\t\022\031\n\nversion_" + + "id\030\034 \001(\tB\005\342A\002\005\003\022\027\n\017version_aliases\030\035 \003(\t" + + "\022=\n\023version_create_time\030\037 \001(\0132\032.google.p" + + "rotobuf.TimestampB\004\342A\001\003\022=\n\023version_updat" + + "e_time\030 \001(\0132\032.google.protobuf.Timestamp" + + "B\004\342A\001\003\022\032\n\014display_name\030\002 \001(\tB\004\342A\001\002\022\023\n\013de" + + "scription\030\003 \001(\t\022\033\n\023version_description\030\036" + + " \001(\t\022J\n\020predict_schemata\030\004 \001(\01320.google." + + "cloud.aiplatform.v1beta1.PredictSchemata" + + "\022!\n\023metadata_schema_uri\030\005 \001(\tB\004\342A\001\005\022.\n\010m" + + "etadata\030\006 \001(\0132\026.google.protobuf.ValueB\004\342" + + "A\001\005\022[\n\030supported_export_formats\030\024 \003(\01323." + + "google.cloud.aiplatform.v1beta1.Model.Ex" + + "portFormatB\004\342A\001\003\022N\n\021training_pipeline\030\007 " + + "\001(\tB3\342A\001\003\372A,\n*aiplatform.googleapis.com/" + + "TrainingPipeline\022Q\n\016container_spec\030\t \001(\013" + + "23.google.cloud.aiplatform.v1beta1.Model" + + "ContainerSpecB\004\342A\001\004\022\032\n\014artifact_uri\030\032 \001(" + + "\tB\004\342A\001\005\022r\n$supported_deployment_resource" + + "s_types\030\n \003(\0162>.google.cloud.aiplatform." + + "v1beta1.Model.DeploymentResourcesTypeB\004\342" + + "A\001\003\022-\n\037supported_input_storage_formats\030\013" + + " \003(\tB\004\342A\001\003\022.\n supported_output_storage_f" + + "ormats\030\014 \003(\tB\004\342A\001\003\0225\n\013create_time\030\r \001(\0132" + + "\032.google.protobuf.TimestampB\004\342A\001\003\0225\n\013upd" + + "ate_time\030\016 \001(\0132\032.google.protobuf.Timesta" + + "mpB\004\342A\001\003\022P\n\017deployed_models\030\017 \003(\01321.goog" + + "le.cloud.aiplatform.v1beta1.DeployedMode" + + "lRefB\004\342A\001\003\022J\n\020explanation_spec\030\027 \001(\01320.g" + + "oogle.cloud.aiplatform.v1beta1.Explanati" + + "onSpec\022\014\n\004etag\030\020 \001(\t\022B\n\006labels\030\021 \003(\01322.g" + + "oogle.cloud.aiplatform.v1beta1.Model.Lab" + + "elsEntry\022H\n\017encryption_spec\030\030 \001(\0132/.goog" + + "le.cloud.aiplatform.v1beta1.EncryptionSp" + + "ec\022Q\n\021model_source_info\030& \001(\01320.google.c" + + "loud.aiplatform.v1beta1.ModelSourceInfoB" + + "\004\342A\001\003\022[\n\023original_model_info\030\" \001(\01328.goo" + + "gle.cloud.aiplatform.v1beta1.Model.Origi" + + "nalModelInfoB\004\342A\001\003\022\037\n\021metadata_artifact\030" + + ", \001(\tB\004\342A\001\003\032\334\001\n\014ExportFormat\022\020\n\002id\030\001 \001(\t" + + "B\004\342A\001\003\022h\n\023exportable_contents\030\002 \003(\0162E.go" + + "ogle.cloud.aiplatform.v1beta1.Model.Expo" + + "rtFormat.ExportableContentB\004\342A\001\003\"P\n\021Expo" + + "rtableContent\022\"\n\036EXPORTABLE_CONTENT_UNSP" + + "ECIFIED\020\000\022\014\n\010ARTIFACT\020\001\022\t\n\005IMAGE\020\002\032L\n\021Or" + + "iginalModelInfo\0227\n\005model\030\001 \001(\tB(\342A\001\003\372A!\n" + + "\037aiplatform.googleapis.com/Model\032-\n\013Labe" + + "lsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"" + + "\214\001\n\027DeploymentResourcesType\022)\n%DEPLOYMEN" + + "T_RESOURCES_TYPE_UNSPECIFIED\020\000\022\027\n\023DEDICA" + + "TED_RESOURCES\020\001\022\027\n\023AUTOMATIC_RESOURCES\020\002" + + "\022\024\n\020SHARED_RESOURCES\020\003:\\\352AY\n\037aiplatform." + + "googleapis.com/Model\0226projects/{project}" + + "/locations/{location}/models/{model}\")\n\023" + + "LargeModelReference\022\022\n\004name\030\001 \001(\tB\004\342A\001\002\"" + + "~\n\017PredictSchemata\022!\n\023instance_schema_ur" + + "i\030\001 \001(\tB\004\342A\001\005\022#\n\025parameters_schema_uri\030\002" + + " \001(\tB\004\342A\001\005\022#\n\025prediction_schema_uri\030\003 \001(" + + "\tB\004\342A\001\005\"\365\003\n\022ModelContainerSpec\022\030\n\timage_" + + "uri\030\001 \001(\tB\005\342A\002\002\005\022\025\n\007command\030\002 \003(\tB\004\342A\001\005\022" + + "\022\n\004args\030\003 \003(\tB\004\342A\001\005\022:\n\003env\030\004 \003(\0132\'.googl" + + "e.cloud.aiplatform.v1beta1.EnvVarB\004\342A\001\005\022" + + ":\n\005ports\030\005 \003(\0132%.google.cloud.aiplatform" + + ".v1beta1.PortB\004\342A\001\005\022\033\n\rpredict_route\030\006 \001" + + "(\tB\004\342A\001\005\022\032\n\014health_route\030\007 \001(\tB\004\342A\001\005\022;\n\022" + + "deployment_timeout\030\n \001(\0132\031.google.protob" + + "uf.DurationB\004\342A\001\005\022#\n\025shared_memory_size_" + + "mb\030\013 \001(\003B\004\342A\001\005\022C\n\rstartup_probe\030\014 \001(\0132&." + + "google.cloud.aiplatform.v1beta1.ProbeB\004\342" + + "A\001\005\022B\n\014health_probe\030\r \001(\0132&.google.cloud" + + ".aiplatform.v1beta1.ProbeB\004\342A\001\005\"\036\n\004Port\022" + + "\026\n\016container_port\030\003 \001(\005\"\353\001\n\017ModelSourceI" + + "nfo\022U\n\013source_type\030\001 \001(\0162@.google.cloud." + + "aiplatform.v1beta1.ModelSourceInfo.Model" + + "SourceType\022\014\n\004copy\030\002 \001(\010\"s\n\017ModelSourceT" + + "ype\022!\n\035MODEL_SOURCE_TYPE_UNSPECIFIED\020\000\022\n" + + "\n\006AUTOML\020\001\022\n\n\006CUSTOM\020\002\022\010\n\004BQML\020\003\022\020\n\014MODE" + + "L_GARDEN\020\004\022\t\n\005GENIE\020\005\"\250\001\n\005Probe\022A\n\004exec\030" + + "\001 \001(\01321.google.cloud.aiplatform.v1beta1." + + "Probe.ExecActionH\000\022\026\n\016period_seconds\030\002 \001" + + "(\005\022\027\n\017timeout_seconds\030\003 \001(\005\032\035\n\nExecActio" + + "n\022\017\n\007command\030\001 \003(\tB\014\n\nprobe_typeB\341\001\n#com" + + ".google.cloud.aiplatform.v1beta1B\nModelP" + + "rotoP\001ZCcloud.google.com/go/aiplatform/a" + + "piv1beta1/aiplatformpb;aiplatformpb\252\002\037Go" + + "ogle.Cloud.AIPlatform.V1Beta1\312\002\037Google\\C" + + "loud\\AIPlatform\\V1beta1\352\002\"Google::Cloud:" + + ":AIPlatform::V1beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -171,6 +190,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.aiplatform.v1beta1.EncryptionSpecProto.getDescriptor(), com.google.cloud.aiplatform.v1beta1.EnvVarProto.getDescriptor(), com.google.cloud.aiplatform.v1beta1.ExplanationProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); @@ -255,7 +275,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_ModelContainerSpec_descriptor, new java.lang.String[] { - "ImageUri", "Command", "Args", "Env", "Ports", "PredictRoute", "HealthRoute", + "ImageUri", + "Command", + "Args", + "Env", + "Ports", + "PredictRoute", + "HealthRoute", + "DeploymentTimeout", + "SharedMemorySizeMb", + "StartupProbe", + "HealthProbe", }); internal_static_google_cloud_aiplatform_v1beta1_Port_descriptor = getDescriptor().getMessageTypes().get(4); @@ -273,6 +303,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "SourceType", "Copy", }); + internal_static_google_cloud_aiplatform_v1beta1_Probe_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_aiplatform_v1beta1_Probe_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_Probe_descriptor, + new java.lang.String[] { + "Exec", "PeriodSeconds", "TimeoutSeconds", "ProbeType", + }); + internal_static_google_cloud_aiplatform_v1beta1_Probe_ExecAction_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_Probe_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_Probe_ExecAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_Probe_ExecAction_descriptor, + new java.lang.String[] { + "Command", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); @@ -286,6 +332,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.aiplatform.v1beta1.EncryptionSpecProto.getDescriptor(); com.google.cloud.aiplatform.v1beta1.EnvVarProto.getDescriptor(); com.google.cloud.aiplatform.v1beta1.ExplanationProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceProto.java index a411a143da87..c408cfffeeb5 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceProto.java @@ -71,6 +71,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_DeletePipelineJobRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_DeletePipelineJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_BatchDeletePipelineJobsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_BatchDeletePipelineJobsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_BatchDeletePipelineJobsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_BatchDeletePipelineJobsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1beta1_CancelPipelineJobRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -133,73 +141,86 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ipelineJob\022\027\n\017next_page_token\030\002 \001(\t\"X\n\030D" + "eletePipelineJobRequest\022<\n\004name\030\001 \001(\tB.\342" + "A\001\002\372A\'\n%aiplatform.googleapis.com/Pipeli" - + "neJob\"X\n\030CancelPipelineJobRequest\022<\n\004nam" - + "e\030\001 \001(\tB.\342A\001\002\372A\'\n%aiplatform.googleapis." - + "com/PipelineJob2\376\021\n\017PipelineService\022\375\001\n\026" - + "CreateTrainingPipeline\022>.google.cloud.ai" - + "platform.v1beta1.CreateTrainingPipelineR" - + "equest\0321.google.cloud.aiplatform.v1beta1" - + ".TrainingPipeline\"p\332A\030parent,training_pi" - + "peline\202\323\344\223\002O\":/v1beta1/{parent=projects/" - + "*/locations/*}/trainingPipelines:\021traini" - + "ng_pipeline\022\320\001\n\023GetTrainingPipeline\022;.go" - + "ogle.cloud.aiplatform.v1beta1.GetTrainin" - + "gPipelineRequest\0321.google.cloud.aiplatfo" - + "rm.v1beta1.TrainingPipeline\"I\332A\004name\202\323\344\223" - + "\002<\022:/v1beta1/{name=projects/*/locations/" - + "*/trainingPipelines/*}\022\343\001\n\025ListTrainingP" - + "ipelines\022=.google.cloud.aiplatform.v1bet" - + "a1.ListTrainingPipelinesRequest\032>.google" - + ".cloud.aiplatform.v1beta1.ListTrainingPi" - + "pelinesResponse\"K\332A\006parent\202\323\344\223\002<\022:/v1bet" - + "a1/{parent=projects/*/locations/*}/train" - + "ingPipelines\022\365\001\n\026DeleteTrainingPipeline\022" - + ">.google.cloud.aiplatform.v1beta1.Delete" - + "TrainingPipelineRequest\032\035.google.longrun" - + "ning.Operation\"|\312A0\n\025google.protobuf.Emp" - + "ty\022\027DeleteOperationMetadata\332A\004name\202\323\344\223\002<" - + "*:/v1beta1/{name=projects/*/locations/*/" - + "trainingPipelines/*}\022\305\001\n\026CancelTrainingP" - + "ipeline\022>.google.cloud.aiplatform.v1beta" - + "1.CancelTrainingPipelineRequest\032\026.google" - + ".protobuf.Empty\"S\332A\004name\202\323\344\223\002F\"A/v1beta1" - + "/{name=projects/*/locations/*/trainingPi" - + "pelines/*}:cancel:\001*\022\357\001\n\021CreatePipelineJ" - + "ob\0229.google.cloud.aiplatform.v1beta1.Cre" - + "atePipelineJobRequest\032,.google.cloud.aip" - + "latform.v1beta1.PipelineJob\"q\332A#parent,p" - + "ipeline_job,pipeline_job_id\202\323\344\223\002E\"5/v1be" - + "ta1/{parent=projects/*/locations/*}/pipe" - + "lineJobs:\014pipeline_job\022\274\001\n\016GetPipelineJo" - + "b\0226.google.cloud.aiplatform.v1beta1.GetP" - + "ipelineJobRequest\032,.google.cloud.aiplatf" - + "orm.v1beta1.PipelineJob\"D\332A\004name\202\323\344\223\0027\0225" - + "/v1beta1/{name=projects/*/locations/*/pi" - + "pelineJobs/*}\022\317\001\n\020ListPipelineJobs\0228.goo" - + "gle.cloud.aiplatform.v1beta1.ListPipelin" - + "eJobsRequest\0329.google.cloud.aiplatform.v" - + "1beta1.ListPipelineJobsResponse\"F\332A\006pare" - + "nt\202\323\344\223\0027\0225/v1beta1/{parent=projects/*/lo" - + "cations/*}/pipelineJobs\022\346\001\n\021DeletePipeli" - + "neJob\0229.google.cloud.aiplatform.v1beta1." - + "DeletePipelineJobRequest\032\035.google.longru" - + "nning.Operation\"w\312A0\n\025google.protobuf.Em" - + "pty\022\027DeleteOperationMetadata\332A\004name\202\323\344\223\002" - + "7*5/v1beta1/{name=projects/*/locations/*" - + "/pipelineJobs/*}\022\266\001\n\021CancelPipelineJob\0229" - + ".google.cloud.aiplatform.v1beta1.CancelP" - + "ipelineJobRequest\032\026.google.protobuf.Empt" - + "y\"N\332A\004name\202\323\344\223\002A\"\n\006parent\030\001 \001(\tB.\342A\001\002\372A\'\022%aiplatform.go" + + "ogleapis.com/PipelineJob\022=\n\005names\030\002 \003(\tB" + + ".\342A\001\002\372A\'\n%aiplatform.googleapis.com/Pipe" + + "lineJob\"f\n\037BatchDeletePipelineJobsRespon" + + "se\022C\n\rpipeline_jobs\030\001 \003(\0132,.google.cloud" + + ".aiplatform.v1beta1.PipelineJob\"X\n\030Cance" + + "lPipelineJobRequest\022<\n\004name\030\001 \001(\tB.\342A\001\002\372" + + "A\'\n%aiplatform.googleapis.com/PipelineJo" + + "b2\225\024\n\017PipelineService\022\375\001\n\026CreateTraining" + + "Pipeline\022>.google.cloud.aiplatform.v1bet" + + "a1.CreateTrainingPipelineRequest\0321.googl" + + "e.cloud.aiplatform.v1beta1.TrainingPipel" + + "ine\"p\332A\030parent,training_pipeline\202\323\344\223\002O\":" + + "/v1beta1/{parent=projects/*/locations/*}" + + "/trainingPipelines:\021training_pipeline\022\320\001" + + "\n\023GetTrainingPipeline\022;.google.cloud.aip" + + "latform.v1beta1.GetTrainingPipelineReque" + + "st\0321.google.cloud.aiplatform.v1beta1.Tra" + + "iningPipeline\"I\332A\004name\202\323\344\223\002<\022:/v1beta1/{" + + "name=projects/*/locations/*/trainingPipe" + + "lines/*}\022\343\001\n\025ListTrainingPipelines\022=.goo" + + "gle.cloud.aiplatform.v1beta1.ListTrainin" + + "gPipelinesRequest\032>.google.cloud.aiplatf" + + "orm.v1beta1.ListTrainingPipelinesRespons" + + "e\"K\332A\006parent\202\323\344\223\002<\022:/v1beta1/{parent=pro" + + "jects/*/locations/*}/trainingPipelines\022\365" + + "\001\n\026DeleteTrainingPipeline\022>.google.cloud" + + ".aiplatform.v1beta1.DeleteTrainingPipeli" + + "neRequest\032\035.google.longrunning.Operation" + + "\"|\312A0\n\025google.protobuf.Empty\022\027DeleteOper" + + "ationMetadata\332A\004name\202\323\344\223\002<*:/v1beta1/{na" + + "me=projects/*/locations/*/trainingPipeli" + + "nes/*}\022\305\001\n\026CancelTrainingPipeline\022>.goog" + + "le.cloud.aiplatform.v1beta1.CancelTraini" + + "ngPipelineRequest\032\026.google.protobuf.Empt" + + "y\"S\332A\004name\202\323\344\223\002F\"A/v1beta1/{name=project" + + "s/*/locations/*/trainingPipelines/*}:can" + + "cel:\001*\022\357\001\n\021CreatePipelineJob\0229.google.cl" + + "oud.aiplatform.v1beta1.CreatePipelineJob" + + "Request\032,.google.cloud.aiplatform.v1beta" + + "1.PipelineJob\"q\332A#parent,pipeline_job,pi" + + "peline_job_id\202\323\344\223\002E\"5/v1beta1/{parent=pr" + + "ojects/*/locations/*}/pipelineJobs:\014pipe" + + "line_job\022\274\001\n\016GetPipelineJob\0226.google.clo" + + "ud.aiplatform.v1beta1.GetPipelineJobRequ" + + "est\032,.google.cloud.aiplatform.v1beta1.Pi" + + "pelineJob\"D\332A\004name\202\323\344\223\0027\0225/v1beta1/{name" + + "=projects/*/locations/*/pipelineJobs/*}\022" + + "\317\001\n\020ListPipelineJobs\0228.google.cloud.aipl" + + "atform.v1beta1.ListPipelineJobsRequest\0329" + + ".google.cloud.aiplatform.v1beta1.ListPip" + + "elineJobsResponse\"F\332A\006parent\202\323\344\223\0027\0225/v1b" + + "eta1/{parent=projects/*/locations/*}/pip" + + "elineJobs\022\346\001\n\021DeletePipelineJob\0229.google" + + ".cloud.aiplatform.v1beta1.DeletePipeline" + + "JobRequest\032\035.google.longrunning.Operatio" + + "n\"w\312A0\n\025google.protobuf.Empty\022\027DeleteOpe" + + "rationMetadata\332A\004name\202\323\344\223\0027*5/v1beta1/{n" + + "ame=projects/*/locations/*/pipelineJobs/" + + "*}\022\224\002\n\027BatchDeletePipelineJobs\022?.google." + + "cloud.aiplatform.v1beta1.BatchDeletePipe" + + "lineJobsRequest\032\035.google.longrunning.Ope" + + "ration\"\230\001\312A:\n\037BatchDeletePipelineJobsRes" + + "ponse\022\027DeleteOperationMetadata\332A\014parent," + + "names\202\323\344\223\002F\"A/v1beta1/{parent=projects/*" + + "/locations/*}/pipelineJobs:batchDelete:\001" + + "*\022\266\001\n\021CancelPipelineJob\0229.google.cloud.a" + + "iplatform.v1beta1.CancelPipelineJobReque" + + "st\032\026.google.protobuf.Empty\"N\332A\004name\202\323\344\223\002" + + "A\" + * Probe describes a health check to be performed against a container to + * determine whether it is alive or ready to receive traffic. + *
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.Probe} + */ +public final class Probe extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.Probe) + ProbeOrBuilder { + private static final long serialVersionUID = 0L; + // Use Probe.newBuilder() to construct. + private Probe(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Probe() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Probe(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ModelProto + .internal_static_google_cloud_aiplatform_v1beta1_Probe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ModelProto + .internal_static_google_cloud_aiplatform_v1beta1_Probe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.Probe.class, + com.google.cloud.aiplatform.v1beta1.Probe.Builder.class); + } + + public interface ExecActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.Probe.ExecAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Command is the command line to execute inside the container, the working
+     * directory for the command is root ('/') in the container's filesystem.
+     * The command is simply exec'd, it is not run inside a shell, so
+     * traditional shell instructions ('|', etc) won't work. To use a shell, you
+     * need to explicitly call out to that shell. Exit status of 0 is treated as
+     * live/healthy and non-zero is unhealthy.
+     * 
+ * + * repeated string command = 1; + * + * @return A list containing the command. + */ + java.util.List getCommandList(); + /** + * + * + *
+     * Command is the command line to execute inside the container, the working
+     * directory for the command is root ('/') in the container's filesystem.
+     * The command is simply exec'd, it is not run inside a shell, so
+     * traditional shell instructions ('|', etc) won't work. To use a shell, you
+     * need to explicitly call out to that shell. Exit status of 0 is treated as
+     * live/healthy and non-zero is unhealthy.
+     * 
+ * + * repeated string command = 1; + * + * @return The count of command. + */ + int getCommandCount(); + /** + * + * + *
+     * Command is the command line to execute inside the container, the working
+     * directory for the command is root ('/') in the container's filesystem.
+     * The command is simply exec'd, it is not run inside a shell, so
+     * traditional shell instructions ('|', etc) won't work. To use a shell, you
+     * need to explicitly call out to that shell. Exit status of 0 is treated as
+     * live/healthy and non-zero is unhealthy.
+     * 
+ * + * repeated string command = 1; + * + * @param index The index of the element to return. + * @return The command at the given index. + */ + java.lang.String getCommand(int index); + /** + * + * + *
+     * Command is the command line to execute inside the container, the working
+     * directory for the command is root ('/') in the container's filesystem.
+     * The command is simply exec'd, it is not run inside a shell, so
+     * traditional shell instructions ('|', etc) won't work. To use a shell, you
+     * need to explicitly call out to that shell. Exit status of 0 is treated as
+     * live/healthy and non-zero is unhealthy.
+     * 
+ * + * repeated string command = 1; + * + * @param index The index of the value to return. + * @return The bytes of the command at the given index. + */ + com.google.protobuf.ByteString getCommandBytes(int index); + } + /** + * + * + *
+   * ExecAction specifies a command to execute.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.Probe.ExecAction} + */ + public static final class ExecAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.Probe.ExecAction) + ExecActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecAction.newBuilder() to construct. + private ExecAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecAction() { + command_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ModelProto + .internal_static_google_cloud_aiplatform_v1beta1_Probe_ExecAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ModelProto + .internal_static_google_cloud_aiplatform_v1beta1_Probe_ExecAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.Probe.ExecAction.class, + com.google.cloud.aiplatform.v1beta1.Probe.ExecAction.Builder.class); + } + + public static final int COMMAND_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList command_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Command is the command line to execute inside the container, the working
+     * directory for the command is root ('/') in the container's filesystem.
+     * The command is simply exec'd, it is not run inside a shell, so
+     * traditional shell instructions ('|', etc) won't work. To use a shell, you
+     * need to explicitly call out to that shell. Exit status of 0 is treated as
+     * live/healthy and non-zero is unhealthy.
+     * 
+ * + * repeated string command = 1; + * + * @return A list containing the command. + */ + public com.google.protobuf.ProtocolStringList getCommandList() { + return command_; + } + /** + * + * + *
+     * Command is the command line to execute inside the container, the working
+     * directory for the command is root ('/') in the container's filesystem.
+     * The command is simply exec'd, it is not run inside a shell, so
+     * traditional shell instructions ('|', etc) won't work. To use a shell, you
+     * need to explicitly call out to that shell. Exit status of 0 is treated as
+     * live/healthy and non-zero is unhealthy.
+     * 
+ * + * repeated string command = 1; + * + * @return The count of command. + */ + public int getCommandCount() { + return command_.size(); + } + /** + * + * + *
+     * Command is the command line to execute inside the container, the working
+     * directory for the command is root ('/') in the container's filesystem.
+     * The command is simply exec'd, it is not run inside a shell, so
+     * traditional shell instructions ('|', etc) won't work. To use a shell, you
+     * need to explicitly call out to that shell. Exit status of 0 is treated as
+     * live/healthy and non-zero is unhealthy.
+     * 
+ * + * repeated string command = 1; + * + * @param index The index of the element to return. + * @return The command at the given index. + */ + public java.lang.String getCommand(int index) { + return command_.get(index); + } + /** + * + * + *
+     * Command is the command line to execute inside the container, the working
+     * directory for the command is root ('/') in the container's filesystem.
+     * The command is simply exec'd, it is not run inside a shell, so
+     * traditional shell instructions ('|', etc) won't work. To use a shell, you
+     * need to explicitly call out to that shell. Exit status of 0 is treated as
+     * live/healthy and non-zero is unhealthy.
+     * 
+ * + * repeated string command = 1; + * + * @param index The index of the value to return. + * @return The bytes of the command at the given index. + */ + public com.google.protobuf.ByteString getCommandBytes(int index) { + return command_.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 < command_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, command_.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 < command_.size(); i++) { + dataSize += computeStringSizeNoTag(command_.getRaw(i)); + } + size += dataSize; + size += 1 * getCommandList().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.aiplatform.v1beta1.Probe.ExecAction)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.Probe.ExecAction other = + (com.google.cloud.aiplatform.v1beta1.Probe.ExecAction) obj; + + if (!getCommandList().equals(other.getCommandList())) return false; + if (!getUnknownFields().equals(other.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 (getCommandCount() > 0) { + hash = (37 * hash) + COMMAND_FIELD_NUMBER; + hash = (53 * hash) + getCommandList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.Probe.ExecAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe.ExecAction parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe.ExecAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe.ExecAction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe.ExecAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe.ExecAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe.ExecAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe.ExecAction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe.ExecAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe.ExecAction parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe.ExecAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe.ExecAction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.Probe.ExecAction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * ExecAction specifies a command to execute.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.Probe.ExecAction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.Probe.ExecAction) + com.google.cloud.aiplatform.v1beta1.Probe.ExecActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ModelProto + .internal_static_google_cloud_aiplatform_v1beta1_Probe_ExecAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ModelProto + .internal_static_google_cloud_aiplatform_v1beta1_Probe_ExecAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.Probe.ExecAction.class, + com.google.cloud.aiplatform.v1beta1.Probe.ExecAction.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.Probe.ExecAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + command_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.ModelProto + .internal_static_google_cloud_aiplatform_v1beta1_Probe_ExecAction_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Probe.ExecAction getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.Probe.ExecAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Probe.ExecAction build() { + com.google.cloud.aiplatform.v1beta1.Probe.ExecAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Probe.ExecAction buildPartial() { + com.google.cloud.aiplatform.v1beta1.Probe.ExecAction result = + new com.google.cloud.aiplatform.v1beta1.Probe.ExecAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.Probe.ExecAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + command_.makeImmutable(); + result.command_ = command_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.Probe.ExecAction) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.Probe.ExecAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.Probe.ExecAction other) { + if (other == com.google.cloud.aiplatform.v1beta1.Probe.ExecAction.getDefaultInstance()) + return this; + if (!other.command_.isEmpty()) { + if (command_.isEmpty()) { + command_ = other.command_; + bitField0_ |= 0x00000001; + } else { + ensureCommandIsMutable(); + command_.addAll(other.command_); + } + 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(); + ensureCommandIsMutable(); + command_.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 command_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureCommandIsMutable() { + if (!command_.isModifiable()) { + command_ = new com.google.protobuf.LazyStringArrayList(command_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+       * Command is the command line to execute inside the container, the working
+       * directory for the command is root ('/') in the container's filesystem.
+       * The command is simply exec'd, it is not run inside a shell, so
+       * traditional shell instructions ('|', etc) won't work. To use a shell, you
+       * need to explicitly call out to that shell. Exit status of 0 is treated as
+       * live/healthy and non-zero is unhealthy.
+       * 
+ * + * repeated string command = 1; + * + * @return A list containing the command. + */ + public com.google.protobuf.ProtocolStringList getCommandList() { + command_.makeImmutable(); + return command_; + } + /** + * + * + *
+       * Command is the command line to execute inside the container, the working
+       * directory for the command is root ('/') in the container's filesystem.
+       * The command is simply exec'd, it is not run inside a shell, so
+       * traditional shell instructions ('|', etc) won't work. To use a shell, you
+       * need to explicitly call out to that shell. Exit status of 0 is treated as
+       * live/healthy and non-zero is unhealthy.
+       * 
+ * + * repeated string command = 1; + * + * @return The count of command. + */ + public int getCommandCount() { + return command_.size(); + } + /** + * + * + *
+       * Command is the command line to execute inside the container, the working
+       * directory for the command is root ('/') in the container's filesystem.
+       * The command is simply exec'd, it is not run inside a shell, so
+       * traditional shell instructions ('|', etc) won't work. To use a shell, you
+       * need to explicitly call out to that shell. Exit status of 0 is treated as
+       * live/healthy and non-zero is unhealthy.
+       * 
+ * + * repeated string command = 1; + * + * @param index The index of the element to return. + * @return The command at the given index. + */ + public java.lang.String getCommand(int index) { + return command_.get(index); + } + /** + * + * + *
+       * Command is the command line to execute inside the container, the working
+       * directory for the command is root ('/') in the container's filesystem.
+       * The command is simply exec'd, it is not run inside a shell, so
+       * traditional shell instructions ('|', etc) won't work. To use a shell, you
+       * need to explicitly call out to that shell. Exit status of 0 is treated as
+       * live/healthy and non-zero is unhealthy.
+       * 
+ * + * repeated string command = 1; + * + * @param index The index of the value to return. + * @return The bytes of the command at the given index. + */ + public com.google.protobuf.ByteString getCommandBytes(int index) { + return command_.getByteString(index); + } + /** + * + * + *
+       * Command is the command line to execute inside the container, the working
+       * directory for the command is root ('/') in the container's filesystem.
+       * The command is simply exec'd, it is not run inside a shell, so
+       * traditional shell instructions ('|', etc) won't work. To use a shell, you
+       * need to explicitly call out to that shell. Exit status of 0 is treated as
+       * live/healthy and non-zero is unhealthy.
+       * 
+ * + * repeated string command = 1; + * + * @param index The index to set the value at. + * @param value The command to set. + * @return This builder for chaining. + */ + public Builder setCommand(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommandIsMutable(); + command_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Command is the command line to execute inside the container, the working
+       * directory for the command is root ('/') in the container's filesystem.
+       * The command is simply exec'd, it is not run inside a shell, so
+       * traditional shell instructions ('|', etc) won't work. To use a shell, you
+       * need to explicitly call out to that shell. Exit status of 0 is treated as
+       * live/healthy and non-zero is unhealthy.
+       * 
+ * + * repeated string command = 1; + * + * @param value The command to add. + * @return This builder for chaining. + */ + public Builder addCommand(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommandIsMutable(); + command_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Command is the command line to execute inside the container, the working
+       * directory for the command is root ('/') in the container's filesystem.
+       * The command is simply exec'd, it is not run inside a shell, so
+       * traditional shell instructions ('|', etc) won't work. To use a shell, you
+       * need to explicitly call out to that shell. Exit status of 0 is treated as
+       * live/healthy and non-zero is unhealthy.
+       * 
+ * + * repeated string command = 1; + * + * @param values The command to add. + * @return This builder for chaining. + */ + public Builder addAllCommand(java.lang.Iterable values) { + ensureCommandIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, command_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Command is the command line to execute inside the container, the working
+       * directory for the command is root ('/') in the container's filesystem.
+       * The command is simply exec'd, it is not run inside a shell, so
+       * traditional shell instructions ('|', etc) won't work. To use a shell, you
+       * need to explicitly call out to that shell. Exit status of 0 is treated as
+       * live/healthy and non-zero is unhealthy.
+       * 
+ * + * repeated string command = 1; + * + * @return This builder for chaining. + */ + public Builder clearCommand() { + command_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Command is the command line to execute inside the container, the working
+       * directory for the command is root ('/') in the container's filesystem.
+       * The command is simply exec'd, it is not run inside a shell, so
+       * traditional shell instructions ('|', etc) won't work. To use a shell, you
+       * need to explicitly call out to that shell. Exit status of 0 is treated as
+       * live/healthy and non-zero is unhealthy.
+       * 
+ * + * repeated string command = 1; + * + * @param value The bytes of the command to add. + * @return This builder for chaining. + */ + public Builder addCommandBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCommandIsMutable(); + command_.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.aiplatform.v1beta1.Probe.ExecAction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.Probe.ExecAction) + private static final com.google.cloud.aiplatform.v1beta1.Probe.ExecAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.Probe.ExecAction(); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe.ExecAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecAction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Probe.ExecAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int probeTypeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object probeType_; + + public enum ProbeTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + EXEC(1), + PROBETYPE_NOT_SET(0); + private final int value; + + private ProbeTypeCase(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 ProbeTypeCase valueOf(int value) { + return forNumber(value); + } + + public static ProbeTypeCase forNumber(int value) { + switch (value) { + case 1: + return EXEC; + case 0: + return PROBETYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ProbeTypeCase getProbeTypeCase() { + return ProbeTypeCase.forNumber(probeTypeCase_); + } + + public static final int EXEC_FIELD_NUMBER = 1; + /** + * + * + *
+   * Exec specifies the action to take.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.Probe.ExecAction exec = 1; + * + * @return Whether the exec field is set. + */ + @java.lang.Override + public boolean hasExec() { + return probeTypeCase_ == 1; + } + /** + * + * + *
+   * Exec specifies the action to take.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.Probe.ExecAction exec = 1; + * + * @return The exec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Probe.ExecAction getExec() { + if (probeTypeCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.Probe.ExecAction) probeType_; + } + return com.google.cloud.aiplatform.v1beta1.Probe.ExecAction.getDefaultInstance(); + } + /** + * + * + *
+   * Exec specifies the action to take.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.Probe.ExecAction exec = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Probe.ExecActionOrBuilder getExecOrBuilder() { + if (probeTypeCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.Probe.ExecAction) probeType_; + } + return com.google.cloud.aiplatform.v1beta1.Probe.ExecAction.getDefaultInstance(); + } + + public static final int PERIOD_SECONDS_FIELD_NUMBER = 2; + private int periodSeconds_ = 0; + /** + * + * + *
+   * How often (in seconds) to perform the probe. Default to 10 seconds.
+   * Minimum value is 1. Must be less than timeout_seconds.
+   *
+   * Maps to Kubernetes probe argument 'periodSeconds'.
+   * 
+ * + * int32 period_seconds = 2; + * + * @return The periodSeconds. + */ + @java.lang.Override + public int getPeriodSeconds() { + return periodSeconds_; + } + + public static final int TIMEOUT_SECONDS_FIELD_NUMBER = 3; + private int timeoutSeconds_ = 0; + /** + * + * + *
+   * Number of seconds after which the probe times out. Defaults to 1 second.
+   * Minimum value is 1. Must be greater or equal to period_seconds.
+   *
+   * Maps to Kubernetes probe argument 'timeoutSeconds'.
+   * 
+ * + * int32 timeout_seconds = 3; + * + * @return The timeoutSeconds. + */ + @java.lang.Override + public int getTimeoutSeconds() { + return timeoutSeconds_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (probeTypeCase_ == 1) { + output.writeMessage(1, (com.google.cloud.aiplatform.v1beta1.Probe.ExecAction) probeType_); + } + if (periodSeconds_ != 0) { + output.writeInt32(2, periodSeconds_); + } + if (timeoutSeconds_ != 0) { + output.writeInt32(3, timeoutSeconds_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (probeTypeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.aiplatform.v1beta1.Probe.ExecAction) probeType_); + } + if (periodSeconds_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, periodSeconds_); + } + if (timeoutSeconds_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, timeoutSeconds_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.Probe)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.Probe other = + (com.google.cloud.aiplatform.v1beta1.Probe) obj; + + if (getPeriodSeconds() != other.getPeriodSeconds()) return false; + if (getTimeoutSeconds() != other.getTimeoutSeconds()) return false; + if (!getProbeTypeCase().equals(other.getProbeTypeCase())) return false; + switch (probeTypeCase_) { + case 1: + if (!getExec().equals(other.getExec())) 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) + PERIOD_SECONDS_FIELD_NUMBER; + hash = (53 * hash) + getPeriodSeconds(); + hash = (37 * hash) + TIMEOUT_SECONDS_FIELD_NUMBER; + hash = (53 * hash) + getTimeoutSeconds(); + switch (probeTypeCase_) { + case 1: + hash = (37 * hash) + EXEC_FIELD_NUMBER; + hash = (53 * hash) + getExec().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.Probe parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1beta1.Probe prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Probe describes a health check to be performed against a container to
+   * determine whether it is alive or ready to receive traffic.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.Probe} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.Probe) + com.google.cloud.aiplatform.v1beta1.ProbeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ModelProto + .internal_static_google_cloud_aiplatform_v1beta1_Probe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ModelProto + .internal_static_google_cloud_aiplatform_v1beta1_Probe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.Probe.class, + com.google.cloud.aiplatform.v1beta1.Probe.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.Probe.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (execBuilder_ != null) { + execBuilder_.clear(); + } + periodSeconds_ = 0; + timeoutSeconds_ = 0; + probeTypeCase_ = 0; + probeType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.ModelProto + .internal_static_google_cloud_aiplatform_v1beta1_Probe_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Probe getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.Probe.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Probe build() { + com.google.cloud.aiplatform.v1beta1.Probe result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Probe buildPartial() { + com.google.cloud.aiplatform.v1beta1.Probe result = + new com.google.cloud.aiplatform.v1beta1.Probe(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.Probe result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.periodSeconds_ = periodSeconds_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.timeoutSeconds_ = timeoutSeconds_; + } + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1beta1.Probe result) { + result.probeTypeCase_ = probeTypeCase_; + result.probeType_ = this.probeType_; + if (probeTypeCase_ == 1 && execBuilder_ != null) { + result.probeType_ = execBuilder_.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.aiplatform.v1beta1.Probe) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.Probe) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.Probe other) { + if (other == com.google.cloud.aiplatform.v1beta1.Probe.getDefaultInstance()) return this; + if (other.getPeriodSeconds() != 0) { + setPeriodSeconds(other.getPeriodSeconds()); + } + if (other.getTimeoutSeconds() != 0) { + setTimeoutSeconds(other.getTimeoutSeconds()); + } + switch (other.getProbeTypeCase()) { + case EXEC: + { + mergeExec(other.getExec()); + break; + } + case PROBETYPE_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(getExecFieldBuilder().getBuilder(), extensionRegistry); + probeTypeCase_ = 1; + break; + } // case 10 + case 16: + { + periodSeconds_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + timeoutSeconds_ = 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 probeTypeCase_ = 0; + private java.lang.Object probeType_; + + public ProbeTypeCase getProbeTypeCase() { + return ProbeTypeCase.forNumber(probeTypeCase_); + } + + public Builder clearProbeType() { + probeTypeCase_ = 0; + probeType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Probe.ExecAction, + com.google.cloud.aiplatform.v1beta1.Probe.ExecAction.Builder, + com.google.cloud.aiplatform.v1beta1.Probe.ExecActionOrBuilder> + execBuilder_; + /** + * + * + *
+     * Exec specifies the action to take.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.Probe.ExecAction exec = 1; + * + * @return Whether the exec field is set. + */ + @java.lang.Override + public boolean hasExec() { + return probeTypeCase_ == 1; + } + /** + * + * + *
+     * Exec specifies the action to take.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.Probe.ExecAction exec = 1; + * + * @return The exec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Probe.ExecAction getExec() { + if (execBuilder_ == null) { + if (probeTypeCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.Probe.ExecAction) probeType_; + } + return com.google.cloud.aiplatform.v1beta1.Probe.ExecAction.getDefaultInstance(); + } else { + if (probeTypeCase_ == 1) { + return execBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.Probe.ExecAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Exec specifies the action to take.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.Probe.ExecAction exec = 1; + */ + public Builder setExec(com.google.cloud.aiplatform.v1beta1.Probe.ExecAction value) { + if (execBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + probeType_ = value; + onChanged(); + } else { + execBuilder_.setMessage(value); + } + probeTypeCase_ = 1; + return this; + } + /** + * + * + *
+     * Exec specifies the action to take.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.Probe.ExecAction exec = 1; + */ + public Builder setExec( + com.google.cloud.aiplatform.v1beta1.Probe.ExecAction.Builder builderForValue) { + if (execBuilder_ == null) { + probeType_ = builderForValue.build(); + onChanged(); + } else { + execBuilder_.setMessage(builderForValue.build()); + } + probeTypeCase_ = 1; + return this; + } + /** + * + * + *
+     * Exec specifies the action to take.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.Probe.ExecAction exec = 1; + */ + public Builder mergeExec(com.google.cloud.aiplatform.v1beta1.Probe.ExecAction value) { + if (execBuilder_ == null) { + if (probeTypeCase_ == 1 + && probeType_ + != com.google.cloud.aiplatform.v1beta1.Probe.ExecAction.getDefaultInstance()) { + probeType_ = + com.google.cloud.aiplatform.v1beta1.Probe.ExecAction.newBuilder( + (com.google.cloud.aiplatform.v1beta1.Probe.ExecAction) probeType_) + .mergeFrom(value) + .buildPartial(); + } else { + probeType_ = value; + } + onChanged(); + } else { + if (probeTypeCase_ == 1) { + execBuilder_.mergeFrom(value); + } else { + execBuilder_.setMessage(value); + } + } + probeTypeCase_ = 1; + return this; + } + /** + * + * + *
+     * Exec specifies the action to take.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.Probe.ExecAction exec = 1; + */ + public Builder clearExec() { + if (execBuilder_ == null) { + if (probeTypeCase_ == 1) { + probeTypeCase_ = 0; + probeType_ = null; + onChanged(); + } + } else { + if (probeTypeCase_ == 1) { + probeTypeCase_ = 0; + probeType_ = null; + } + execBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Exec specifies the action to take.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.Probe.ExecAction exec = 1; + */ + public com.google.cloud.aiplatform.v1beta1.Probe.ExecAction.Builder getExecBuilder() { + return getExecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Exec specifies the action to take.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.Probe.ExecAction exec = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Probe.ExecActionOrBuilder getExecOrBuilder() { + if ((probeTypeCase_ == 1) && (execBuilder_ != null)) { + return execBuilder_.getMessageOrBuilder(); + } else { + if (probeTypeCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.Probe.ExecAction) probeType_; + } + return com.google.cloud.aiplatform.v1beta1.Probe.ExecAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Exec specifies the action to take.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.Probe.ExecAction exec = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Probe.ExecAction, + com.google.cloud.aiplatform.v1beta1.Probe.ExecAction.Builder, + com.google.cloud.aiplatform.v1beta1.Probe.ExecActionOrBuilder> + getExecFieldBuilder() { + if (execBuilder_ == null) { + if (!(probeTypeCase_ == 1)) { + probeType_ = com.google.cloud.aiplatform.v1beta1.Probe.ExecAction.getDefaultInstance(); + } + execBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Probe.ExecAction, + com.google.cloud.aiplatform.v1beta1.Probe.ExecAction.Builder, + com.google.cloud.aiplatform.v1beta1.Probe.ExecActionOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.Probe.ExecAction) probeType_, + getParentForChildren(), + isClean()); + probeType_ = null; + } + probeTypeCase_ = 1; + onChanged(); + return execBuilder_; + } + + private int periodSeconds_; + /** + * + * + *
+     * How often (in seconds) to perform the probe. Default to 10 seconds.
+     * Minimum value is 1. Must be less than timeout_seconds.
+     *
+     * Maps to Kubernetes probe argument 'periodSeconds'.
+     * 
+ * + * int32 period_seconds = 2; + * + * @return The periodSeconds. + */ + @java.lang.Override + public int getPeriodSeconds() { + return periodSeconds_; + } + /** + * + * + *
+     * How often (in seconds) to perform the probe. Default to 10 seconds.
+     * Minimum value is 1. Must be less than timeout_seconds.
+     *
+     * Maps to Kubernetes probe argument 'periodSeconds'.
+     * 
+ * + * int32 period_seconds = 2; + * + * @param value The periodSeconds to set. + * @return This builder for chaining. + */ + public Builder setPeriodSeconds(int value) { + + periodSeconds_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * How often (in seconds) to perform the probe. Default to 10 seconds.
+     * Minimum value is 1. Must be less than timeout_seconds.
+     *
+     * Maps to Kubernetes probe argument 'periodSeconds'.
+     * 
+ * + * int32 period_seconds = 2; + * + * @return This builder for chaining. + */ + public Builder clearPeriodSeconds() { + bitField0_ = (bitField0_ & ~0x00000002); + periodSeconds_ = 0; + onChanged(); + return this; + } + + private int timeoutSeconds_; + /** + * + * + *
+     * Number of seconds after which the probe times out. Defaults to 1 second.
+     * Minimum value is 1. Must be greater or equal to period_seconds.
+     *
+     * Maps to Kubernetes probe argument 'timeoutSeconds'.
+     * 
+ * + * int32 timeout_seconds = 3; + * + * @return The timeoutSeconds. + */ + @java.lang.Override + public int getTimeoutSeconds() { + return timeoutSeconds_; + } + /** + * + * + *
+     * Number of seconds after which the probe times out. Defaults to 1 second.
+     * Minimum value is 1. Must be greater or equal to period_seconds.
+     *
+     * Maps to Kubernetes probe argument 'timeoutSeconds'.
+     * 
+ * + * int32 timeout_seconds = 3; + * + * @param value The timeoutSeconds to set. + * @return This builder for chaining. + */ + public Builder setTimeoutSeconds(int value) { + + timeoutSeconds_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of seconds after which the probe times out. Defaults to 1 second.
+     * Minimum value is 1. Must be greater or equal to period_seconds.
+     *
+     * Maps to Kubernetes probe argument 'timeoutSeconds'.
+     * 
+ * + * int32 timeout_seconds = 3; + * + * @return This builder for chaining. + */ + public Builder clearTimeoutSeconds() { + bitField0_ = (bitField0_ & ~0x00000004); + timeoutSeconds_ = 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.aiplatform.v1beta1.Probe) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.Probe) + private static final com.google.cloud.aiplatform.v1beta1.Probe DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.Probe(); + } + + public static com.google.cloud.aiplatform.v1beta1.Probe getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Probe parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Probe getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ProbeOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ProbeOrBuilder.java new file mode 100644 index 000000000000..bf3a713c44b2 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ProbeOrBuilder.java @@ -0,0 +1,94 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/model.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface ProbeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.Probe) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Exec specifies the action to take.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.Probe.ExecAction exec = 1; + * + * @return Whether the exec field is set. + */ + boolean hasExec(); + /** + * + * + *
+   * Exec specifies the action to take.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.Probe.ExecAction exec = 1; + * + * @return The exec. + */ + com.google.cloud.aiplatform.v1beta1.Probe.ExecAction getExec(); + /** + * + * + *
+   * Exec specifies the action to take.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.Probe.ExecAction exec = 1; + */ + com.google.cloud.aiplatform.v1beta1.Probe.ExecActionOrBuilder getExecOrBuilder(); + + /** + * + * + *
+   * How often (in seconds) to perform the probe. Default to 10 seconds.
+   * Minimum value is 1. Must be less than timeout_seconds.
+   *
+   * Maps to Kubernetes probe argument 'periodSeconds'.
+   * 
+ * + * int32 period_seconds = 2; + * + * @return The periodSeconds. + */ + int getPeriodSeconds(); + + /** + * + * + *
+   * Number of seconds after which the probe times out. Defaults to 1 second.
+   * Minimum value is 1. Must be greater or equal to period_seconds.
+   *
+   * Maps to Kubernetes probe argument 'timeoutSeconds'.
+   * 
+ * + * int32 timeout_seconds = 3; + * + * @return The timeoutSeconds. + */ + int getTimeoutSeconds(); + + com.google.cloud.aiplatform.v1beta1.Probe.ProbeTypeCase getProbeTypeCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudyProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudyProto.java index e86ad5d5ae90..e95214446c9e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudyProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudyProto.java @@ -47,6 +47,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_TrialContext_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_TrialContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_StudyTimeConstraint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_StudyTimeConstraint_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1beta1_StudySpec_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -115,6 +119,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_StudySpec_TransferLearningConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_StudySpec_TransferLearningConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_StudySpec_StudyStoppingConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_StudySpec_StudyStoppingConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1beta1_Measurement_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -137,165 +145,185 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "google/api/field_behavior.proto\032\031google/" + "api/resource.proto\032\036google/protobuf/dura" + "tion.proto\032\034google/protobuf/struct.proto" - + "\032\037google/protobuf/timestamp.proto\"\276\003\n\005St" - + "udy\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\032\n\014display_name\030" - + "\002 \001(\tB\004\342A\001\002\022D\n\nstudy_spec\030\003 \001(\0132*.google" - + ".cloud.aiplatform.v1beta1.StudySpecB\004\342A\001" - + "\002\022A\n\005state\030\004 \001(\0162,.google.cloud.aiplatfo" - + "rm.v1beta1.Study.StateB\004\342A\001\003\0225\n\013create_t" - + "ime\030\005 \001(\0132\032.google.protobuf.TimestampB\004\342" - + "A\001\003\022\035\n\017inactive_reason\030\006 \001(\tB\004\342A\001\003\"G\n\005St" - + "ate\022\025\n\021STATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\014" - + "\n\010INACTIVE\020\002\022\r\n\tCOMPLETED\020\003:]\352AZ\n\037aiplat" - + "form.googleapis.com/Study\0227projects/{pro" - + "ject}/locations/{location}/studies/{stud" - + "y}\"\367\007\n\005Trial\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\020\n\002id\030\002" - + " \001(\tB\004\342A\001\003\022A\n\005state\030\003 \001(\0162,.google.cloud" - + ".aiplatform.v1beta1.Trial.StateB\004\342A\001\003\022J\n" - + "\nparameters\030\004 \003(\01320.google.cloud.aiplatf" - + "orm.v1beta1.Trial.ParameterB\004\342A\001\003\022M\n\021fin" - + "al_measurement\030\005 \001(\0132,.google.cloud.aipl" - + "atform.v1beta1.MeasurementB\004\342A\001\003\022H\n\014meas" - + "urements\030\006 \003(\0132,.google.cloud.aiplatform" - + ".v1beta1.MeasurementB\004\342A\001\003\0224\n\nstart_time" - + "\030\007 \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003" - + "\0222\n\010end_time\030\010 \001(\0132\032.google.protobuf.Tim" - + "estampB\004\342A\001\003\022\027\n\tclient_id\030\t \001(\tB\004\342A\001\003\022\037\n" - + "\021infeasible_reason\030\n \001(\tB\004\342A\001\003\022@\n\ncustom" - + "_job\030\013 \001(\tB,\342A\001\003\372A%\n#aiplatform.googleap" - + "is.com/CustomJob\022X\n\017web_access_uris\030\014 \003(" - + "\01329.google.cloud.aiplatform.v1beta1.Tria" - + "l.WebAccessUrisEntryB\004\342A\001\003\032T\n\tParameter\022" - + "\032\n\014parameter_id\030\001 \001(\tB\004\342A\001\003\022+\n\005value\030\002 \001" - + "(\0132\026.google.protobuf.ValueB\004\342A\001\003\0324\n\022WebA" - + "ccessUrisEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" - + "(\t:\0028\001\"f\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\r" - + "\n\tREQUESTED\020\001\022\n\n\006ACTIVE\020\002\022\014\n\010STOPPING\020\003\022" - + "\r\n\tSUCCEEDED\020\004\022\016\n\nINFEASIBLE\020\005:l\352Ai\n\037aip" - + "latform.googleapis.com/Trial\022Fprojects/{" - + "project}/locations/{location}/studies/{s" - + "tudy}/trials/{trial}\"i\n\014TrialContext\022\023\n\013" - + "description\030\001 \001(\t\022D\n\nparameters\030\002 \003(\01320." - + "google.cloud.aiplatform.v1beta1.Trial.Pa" - + "rameter\"\264!\n\tStudySpec\022o\n\031decay_curve_sto" - + "pping_spec\030\004 \001(\0132J.google.cloud.aiplatfo" - + "rm.v1beta1.StudySpec.DecayCurveAutomated" - + "StoppingSpecH\000\022p\n\036median_automated_stopp" - + "ing_spec\030\005 \001(\0132F.google.cloud.aiplatform" - + ".v1beta1.StudySpec.MedianAutomatedStoppi" - + "ngSpecH\000\022]\n\022convex_stop_config\030\010 \001(\0132;.g" - + "oogle.cloud.aiplatform.v1beta1.StudySpec" - + ".ConvexStopConfigB\002\030\001H\000\022p\n\036convex_automa" - + "ted_stopping_spec\030\t \001(\0132F.google.cloud.a" - + "iplatform.v1beta1.StudySpec.ConvexAutoma" - + "tedStoppingSpecH\000\022L\n\007metrics\030\001 \003(\01325.goo" - + "gle.cloud.aiplatform.v1beta1.StudySpec.M" - + "etricSpecB\004\342A\001\002\022R\n\nparameters\030\002 \003(\01328.go" - + "ogle.cloud.aiplatform.v1beta1.StudySpec." - + "ParameterSpecB\004\342A\001\002\022G\n\talgorithm\030\003 \001(\01624" - + ".google.cloud.aiplatform.v1beta1.StudySp" - + "ec.Algorithm\022V\n\021observation_noise\030\006 \001(\0162" - + ";.google.cloud.aiplatform.v1beta1.StudyS" - + "pec.ObservationNoise\022g\n\032measurement_sele" - + "ction_type\030\007 \001(\0162C.google.cloud.aiplatfo" - + "rm.v1beta1.StudySpec.MeasurementSelectio" - + "nType\022c\n\030transfer_learning_config\030\n \001(\0132" - + "A.google.cloud.aiplatform.v1beta1.StudyS" - + "pec.TransferLearningConfig\032\271\003\n\nMetricSpe" - + "c\022\027\n\tmetric_id\030\001 \001(\tB\004\342A\001\002\022R\n\004goal\030\002 \001(\016" - + "2>.google.cloud.aiplatform.v1beta1.Study" - + "Spec.MetricSpec.GoalTypeB\004\342A\001\002\022d\n\rsafety" - + "_config\030\003 \001(\0132H.google.cloud.aiplatform." - + "v1beta1.StudySpec.MetricSpec.SafetyMetri" - + "cConfigH\000\210\001\001\032\202\001\n\022SafetyMetricConfig\022\030\n\020s" - + "afety_threshold\030\001 \001(\001\022-\n desired_min_saf" - + "e_trials_fraction\030\002 \001(\001H\000\210\001\001B#\n!_desired" - + "_min_safe_trials_fraction\"A\n\010GoalType\022\031\n" - + "\025GOAL_TYPE_UNSPECIFIED\020\000\022\014\n\010MAXIMIZE\020\001\022\014" - + "\n\010MINIMIZE\020\002B\020\n\016_safety_config\032\213\017\n\rParam" - + "eterSpec\022e\n\021double_value_spec\030\002 \001(\0132H.go" - + "ogle.cloud.aiplatform.v1beta1.StudySpec." - + "ParameterSpec.DoubleValueSpecH\000\022g\n\022integ" - + "er_value_spec\030\003 \001(\0132I.google.cloud.aipla" - + "tform.v1beta1.StudySpec.ParameterSpec.In" - + "tegerValueSpecH\000\022o\n\026categorical_value_sp" - + "ec\030\004 \001(\0132M.google.cloud.aiplatform.v1bet" - + "a1.StudySpec.ParameterSpec.CategoricalVa" - + "lueSpecH\000\022i\n\023discrete_value_spec\030\005 \001(\0132J" - + ".google.cloud.aiplatform.v1beta1.StudySp" - + "ec.ParameterSpec.DiscreteValueSpecH\000\022\032\n\014" - + "parameter_id\030\001 \001(\tB\004\342A\001\002\022V\n\nscale_type\030\006" - + " \001(\0162B.google.cloud.aiplatform.v1beta1.S" - + "tudySpec.ParameterSpec.ScaleType\022v\n\033cond" - + "itional_parameter_specs\030\n \003(\0132Q.google.c" - + "loud.aiplatform.v1beta1.StudySpec.Parame" - + "terSpec.ConditionalParameterSpec\032q\n\017Doub" - + "leValueSpec\022\027\n\tmin_value\030\001 \001(\001B\004\342A\001\002\022\027\n\t" - + "max_value\030\002 \001(\001B\004\342A\001\002\022\032\n\rdefault_value\030\004" - + " \001(\001H\000\210\001\001B\020\n\016_default_value\032r\n\020IntegerVa" - + "lueSpec\022\027\n\tmin_value\030\001 \001(\003B\004\342A\001\002\022\027\n\tmax_" - + "value\030\002 \001(\003B\004\342A\001\002\022\032\n\rdefault_value\030\004 \001(\003" - + "H\000\210\001\001B\020\n\016_default_value\032Z\n\024CategoricalVa" - + "lueSpec\022\024\n\006values\030\001 \003(\tB\004\342A\001\002\022\032\n\rdefault" - + "_value\030\003 \001(\tH\000\210\001\001B\020\n\016_default_value\032W\n\021D" - + "iscreteValueSpec\022\024\n\006values\030\001 \003(\001B\004\342A\001\002\022\032" - + "\n\rdefault_value\030\003 \001(\001H\000\210\001\001B\020\n\016_default_v" - + "alue\032\275\005\n\030ConditionalParameterSpec\022\212\001\n\026pa" - + "rent_discrete_values\030\002 \001(\0132h.google.clou" - + "d.aiplatform.v1beta1.StudySpec.Parameter" - + "Spec.ConditionalParameterSpec.DiscreteVa" - + "lueConditionH\000\022\200\001\n\021parent_int_values\030\003 \001" - + "(\0132c.google.cloud.aiplatform.v1beta1.Stu" - + "dySpec.ParameterSpec.ConditionalParamete" - + "rSpec.IntValueConditionH\000\022\220\001\n\031parent_cat" - + "egorical_values\030\004 \001(\0132k.google.cloud.aip" - + "latform.v1beta1.StudySpec.ParameterSpec." - + "ConditionalParameterSpec.CategoricalValu" - + "eConditionH\000\022V\n\016parameter_spec\030\001 \001(\01328.g" - + "oogle.cloud.aiplatform.v1beta1.StudySpec" - + ".ParameterSpecB\004\342A\001\002\032.\n\026DiscreteValueCon" - + "dition\022\024\n\006values\030\001 \003(\001B\004\342A\001\002\032)\n\021IntValue" - + "Condition\022\024\n\006values\030\001 \003(\003B\004\342A\001\002\0321\n\031Categ" - + "oricalValueCondition\022\024\n\006values\030\001 \003(\tB\004\342A" - + "\001\002B\030\n\026parent_value_condition\"n\n\tScaleTyp" - + "e\022\032\n\026SCALE_TYPE_UNSPECIFIED\020\000\022\025\n\021UNIT_LI" - + "NEAR_SCALE\020\001\022\022\n\016UNIT_LOG_SCALE\020\002\022\032\n\026UNIT" - + "_REVERSE_LOG_SCALE\020\003B\026\n\024parameter_value_" - + "spec\032?\n\037DecayCurveAutomatedStoppingSpec\022" - + "\034\n\024use_elapsed_duration\030\001 \001(\010\032;\n\033MedianA" - + "utomatedStoppingSpec\022\034\n\024use_elapsed_dura" - + "tion\030\001 \001(\010\032\366\001\n\033ConvexAutomatedStoppingSp" - + "ec\022\026\n\016max_step_count\030\001 \001(\003\022\026\n\016min_step_c" - + "ount\030\002 \001(\003\022\035\n\025min_measurement_count\030\003 \001(" - + "\003\022$\n\034learning_rate_parameter_name\030\004 \001(\t\022" - + "\034\n\024use_elapsed_duration\030\005 \001(\010\022&\n\031update_" - + "all_stopped_trials\030\006 \001(\010H\000\210\001\001B\034\n\032_update" - + "_all_stopped_trials\032\235\001\n\020ConvexStopConfig" - + "\022\025\n\rmax_num_steps\030\001 \001(\003\022\025\n\rmin_num_steps" - + "\030\002 \001(\003\022\034\n\024autoregressive_order\030\003 \001(\003\022$\n\034" - + "learning_rate_parameter_name\030\004 \001(\t\022\023\n\013us" - + "e_seconds\030\005 \001(\010:\002\030\001\032\\\n\026TransferLearningC" - + "onfig\022!\n\031disable_transfer_learning\030\001 \001(\010" - + "\022\037\n\021prior_study_names\030\002 \003(\tB\004\342A\001\003\"J\n\tAlg" - + "orithm\022\031\n\025ALGORITHM_UNSPECIFIED\020\000\022\017\n\013GRI" - + "D_SEARCH\020\002\022\021\n\rRANDOM_SEARCH\020\003\"H\n\020Observa" - + "tionNoise\022!\n\035OBSERVATION_NOISE_UNSPECIFI" - + "ED\020\000\022\007\n\003LOW\020\001\022\010\n\004HIGH\020\002\"r\n\030MeasurementSe" - + "lectionType\022*\n&MEASUREMENT_SELECTION_TYP" - + "E_UNSPECIFIED\020\000\022\024\n\020LAST_MEASUREMENT\020\001\022\024\n" - + "\020BEST_MEASUREMENT\020\002B\031\n\027automated_stoppin" - + "g_spec\"\346\001\n\013Measurement\0229\n\020elapsed_durati" - + "on\030\001 \001(\0132\031.google.protobuf.DurationB\004\342A\001" - + "\003\022\030\n\nstep_count\030\002 \001(\003B\004\342A\001\003\022J\n\007metrics\030\003" - + " \003(\01323.google.cloud.aiplatform.v1beta1.M" - + "easurement.MetricB\004\342A\001\003\0326\n\006Metric\022\027\n\tmet" - + "ric_id\030\001 \001(\tB\004\342A\001\003\022\023\n\005value\030\002 \001(\001B\004\342A\001\003B" - + "\341\001\n#com.google.cloud.aiplatform.v1beta1B" - + "\nStudyProtoP\001ZCcloud.google.com/go/aipla" - + "tform/apiv1beta1/aiplatformpb;aiplatform" - + "pb\252\002\037Google.Cloud.AIPlatform.V1Beta1\312\002\037G" - + "oogle\\Cloud\\AIPlatform\\V1beta1\352\002\"Google:" - + ":Cloud::AIPlatform::V1beta1b\006proto3" + + "\032\037google/protobuf/timestamp.proto\032\036googl" + + "e/protobuf/wrappers.proto\"\276\003\n\005Study\022\022\n\004n" + + "ame\030\001 \001(\tB\004\342A\001\003\022\032\n\014display_name\030\002 \001(\tB\004\342" + + "A\001\002\022D\n\nstudy_spec\030\003 \001(\0132*.google.cloud.a" + + "iplatform.v1beta1.StudySpecB\004\342A\001\002\022A\n\005sta" + + "te\030\004 \001(\0162,.google.cloud.aiplatform.v1bet" + + "a1.Study.StateB\004\342A\001\003\0225\n\013create_time\030\005 \001(" + + "\0132\032.google.protobuf.TimestampB\004\342A\001\003\022\035\n\017i" + + "nactive_reason\030\006 \001(\tB\004\342A\001\003\"G\n\005State\022\025\n\021S" + + "TATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\014\n\010INACTI" + + "VE\020\002\022\r\n\tCOMPLETED\020\003:]\352AZ\n\037aiplatform.goo" + + "gleapis.com/Study\0227projects/{project}/lo" + + "cations/{location}/studies/{study}\"\367\007\n\005T" + + "rial\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\020\n\002id\030\002 \001(\tB\004\342A" + + "\001\003\022A\n\005state\030\003 \001(\0162,.google.cloud.aiplatf" + + "orm.v1beta1.Trial.StateB\004\342A\001\003\022J\n\nparamet" + + "ers\030\004 \003(\01320.google.cloud.aiplatform.v1be" + + "ta1.Trial.ParameterB\004\342A\001\003\022M\n\021final_measu" + + "rement\030\005 \001(\0132,.google.cloud.aiplatform.v" + + "1beta1.MeasurementB\004\342A\001\003\022H\n\014measurements" + + "\030\006 \003(\0132,.google.cloud.aiplatform.v1beta1" + + ".MeasurementB\004\342A\001\003\0224\n\nstart_time\030\007 \001(\0132\032" + + ".google.protobuf.TimestampB\004\342A\001\003\0222\n\010end_" + + "time\030\010 \001(\0132\032.google.protobuf.TimestampB\004" + + "\342A\001\003\022\027\n\tclient_id\030\t \001(\tB\004\342A\001\003\022\037\n\021infeasi" + + "ble_reason\030\n \001(\tB\004\342A\001\003\022@\n\ncustom_job\030\013 \001" + + "(\tB,\342A\001\003\372A%\n#aiplatform.googleapis.com/C" + + "ustomJob\022X\n\017web_access_uris\030\014 \003(\01329.goog" + + "le.cloud.aiplatform.v1beta1.Trial.WebAcc" + + "essUrisEntryB\004\342A\001\003\032T\n\tParameter\022\032\n\014param" + + "eter_id\030\001 \001(\tB\004\342A\001\003\022+\n\005value\030\002 \001(\0132\026.goo" + + "gle.protobuf.ValueB\004\342A\001\003\0324\n\022WebAccessUri" + + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"f" + + "\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\r\n\tREQUES" + + "TED\020\001\022\n\n\006ACTIVE\020\002\022\014\n\010STOPPING\020\003\022\r\n\tSUCCE" + + "EDED\020\004\022\016\n\nINFEASIBLE\020\005:l\352Ai\n\037aiplatform." + + "googleapis.com/Trial\022Fprojects/{project}" + + "/locations/{location}/studies/{study}/tr" + + "ials/{trial}\"i\n\014TrialContext\022\023\n\013descript" + + "ion\030\001 \001(\t\022D\n\nparameters\030\002 \003(\01320.google.c" + + "loud.aiplatform.v1beta1.Trial.Parameter\"" + + "\206\001\n\023StudyTimeConstraint\0221\n\014max_duration\030" + + "\001 \001(\0132\031.google.protobuf.DurationH\000\022.\n\010en" + + "d_time\030\002 \001(\0132\032.google.protobuf.Timestamp" + + "H\000B\014\n\nconstraint\"\234&\n\tStudySpec\022o\n\031decay_" + + "curve_stopping_spec\030\004 \001(\0132J.google.cloud" + + ".aiplatform.v1beta1.StudySpec.DecayCurve" + + "AutomatedStoppingSpecH\000\022p\n\036median_automa" + + "ted_stopping_spec\030\005 \001(\0132F.google.cloud.a" + + "iplatform.v1beta1.StudySpec.MedianAutoma" + + "tedStoppingSpecH\000\022]\n\022convex_stop_config\030" + + "\010 \001(\0132;.google.cloud.aiplatform.v1beta1." + + "StudySpec.ConvexStopConfigB\002\030\001H\000\022p\n\036conv" + + "ex_automated_stopping_spec\030\t \001(\0132F.googl" + + "e.cloud.aiplatform.v1beta1.StudySpec.Con" + + "vexAutomatedStoppingSpecH\000\022L\n\007metrics\030\001 " + + "\003(\01325.google.cloud.aiplatform.v1beta1.St" + + "udySpec.MetricSpecB\004\342A\001\002\022R\n\nparameters\030\002" + + " \003(\01328.google.cloud.aiplatform.v1beta1.S" + + "tudySpec.ParameterSpecB\004\342A\001\002\022G\n\talgorith" + + "m\030\003 \001(\01624.google.cloud.aiplatform.v1beta" + + "1.StudySpec.Algorithm\022V\n\021observation_noi" + + "se\030\006 \001(\0162;.google.cloud.aiplatform.v1bet" + + "a1.StudySpec.ObservationNoise\022g\n\032measure" + + "ment_selection_type\030\007 \001(\0162C.google.cloud" + + ".aiplatform.v1beta1.StudySpec.Measuremen" + + "tSelectionType\022c\n\030transfer_learning_conf" + + "ig\030\n \001(\0132A.google.cloud.aiplatform.v1bet" + + "a1.StudySpec.TransferLearningConfig\022b\n\025s" + + "tudy_stopping_config\030\013 \001(\0132>.google.clou" + + "d.aiplatform.v1beta1.StudySpec.StudyStop" + + "pingConfigH\001\210\001\001\032\271\003\n\nMetricSpec\022\027\n\tmetric" + + "_id\030\001 \001(\tB\004\342A\001\002\022R\n\004goal\030\002 \001(\0162>.google.c" + + "loud.aiplatform.v1beta1.StudySpec.Metric" + + "Spec.GoalTypeB\004\342A\001\002\022d\n\rsafety_config\030\003 \001" + + "(\0132H.google.cloud.aiplatform.v1beta1.Stu" + + "dySpec.MetricSpec.SafetyMetricConfigH\000\210\001" + + "\001\032\202\001\n\022SafetyMetricConfig\022\030\n\020safety_thres" + + "hold\030\001 \001(\001\022-\n desired_min_safe_trials_fr" + + "action\030\002 \001(\001H\000\210\001\001B#\n!_desired_min_safe_t" + + "rials_fraction\"A\n\010GoalType\022\031\n\025GOAL_TYPE_" + + "UNSPECIFIED\020\000\022\014\n\010MAXIMIZE\020\001\022\014\n\010MINIMIZE\020" + + "\002B\020\n\016_safety_config\032\213\017\n\rParameterSpec\022e\n" + + "\021double_value_spec\030\002 \001(\0132H.google.cloud." + + "aiplatform.v1beta1.StudySpec.ParameterSp" + + "ec.DoubleValueSpecH\000\022g\n\022integer_value_sp" + + "ec\030\003 \001(\0132I.google.cloud.aiplatform.v1bet" + + "a1.StudySpec.ParameterSpec.IntegerValueS" + + "pecH\000\022o\n\026categorical_value_spec\030\004 \001(\0132M." + + "google.cloud.aiplatform.v1beta1.StudySpe" + + "c.ParameterSpec.CategoricalValueSpecH\000\022i" + + "\n\023discrete_value_spec\030\005 \001(\0132J.google.clo" + + "ud.aiplatform.v1beta1.StudySpec.Paramete" + + "rSpec.DiscreteValueSpecH\000\022\032\n\014parameter_i" + + "d\030\001 \001(\tB\004\342A\001\002\022V\n\nscale_type\030\006 \001(\0162B.goog" + + "le.cloud.aiplatform.v1beta1.StudySpec.Pa" + + "rameterSpec.ScaleType\022v\n\033conditional_par" + + "ameter_specs\030\n \003(\0132Q.google.cloud.aiplat" + + "form.v1beta1.StudySpec.ParameterSpec.Con" + + "ditionalParameterSpec\032q\n\017DoubleValueSpec" + + "\022\027\n\tmin_value\030\001 \001(\001B\004\342A\001\002\022\027\n\tmax_value\030\002" + + " \001(\001B\004\342A\001\002\022\032\n\rdefault_value\030\004 \001(\001H\000\210\001\001B\020" + + "\n\016_default_value\032r\n\020IntegerValueSpec\022\027\n\t" + + "min_value\030\001 \001(\003B\004\342A\001\002\022\027\n\tmax_value\030\002 \001(\003" + + "B\004\342A\001\002\022\032\n\rdefault_value\030\004 \001(\003H\000\210\001\001B\020\n\016_d" + + "efault_value\032Z\n\024CategoricalValueSpec\022\024\n\006" + + "values\030\001 \003(\tB\004\342A\001\002\022\032\n\rdefault_value\030\003 \001(" + + "\tH\000\210\001\001B\020\n\016_default_value\032W\n\021DiscreteValu" + + "eSpec\022\024\n\006values\030\001 \003(\001B\004\342A\001\002\022\032\n\rdefault_v" + + "alue\030\003 \001(\001H\000\210\001\001B\020\n\016_default_value\032\275\005\n\030Co" + + "nditionalParameterSpec\022\212\001\n\026parent_discre" + + "te_values\030\002 \001(\0132h.google.cloud.aiplatfor" + + "m.v1beta1.StudySpec.ParameterSpec.Condit" + + "ionalParameterSpec.DiscreteValueConditio" + + "nH\000\022\200\001\n\021parent_int_values\030\003 \001(\0132c.google" + + ".cloud.aiplatform.v1beta1.StudySpec.Para" + + "meterSpec.ConditionalParameterSpec.IntVa" + + "lueConditionH\000\022\220\001\n\031parent_categorical_va" + + "lues\030\004 \001(\0132k.google.cloud.aiplatform.v1b" + + "eta1.StudySpec.ParameterSpec.Conditional" + + "ParameterSpec.CategoricalValueConditionH" + + "\000\022V\n\016parameter_spec\030\001 \001(\01328.google.cloud" + + ".aiplatform.v1beta1.StudySpec.ParameterS" + + "pecB\004\342A\001\002\032.\n\026DiscreteValueCondition\022\024\n\006v" + + "alues\030\001 \003(\001B\004\342A\001\002\032)\n\021IntValueCondition\022\024" + + "\n\006values\030\001 \003(\003B\004\342A\001\002\0321\n\031CategoricalValue" + + "Condition\022\024\n\006values\030\001 \003(\tB\004\342A\001\002B\030\n\026paren" + + "t_value_condition\"n\n\tScaleType\022\032\n\026SCALE_" + + "TYPE_UNSPECIFIED\020\000\022\025\n\021UNIT_LINEAR_SCALE\020" + + "\001\022\022\n\016UNIT_LOG_SCALE\020\002\022\032\n\026UNIT_REVERSE_LO" + + "G_SCALE\020\003B\026\n\024parameter_value_spec\032?\n\037Dec" + + "ayCurveAutomatedStoppingSpec\022\034\n\024use_elap" + + "sed_duration\030\001 \001(\010\032;\n\033MedianAutomatedSto" + + "ppingSpec\022\034\n\024use_elapsed_duration\030\001 \001(\010\032" + + "\366\001\n\033ConvexAutomatedStoppingSpec\022\026\n\016max_s" + + "tep_count\030\001 \001(\003\022\026\n\016min_step_count\030\002 \001(\003\022" + + "\035\n\025min_measurement_count\030\003 \001(\003\022$\n\034learni" + + "ng_rate_parameter_name\030\004 \001(\t\022\034\n\024use_elap" + + "sed_duration\030\005 \001(\010\022&\n\031update_all_stopped" + + "_trials\030\006 \001(\010H\000\210\001\001B\034\n\032_update_all_stoppe" + + "d_trials\032\235\001\n\020ConvexStopConfig\022\025\n\rmax_num" + + "_steps\030\001 \001(\003\022\025\n\rmin_num_steps\030\002 \001(\003\022\034\n\024a" + + "utoregressive_order\030\003 \001(\003\022$\n\034learning_ra" + + "te_parameter_name\030\004 \001(\t\022\023\n\013use_seconds\030\005" + + " \001(\010:\002\030\001\032\\\n\026TransferLearningConfig\022!\n\031di" + + "sable_transfer_learning\030\001 \001(\010\022\037\n\021prior_s" + + "tudy_names\030\002 \003(\tB\004\342A\001\003\032\347\003\n\023StudyStopping" + + "Config\0224\n\020should_stop_asap\030\001 \001(\0132\032.googl" + + "e.protobuf.BoolValue\022X\n\032minimum_runtime_" + + "constraint\030\002 \001(\01324.google.cloud.aiplatfo" + + "rm.v1beta1.StudyTimeConstraint\022X\n\032maximu" + + "m_runtime_constraint\030\003 \001(\01324.google.clou" + + "d.aiplatform.v1beta1.StudyTimeConstraint" + + "\0223\n\016min_num_trials\030\004 \001(\0132\033.google.protob" + + "uf.Int32Value\0223\n\016max_num_trials\030\005 \001(\0132\033." + + "google.protobuf.Int32Value\022?\n\032max_num_tr" + + "ials_no_progress\030\006 \001(\0132\033.google.protobuf" + + ".Int32Value\022;\n\030max_duration_no_progress\030" + + "\007 \001(\0132\031.google.protobuf.Duration\"J\n\tAlgo" + + "rithm\022\031\n\025ALGORITHM_UNSPECIFIED\020\000\022\017\n\013GRID" + + "_SEARCH\020\002\022\021\n\rRANDOM_SEARCH\020\003\"H\n\020Observat" + + "ionNoise\022!\n\035OBSERVATION_NOISE_UNSPECIFIE" + + "D\020\000\022\007\n\003LOW\020\001\022\010\n\004HIGH\020\002\"r\n\030MeasurementSel" + + "ectionType\022*\n&MEASUREMENT_SELECTION_TYPE" + + "_UNSPECIFIED\020\000\022\024\n\020LAST_MEASUREMENT\020\001\022\024\n\020" + + "BEST_MEASUREMENT\020\002B\031\n\027automated_stopping" + + "_specB\030\n\026_study_stopping_config\"\346\001\n\013Meas" + + "urement\0229\n\020elapsed_duration\030\001 \001(\0132\031.goog" + + "le.protobuf.DurationB\004\342A\001\003\022\030\n\nstep_count" + + "\030\002 \001(\003B\004\342A\001\003\022J\n\007metrics\030\003 \003(\01323.google.c" + + "loud.aiplatform.v1beta1.Measurement.Metr" + + "icB\004\342A\001\003\0326\n\006Metric\022\027\n\tmetric_id\030\001 \001(\tB\004\342" + + "A\001\003\022\023\n\005value\030\002 \001(\001B\004\342A\001\003B\341\001\n#com.google." + + "cloud.aiplatform.v1beta1B\nStudyProtoP\001ZC" + + "cloud.google.com/go/aiplatform/apiv1beta" + + "1/aiplatformpb;aiplatformpb\252\002\037Google.Clo" + + "ud.AIPlatform.V1Beta1\312\002\037Google\\Cloud\\AIP" + + "latform\\V1beta1\352\002\"Google::Cloud::AIPlatf" + + "orm::V1beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -306,6 +334,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), }); internal_static_google_cloud_aiplatform_v1beta1_Study_descriptor = getDescriptor().getMessageTypes().get(0); @@ -358,8 +387,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Description", "Parameters", }); - internal_static_google_cloud_aiplatform_v1beta1_StudySpec_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_StudyTimeConstraint_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1beta1_StudyTimeConstraint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_StudyTimeConstraint_descriptor, + new java.lang.String[] { + "MaxDuration", "EndTime", "Constraint", + }); + internal_static_google_cloud_aiplatform_v1beta1_StudySpec_descriptor = + getDescriptor().getMessageTypes().get(4); internal_static_google_cloud_aiplatform_v1beta1_StudySpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_StudySpec_descriptor, @@ -374,7 +411,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ObservationNoise", "MeasurementSelectionType", "TransferLearningConfig", + "StudyStoppingConfig", "AutomatedStoppingSpec", + "StudyStoppingConfig", }); internal_static_google_cloud_aiplatform_v1beta1_StudySpec_MetricSpec_descriptor = internal_static_google_cloud_aiplatform_v1beta1_StudySpec_descriptor @@ -557,8 +596,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "DisableTransferLearning", "PriorStudyNames", }); + internal_static_google_cloud_aiplatform_v1beta1_StudySpec_StudyStoppingConfig_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_StudySpec_descriptor + .getNestedTypes() + .get(7); + internal_static_google_cloud_aiplatform_v1beta1_StudySpec_StudyStoppingConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_StudySpec_StudyStoppingConfig_descriptor, + new java.lang.String[] { + "ShouldStopAsap", + "MinimumRuntimeConstraint", + "MaximumRuntimeConstraint", + "MinNumTrials", + "MaxNumTrials", + "MaxNumTrialsNoProgress", + "MaxDurationNoProgress", + }); internal_static_google_cloud_aiplatform_v1beta1_Measurement_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_aiplatform_v1beta1_Measurement_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_Measurement_descriptor, @@ -587,6 +642,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudySpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudySpec.java index 5363a3fc5b02..1ca7902e4d12 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudySpec.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudySpec.java @@ -19592,6 +19592,3089 @@ public com.google.protobuf.Parser getParserForType() { } } + public interface StudyStoppingConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+     * STOPPING state.
+     *
+     * The bottom line is: set to true if you want to interrupt on-going
+     * evaluations of Trials as soon as the study stopping condition is met.
+     * (Please see Study.State documentation for the source of truth).
+     * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + * + * @return Whether the shouldStopAsap field is set. + */ + boolean hasShouldStopAsap(); + /** + * + * + *
+     * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+     * STOPPING state.
+     *
+     * The bottom line is: set to true if you want to interrupt on-going
+     * evaluations of Trials as soon as the study stopping condition is met.
+     * (Please see Study.State documentation for the source of truth).
+     * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + * + * @return The shouldStopAsap. + */ + com.google.protobuf.BoolValue getShouldStopAsap(); + /** + * + * + *
+     * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+     * STOPPING state.
+     *
+     * The bottom line is: set to true if you want to interrupt on-going
+     * evaluations of Trials as soon as the study stopping condition is met.
+     * (Please see Study.State documentation for the source of truth).
+     * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + */ + com.google.protobuf.BoolValueOrBuilder getShouldStopAsapOrBuilder(); + + /** + * + * + *
+     * Each "stopping rule" in this proto specifies an "if" condition. Before
+     * Vizier would generate a new suggestion, it first checks each specified
+     * stopping rule, from top to bottom in this list.
+     * Note that the first few rules (e.g. minimum_runtime_constraint,
+     * min_num_trials) will prevent other stopping rules from being evaluated
+     * until they are met. For example, setting `min_num_trials=5` and
+     * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+     * has 5 COMPLETED trials, even if more than an hour has passed since its
+     * creation. It follows the first applicable rule (whose "if" condition is
+     * satisfied) to make a stopping decision. If none of the specified rules
+     * are applicable, then Vizier decides that the study should not stop.
+     * If Vizier decides that the study should stop, the study enters
+     * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+     * IMPORTANT: The automatic study state transition happens precisely as
+     * described above; that is, deleting trials or updating StudyConfig NEVER
+     * automatically moves the study state back to ACTIVE. If you want to
+     * _resume_ a Study that was stopped, 1) change the stopping conditions if
+     * necessary, 2) activate the study, and then 3) ask for suggestions.
+     * If the specified time or duration has not passed, do not stop the
+     * study.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + * + * @return Whether the minimumRuntimeConstraint field is set. + */ + boolean hasMinimumRuntimeConstraint(); + /** + * + * + *
+     * Each "stopping rule" in this proto specifies an "if" condition. Before
+     * Vizier would generate a new suggestion, it first checks each specified
+     * stopping rule, from top to bottom in this list.
+     * Note that the first few rules (e.g. minimum_runtime_constraint,
+     * min_num_trials) will prevent other stopping rules from being evaluated
+     * until they are met. For example, setting `min_num_trials=5` and
+     * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+     * has 5 COMPLETED trials, even if more than an hour has passed since its
+     * creation. It follows the first applicable rule (whose "if" condition is
+     * satisfied) to make a stopping decision. If none of the specified rules
+     * are applicable, then Vizier decides that the study should not stop.
+     * If Vizier decides that the study should stop, the study enters
+     * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+     * IMPORTANT: The automatic study state transition happens precisely as
+     * described above; that is, deleting trials or updating StudyConfig NEVER
+     * automatically moves the study state back to ACTIVE. If you want to
+     * _resume_ a Study that was stopped, 1) change the stopping conditions if
+     * necessary, 2) activate the study, and then 3) ask for suggestions.
+     * If the specified time or duration has not passed, do not stop the
+     * study.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + * + * @return The minimumRuntimeConstraint. + */ + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint getMinimumRuntimeConstraint(); + /** + * + * + *
+     * Each "stopping rule" in this proto specifies an "if" condition. Before
+     * Vizier would generate a new suggestion, it first checks each specified
+     * stopping rule, from top to bottom in this list.
+     * Note that the first few rules (e.g. minimum_runtime_constraint,
+     * min_num_trials) will prevent other stopping rules from being evaluated
+     * until they are met. For example, setting `min_num_trials=5` and
+     * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+     * has 5 COMPLETED trials, even if more than an hour has passed since its
+     * creation. It follows the first applicable rule (whose "if" condition is
+     * satisfied) to make a stopping decision. If none of the specified rules
+     * are applicable, then Vizier decides that the study should not stop.
+     * If Vizier decides that the study should stop, the study enters
+     * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+     * IMPORTANT: The automatic study state transition happens precisely as
+     * described above; that is, deleting trials or updating StudyConfig NEVER
+     * automatically moves the study state back to ACTIVE. If you want to
+     * _resume_ a Study that was stopped, 1) change the stopping conditions if
+     * necessary, 2) activate the study, and then 3) ask for suggestions.
+     * If the specified time or duration has not passed, do not stop the
+     * study.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + */ + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraintOrBuilder + getMinimumRuntimeConstraintOrBuilder(); + + /** + * + * + *
+     * If the specified time or duration has passed, stop the study.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + * + * @return Whether the maximumRuntimeConstraint field is set. + */ + boolean hasMaximumRuntimeConstraint(); + /** + * + * + *
+     * If the specified time or duration has passed, stop the study.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + * + * @return The maximumRuntimeConstraint. + */ + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint getMaximumRuntimeConstraint(); + /** + * + * + *
+     * If the specified time or duration has passed, stop the study.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + */ + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraintOrBuilder + getMaximumRuntimeConstraintOrBuilder(); + + /** + * + * + *
+     * If there are fewer than this many COMPLETED trials, do not stop the
+     * study.
+     * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + * + * @return Whether the minNumTrials field is set. + */ + boolean hasMinNumTrials(); + /** + * + * + *
+     * If there are fewer than this many COMPLETED trials, do not stop the
+     * study.
+     * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + * + * @return The minNumTrials. + */ + com.google.protobuf.Int32Value getMinNumTrials(); + /** + * + * + *
+     * If there are fewer than this many COMPLETED trials, do not stop the
+     * study.
+     * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + */ + com.google.protobuf.Int32ValueOrBuilder getMinNumTrialsOrBuilder(); + + /** + * + * + *
+     * If there are more than this many trials, stop the study.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + * + * @return Whether the maxNumTrials field is set. + */ + boolean hasMaxNumTrials(); + /** + * + * + *
+     * If there are more than this many trials, stop the study.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + * + * @return The maxNumTrials. + */ + com.google.protobuf.Int32Value getMaxNumTrials(); + /** + * + * + *
+     * If there are more than this many trials, stop the study.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + */ + com.google.protobuf.Int32ValueOrBuilder getMaxNumTrialsOrBuilder(); + + /** + * + * + *
+     * If the objective value has not improved for this many consecutive
+     * trials, stop the study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + * + * @return Whether the maxNumTrialsNoProgress field is set. + */ + boolean hasMaxNumTrialsNoProgress(); + /** + * + * + *
+     * If the objective value has not improved for this many consecutive
+     * trials, stop the study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + * + * @return The maxNumTrialsNoProgress. + */ + com.google.protobuf.Int32Value getMaxNumTrialsNoProgress(); + /** + * + * + *
+     * If the objective value has not improved for this many consecutive
+     * trials, stop the study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + */ + com.google.protobuf.Int32ValueOrBuilder getMaxNumTrialsNoProgressOrBuilder(); + + /** + * + * + *
+     * If the objective value has not improved for this much time, stop the
+     * study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + * + * @return Whether the maxDurationNoProgress field is set. + */ + boolean hasMaxDurationNoProgress(); + /** + * + * + *
+     * If the objective value has not improved for this much time, stop the
+     * study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + * + * @return The maxDurationNoProgress. + */ + com.google.protobuf.Duration getMaxDurationNoProgress(); + /** + * + * + *
+     * If the objective value has not improved for this much time, stop the
+     * study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + */ + com.google.protobuf.DurationOrBuilder getMaxDurationNoProgressOrBuilder(); + } + /** + * + * + *
+   * The configuration (stopping conditions) for automated stopping of a Study.
+   * Conditions include trial budgets, time budgets, and convergence detection.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig} + */ + public static final class StudyStoppingConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig) + StudyStoppingConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use StudyStoppingConfig.newBuilder() to construct. + private StudyStoppingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StudyStoppingConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StudyStoppingConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.StudyProto + .internal_static_google_cloud_aiplatform_v1beta1_StudySpec_StudyStoppingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.StudyProto + .internal_static_google_cloud_aiplatform_v1beta1_StudySpec_StudyStoppingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig.class, + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig.Builder.class); + } + + public static final int SHOULD_STOP_ASAP_FIELD_NUMBER = 1; + private com.google.protobuf.BoolValue shouldStopAsap_; + /** + * + * + *
+     * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+     * STOPPING state.
+     *
+     * The bottom line is: set to true if you want to interrupt on-going
+     * evaluations of Trials as soon as the study stopping condition is met.
+     * (Please see Study.State documentation for the source of truth).
+     * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + * + * @return Whether the shouldStopAsap field is set. + */ + @java.lang.Override + public boolean hasShouldStopAsap() { + return shouldStopAsap_ != null; + } + /** + * + * + *
+     * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+     * STOPPING state.
+     *
+     * The bottom line is: set to true if you want to interrupt on-going
+     * evaluations of Trials as soon as the study stopping condition is met.
+     * (Please see Study.State documentation for the source of truth).
+     * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + * + * @return The shouldStopAsap. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getShouldStopAsap() { + return shouldStopAsap_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : shouldStopAsap_; + } + /** + * + * + *
+     * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+     * STOPPING state.
+     *
+     * The bottom line is: set to true if you want to interrupt on-going
+     * evaluations of Trials as soon as the study stopping condition is met.
+     * (Please see Study.State documentation for the source of truth).
+     * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getShouldStopAsapOrBuilder() { + return shouldStopAsap_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : shouldStopAsap_; + } + + public static final int MINIMUM_RUNTIME_CONSTRAINT_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint minimumRuntimeConstraint_; + /** + * + * + *
+     * Each "stopping rule" in this proto specifies an "if" condition. Before
+     * Vizier would generate a new suggestion, it first checks each specified
+     * stopping rule, from top to bottom in this list.
+     * Note that the first few rules (e.g. minimum_runtime_constraint,
+     * min_num_trials) will prevent other stopping rules from being evaluated
+     * until they are met. For example, setting `min_num_trials=5` and
+     * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+     * has 5 COMPLETED trials, even if more than an hour has passed since its
+     * creation. It follows the first applicable rule (whose "if" condition is
+     * satisfied) to make a stopping decision. If none of the specified rules
+     * are applicable, then Vizier decides that the study should not stop.
+     * If Vizier decides that the study should stop, the study enters
+     * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+     * IMPORTANT: The automatic study state transition happens precisely as
+     * described above; that is, deleting trials or updating StudyConfig NEVER
+     * automatically moves the study state back to ACTIVE. If you want to
+     * _resume_ a Study that was stopped, 1) change the stopping conditions if
+     * necessary, 2) activate the study, and then 3) ask for suggestions.
+     * If the specified time or duration has not passed, do not stop the
+     * study.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + * + * @return Whether the minimumRuntimeConstraint field is set. + */ + @java.lang.Override + public boolean hasMinimumRuntimeConstraint() { + return minimumRuntimeConstraint_ != null; + } + /** + * + * + *
+     * Each "stopping rule" in this proto specifies an "if" condition. Before
+     * Vizier would generate a new suggestion, it first checks each specified
+     * stopping rule, from top to bottom in this list.
+     * Note that the first few rules (e.g. minimum_runtime_constraint,
+     * min_num_trials) will prevent other stopping rules from being evaluated
+     * until they are met. For example, setting `min_num_trials=5` and
+     * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+     * has 5 COMPLETED trials, even if more than an hour has passed since its
+     * creation. It follows the first applicable rule (whose "if" condition is
+     * satisfied) to make a stopping decision. If none of the specified rules
+     * are applicable, then Vizier decides that the study should not stop.
+     * If Vizier decides that the study should stop, the study enters
+     * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+     * IMPORTANT: The automatic study state transition happens precisely as
+     * described above; that is, deleting trials or updating StudyConfig NEVER
+     * automatically moves the study state back to ACTIVE. If you want to
+     * _resume_ a Study that was stopped, 1) change the stopping conditions if
+     * necessary, 2) activate the study, and then 3) ask for suggestions.
+     * If the specified time or duration has not passed, do not stop the
+     * study.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + * + * @return The minimumRuntimeConstraint. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint getMinimumRuntimeConstraint() { + return minimumRuntimeConstraint_ == null + ? com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.getDefaultInstance() + : minimumRuntimeConstraint_; + } + /** + * + * + *
+     * Each "stopping rule" in this proto specifies an "if" condition. Before
+     * Vizier would generate a new suggestion, it first checks each specified
+     * stopping rule, from top to bottom in this list.
+     * Note that the first few rules (e.g. minimum_runtime_constraint,
+     * min_num_trials) will prevent other stopping rules from being evaluated
+     * until they are met. For example, setting `min_num_trials=5` and
+     * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+     * has 5 COMPLETED trials, even if more than an hour has passed since its
+     * creation. It follows the first applicable rule (whose "if" condition is
+     * satisfied) to make a stopping decision. If none of the specified rules
+     * are applicable, then Vizier decides that the study should not stop.
+     * If Vizier decides that the study should stop, the study enters
+     * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+     * IMPORTANT: The automatic study state transition happens precisely as
+     * described above; that is, deleting trials or updating StudyConfig NEVER
+     * automatically moves the study state back to ACTIVE. If you want to
+     * _resume_ a Study that was stopped, 1) change the stopping conditions if
+     * necessary, 2) activate the study, and then 3) ask for suggestions.
+     * If the specified time or duration has not passed, do not stop the
+     * study.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StudyTimeConstraintOrBuilder + getMinimumRuntimeConstraintOrBuilder() { + return minimumRuntimeConstraint_ == null + ? com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.getDefaultInstance() + : minimumRuntimeConstraint_; + } + + public static final int MAXIMUM_RUNTIME_CONSTRAINT_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint maximumRuntimeConstraint_; + /** + * + * + *
+     * If the specified time or duration has passed, stop the study.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + * + * @return Whether the maximumRuntimeConstraint field is set. + */ + @java.lang.Override + public boolean hasMaximumRuntimeConstraint() { + return maximumRuntimeConstraint_ != null; + } + /** + * + * + *
+     * If the specified time or duration has passed, stop the study.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + * + * @return The maximumRuntimeConstraint. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint getMaximumRuntimeConstraint() { + return maximumRuntimeConstraint_ == null + ? com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.getDefaultInstance() + : maximumRuntimeConstraint_; + } + /** + * + * + *
+     * If the specified time or duration has passed, stop the study.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StudyTimeConstraintOrBuilder + getMaximumRuntimeConstraintOrBuilder() { + return maximumRuntimeConstraint_ == null + ? com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.getDefaultInstance() + : maximumRuntimeConstraint_; + } + + public static final int MIN_NUM_TRIALS_FIELD_NUMBER = 4; + private com.google.protobuf.Int32Value minNumTrials_; + /** + * + * + *
+     * If there are fewer than this many COMPLETED trials, do not stop the
+     * study.
+     * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + * + * @return Whether the minNumTrials field is set. + */ + @java.lang.Override + public boolean hasMinNumTrials() { + return minNumTrials_ != null; + } + /** + * + * + *
+     * If there are fewer than this many COMPLETED trials, do not stop the
+     * study.
+     * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + * + * @return The minNumTrials. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getMinNumTrials() { + return minNumTrials_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : minNumTrials_; + } + /** + * + * + *
+     * If there are fewer than this many COMPLETED trials, do not stop the
+     * study.
+     * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getMinNumTrialsOrBuilder() { + return minNumTrials_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : minNumTrials_; + } + + public static final int MAX_NUM_TRIALS_FIELD_NUMBER = 5; + private com.google.protobuf.Int32Value maxNumTrials_; + /** + * + * + *
+     * If there are more than this many trials, stop the study.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + * + * @return Whether the maxNumTrials field is set. + */ + @java.lang.Override + public boolean hasMaxNumTrials() { + return maxNumTrials_ != null; + } + /** + * + * + *
+     * If there are more than this many trials, stop the study.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + * + * @return The maxNumTrials. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getMaxNumTrials() { + return maxNumTrials_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : maxNumTrials_; + } + /** + * + * + *
+     * If there are more than this many trials, stop the study.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getMaxNumTrialsOrBuilder() { + return maxNumTrials_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : maxNumTrials_; + } + + public static final int MAX_NUM_TRIALS_NO_PROGRESS_FIELD_NUMBER = 6; + private com.google.protobuf.Int32Value maxNumTrialsNoProgress_; + /** + * + * + *
+     * If the objective value has not improved for this many consecutive
+     * trials, stop the study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + * + * @return Whether the maxNumTrialsNoProgress field is set. + */ + @java.lang.Override + public boolean hasMaxNumTrialsNoProgress() { + return maxNumTrialsNoProgress_ != null; + } + /** + * + * + *
+     * If the objective value has not improved for this many consecutive
+     * trials, stop the study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + * + * @return The maxNumTrialsNoProgress. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getMaxNumTrialsNoProgress() { + return maxNumTrialsNoProgress_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : maxNumTrialsNoProgress_; + } + /** + * + * + *
+     * If the objective value has not improved for this many consecutive
+     * trials, stop the study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getMaxNumTrialsNoProgressOrBuilder() { + return maxNumTrialsNoProgress_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : maxNumTrialsNoProgress_; + } + + public static final int MAX_DURATION_NO_PROGRESS_FIELD_NUMBER = 7; + private com.google.protobuf.Duration maxDurationNoProgress_; + /** + * + * + *
+     * If the objective value has not improved for this much time, stop the
+     * study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + * + * @return Whether the maxDurationNoProgress field is set. + */ + @java.lang.Override + public boolean hasMaxDurationNoProgress() { + return maxDurationNoProgress_ != null; + } + /** + * + * + *
+     * If the objective value has not improved for this much time, stop the
+     * study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + * + * @return The maxDurationNoProgress. + */ + @java.lang.Override + public com.google.protobuf.Duration getMaxDurationNoProgress() { + return maxDurationNoProgress_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maxDurationNoProgress_; + } + /** + * + * + *
+     * If the objective value has not improved for this much time, stop the
+     * study.
+     *
+     * WARNING: Effective only for single-objective studies.
+     * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMaxDurationNoProgressOrBuilder() { + return maxDurationNoProgress_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maxDurationNoProgress_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (shouldStopAsap_ != null) { + output.writeMessage(1, getShouldStopAsap()); + } + if (minimumRuntimeConstraint_ != null) { + output.writeMessage(2, getMinimumRuntimeConstraint()); + } + if (maximumRuntimeConstraint_ != null) { + output.writeMessage(3, getMaximumRuntimeConstraint()); + } + if (minNumTrials_ != null) { + output.writeMessage(4, getMinNumTrials()); + } + if (maxNumTrials_ != null) { + output.writeMessage(5, getMaxNumTrials()); + } + if (maxNumTrialsNoProgress_ != null) { + output.writeMessage(6, getMaxNumTrialsNoProgress()); + } + if (maxDurationNoProgress_ != null) { + output.writeMessage(7, getMaxDurationNoProgress()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (shouldStopAsap_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getShouldStopAsap()); + } + if (minimumRuntimeConstraint_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, getMinimumRuntimeConstraint()); + } + if (maximumRuntimeConstraint_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getMaximumRuntimeConstraint()); + } + if (minNumTrials_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getMinNumTrials()); + } + if (maxNumTrials_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getMaxNumTrials()); + } + if (maxNumTrialsNoProgress_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, getMaxNumTrialsNoProgress()); + } + if (maxDurationNoProgress_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(7, getMaxDurationNoProgress()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig other = + (com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig) obj; + + if (hasShouldStopAsap() != other.hasShouldStopAsap()) return false; + if (hasShouldStopAsap()) { + if (!getShouldStopAsap().equals(other.getShouldStopAsap())) return false; + } + if (hasMinimumRuntimeConstraint() != other.hasMinimumRuntimeConstraint()) return false; + if (hasMinimumRuntimeConstraint()) { + if (!getMinimumRuntimeConstraint().equals(other.getMinimumRuntimeConstraint())) + return false; + } + if (hasMaximumRuntimeConstraint() != other.hasMaximumRuntimeConstraint()) return false; + if (hasMaximumRuntimeConstraint()) { + if (!getMaximumRuntimeConstraint().equals(other.getMaximumRuntimeConstraint())) + return false; + } + if (hasMinNumTrials() != other.hasMinNumTrials()) return false; + if (hasMinNumTrials()) { + if (!getMinNumTrials().equals(other.getMinNumTrials())) return false; + } + if (hasMaxNumTrials() != other.hasMaxNumTrials()) return false; + if (hasMaxNumTrials()) { + if (!getMaxNumTrials().equals(other.getMaxNumTrials())) return false; + } + if (hasMaxNumTrialsNoProgress() != other.hasMaxNumTrialsNoProgress()) return false; + if (hasMaxNumTrialsNoProgress()) { + if (!getMaxNumTrialsNoProgress().equals(other.getMaxNumTrialsNoProgress())) return false; + } + if (hasMaxDurationNoProgress() != other.hasMaxDurationNoProgress()) return false; + if (hasMaxDurationNoProgress()) { + if (!getMaxDurationNoProgress().equals(other.getMaxDurationNoProgress())) return false; + } + if (!getUnknownFields().equals(other.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 (hasShouldStopAsap()) { + hash = (37 * hash) + SHOULD_STOP_ASAP_FIELD_NUMBER; + hash = (53 * hash) + getShouldStopAsap().hashCode(); + } + if (hasMinimumRuntimeConstraint()) { + hash = (37 * hash) + MINIMUM_RUNTIME_CONSTRAINT_FIELD_NUMBER; + hash = (53 * hash) + getMinimumRuntimeConstraint().hashCode(); + } + if (hasMaximumRuntimeConstraint()) { + hash = (37 * hash) + MAXIMUM_RUNTIME_CONSTRAINT_FIELD_NUMBER; + hash = (53 * hash) + getMaximumRuntimeConstraint().hashCode(); + } + if (hasMinNumTrials()) { + hash = (37 * hash) + MIN_NUM_TRIALS_FIELD_NUMBER; + hash = (53 * hash) + getMinNumTrials().hashCode(); + } + if (hasMaxNumTrials()) { + hash = (37 * hash) + MAX_NUM_TRIALS_FIELD_NUMBER; + hash = (53 * hash) + getMaxNumTrials().hashCode(); + } + if (hasMaxNumTrialsNoProgress()) { + hash = (37 * hash) + MAX_NUM_TRIALS_NO_PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getMaxNumTrialsNoProgress().hashCode(); + } + if (hasMaxDurationNoProgress()) { + hash = (37 * hash) + MAX_DURATION_NO_PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getMaxDurationNoProgress().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 (stopping conditions) for automated stopping of a Study.
+     * Conditions include trial budgets, time budgets, and convergence detection.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig) + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.StudyProto + .internal_static_google_cloud_aiplatform_v1beta1_StudySpec_StudyStoppingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.StudyProto + .internal_static_google_cloud_aiplatform_v1beta1_StudySpec_StudyStoppingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig.class, + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + shouldStopAsap_ = null; + if (shouldStopAsapBuilder_ != null) { + shouldStopAsapBuilder_.dispose(); + shouldStopAsapBuilder_ = null; + } + minimumRuntimeConstraint_ = null; + if (minimumRuntimeConstraintBuilder_ != null) { + minimumRuntimeConstraintBuilder_.dispose(); + minimumRuntimeConstraintBuilder_ = null; + } + maximumRuntimeConstraint_ = null; + if (maximumRuntimeConstraintBuilder_ != null) { + maximumRuntimeConstraintBuilder_.dispose(); + maximumRuntimeConstraintBuilder_ = null; + } + minNumTrials_ = null; + if (minNumTrialsBuilder_ != null) { + minNumTrialsBuilder_.dispose(); + minNumTrialsBuilder_ = null; + } + maxNumTrials_ = null; + if (maxNumTrialsBuilder_ != null) { + maxNumTrialsBuilder_.dispose(); + maxNumTrialsBuilder_ = null; + } + maxNumTrialsNoProgress_ = null; + if (maxNumTrialsNoProgressBuilder_ != null) { + maxNumTrialsNoProgressBuilder_.dispose(); + maxNumTrialsNoProgressBuilder_ = null; + } + maxDurationNoProgress_ = null; + if (maxDurationNoProgressBuilder_ != null) { + maxDurationNoProgressBuilder_.dispose(); + maxDurationNoProgressBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.StudyProto + .internal_static_google_cloud_aiplatform_v1beta1_StudySpec_StudyStoppingConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig build() { + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig buildPartial() { + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig result = + new com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.shouldStopAsap_ = + shouldStopAsapBuilder_ == null ? shouldStopAsap_ : shouldStopAsapBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.minimumRuntimeConstraint_ = + minimumRuntimeConstraintBuilder_ == null + ? minimumRuntimeConstraint_ + : minimumRuntimeConstraintBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.maximumRuntimeConstraint_ = + maximumRuntimeConstraintBuilder_ == null + ? maximumRuntimeConstraint_ + : maximumRuntimeConstraintBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.minNumTrials_ = + minNumTrialsBuilder_ == null ? minNumTrials_ : minNumTrialsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.maxNumTrials_ = + maxNumTrialsBuilder_ == null ? maxNumTrials_ : maxNumTrialsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.maxNumTrialsNoProgress_ = + maxNumTrialsNoProgressBuilder_ == null + ? maxNumTrialsNoProgress_ + : maxNumTrialsNoProgressBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.maxDurationNoProgress_ = + maxDurationNoProgressBuilder_ == null + ? maxDurationNoProgress_ + : maxDurationNoProgressBuilder_.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.aiplatform.v1beta1.StudySpec.StudyStoppingConfig) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig other) { + if (other + == com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig + .getDefaultInstance()) return this; + if (other.hasShouldStopAsap()) { + mergeShouldStopAsap(other.getShouldStopAsap()); + } + if (other.hasMinimumRuntimeConstraint()) { + mergeMinimumRuntimeConstraint(other.getMinimumRuntimeConstraint()); + } + if (other.hasMaximumRuntimeConstraint()) { + mergeMaximumRuntimeConstraint(other.getMaximumRuntimeConstraint()); + } + if (other.hasMinNumTrials()) { + mergeMinNumTrials(other.getMinNumTrials()); + } + if (other.hasMaxNumTrials()) { + mergeMaxNumTrials(other.getMaxNumTrials()); + } + if (other.hasMaxNumTrialsNoProgress()) { + mergeMaxNumTrialsNoProgress(other.getMaxNumTrialsNoProgress()); + } + if (other.hasMaxDurationNoProgress()) { + mergeMaxDurationNoProgress(other.getMaxDurationNoProgress()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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( + getShouldStopAsapFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getMinimumRuntimeConstraintFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getMaximumRuntimeConstraintFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getMinNumTrialsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getMaxNumTrialsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + getMaxNumTrialsNoProgressFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + getMaxDurationNoProgressFieldBuilder().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 com.google.protobuf.BoolValue shouldStopAsap_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + shouldStopAsapBuilder_; + /** + * + * + *
+       * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+       * STOPPING state.
+       *
+       * The bottom line is: set to true if you want to interrupt on-going
+       * evaluations of Trials as soon as the study stopping condition is met.
+       * (Please see Study.State documentation for the source of truth).
+       * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + * + * @return Whether the shouldStopAsap field is set. + */ + public boolean hasShouldStopAsap() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+       * STOPPING state.
+       *
+       * The bottom line is: set to true if you want to interrupt on-going
+       * evaluations of Trials as soon as the study stopping condition is met.
+       * (Please see Study.State documentation for the source of truth).
+       * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + * + * @return The shouldStopAsap. + */ + public com.google.protobuf.BoolValue getShouldStopAsap() { + if (shouldStopAsapBuilder_ == null) { + return shouldStopAsap_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : shouldStopAsap_; + } else { + return shouldStopAsapBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+       * STOPPING state.
+       *
+       * The bottom line is: set to true if you want to interrupt on-going
+       * evaluations of Trials as soon as the study stopping condition is met.
+       * (Please see Study.State documentation for the source of truth).
+       * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + */ + public Builder setShouldStopAsap(com.google.protobuf.BoolValue value) { + if (shouldStopAsapBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + shouldStopAsap_ = value; + } else { + shouldStopAsapBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+       * STOPPING state.
+       *
+       * The bottom line is: set to true if you want to interrupt on-going
+       * evaluations of Trials as soon as the study stopping condition is met.
+       * (Please see Study.State documentation for the source of truth).
+       * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + */ + public Builder setShouldStopAsap(com.google.protobuf.BoolValue.Builder builderForValue) { + if (shouldStopAsapBuilder_ == null) { + shouldStopAsap_ = builderForValue.build(); + } else { + shouldStopAsapBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+       * STOPPING state.
+       *
+       * The bottom line is: set to true if you want to interrupt on-going
+       * evaluations of Trials as soon as the study stopping condition is met.
+       * (Please see Study.State documentation for the source of truth).
+       * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + */ + public Builder mergeShouldStopAsap(com.google.protobuf.BoolValue value) { + if (shouldStopAsapBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && shouldStopAsap_ != null + && shouldStopAsap_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getShouldStopAsapBuilder().mergeFrom(value); + } else { + shouldStopAsap_ = value; + } + } else { + shouldStopAsapBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+       * STOPPING state.
+       *
+       * The bottom line is: set to true if you want to interrupt on-going
+       * evaluations of Trials as soon as the study stopping condition is met.
+       * (Please see Study.State documentation for the source of truth).
+       * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + */ + public Builder clearShouldStopAsap() { + bitField0_ = (bitField0_ & ~0x00000001); + shouldStopAsap_ = null; + if (shouldStopAsapBuilder_ != null) { + shouldStopAsapBuilder_.dispose(); + shouldStopAsapBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+       * STOPPING state.
+       *
+       * The bottom line is: set to true if you want to interrupt on-going
+       * evaluations of Trials as soon as the study stopping condition is met.
+       * (Please see Study.State documentation for the source of truth).
+       * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + */ + public com.google.protobuf.BoolValue.Builder getShouldStopAsapBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getShouldStopAsapFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+       * STOPPING state.
+       *
+       * The bottom line is: set to true if you want to interrupt on-going
+       * evaluations of Trials as soon as the study stopping condition is met.
+       * (Please see Study.State documentation for the source of truth).
+       * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + */ + public com.google.protobuf.BoolValueOrBuilder getShouldStopAsapOrBuilder() { + if (shouldStopAsapBuilder_ != null) { + return shouldStopAsapBuilder_.getMessageOrBuilder(); + } else { + return shouldStopAsap_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : shouldStopAsap_; + } + } + /** + * + * + *
+       * If true, a Study enters STOPPING_ASAP whenever it would normally enters
+       * STOPPING state.
+       *
+       * The bottom line is: set to true if you want to interrupt on-going
+       * evaluations of Trials as soon as the study stopping condition is met.
+       * (Please see Study.State documentation for the source of truth).
+       * 
+ * + * .google.protobuf.BoolValue should_stop_asap = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + getShouldStopAsapFieldBuilder() { + if (shouldStopAsapBuilder_ == null) { + shouldStopAsapBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder>( + getShouldStopAsap(), getParentForChildren(), isClean()); + shouldStopAsap_ = null; + } + return shouldStopAsapBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint minimumRuntimeConstraint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint, + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.Builder, + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraintOrBuilder> + minimumRuntimeConstraintBuilder_; + /** + * + * + *
+       * Each "stopping rule" in this proto specifies an "if" condition. Before
+       * Vizier would generate a new suggestion, it first checks each specified
+       * stopping rule, from top to bottom in this list.
+       * Note that the first few rules (e.g. minimum_runtime_constraint,
+       * min_num_trials) will prevent other stopping rules from being evaluated
+       * until they are met. For example, setting `min_num_trials=5` and
+       * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+       * has 5 COMPLETED trials, even if more than an hour has passed since its
+       * creation. It follows the first applicable rule (whose "if" condition is
+       * satisfied) to make a stopping decision. If none of the specified rules
+       * are applicable, then Vizier decides that the study should not stop.
+       * If Vizier decides that the study should stop, the study enters
+       * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+       * IMPORTANT: The automatic study state transition happens precisely as
+       * described above; that is, deleting trials or updating StudyConfig NEVER
+       * automatically moves the study state back to ACTIVE. If you want to
+       * _resume_ a Study that was stopped, 1) change the stopping conditions if
+       * necessary, 2) activate the study, and then 3) ask for suggestions.
+       * If the specified time or duration has not passed, do not stop the
+       * study.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + * + * @return Whether the minimumRuntimeConstraint field is set. + */ + public boolean hasMinimumRuntimeConstraint() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Each "stopping rule" in this proto specifies an "if" condition. Before
+       * Vizier would generate a new suggestion, it first checks each specified
+       * stopping rule, from top to bottom in this list.
+       * Note that the first few rules (e.g. minimum_runtime_constraint,
+       * min_num_trials) will prevent other stopping rules from being evaluated
+       * until they are met. For example, setting `min_num_trials=5` and
+       * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+       * has 5 COMPLETED trials, even if more than an hour has passed since its
+       * creation. It follows the first applicable rule (whose "if" condition is
+       * satisfied) to make a stopping decision. If none of the specified rules
+       * are applicable, then Vizier decides that the study should not stop.
+       * If Vizier decides that the study should stop, the study enters
+       * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+       * IMPORTANT: The automatic study state transition happens precisely as
+       * described above; that is, deleting trials or updating StudyConfig NEVER
+       * automatically moves the study state back to ACTIVE. If you want to
+       * _resume_ a Study that was stopped, 1) change the stopping conditions if
+       * necessary, 2) activate the study, and then 3) ask for suggestions.
+       * If the specified time or duration has not passed, do not stop the
+       * study.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + * + * @return The minimumRuntimeConstraint. + */ + public com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint getMinimumRuntimeConstraint() { + if (minimumRuntimeConstraintBuilder_ == null) { + return minimumRuntimeConstraint_ == null + ? com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.getDefaultInstance() + : minimumRuntimeConstraint_; + } else { + return minimumRuntimeConstraintBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Each "stopping rule" in this proto specifies an "if" condition. Before
+       * Vizier would generate a new suggestion, it first checks each specified
+       * stopping rule, from top to bottom in this list.
+       * Note that the first few rules (e.g. minimum_runtime_constraint,
+       * min_num_trials) will prevent other stopping rules from being evaluated
+       * until they are met. For example, setting `min_num_trials=5` and
+       * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+       * has 5 COMPLETED trials, even if more than an hour has passed since its
+       * creation. It follows the first applicable rule (whose "if" condition is
+       * satisfied) to make a stopping decision. If none of the specified rules
+       * are applicable, then Vizier decides that the study should not stop.
+       * If Vizier decides that the study should stop, the study enters
+       * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+       * IMPORTANT: The automatic study state transition happens precisely as
+       * described above; that is, deleting trials or updating StudyConfig NEVER
+       * automatically moves the study state back to ACTIVE. If you want to
+       * _resume_ a Study that was stopped, 1) change the stopping conditions if
+       * necessary, 2) activate the study, and then 3) ask for suggestions.
+       * If the specified time or duration has not passed, do not stop the
+       * study.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + */ + public Builder setMinimumRuntimeConstraint( + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint value) { + if (minimumRuntimeConstraintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minimumRuntimeConstraint_ = value; + } else { + minimumRuntimeConstraintBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Each "stopping rule" in this proto specifies an "if" condition. Before
+       * Vizier would generate a new suggestion, it first checks each specified
+       * stopping rule, from top to bottom in this list.
+       * Note that the first few rules (e.g. minimum_runtime_constraint,
+       * min_num_trials) will prevent other stopping rules from being evaluated
+       * until they are met. For example, setting `min_num_trials=5` and
+       * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+       * has 5 COMPLETED trials, even if more than an hour has passed since its
+       * creation. It follows the first applicable rule (whose "if" condition is
+       * satisfied) to make a stopping decision. If none of the specified rules
+       * are applicable, then Vizier decides that the study should not stop.
+       * If Vizier decides that the study should stop, the study enters
+       * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+       * IMPORTANT: The automatic study state transition happens precisely as
+       * described above; that is, deleting trials or updating StudyConfig NEVER
+       * automatically moves the study state back to ACTIVE. If you want to
+       * _resume_ a Study that was stopped, 1) change the stopping conditions if
+       * necessary, 2) activate the study, and then 3) ask for suggestions.
+       * If the specified time or duration has not passed, do not stop the
+       * study.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + */ + public Builder setMinimumRuntimeConstraint( + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.Builder builderForValue) { + if (minimumRuntimeConstraintBuilder_ == null) { + minimumRuntimeConstraint_ = builderForValue.build(); + } else { + minimumRuntimeConstraintBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Each "stopping rule" in this proto specifies an "if" condition. Before
+       * Vizier would generate a new suggestion, it first checks each specified
+       * stopping rule, from top to bottom in this list.
+       * Note that the first few rules (e.g. minimum_runtime_constraint,
+       * min_num_trials) will prevent other stopping rules from being evaluated
+       * until they are met. For example, setting `min_num_trials=5` and
+       * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+       * has 5 COMPLETED trials, even if more than an hour has passed since its
+       * creation. It follows the first applicable rule (whose "if" condition is
+       * satisfied) to make a stopping decision. If none of the specified rules
+       * are applicable, then Vizier decides that the study should not stop.
+       * If Vizier decides that the study should stop, the study enters
+       * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+       * IMPORTANT: The automatic study state transition happens precisely as
+       * described above; that is, deleting trials or updating StudyConfig NEVER
+       * automatically moves the study state back to ACTIVE. If you want to
+       * _resume_ a Study that was stopped, 1) change the stopping conditions if
+       * necessary, 2) activate the study, and then 3) ask for suggestions.
+       * If the specified time or duration has not passed, do not stop the
+       * study.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + */ + public Builder mergeMinimumRuntimeConstraint( + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint value) { + if (minimumRuntimeConstraintBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && minimumRuntimeConstraint_ != null + && minimumRuntimeConstraint_ + != com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.getDefaultInstance()) { + getMinimumRuntimeConstraintBuilder().mergeFrom(value); + } else { + minimumRuntimeConstraint_ = value; + } + } else { + minimumRuntimeConstraintBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Each "stopping rule" in this proto specifies an "if" condition. Before
+       * Vizier would generate a new suggestion, it first checks each specified
+       * stopping rule, from top to bottom in this list.
+       * Note that the first few rules (e.g. minimum_runtime_constraint,
+       * min_num_trials) will prevent other stopping rules from being evaluated
+       * until they are met. For example, setting `min_num_trials=5` and
+       * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+       * has 5 COMPLETED trials, even if more than an hour has passed since its
+       * creation. It follows the first applicable rule (whose "if" condition is
+       * satisfied) to make a stopping decision. If none of the specified rules
+       * are applicable, then Vizier decides that the study should not stop.
+       * If Vizier decides that the study should stop, the study enters
+       * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+       * IMPORTANT: The automatic study state transition happens precisely as
+       * described above; that is, deleting trials or updating StudyConfig NEVER
+       * automatically moves the study state back to ACTIVE. If you want to
+       * _resume_ a Study that was stopped, 1) change the stopping conditions if
+       * necessary, 2) activate the study, and then 3) ask for suggestions.
+       * If the specified time or duration has not passed, do not stop the
+       * study.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + */ + public Builder clearMinimumRuntimeConstraint() { + bitField0_ = (bitField0_ & ~0x00000002); + minimumRuntimeConstraint_ = null; + if (minimumRuntimeConstraintBuilder_ != null) { + minimumRuntimeConstraintBuilder_.dispose(); + minimumRuntimeConstraintBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Each "stopping rule" in this proto specifies an "if" condition. Before
+       * Vizier would generate a new suggestion, it first checks each specified
+       * stopping rule, from top to bottom in this list.
+       * Note that the first few rules (e.g. minimum_runtime_constraint,
+       * min_num_trials) will prevent other stopping rules from being evaluated
+       * until they are met. For example, setting `min_num_trials=5` and
+       * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+       * has 5 COMPLETED trials, even if more than an hour has passed since its
+       * creation. It follows the first applicable rule (whose "if" condition is
+       * satisfied) to make a stopping decision. If none of the specified rules
+       * are applicable, then Vizier decides that the study should not stop.
+       * If Vizier decides that the study should stop, the study enters
+       * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+       * IMPORTANT: The automatic study state transition happens precisely as
+       * described above; that is, deleting trials or updating StudyConfig NEVER
+       * automatically moves the study state back to ACTIVE. If you want to
+       * _resume_ a Study that was stopped, 1) change the stopping conditions if
+       * necessary, 2) activate the study, and then 3) ask for suggestions.
+       * If the specified time or duration has not passed, do not stop the
+       * study.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + */ + public com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.Builder + getMinimumRuntimeConstraintBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getMinimumRuntimeConstraintFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Each "stopping rule" in this proto specifies an "if" condition. Before
+       * Vizier would generate a new suggestion, it first checks each specified
+       * stopping rule, from top to bottom in this list.
+       * Note that the first few rules (e.g. minimum_runtime_constraint,
+       * min_num_trials) will prevent other stopping rules from being evaluated
+       * until they are met. For example, setting `min_num_trials=5` and
+       * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+       * has 5 COMPLETED trials, even if more than an hour has passed since its
+       * creation. It follows the first applicable rule (whose "if" condition is
+       * satisfied) to make a stopping decision. If none of the specified rules
+       * are applicable, then Vizier decides that the study should not stop.
+       * If Vizier decides that the study should stop, the study enters
+       * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+       * IMPORTANT: The automatic study state transition happens precisely as
+       * described above; that is, deleting trials or updating StudyConfig NEVER
+       * automatically moves the study state back to ACTIVE. If you want to
+       * _resume_ a Study that was stopped, 1) change the stopping conditions if
+       * necessary, 2) activate the study, and then 3) ask for suggestions.
+       * If the specified time or duration has not passed, do not stop the
+       * study.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + */ + public com.google.cloud.aiplatform.v1beta1.StudyTimeConstraintOrBuilder + getMinimumRuntimeConstraintOrBuilder() { + if (minimumRuntimeConstraintBuilder_ != null) { + return minimumRuntimeConstraintBuilder_.getMessageOrBuilder(); + } else { + return minimumRuntimeConstraint_ == null + ? com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.getDefaultInstance() + : minimumRuntimeConstraint_; + } + } + /** + * + * + *
+       * Each "stopping rule" in this proto specifies an "if" condition. Before
+       * Vizier would generate a new suggestion, it first checks each specified
+       * stopping rule, from top to bottom in this list.
+       * Note that the first few rules (e.g. minimum_runtime_constraint,
+       * min_num_trials) will prevent other stopping rules from being evaluated
+       * until they are met. For example, setting `min_num_trials=5` and
+       * `always_stop_after= 1 hour` means that the Study will ONLY stop after it
+       * has 5 COMPLETED trials, even if more than an hour has passed since its
+       * creation. It follows the first applicable rule (whose "if" condition is
+       * satisfied) to make a stopping decision. If none of the specified rules
+       * are applicable, then Vizier decides that the study should not stop.
+       * If Vizier decides that the study should stop, the study enters
+       * STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
+       * IMPORTANT: The automatic study state transition happens precisely as
+       * described above; that is, deleting trials or updating StudyConfig NEVER
+       * automatically moves the study state back to ACTIVE. If you want to
+       * _resume_ a Study that was stopped, 1) change the stopping conditions if
+       * necessary, 2) activate the study, and then 3) ask for suggestions.
+       * If the specified time or duration has not passed, do not stop the
+       * study.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint minimum_runtime_constraint = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint, + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.Builder, + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraintOrBuilder> + getMinimumRuntimeConstraintFieldBuilder() { + if (minimumRuntimeConstraintBuilder_ == null) { + minimumRuntimeConstraintBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint, + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.Builder, + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraintOrBuilder>( + getMinimumRuntimeConstraint(), getParentForChildren(), isClean()); + minimumRuntimeConstraint_ = null; + } + return minimumRuntimeConstraintBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint maximumRuntimeConstraint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint, + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.Builder, + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraintOrBuilder> + maximumRuntimeConstraintBuilder_; + /** + * + * + *
+       * If the specified time or duration has passed, stop the study.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + * + * @return Whether the maximumRuntimeConstraint field is set. + */ + public boolean hasMaximumRuntimeConstraint() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * If the specified time or duration has passed, stop the study.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + * + * @return The maximumRuntimeConstraint. + */ + public com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint getMaximumRuntimeConstraint() { + if (maximumRuntimeConstraintBuilder_ == null) { + return maximumRuntimeConstraint_ == null + ? com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.getDefaultInstance() + : maximumRuntimeConstraint_; + } else { + return maximumRuntimeConstraintBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If the specified time or duration has passed, stop the study.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + */ + public Builder setMaximumRuntimeConstraint( + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint value) { + if (maximumRuntimeConstraintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maximumRuntimeConstraint_ = value; + } else { + maximumRuntimeConstraintBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * If the specified time or duration has passed, stop the study.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + */ + public Builder setMaximumRuntimeConstraint( + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.Builder builderForValue) { + if (maximumRuntimeConstraintBuilder_ == null) { + maximumRuntimeConstraint_ = builderForValue.build(); + } else { + maximumRuntimeConstraintBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * If the specified time or duration has passed, stop the study.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + */ + public Builder mergeMaximumRuntimeConstraint( + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint value) { + if (maximumRuntimeConstraintBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && maximumRuntimeConstraint_ != null + && maximumRuntimeConstraint_ + != com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.getDefaultInstance()) { + getMaximumRuntimeConstraintBuilder().mergeFrom(value); + } else { + maximumRuntimeConstraint_ = value; + } + } else { + maximumRuntimeConstraintBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * If the specified time or duration has passed, stop the study.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + */ + public Builder clearMaximumRuntimeConstraint() { + bitField0_ = (bitField0_ & ~0x00000004); + maximumRuntimeConstraint_ = null; + if (maximumRuntimeConstraintBuilder_ != null) { + maximumRuntimeConstraintBuilder_.dispose(); + maximumRuntimeConstraintBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * If the specified time or duration has passed, stop the study.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + */ + public com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.Builder + getMaximumRuntimeConstraintBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMaximumRuntimeConstraintFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If the specified time or duration has passed, stop the study.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + */ + public com.google.cloud.aiplatform.v1beta1.StudyTimeConstraintOrBuilder + getMaximumRuntimeConstraintOrBuilder() { + if (maximumRuntimeConstraintBuilder_ != null) { + return maximumRuntimeConstraintBuilder_.getMessageOrBuilder(); + } else { + return maximumRuntimeConstraint_ == null + ? com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.getDefaultInstance() + : maximumRuntimeConstraint_; + } + } + /** + * + * + *
+       * If the specified time or duration has passed, stop the study.
+       * 
+ * + * .google.cloud.aiplatform.v1beta1.StudyTimeConstraint maximum_runtime_constraint = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint, + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.Builder, + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraintOrBuilder> + getMaximumRuntimeConstraintFieldBuilder() { + if (maximumRuntimeConstraintBuilder_ == null) { + maximumRuntimeConstraintBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint, + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.Builder, + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraintOrBuilder>( + getMaximumRuntimeConstraint(), getParentForChildren(), isClean()); + maximumRuntimeConstraint_ = null; + } + return maximumRuntimeConstraintBuilder_; + } + + private com.google.protobuf.Int32Value minNumTrials_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + minNumTrialsBuilder_; + /** + * + * + *
+       * If there are fewer than this many COMPLETED trials, do not stop the
+       * study.
+       * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + * + * @return Whether the minNumTrials field is set. + */ + public boolean hasMinNumTrials() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * If there are fewer than this many COMPLETED trials, do not stop the
+       * study.
+       * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + * + * @return The minNumTrials. + */ + public com.google.protobuf.Int32Value getMinNumTrials() { + if (minNumTrialsBuilder_ == null) { + return minNumTrials_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : minNumTrials_; + } else { + return minNumTrialsBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If there are fewer than this many COMPLETED trials, do not stop the
+       * study.
+       * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + */ + public Builder setMinNumTrials(com.google.protobuf.Int32Value value) { + if (minNumTrialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minNumTrials_ = value; + } else { + minNumTrialsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * If there are fewer than this many COMPLETED trials, do not stop the
+       * study.
+       * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + */ + public Builder setMinNumTrials(com.google.protobuf.Int32Value.Builder builderForValue) { + if (minNumTrialsBuilder_ == null) { + minNumTrials_ = builderForValue.build(); + } else { + minNumTrialsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * If there are fewer than this many COMPLETED trials, do not stop the
+       * study.
+       * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + */ + public Builder mergeMinNumTrials(com.google.protobuf.Int32Value value) { + if (minNumTrialsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && minNumTrials_ != null + && minNumTrials_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getMinNumTrialsBuilder().mergeFrom(value); + } else { + minNumTrials_ = value; + } + } else { + minNumTrialsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * If there are fewer than this many COMPLETED trials, do not stop the
+       * study.
+       * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + */ + public Builder clearMinNumTrials() { + bitField0_ = (bitField0_ & ~0x00000008); + minNumTrials_ = null; + if (minNumTrialsBuilder_ != null) { + minNumTrialsBuilder_.dispose(); + minNumTrialsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * If there are fewer than this many COMPLETED trials, do not stop the
+       * study.
+       * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + */ + public com.google.protobuf.Int32Value.Builder getMinNumTrialsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getMinNumTrialsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If there are fewer than this many COMPLETED trials, do not stop the
+       * study.
+       * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + */ + public com.google.protobuf.Int32ValueOrBuilder getMinNumTrialsOrBuilder() { + if (minNumTrialsBuilder_ != null) { + return minNumTrialsBuilder_.getMessageOrBuilder(); + } else { + return minNumTrials_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : minNumTrials_; + } + } + /** + * + * + *
+       * If there are fewer than this many COMPLETED trials, do not stop the
+       * study.
+       * 
+ * + * .google.protobuf.Int32Value min_num_trials = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getMinNumTrialsFieldBuilder() { + if (minNumTrialsBuilder_ == null) { + minNumTrialsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getMinNumTrials(), getParentForChildren(), isClean()); + minNumTrials_ = null; + } + return minNumTrialsBuilder_; + } + + private com.google.protobuf.Int32Value maxNumTrials_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + maxNumTrialsBuilder_; + /** + * + * + *
+       * If there are more than this many trials, stop the study.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + * + * @return Whether the maxNumTrials field is set. + */ + public boolean hasMaxNumTrials() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+       * If there are more than this many trials, stop the study.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + * + * @return The maxNumTrials. + */ + public com.google.protobuf.Int32Value getMaxNumTrials() { + if (maxNumTrialsBuilder_ == null) { + return maxNumTrials_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : maxNumTrials_; + } else { + return maxNumTrialsBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If there are more than this many trials, stop the study.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + */ + public Builder setMaxNumTrials(com.google.protobuf.Int32Value value) { + if (maxNumTrialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxNumTrials_ = value; + } else { + maxNumTrialsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * If there are more than this many trials, stop the study.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + */ + public Builder setMaxNumTrials(com.google.protobuf.Int32Value.Builder builderForValue) { + if (maxNumTrialsBuilder_ == null) { + maxNumTrials_ = builderForValue.build(); + } else { + maxNumTrialsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * If there are more than this many trials, stop the study.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + */ + public Builder mergeMaxNumTrials(com.google.protobuf.Int32Value value) { + if (maxNumTrialsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && maxNumTrials_ != null + && maxNumTrials_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getMaxNumTrialsBuilder().mergeFrom(value); + } else { + maxNumTrials_ = value; + } + } else { + maxNumTrialsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * If there are more than this many trials, stop the study.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + */ + public Builder clearMaxNumTrials() { + bitField0_ = (bitField0_ & ~0x00000010); + maxNumTrials_ = null; + if (maxNumTrialsBuilder_ != null) { + maxNumTrialsBuilder_.dispose(); + maxNumTrialsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * If there are more than this many trials, stop the study.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + */ + public com.google.protobuf.Int32Value.Builder getMaxNumTrialsBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getMaxNumTrialsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If there are more than this many trials, stop the study.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + */ + public com.google.protobuf.Int32ValueOrBuilder getMaxNumTrialsOrBuilder() { + if (maxNumTrialsBuilder_ != null) { + return maxNumTrialsBuilder_.getMessageOrBuilder(); + } else { + return maxNumTrials_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : maxNumTrials_; + } + } + /** + * + * + *
+       * If there are more than this many trials, stop the study.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getMaxNumTrialsFieldBuilder() { + if (maxNumTrialsBuilder_ == null) { + maxNumTrialsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getMaxNumTrials(), getParentForChildren(), isClean()); + maxNumTrials_ = null; + } + return maxNumTrialsBuilder_; + } + + private com.google.protobuf.Int32Value maxNumTrialsNoProgress_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + maxNumTrialsNoProgressBuilder_; + /** + * + * + *
+       * If the objective value has not improved for this many consecutive
+       * trials, stop the study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + * + * @return Whether the maxNumTrialsNoProgress field is set. + */ + public boolean hasMaxNumTrialsNoProgress() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+       * If the objective value has not improved for this many consecutive
+       * trials, stop the study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + * + * @return The maxNumTrialsNoProgress. + */ + public com.google.protobuf.Int32Value getMaxNumTrialsNoProgress() { + if (maxNumTrialsNoProgressBuilder_ == null) { + return maxNumTrialsNoProgress_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : maxNumTrialsNoProgress_; + } else { + return maxNumTrialsNoProgressBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If the objective value has not improved for this many consecutive
+       * trials, stop the study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + */ + public Builder setMaxNumTrialsNoProgress(com.google.protobuf.Int32Value value) { + if (maxNumTrialsNoProgressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxNumTrialsNoProgress_ = value; + } else { + maxNumTrialsNoProgressBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * If the objective value has not improved for this many consecutive
+       * trials, stop the study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + */ + public Builder setMaxNumTrialsNoProgress( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (maxNumTrialsNoProgressBuilder_ == null) { + maxNumTrialsNoProgress_ = builderForValue.build(); + } else { + maxNumTrialsNoProgressBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * If the objective value has not improved for this many consecutive
+       * trials, stop the study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + */ + public Builder mergeMaxNumTrialsNoProgress(com.google.protobuf.Int32Value value) { + if (maxNumTrialsNoProgressBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && maxNumTrialsNoProgress_ != null + && maxNumTrialsNoProgress_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getMaxNumTrialsNoProgressBuilder().mergeFrom(value); + } else { + maxNumTrialsNoProgress_ = value; + } + } else { + maxNumTrialsNoProgressBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * If the objective value has not improved for this many consecutive
+       * trials, stop the study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + */ + public Builder clearMaxNumTrialsNoProgress() { + bitField0_ = (bitField0_ & ~0x00000020); + maxNumTrialsNoProgress_ = null; + if (maxNumTrialsNoProgressBuilder_ != null) { + maxNumTrialsNoProgressBuilder_.dispose(); + maxNumTrialsNoProgressBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * If the objective value has not improved for this many consecutive
+       * trials, stop the study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + */ + public com.google.protobuf.Int32Value.Builder getMaxNumTrialsNoProgressBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getMaxNumTrialsNoProgressFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If the objective value has not improved for this many consecutive
+       * trials, stop the study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + */ + public com.google.protobuf.Int32ValueOrBuilder getMaxNumTrialsNoProgressOrBuilder() { + if (maxNumTrialsNoProgressBuilder_ != null) { + return maxNumTrialsNoProgressBuilder_.getMessageOrBuilder(); + } else { + return maxNumTrialsNoProgress_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : maxNumTrialsNoProgress_; + } + } + /** + * + * + *
+       * If the objective value has not improved for this many consecutive
+       * trials, stop the study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Int32Value max_num_trials_no_progress = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getMaxNumTrialsNoProgressFieldBuilder() { + if (maxNumTrialsNoProgressBuilder_ == null) { + maxNumTrialsNoProgressBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getMaxNumTrialsNoProgress(), getParentForChildren(), isClean()); + maxNumTrialsNoProgress_ = null; + } + return maxNumTrialsNoProgressBuilder_; + } + + private com.google.protobuf.Duration maxDurationNoProgress_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + maxDurationNoProgressBuilder_; + /** + * + * + *
+       * If the objective value has not improved for this much time, stop the
+       * study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + * + * @return Whether the maxDurationNoProgress field is set. + */ + public boolean hasMaxDurationNoProgress() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+       * If the objective value has not improved for this much time, stop the
+       * study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + * + * @return The maxDurationNoProgress. + */ + public com.google.protobuf.Duration getMaxDurationNoProgress() { + if (maxDurationNoProgressBuilder_ == null) { + return maxDurationNoProgress_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maxDurationNoProgress_; + } else { + return maxDurationNoProgressBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If the objective value has not improved for this much time, stop the
+       * study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + */ + public Builder setMaxDurationNoProgress(com.google.protobuf.Duration value) { + if (maxDurationNoProgressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxDurationNoProgress_ = value; + } else { + maxDurationNoProgressBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * If the objective value has not improved for this much time, stop the
+       * study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + */ + public Builder setMaxDurationNoProgress( + com.google.protobuf.Duration.Builder builderForValue) { + if (maxDurationNoProgressBuilder_ == null) { + maxDurationNoProgress_ = builderForValue.build(); + } else { + maxDurationNoProgressBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * If the objective value has not improved for this much time, stop the
+       * study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + */ + public Builder mergeMaxDurationNoProgress(com.google.protobuf.Duration value) { + if (maxDurationNoProgressBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && maxDurationNoProgress_ != null + && maxDurationNoProgress_ != com.google.protobuf.Duration.getDefaultInstance()) { + getMaxDurationNoProgressBuilder().mergeFrom(value); + } else { + maxDurationNoProgress_ = value; + } + } else { + maxDurationNoProgressBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * If the objective value has not improved for this much time, stop the
+       * study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + */ + public Builder clearMaxDurationNoProgress() { + bitField0_ = (bitField0_ & ~0x00000040); + maxDurationNoProgress_ = null; + if (maxDurationNoProgressBuilder_ != null) { + maxDurationNoProgressBuilder_.dispose(); + maxDurationNoProgressBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * If the objective value has not improved for this much time, stop the
+       * study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + */ + public com.google.protobuf.Duration.Builder getMaxDurationNoProgressBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getMaxDurationNoProgressFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If the objective value has not improved for this much time, stop the
+       * study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + */ + public com.google.protobuf.DurationOrBuilder getMaxDurationNoProgressOrBuilder() { + if (maxDurationNoProgressBuilder_ != null) { + return maxDurationNoProgressBuilder_.getMessageOrBuilder(); + } else { + return maxDurationNoProgress_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maxDurationNoProgress_; + } + } + /** + * + * + *
+       * If the objective value has not improved for this much time, stop the
+       * study.
+       *
+       * WARNING: Effective only for single-objective studies.
+       * 
+ * + * .google.protobuf.Duration max_duration_no_progress = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getMaxDurationNoProgressFieldBuilder() { + if (maxDurationNoProgressBuilder_ == null) { + maxDurationNoProgressBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getMaxDurationNoProgress(), getParentForChildren(), isClean()); + maxDurationNoProgress_ = null; + } + return maxDurationNoProgressBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig) + private static final com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig(); + } + + public static com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StudyStoppingConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; private int automatedStoppingSpecCase_ = 0; @SuppressWarnings("serial") @@ -19788,7 +22871,7 @@ public boolean hasMedianAutomatedStoppingSpec() { *
* * @deprecated google.cloud.aiplatform.v1beta1.StudySpec.convex_stop_config is deprecated. See - * google/cloud/aiplatform/v1beta1/study.proto;l=625 + * google/cloud/aiplatform/v1beta1/study.proto;l=693 * @return Whether the convexStopConfig field is set. */ @java.lang.Override @@ -19809,7 +22892,7 @@ public boolean hasConvexStopConfig() { * * * @deprecated google.cloud.aiplatform.v1beta1.StudySpec.convex_stop_config is deprecated. See - * google/cloud/aiplatform/v1beta1/study.proto;l=625 + * google/cloud/aiplatform/v1beta1/study.proto;l=693 * @return The convexStopConfig. */ @java.lang.Override @@ -20256,6 +23339,67 @@ public boolean hasTransferLearningConfig() { : transferLearningConfig_; } + public static final int STUDY_STOPPING_CONFIG_FIELD_NUMBER = 11; + private com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig studyStoppingConfig_; + /** + * + * + *
+   * Conditions for automated stopping of a Study. Enable automated stopping by
+   * configuring at least one condition.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + * + * @return Whether the studyStoppingConfig field is set. + */ + @java.lang.Override + public boolean hasStudyStoppingConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Conditions for automated stopping of a Study. Enable automated stopping by
+   * configuring at least one condition.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + * + * @return The studyStoppingConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig + getStudyStoppingConfig() { + return studyStoppingConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig.getDefaultInstance() + : studyStoppingConfig_; + } + /** + * + * + *
+   * Conditions for automated stopping of a Study. Enable automated stopping by
+   * configuring at least one condition.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfigOrBuilder + getStudyStoppingConfigOrBuilder() { + return studyStoppingConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig.getDefaultInstance() + : studyStoppingConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -20319,6 +23463,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (transferLearningConfig_ != null) { output.writeMessage(10, getTransferLearningConfig()); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(11, getStudyStoppingConfig()); + } getUnknownFields().writeTo(output); } @@ -20383,6 +23530,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getTransferLearningConfig()); } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(11, getStudyStoppingConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -20408,6 +23559,10 @@ public boolean equals(final java.lang.Object obj) { if (hasTransferLearningConfig()) { if (!getTransferLearningConfig().equals(other.getTransferLearningConfig())) return false; } + if (hasStudyStoppingConfig() != other.hasStudyStoppingConfig()) return false; + if (hasStudyStoppingConfig()) { + if (!getStudyStoppingConfig().equals(other.getStudyStoppingConfig())) return false; + } if (!getAutomatedStoppingSpecCase().equals(other.getAutomatedStoppingSpecCase())) return false; switch (automatedStoppingSpecCase_) { case 4: @@ -20456,6 +23611,10 @@ public int hashCode() { hash = (37 * hash) + TRANSFER_LEARNING_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getTransferLearningConfig().hashCode(); } + if (hasStudyStoppingConfig()) { + hash = (37 * hash) + STUDY_STOPPING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getStudyStoppingConfig().hashCode(); + } switch (automatedStoppingSpecCase_) { case 4: hash = (37 * hash) + DECAY_CURVE_STOPPING_SPEC_FIELD_NUMBER; @@ -20605,10 +23764,22 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.aiplatform.v1beta1.StudySpec.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMetricsFieldBuilder(); + getParametersFieldBuilder(); + getTransferLearningConfigFieldBuilder(); + getStudyStoppingConfigFieldBuilder(); + } } @java.lang.Override @@ -20649,6 +23820,11 @@ public Builder clear() { transferLearningConfigBuilder_.dispose(); transferLearningConfigBuilder_ = null; } + studyStoppingConfig_ = null; + if (studyStoppingConfigBuilder_ != null) { + studyStoppingConfigBuilder_.dispose(); + studyStoppingConfigBuilder_ = null; + } automatedStoppingSpecCase_ = 0; automatedStoppingSpec_ = null; return this; @@ -20725,6 +23901,15 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.StudySpec result) ? transferLearningConfig_ : transferLearningConfigBuilder_.build(); } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000400) != 0)) { + result.studyStoppingConfig_ = + studyStoppingConfigBuilder_ == null + ? studyStoppingConfig_ + : studyStoppingConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } private void buildPartialOneofs(com.google.cloud.aiplatform.v1beta1.StudySpec result) { @@ -20855,6 +24040,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.StudySpec other) { if (other.hasTransferLearningConfig()) { mergeTransferLearningConfig(other.getTransferLearningConfig()); } + if (other.hasStudyStoppingConfig()) { + mergeStudyStoppingConfig(other.getStudyStoppingConfig()); + } switch (other.getAutomatedStoppingSpecCase()) { case DECAY_CURVE_STOPPING_SPEC: { @@ -20988,6 +24176,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000200; break; } // case 82 + case 90: + { + input.readMessage( + getStudyStoppingConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 90 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -21531,7 +24726,7 @@ public Builder clearMedianAutomatedStoppingSpec() { * * * @deprecated google.cloud.aiplatform.v1beta1.StudySpec.convex_stop_config is deprecated. See - * google/cloud/aiplatform/v1beta1/study.proto;l=625 + * google/cloud/aiplatform/v1beta1/study.proto;l=693 * @return Whether the convexStopConfig field is set. */ @java.lang.Override @@ -21552,7 +24747,7 @@ public boolean hasConvexStopConfig() { * * * @deprecated google.cloud.aiplatform.v1beta1.StudySpec.convex_stop_config is deprecated. See - * google/cloud/aiplatform/v1beta1/study.proto;l=625 + * google/cloud/aiplatform/v1beta1/study.proto;l=693 * @return The convexStopConfig. */ @java.lang.Override @@ -23347,6 +26542,224 @@ public Builder clearTransferLearningConfig() { return transferLearningConfigBuilder_; } + private com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig studyStoppingConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig, + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig.Builder, + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfigOrBuilder> + studyStoppingConfigBuilder_; + /** + * + * + *
+     * Conditions for automated stopping of a Study. Enable automated stopping by
+     * configuring at least one condition.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + * + * @return Whether the studyStoppingConfig field is set. + */ + public boolean hasStudyStoppingConfig() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Conditions for automated stopping of a Study. Enable automated stopping by
+     * configuring at least one condition.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + * + * @return The studyStoppingConfig. + */ + public com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig + getStudyStoppingConfig() { + if (studyStoppingConfigBuilder_ == null) { + return studyStoppingConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig.getDefaultInstance() + : studyStoppingConfig_; + } else { + return studyStoppingConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Conditions for automated stopping of a Study. Enable automated stopping by
+     * configuring at least one condition.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + */ + public Builder setStudyStoppingConfig( + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig value) { + if (studyStoppingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + studyStoppingConfig_ = value; + } else { + studyStoppingConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Conditions for automated stopping of a Study. Enable automated stopping by
+     * configuring at least one condition.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + */ + public Builder setStudyStoppingConfig( + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig.Builder builderForValue) { + if (studyStoppingConfigBuilder_ == null) { + studyStoppingConfig_ = builderForValue.build(); + } else { + studyStoppingConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Conditions for automated stopping of a Study. Enable automated stopping by
+     * configuring at least one condition.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + */ + public Builder mergeStudyStoppingConfig( + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig value) { + if (studyStoppingConfigBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && studyStoppingConfig_ != null + && studyStoppingConfig_ + != com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig + .getDefaultInstance()) { + getStudyStoppingConfigBuilder().mergeFrom(value); + } else { + studyStoppingConfig_ = value; + } + } else { + studyStoppingConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Conditions for automated stopping of a Study. Enable automated stopping by
+     * configuring at least one condition.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + */ + public Builder clearStudyStoppingConfig() { + bitField0_ = (bitField0_ & ~0x00000400); + studyStoppingConfig_ = null; + if (studyStoppingConfigBuilder_ != null) { + studyStoppingConfigBuilder_.dispose(); + studyStoppingConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Conditions for automated stopping of a Study. Enable automated stopping by
+     * configuring at least one condition.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + */ + public com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig.Builder + getStudyStoppingConfigBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getStudyStoppingConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Conditions for automated stopping of a Study. Enable automated stopping by
+     * configuring at least one condition.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + */ + public com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfigOrBuilder + getStudyStoppingConfigOrBuilder() { + if (studyStoppingConfigBuilder_ != null) { + return studyStoppingConfigBuilder_.getMessageOrBuilder(); + } else { + return studyStoppingConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig.getDefaultInstance() + : studyStoppingConfig_; + } + } + /** + * + * + *
+     * Conditions for automated stopping of a Study. Enable automated stopping by
+     * configuring at least one condition.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig, + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig.Builder, + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfigOrBuilder> + getStudyStoppingConfigFieldBuilder() { + if (studyStoppingConfigBuilder_ == null) { + studyStoppingConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig, + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig.Builder, + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfigOrBuilder>( + getStudyStoppingConfig(), getParentForChildren(), isClean()); + studyStoppingConfig_ = null; + } + return studyStoppingConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudySpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudySpecOrBuilder.java index 0403d5131297..bca4ce3e09b9 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudySpecOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudySpecOrBuilder.java @@ -122,7 +122,7 @@ public interface StudySpecOrBuilder * * * @deprecated google.cloud.aiplatform.v1beta1.StudySpec.convex_stop_config is deprecated. See - * google/cloud/aiplatform/v1beta1/study.proto;l=625 + * google/cloud/aiplatform/v1beta1/study.proto;l=693 * @return Whether the convexStopConfig field is set. */ @java.lang.Deprecated @@ -140,7 +140,7 @@ public interface StudySpecOrBuilder * * * @deprecated google.cloud.aiplatform.v1beta1.StudySpec.convex_stop_config is deprecated. See - * google/cloud/aiplatform/v1beta1/study.proto;l=625 + * google/cloud/aiplatform/v1beta1/study.proto;l=693 * @return The convexStopConfig. */ @java.lang.Deprecated @@ -458,6 +458,51 @@ com.google.cloud.aiplatform.v1beta1.StudySpec.ParameterSpecOrBuilder getParamete com.google.cloud.aiplatform.v1beta1.StudySpec.TransferLearningConfigOrBuilder getTransferLearningConfigOrBuilder(); + /** + * + * + *
+   * Conditions for automated stopping of a Study. Enable automated stopping by
+   * configuring at least one condition.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + * + * @return Whether the studyStoppingConfig field is set. + */ + boolean hasStudyStoppingConfig(); + /** + * + * + *
+   * Conditions for automated stopping of a Study. Enable automated stopping by
+   * configuring at least one condition.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + * + * @return The studyStoppingConfig. + */ + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig getStudyStoppingConfig(); + /** + * + * + *
+   * Conditions for automated stopping of a Study. Enable automated stopping by
+   * configuring at least one condition.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfig study_stopping_config = 11; + * + */ + com.google.cloud.aiplatform.v1beta1.StudySpec.StudyStoppingConfigOrBuilder + getStudyStoppingConfigOrBuilder(); + com.google.cloud.aiplatform.v1beta1.StudySpec.AutomatedStoppingSpecCase getAutomatedStoppingSpecCase(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudyTimeConstraint.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudyTimeConstraint.java new file mode 100644 index 000000000000..54eae0421e59 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudyTimeConstraint.java @@ -0,0 +1,1105 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/study.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Time-based Constraint for Study
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.StudyTimeConstraint} + */ +public final class StudyTimeConstraint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.StudyTimeConstraint) + StudyTimeConstraintOrBuilder { + private static final long serialVersionUID = 0L; + // Use StudyTimeConstraint.newBuilder() to construct. + private StudyTimeConstraint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StudyTimeConstraint() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StudyTimeConstraint(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.StudyProto + .internal_static_google_cloud_aiplatform_v1beta1_StudyTimeConstraint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.StudyProto + .internal_static_google_cloud_aiplatform_v1beta1_StudyTimeConstraint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.class, + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.Builder.class); + } + + private int constraintCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object constraint_; + + public enum ConstraintCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MAX_DURATION(1), + END_TIME(2), + CONSTRAINT_NOT_SET(0); + private final int value; + + private ConstraintCase(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 ConstraintCase valueOf(int value) { + return forNumber(value); + } + + public static ConstraintCase forNumber(int value) { + switch (value) { + case 1: + return MAX_DURATION; + case 2: + return END_TIME; + case 0: + return CONSTRAINT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ConstraintCase getConstraintCase() { + return ConstraintCase.forNumber(constraintCase_); + } + + public static final int MAX_DURATION_FIELD_NUMBER = 1; + /** + * + * + *
+   * Counts the wallclock time passed since the creation of this Study.
+   * 
+ * + * .google.protobuf.Duration max_duration = 1; + * + * @return Whether the maxDuration field is set. + */ + @java.lang.Override + public boolean hasMaxDuration() { + return constraintCase_ == 1; + } + /** + * + * + *
+   * Counts the wallclock time passed since the creation of this Study.
+   * 
+ * + * .google.protobuf.Duration max_duration = 1; + * + * @return The maxDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getMaxDuration() { + if (constraintCase_ == 1) { + return (com.google.protobuf.Duration) constraint_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + /** + * + * + *
+   * Counts the wallclock time passed since the creation of this Study.
+   * 
+ * + * .google.protobuf.Duration max_duration = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMaxDurationOrBuilder() { + if (constraintCase_ == 1) { + return (com.google.protobuf.Duration) constraint_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + /** + * + * + *
+   * Compares the wallclock time to this time. Must use UTC timezone.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return constraintCase_ == 2; + } + /** + * + * + *
+   * Compares the wallclock time to this time. Must use UTC timezone.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + if (constraintCase_ == 2) { + return (com.google.protobuf.Timestamp) constraint_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + /** + * + * + *
+   * Compares the wallclock time to this time. Must use UTC timezone.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (constraintCase_ == 2) { + return (com.google.protobuf.Timestamp) constraint_; + } + return com.google.protobuf.Timestamp.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 (constraintCase_ == 1) { + output.writeMessage(1, (com.google.protobuf.Duration) constraint_); + } + if (constraintCase_ == 2) { + output.writeMessage(2, (com.google.protobuf.Timestamp) constraint_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (constraintCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.protobuf.Duration) constraint_); + } + if (constraintCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.protobuf.Timestamp) constraint_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint other = + (com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint) obj; + + if (!getConstraintCase().equals(other.getConstraintCase())) return false; + switch (constraintCase_) { + case 1: + if (!getMaxDuration().equals(other.getMaxDuration())) return false; + break; + case 2: + if (!getEndTime().equals(other.getEndTime())) 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 (constraintCase_) { + case 1: + hash = (37 * hash) + MAX_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getMaxDuration().hashCode(); + break; + case 2: + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Time-based Constraint for Study
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.StudyTimeConstraint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.StudyTimeConstraint) + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraintOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.StudyProto + .internal_static_google_cloud_aiplatform_v1beta1_StudyTimeConstraint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.StudyProto + .internal_static_google_cloud_aiplatform_v1beta1_StudyTimeConstraint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.class, + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (maxDurationBuilder_ != null) { + maxDurationBuilder_.clear(); + } + if (endTimeBuilder_ != null) { + endTimeBuilder_.clear(); + } + constraintCase_ = 0; + constraint_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.StudyProto + .internal_static_google_cloud_aiplatform_v1beta1_StudyTimeConstraint_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint build() { + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint buildPartial() { + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint result = + new com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint result) { + result.constraintCase_ = constraintCase_; + result.constraint_ = this.constraint_; + if (constraintCase_ == 1 && maxDurationBuilder_ != null) { + result.constraint_ = maxDurationBuilder_.build(); + } + if (constraintCase_ == 2 && endTimeBuilder_ != null) { + result.constraint_ = endTimeBuilder_.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.aiplatform.v1beta1.StudyTimeConstraint) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint other) { + if (other == com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.getDefaultInstance()) + return this; + switch (other.getConstraintCase()) { + case MAX_DURATION: + { + mergeMaxDuration(other.getMaxDuration()); + break; + } + case END_TIME: + { + mergeEndTime(other.getEndTime()); + break; + } + case CONSTRAINT_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(getMaxDurationFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 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 constraintCase_ = 0; + private java.lang.Object constraint_; + + public ConstraintCase getConstraintCase() { + return ConstraintCase.forNumber(constraintCase_); + } + + public Builder clearConstraint() { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + maxDurationBuilder_; + /** + * + * + *
+     * Counts the wallclock time passed since the creation of this Study.
+     * 
+ * + * .google.protobuf.Duration max_duration = 1; + * + * @return Whether the maxDuration field is set. + */ + @java.lang.Override + public boolean hasMaxDuration() { + return constraintCase_ == 1; + } + /** + * + * + *
+     * Counts the wallclock time passed since the creation of this Study.
+     * 
+ * + * .google.protobuf.Duration max_duration = 1; + * + * @return The maxDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getMaxDuration() { + if (maxDurationBuilder_ == null) { + if (constraintCase_ == 1) { + return (com.google.protobuf.Duration) constraint_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } else { + if (constraintCase_ == 1) { + return maxDurationBuilder_.getMessage(); + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + } + /** + * + * + *
+     * Counts the wallclock time passed since the creation of this Study.
+     * 
+ * + * .google.protobuf.Duration max_duration = 1; + */ + public Builder setMaxDuration(com.google.protobuf.Duration value) { + if (maxDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + maxDurationBuilder_.setMessage(value); + } + constraintCase_ = 1; + return this; + } + /** + * + * + *
+     * Counts the wallclock time passed since the creation of this Study.
+     * 
+ * + * .google.protobuf.Duration max_duration = 1; + */ + public Builder setMaxDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (maxDurationBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + maxDurationBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 1; + return this; + } + /** + * + * + *
+     * Counts the wallclock time passed since the creation of this Study.
+     * 
+ * + * .google.protobuf.Duration max_duration = 1; + */ + public Builder mergeMaxDuration(com.google.protobuf.Duration value) { + if (maxDurationBuilder_ == null) { + if (constraintCase_ == 1 + && constraint_ != com.google.protobuf.Duration.getDefaultInstance()) { + constraint_ = + com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) constraint_) + .mergeFrom(value) + .buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 1) { + maxDurationBuilder_.mergeFrom(value); + } else { + maxDurationBuilder_.setMessage(value); + } + } + constraintCase_ = 1; + return this; + } + /** + * + * + *
+     * Counts the wallclock time passed since the creation of this Study.
+     * 
+ * + * .google.protobuf.Duration max_duration = 1; + */ + public Builder clearMaxDuration() { + if (maxDurationBuilder_ == null) { + if (constraintCase_ == 1) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 1) { + constraintCase_ = 0; + constraint_ = null; + } + maxDurationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Counts the wallclock time passed since the creation of this Study.
+     * 
+ * + * .google.protobuf.Duration max_duration = 1; + */ + public com.google.protobuf.Duration.Builder getMaxDurationBuilder() { + return getMaxDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Counts the wallclock time passed since the creation of this Study.
+     * 
+ * + * .google.protobuf.Duration max_duration = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMaxDurationOrBuilder() { + if ((constraintCase_ == 1) && (maxDurationBuilder_ != null)) { + return maxDurationBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 1) { + return (com.google.protobuf.Duration) constraint_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + } + /** + * + * + *
+     * Counts the wallclock time passed since the creation of this Study.
+     * 
+ * + * .google.protobuf.Duration max_duration = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getMaxDurationFieldBuilder() { + if (maxDurationBuilder_ == null) { + if (!(constraintCase_ == 1)) { + constraint_ = com.google.protobuf.Duration.getDefaultInstance(); + } + maxDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + (com.google.protobuf.Duration) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 1; + onChanged(); + return maxDurationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Compares the wallclock time to this time. Must use UTC timezone.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return constraintCase_ == 2; + } + /** + * + * + *
+     * Compares the wallclock time to this time. Must use UTC timezone.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + if (constraintCase_ == 2) { + return (com.google.protobuf.Timestamp) constraint_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } else { + if (constraintCase_ == 2) { + return endTimeBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + * + * + *
+     * Compares the wallclock time to this time. Must use UTC timezone.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + constraintCase_ = 2; + return this; + } + /** + * + * + *
+     * Compares the wallclock time to this time. Must use UTC timezone.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 2; + return this; + } + /** + * + * + *
+     * Compares the wallclock time to this time. Must use UTC timezone.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (constraintCase_ == 2 + && constraint_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + constraint_ = + com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) constraint_) + .mergeFrom(value) + .buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 2) { + endTimeBuilder_.mergeFrom(value); + } else { + endTimeBuilder_.setMessage(value); + } + } + constraintCase_ = 2; + return this; + } + /** + * + * + *
+     * Compares the wallclock time to this time. Must use UTC timezone.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + if (constraintCase_ == 2) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 2) { + constraintCase_ = 0; + constraint_ = null; + } + endTimeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Compares the wallclock time to this time. Must use UTC timezone.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Compares the wallclock time to this time. Must use UTC timezone.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if ((constraintCase_ == 2) && (endTimeBuilder_ != null)) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 2) { + return (com.google.protobuf.Timestamp) constraint_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + * + * + *
+     * Compares the wallclock time to this time. Must use UTC timezone.
+     * 
+ * + * .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) { + if (!(constraintCase_ == 2)) { + constraint_ = com.google.protobuf.Timestamp.getDefaultInstance(); + } + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + (com.google.protobuf.Timestamp) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 2; + onChanged(); + 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.aiplatform.v1beta1.StudyTimeConstraint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.StudyTimeConstraint) + private static final com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint(); + } + + public static com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StudyTimeConstraint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudyTimeConstraintOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudyTimeConstraintOrBuilder.java new file mode 100644 index 000000000000..6061bc4a9bec --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudyTimeConstraintOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/study.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface StudyTimeConstraintOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.StudyTimeConstraint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Counts the wallclock time passed since the creation of this Study.
+   * 
+ * + * .google.protobuf.Duration max_duration = 1; + * + * @return Whether the maxDuration field is set. + */ + boolean hasMaxDuration(); + /** + * + * + *
+   * Counts the wallclock time passed since the creation of this Study.
+   * 
+ * + * .google.protobuf.Duration max_duration = 1; + * + * @return The maxDuration. + */ + com.google.protobuf.Duration getMaxDuration(); + /** + * + * + *
+   * Counts the wallclock time passed since the creation of this Study.
+   * 
+ * + * .google.protobuf.Duration max_duration = 1; + */ + com.google.protobuf.DurationOrBuilder getMaxDurationOrBuilder(); + + /** + * + * + *
+   * Compares the wallclock time to this time. Must use UTC timezone.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Compares the wallclock time to this time. Must use UTC timezone.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Compares the wallclock time to this time. Must use UTC timezone.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + com.google.cloud.aiplatform.v1beta1.StudyTimeConstraint.ConstraintCase getConstraintCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TokensInfo.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TokensInfo.java new file mode 100644 index 000000000000..8599da152d35 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TokensInfo.java @@ -0,0 +1,908 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/llm_utility_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Tokens info with a list of tokens and the corresponding list of token ids.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.TokensInfo} + */ +public final class TokensInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.TokensInfo) + TokensInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use TokensInfo.newBuilder() to construct. + private TokensInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TokensInfo() { + tokens_ = java.util.Collections.emptyList(); + tokenIds_ = emptyLongList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TokensInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_TokensInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_TokensInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.TokensInfo.class, + com.google.cloud.aiplatform.v1beta1.TokensInfo.Builder.class); + } + + public static final int TOKENS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List tokens_; + /** + * + * + *
+   * A list of tokens from the input.
+   * 
+ * + * repeated bytes tokens = 1; + * + * @return A list containing the tokens. + */ + @java.lang.Override + public java.util.List getTokensList() { + return tokens_; + } + /** + * + * + *
+   * A list of tokens from the input.
+   * 
+ * + * repeated bytes tokens = 1; + * + * @return The count of tokens. + */ + public int getTokensCount() { + return tokens_.size(); + } + /** + * + * + *
+   * A list of tokens from the input.
+   * 
+ * + * repeated bytes tokens = 1; + * + * @param index The index of the element to return. + * @return The tokens at the given index. + */ + public com.google.protobuf.ByteString getTokens(int index) { + return tokens_.get(index); + } + + public static final int TOKEN_IDS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList tokenIds_; + /** + * + * + *
+   * A list of token ids from the input.
+   * 
+ * + * repeated int64 token_ids = 2; + * + * @return A list containing the tokenIds. + */ + @java.lang.Override + public java.util.List getTokenIdsList() { + return tokenIds_; + } + /** + * + * + *
+   * A list of token ids from the input.
+   * 
+ * + * repeated int64 token_ids = 2; + * + * @return The count of tokenIds. + */ + public int getTokenIdsCount() { + return tokenIds_.size(); + } + /** + * + * + *
+   * A list of token ids from the input.
+   * 
+ * + * repeated int64 token_ids = 2; + * + * @param index The index of the element to return. + * @return The tokenIds at the given index. + */ + public long getTokenIds(int index) { + return tokenIds_.getLong(index); + } + + private int tokenIdsMemoizedSerializedSize = -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(); + for (int i = 0; i < tokens_.size(); i++) { + output.writeBytes(1, tokens_.get(i)); + } + if (getTokenIdsList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(tokenIdsMemoizedSerializedSize); + } + for (int i = 0; i < tokenIds_.size(); i++) { + output.writeInt64NoTag(tokenIds_.getLong(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 < tokens_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeBytesSizeNoTag(tokens_.get(i)); + } + size += dataSize; + size += 1 * getTokensList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < tokenIds_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag(tokenIds_.getLong(i)); + } + size += dataSize; + if (!getTokenIdsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + tokenIdsMemoizedSerializedSize = 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.aiplatform.v1beta1.TokensInfo)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.TokensInfo other = + (com.google.cloud.aiplatform.v1beta1.TokensInfo) obj; + + if (!getTokensList().equals(other.getTokensList())) return false; + if (!getTokenIdsList().equals(other.getTokenIdsList())) return false; + if (!getUnknownFields().equals(other.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 (getTokensCount() > 0) { + hash = (37 * hash) + TOKENS_FIELD_NUMBER; + hash = (53 * hash) + getTokensList().hashCode(); + } + if (getTokenIdsCount() > 0) { + hash = (37 * hash) + TOKEN_IDS_FIELD_NUMBER; + hash = (53 * hash) + getTokenIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.TokensInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.TokensInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.TokensInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.TokensInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.TokensInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.TokensInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.TokensInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.TokensInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.TokensInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.TokensInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.TokensInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.TokensInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1beta1.TokensInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Tokens info with a list of tokens and the corresponding list of token ids.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.TokensInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.TokensInfo) + com.google.cloud.aiplatform.v1beta1.TokensInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_TokensInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_TokensInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.TokensInfo.class, + com.google.cloud.aiplatform.v1beta1.TokensInfo.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.TokensInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tokens_ = java.util.Collections.emptyList(); + tokenIds_ = emptyLongList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_TokensInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TokensInfo getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.TokensInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TokensInfo build() { + com.google.cloud.aiplatform.v1beta1.TokensInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TokensInfo buildPartial() { + com.google.cloud.aiplatform.v1beta1.TokensInfo result = + new com.google.cloud.aiplatform.v1beta1.TokensInfo(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.aiplatform.v1beta1.TokensInfo result) { + if (((bitField0_ & 0x00000001) != 0)) { + tokens_ = java.util.Collections.unmodifiableList(tokens_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tokens_ = tokens_; + if (((bitField0_ & 0x00000002) != 0)) { + tokenIds_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.tokenIds_ = tokenIds_; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.TokensInfo 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.aiplatform.v1beta1.TokensInfo) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.TokensInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.TokensInfo other) { + if (other == com.google.cloud.aiplatform.v1beta1.TokensInfo.getDefaultInstance()) return this; + if (!other.tokens_.isEmpty()) { + if (tokens_.isEmpty()) { + tokens_ = other.tokens_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTokensIsMutable(); + tokens_.addAll(other.tokens_); + } + onChanged(); + } + if (!other.tokenIds_.isEmpty()) { + if (tokenIds_.isEmpty()) { + tokenIds_ = other.tokenIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTokenIdsIsMutable(); + tokenIds_.addAll(other.tokenIds_); + } + 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.protobuf.ByteString v = input.readBytes(); + ensureTokensIsMutable(); + tokens_.add(v); + break; + } // case 10 + case 16: + { + long v = input.readInt64(); + ensureTokenIdsIsMutable(); + tokenIds_.addLong(v); + break; + } // case 16 + case 18: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureTokenIdsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + tokenIds_.addLong(input.readInt64()); + } + input.popLimit(limit); + 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 tokens_ = + java.util.Collections.emptyList(); + + private void ensureTokensIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tokens_ = new java.util.ArrayList(tokens_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * A list of tokens from the input.
+     * 
+ * + * repeated bytes tokens = 1; + * + * @return A list containing the tokens. + */ + public java.util.List getTokensList() { + return ((bitField0_ & 0x00000001) != 0) + ? java.util.Collections.unmodifiableList(tokens_) + : tokens_; + } + /** + * + * + *
+     * A list of tokens from the input.
+     * 
+ * + * repeated bytes tokens = 1; + * + * @return The count of tokens. + */ + public int getTokensCount() { + return tokens_.size(); + } + /** + * + * + *
+     * A list of tokens from the input.
+     * 
+ * + * repeated bytes tokens = 1; + * + * @param index The index of the element to return. + * @return The tokens at the given index. + */ + public com.google.protobuf.ByteString getTokens(int index) { + return tokens_.get(index); + } + /** + * + * + *
+     * A list of tokens from the input.
+     * 
+ * + * repeated bytes tokens = 1; + * + * @param index The index to set the value at. + * @param value The tokens to set. + * @return This builder for chaining. + */ + public Builder setTokens(int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTokensIsMutable(); + tokens_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of tokens from the input.
+     * 
+ * + * repeated bytes tokens = 1; + * + * @param value The tokens to add. + * @return This builder for chaining. + */ + public Builder addTokens(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTokensIsMutable(); + tokens_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of tokens from the input.
+     * 
+ * + * repeated bytes tokens = 1; + * + * @param values The tokens to add. + * @return This builder for chaining. + */ + public Builder addAllTokens( + java.lang.Iterable values) { + ensureTokensIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tokens_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of tokens from the input.
+     * 
+ * + * repeated bytes tokens = 1; + * + * @return This builder for chaining. + */ + public Builder clearTokens() { + tokens_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private com.google.protobuf.Internal.LongList tokenIds_ = emptyLongList(); + + private void ensureTokenIdsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + tokenIds_ = mutableCopy(tokenIds_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * A list of token ids from the input.
+     * 
+ * + * repeated int64 token_ids = 2; + * + * @return A list containing the tokenIds. + */ + public java.util.List getTokenIdsList() { + return ((bitField0_ & 0x00000002) != 0) + ? java.util.Collections.unmodifiableList(tokenIds_) + : tokenIds_; + } + /** + * + * + *
+     * A list of token ids from the input.
+     * 
+ * + * repeated int64 token_ids = 2; + * + * @return The count of tokenIds. + */ + public int getTokenIdsCount() { + return tokenIds_.size(); + } + /** + * + * + *
+     * A list of token ids from the input.
+     * 
+ * + * repeated int64 token_ids = 2; + * + * @param index The index of the element to return. + * @return The tokenIds at the given index. + */ + public long getTokenIds(int index) { + return tokenIds_.getLong(index); + } + /** + * + * + *
+     * A list of token ids from the input.
+     * 
+ * + * repeated int64 token_ids = 2; + * + * @param index The index to set the value at. + * @param value The tokenIds to set. + * @return This builder for chaining. + */ + public Builder setTokenIds(int index, long value) { + + ensureTokenIdsIsMutable(); + tokenIds_.setLong(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of token ids from the input.
+     * 
+ * + * repeated int64 token_ids = 2; + * + * @param value The tokenIds to add. + * @return This builder for chaining. + */ + public Builder addTokenIds(long value) { + + ensureTokenIdsIsMutable(); + tokenIds_.addLong(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of token ids from the input.
+     * 
+ * + * repeated int64 token_ids = 2; + * + * @param values The tokenIds to add. + * @return This builder for chaining. + */ + public Builder addAllTokenIds(java.lang.Iterable values) { + ensureTokenIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tokenIds_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of token ids from the input.
+     * 
+ * + * repeated int64 token_ids = 2; + * + * @return This builder for chaining. + */ + public Builder clearTokenIds() { + tokenIds_ = emptyLongList(); + bitField0_ = (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.aiplatform.v1beta1.TokensInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.TokensInfo) + private static final com.google.cloud.aiplatform.v1beta1.TokensInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.TokensInfo(); + } + + public static com.google.cloud.aiplatform.v1beta1.TokensInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TokensInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TokensInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TokensInfoOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TokensInfoOrBuilder.java new file mode 100644 index 000000000000..f5b25fd9e9f6 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TokensInfoOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/llm_utility_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface TokensInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.TokensInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of tokens from the input.
+   * 
+ * + * repeated bytes tokens = 1; + * + * @return A list containing the tokens. + */ + java.util.List getTokensList(); + /** + * + * + *
+   * A list of tokens from the input.
+   * 
+ * + * repeated bytes tokens = 1; + * + * @return The count of tokens. + */ + int getTokensCount(); + /** + * + * + *
+   * A list of tokens from the input.
+   * 
+ * + * repeated bytes tokens = 1; + * + * @param index The index of the element to return. + * @return The tokens at the given index. + */ + com.google.protobuf.ByteString getTokens(int index); + + /** + * + * + *
+   * A list of token ids from the input.
+   * 
+ * + * repeated int64 token_ids = 2; + * + * @return A list containing the tokenIds. + */ + java.util.List getTokenIdsList(); + /** + * + * + *
+   * A list of token ids from the input.
+   * 
+ * + * repeated int64 token_ids = 2; + * + * @return The count of tokenIds. + */ + int getTokenIdsCount(); + /** + * + * + *
+   * A list of token ids from the input.
+   * 
+ * + * repeated int64 token_ids = 2; + * + * @param index The index of the element to return. + * @return The tokenIds at the given index. + */ + long getTokenIds(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpdateFeatureRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpdateFeatureRequest.java index e12c76a3ebd5..449a838f477b 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpdateFeatureRequest.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpdateFeatureRequest.java @@ -149,7 +149,7 @@ public com.google.cloud.aiplatform.v1beta1.FeatureOrBuilder getFeatureOrBuilder( * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) *
* * .google.protobuf.FieldMask update_mask = 2; @@ -176,7 +176,7 @@ public boolean hasUpdateMask() { * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) *
* * .google.protobuf.FieldMask update_mask = 2; @@ -203,7 +203,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) *
* * .google.protobuf.FieldMask update_mask = 2; @@ -856,7 +856,7 @@ public com.google.cloud.aiplatform.v1beta1.FeatureOrBuilder getFeatureOrBuilder( * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) *
* * .google.protobuf.FieldMask update_mask = 2; @@ -882,7 +882,7 @@ public boolean hasUpdateMask() { * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) *
* * .google.protobuf.FieldMask update_mask = 2; @@ -914,7 +914,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) *
* * .google.protobuf.FieldMask update_mask = 2; @@ -948,7 +948,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) *
* * .google.protobuf.FieldMask update_mask = 2; @@ -979,7 +979,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) *
* * .google.protobuf.FieldMask update_mask = 2; @@ -1016,7 +1016,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) *
* * .google.protobuf.FieldMask update_mask = 2; @@ -1047,7 +1047,7 @@ public Builder clearUpdateMask() { * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) *
* * .google.protobuf.FieldMask update_mask = 2; @@ -1073,7 +1073,7 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) *
* * .google.protobuf.FieldMask update_mask = 2; @@ -1103,7 +1103,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) *
* * .google.protobuf.FieldMask update_mask = 2; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpdateFeatureRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpdateFeatureRequestOrBuilder.java index 9a021e94ea5a..82fce5d41c6b 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpdateFeatureRequestOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpdateFeatureRequestOrBuilder.java @@ -92,7 +92,7 @@ public interface UpdateFeatureRequestOrBuilder * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) *
* * .google.protobuf.FieldMask update_mask = 2; @@ -116,7 +116,7 @@ public interface UpdateFeatureRequestOrBuilder * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) *
* * .google.protobuf.FieldMask update_mask = 2; @@ -140,7 +140,7 @@ public interface UpdateFeatureRequestOrBuilder * * * `description` * * `labels` - * * `disable_monitoring` + * * `disable_monitoring` (Not supported for FeatureRegistry Feature) *
* * .google.protobuf.FieldMask update_mask = 2; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/custom_job.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/custom_job.proto index 399c14eaeb17..300642aea002 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/custom_job.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/custom_job.proto @@ -195,6 +195,12 @@ message CustomJobSpec { // * AIP_TENSORBOARD_LOG_DIR = `//logs/` GcsDestination base_output_directory = 6; + // The ID of the location to store protected artifacts. e.g. us-central1. + // Populate only when the location is different than CustomJob location. + // List of supported locations: + // https://cloud.google.com/vertex-ai/docs/general/locations + string protected_artifact_location_id = 19; + // Optional. The name of a Vertex AI // [Tensorboard][google.cloud.aiplatform.v1beta1.Tensorboard] resource to // which this CustomJob will upload Tensorboard logs. Format: diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/feature.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/feature.proto index e3d3d4656325..668324a6e891 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/feature.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/feature.proto @@ -30,9 +30,8 @@ option java_package = "com.google.cloud.aiplatform.v1beta1"; option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; -// Feature Metadata information that describes an attribute of an entity type. -// For example, apple is an entity type, and color is a feature that describes -// apple. +// Feature Metadata information. +// For example, color is a feature that describes an apple. message Feature { option (google.api.resource) = { type: "aiplatform.googleapis.com/Feature" @@ -73,6 +72,7 @@ message Feature { [(google.api.field_behavior) = OUTPUT_ONLY]; } + // Only applicable for Vertex AI Legacy Feature Store. // An enum representing the value type of a feature. enum ValueType { // The value type is unspecified. @@ -109,6 +109,7 @@ message Feature { // Immutable. Name of the Feature. // Format: // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` + // `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` // // The last part feature is assigned by the client. The feature can be up to // 64 characters long and can consist only of ASCII Latin letters A-Z and a-z, @@ -119,14 +120,17 @@ message Feature { // Description of the Feature. string description = 2; - // Immutable. Type of Feature value. + // Immutable. Only applicable for Vertex AI Feature Store (Legacy). + // Type of Feature value. ValueType value_type = 3 [(google.api.field_behavior) = IMMUTABLE]; - // Output only. Timestamp when this EntityType was created. + // Output only. Only applicable for Vertex AI Feature Store (Legacy). + // Timestamp when this EntityType was created. google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Timestamp when this EntityType was most recently updated. + // Output only. Only applicable for Vertex AI Feature Store (Legacy). + // Timestamp when this EntityType was most recently updated. google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -147,9 +151,11 @@ message Feature { // "overwrite" update happens. string etag = 7; - // Optional. Deprecated: The custom monitoring configuration for this Feature, - // if not set, use the monitoring_config defined for the EntityType this - // Feature belongs to. Only Features with type + // Optional. Only applicable for Vertex AI Feature Store (Legacy). + // Deprecated: The custom monitoring configuration for this Feature, if not + // set, use the monitoring_config defined for the EntityType this Feature + // belongs to. + // Only Features with type // ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType]) // BOOL, STRING, DOUBLE or INT64 can enable monitoring. // @@ -162,8 +168,10 @@ message Feature { FeaturestoreMonitoringConfig monitoring_config = 9 [deprecated = true, (google.api.field_behavior) = OPTIONAL]; - // Optional. If not set, use the monitoring_config defined for the EntityType - // this Feature belongs to. Only Features with type + // Optional. Only applicable for Vertex AI Feature Store (Legacy). + // If not set, use the monitoring_config defined for the EntityType this + // Feature belongs to. + // Only Features with type // ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType]) // BOOL, STRING, DOUBLE or INT64 can enable monitoring. // @@ -171,7 +179,8 @@ message Feature { // config on EntityType. bool disable_monitoring = 12 [(google.api.field_behavior) = OPTIONAL]; - // Output only. A list of historical + // Output only. Only applicable for Vertex AI Feature Store (Legacy). + // A list of historical // [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis] // stats requested by user, sorted by // [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time] @@ -179,8 +188,13 @@ message Feature { repeated FeatureStatsAnomaly monitoring_stats = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The list of historical stats and anomalies with specified - // objectives. + // Output only. Only applicable for Vertex AI Feature Store (Legacy). + // The list of historical stats and anomalies with specified objectives. repeated MonitoringStatsAnomaly monitoring_stats_anomalies = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Only applicable for Vertex AI Feature Store. + // The name of the BigQuery Table/View columnn hosting data for this version. + // If no value is provided, will use feature_id. + string version_column_name = 106; } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/feature_online_store.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/feature_online_store.proto index c1609aabc7a7..711b024fb1fa 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/feature_online_store.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/feature_online_store.proto @@ -61,7 +61,7 @@ message FeatureOnlineStore { AutoScaling auto_scaling = 1 [(google.api.field_behavior) = REQUIRED]; } - // Optimized storage type to replace lightning + // Optimized storage type message Optimized {} // The dedicated serving endpoint for this FeatureOnlineStore. Only need to diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/feature_online_store_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/feature_online_store_service.proto index 8b56cc31c0c3..d50756188d09 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/feature_online_store_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/feature_online_store_service.proto @@ -43,7 +43,7 @@ service FeatureOnlineStoreService { post: "/v1beta1/{feature_view=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:fetchFeatureValues" body: "*" }; - option (google.api.method_signature) = "feature_view, id"; + option (google.api.method_signature) = "feature_view, data_key"; } // Search the nearest entities under a FeatureView. @@ -58,12 +58,34 @@ service FeatureOnlineStoreService { } } +// Format of the data in the Feature View. +enum FeatureViewDataFormat { + // Not set. Will be treated as the KeyValue format. + FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED = 0; + + // Return response data in key-value format. + KEY_VALUE = 1; + + // Return response data in proto Struct format. + PROTO_STRUCT = 2; +} + +// Lookup key for a feature view. +message FeatureViewDataKey { + oneof key_oneof { + // String key to use for lookup. + string key = 1; + } +} + // Request message for // [FeatureOnlineStoreService.FetchFeatureValues][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.FetchFeatureValues]. // All the features under the requested feature view will be returned. message FetchFeatureValuesRequest { // Format of the response data. enum Format { + option deprecated = true; + // Not set. Will be treated as the KeyValue format. FORMAT_UNSPECIFIED = 0; @@ -75,10 +97,12 @@ message FetchFeatureValuesRequest { } // Entity ID to fetch feature values for. + // Deprecated. Use + // [FetchFeatureValuesRequest.data_key][google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.data_key]. oneof entity_id { // Simple ID. The whole string will be used as is to identify Entity to // fetch feature values for. - string id = 3; + string id = 3 [deprecated = true]; } // Required. FeatureView resource format @@ -90,8 +114,19 @@ message FetchFeatureValuesRequest { } ]; + // Optional. The request key to fetch feature values for. + FeatureViewDataKey data_key = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Response data format. If not set, + // [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1beta1.FeatureViewDataFormat.KEY_VALUE] + // will be used. + FeatureViewDataFormat data_format = 7 + [(google.api.field_behavior) = OPTIONAL]; + // Specify response data format. If not set, KeyValue format will be used. - Format format = 5; + // Deprecated. Use + // [FetchFeatureValuesRequest.data_format][google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest.data_format]. + Format format = 5 [deprecated = true]; } // Response message for diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/featurestore_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/featurestore_service.proto index 465669984e99..0a3cc0574775 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/featurestore_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/featurestore_service.proto @@ -953,6 +953,11 @@ message DeleteEntityTypeRequest { // Request message for // [FeatureRegistryService.CreateFeature][google.cloud.aiplatform.v1beta1.FeatureRegistryService.CreateFeature]. message CreateFeatureRequest { + // Required. The resource name of the EntityType or FeatureGroup to create a + // Feature. Format for entity_type as parent: + // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + // Format for feature_group as parent: + // `projects/{project}/locations/{location}/featureGroups/{feature_group}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1008,8 +1013,9 @@ message BatchCreateFeaturesResponse { // [FeatureRegistryService.GetFeature][google.cloud.aiplatform.v1beta1.FeatureRegistryService.GetFeature]. message GetFeatureRequest { // Required. The name of the Feature resource. - // Format: + // Format for entity_type as parent: // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + // Format for feature_group as parent: // `projects/{project}/locations/{location}/featureGroups/{feature_group}` string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -1025,8 +1031,9 @@ message GetFeatureRequest { // [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]. message ListFeaturesRequest { // Required. The resource name of the Location to list Features. - // Format: + // Format for entity_type as parent: // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` + // Format for feature_group as parent: // `projects/{project}/locations/{location}/featureGroups/{feature_group}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, @@ -1065,10 +1072,14 @@ message ListFeaturesRequest { // A page token, received from a previous // [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures] + // call or + // [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures] // call. Provide this to retrieve the subsequent page. // // When paginating, all other parameters provided to // [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures] + // or or + // [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures] // must match the call that provided the page token. string page_token = 4; @@ -1085,6 +1096,7 @@ message ListFeaturesRequest { // Mask specifying which fields to read. google.protobuf.FieldMask read_mask = 6; + // Only applicable for Vertex AI Feature Store (Legacy). // If set, return the most recent // [ListFeaturesRequest.latest_stats_count][google.cloud.aiplatform.v1beta1.ListFeaturesRequest.latest_stats_count] // of stats for each Feature in response. Valid value is [0, 10]. If number of @@ -1245,7 +1257,7 @@ message UpdateFeatureRequest { // // * `description` // * `labels` - // * `disable_monitoring` + // * `disable_monitoring` (Not supported for FeatureRegistry Feature) google.protobuf.FieldMask update_mask = 2; } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/index.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/index.proto index 15345a7c615e..2f191141a626 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/index.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/index.proto @@ -142,6 +142,55 @@ message IndexDatapoint { repeated string deny_list = 3; } + // This field allows restricts to be based on numeric comparisons rather + // than categorical tokens. + message NumericRestriction { + // Which comparison operator to use. Should be specified for queries only; + // specifying this for a datapoint is an error. + // + // Datapoints for which Operator is true relative to the query's Value + // field will be allowlisted. + enum Operator { + // Default value of the enum. + OPERATOR_UNSPECIFIED = 0; + + // Datapoints are eligible iff their value is < the query's. + LESS = 1; + + // Datapoints are eligible iff their value is <= the query's. + LESS_EQUAL = 2; + + // Datapoints are eligible iff their value is == the query's. + EQUAL = 3; + + // Datapoints are eligible iff their value is >= the query's. + GREATER_EQUAL = 4; + + // Datapoints are eligible iff their value is > the query's. + GREATER = 5; + } + + // The type of Value must be consistent for all datapoints with a given + // namespace name. This is verified at runtime. + oneof Value { + // Represents 64 bit integer. + int64 value_int = 2; + + // Represents 32 bit float. + float value_float = 3; + + // Represents 64 bit float. + double value_double = 4; + } + + // The namespace of this restriction. e.g.: cost. + string namespace = 1; + + // This MUST be specified for queries and must NOT be specified for + // datapoints. + Operator op = 5; + } + // Crowding tag is a constraint on a neighbor list produced by nearest // neighbor search requiring that no more than some value k' of the k // neighbors returned have the same value of crowding_attribute. @@ -167,6 +216,12 @@ message IndexDatapoint { // https://cloud.google.com/vertex-ai/docs/matching-engine/filtering repeated Restriction restricts = 4 [(google.api.field_behavior) = OPTIONAL]; + // Optional. List of Restrict of the datapoint, used to perform "restricted + // searches" where boolean rule are used to filter the subset of the database + // eligible for matching. This uses numeric comparisons. + repeated NumericRestriction numeric_restricts = 6 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. CrowdingTag of the datapoint, the number of neighbors to return // in each crowding can be configured during query. CrowdingTag crowding_tag = 5 [(google.api.field_behavior) = OPTIONAL]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/index_endpoint.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/index_endpoint.proto index 7c55142eacc1..46dfba3bfc12 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/index_endpoint.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/index_endpoint.proto @@ -191,10 +191,11 @@ message DeployedIndex { [(google.api.field_behavior) = OPTIONAL]; // Optional. A description of resources that are dedicated to the - // DeployedIndex, and that need a higher degree of manual configuration. If - // min_replica_count is not set, the default value is 2 (we don't provide SLA - // when min_replica_count=1). If max_replica_count is not set, the default - // value is min_replica_count. The max allowed replica count is 1000. + // DeployedIndex, and that need a higher degree of manual configuration. The + // field min_replica_count must be set to a value strictly greater than 0, or + // else validation will fail. We don't provide SLA when min_replica_count=1. + // If max_replica_count is not set, the default value is min_replica_count. + // The max allowed replica count is 1000. // // Available machine types for SMALL shard: // e2-standard-2 and all machine types available for MEDIUM and LARGE shard. diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/llm_utility_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/llm_utility_service.proto new file mode 100644 index 000000000000..3fddf3acc845 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/llm_utility_service.proto @@ -0,0 +1,86 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "LlmUtilityServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// Service for LLM related utility functions. +service LlmUtilityService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Return a list of tokens based on the input text. + rpc ComputeTokens(ComputeTokensRequest) returns (ComputeTokensResponse) { + option (google.api.http) = { + post: "/v1beta1/{endpoint=projects/*/locations/*/endpoints/*}:computeTokens" + body: "*" + additional_bindings { + post: "/v1beta1/{endpoint=projects/*/locations/*/publishers/*/models/*}:computeTokens" + body: "*" + } + }; + option (google.api.method_signature) = "endpoint,instances"; + } +} + +// Request message for ComputeTokens RPC call. +message ComputeTokensRequest { + // Required. The name of the Endpoint requested to get lists of tokens and + // token ids. + string endpoint = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Endpoint" + } + ]; + + // Required. The instances that are the input to token computing API call. + // Schema is identical to the prediction schema of the text model, even for + // the non-text models, like chat models, or Codey models. + repeated google.protobuf.Value instances = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Tokens info with a list of tokens and the corresponding list of token ids. +message TokensInfo { + // A list of tokens from the input. + repeated bytes tokens = 1; + + // A list of token ids from the input. + repeated int64 token_ids = 2; +} + +// Response message for ComputeTokens RPC call. +message ComputeTokensResponse { + // Lists of tokens info from the input. A ComputeTokensRequest could have + // multiple instances with a prompt in each instance. We also need to return + // lists of tokens info for the request with multiple instances. + repeated TokensInfo tokens_info = 1; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/machine_resources.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/machine_resources.proto index b7e19fa130fe..c51246f85462 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/machine_resources.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/machine_resources.proto @@ -52,6 +52,10 @@ message MachineSpec { // The number of accelerators to attach to the machine. int32 accelerator_count = 3; + + // Immutable. The topology of the TPUs. Corresponds to the TPU topologies + // available from GKE. (Example: tpu_topology: "2x2x1"). + string tpu_topology = 4 [(google.api.field_behavior) = IMMUTABLE]; } // A description of resources that are dedicated to a DeployedModel, and diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model.proto index 0edbee572d5e..10bf0807c107 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model.proto @@ -22,6 +22,7 @@ import "google/cloud/aiplatform/v1beta1/deployed_model_ref.proto"; import "google/cloud/aiplatform/v1beta1/encryption_spec.proto"; import "google/cloud/aiplatform/v1beta1/env_var.proto"; import "google/cloud/aiplatform/v1beta1/explanation.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; @@ -693,6 +694,21 @@ message ModelContainerSpec { // [`AIP_DEPLOYED_MODEL_ID` environment // variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) string health_route = 7 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Deployment timeout. + // Limit for deployment timeout is 2 hours. + google.protobuf.Duration deployment_timeout = 10 + [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The amount of the VM memory to reserve as the shared memory for + // the model in megabytes. + int64 shared_memory_size_mb = 11 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Specification for Kubernetes startup probe. + Probe startup_probe = 12 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Specification for Kubernetes readiness probe. + Probe health_probe = 13 [(google.api.field_behavior) = IMMUTABLE]; } // Represents a network port in a container. @@ -733,3 +749,35 @@ message ModelSourceInfo { // pertains to the original. bool copy = 2; } + +// Probe describes a health check to be performed against a container to +// determine whether it is alive or ready to receive traffic. +message Probe { + // ExecAction specifies a command to execute. + message ExecAction { + // Command is the command line to execute inside the container, the working + // directory for the command is root ('/') in the container's filesystem. + // The command is simply exec'd, it is not run inside a shell, so + // traditional shell instructions ('|', etc) won't work. To use a shell, you + // need to explicitly call out to that shell. Exit status of 0 is treated as + // live/healthy and non-zero is unhealthy. + repeated string command = 1; + } + + oneof probe_type { + // Exec specifies the action to take. + ExecAction exec = 1; + } + + // How often (in seconds) to perform the probe. Default to 10 seconds. + // Minimum value is 1. Must be less than timeout_seconds. + // + // Maps to Kubernetes probe argument 'periodSeconds'. + int32 period_seconds = 2; + + // Number of seconds after which the probe times out. Defaults to 1 second. + // Minimum value is 1. Must be greater or equal to period_seconds. + // + // Maps to Kubernetes probe argument 'timeoutSeconds'. + int32 timeout_seconds = 3; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/pipeline_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/pipeline_service.proto index 3b6d819d7bb1..4d8695ba0c70 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/pipeline_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/pipeline_service.proto @@ -148,6 +148,22 @@ service PipelineService { }; } + // Batch deletes PipelineJobs + // The Operation is atomic. If it fails, none of the PipelineJobs are deleted. + // If it succeeds, all of the PipelineJobs are deleted. + rpc BatchDeletePipelineJobs(BatchDeletePipelineJobsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/pipelineJobs:batchDelete" + body: "*" + }; + option (google.api.method_signature) = "parent,names"; + option (google.longrunning.operation_info) = { + response_type: "BatchDeletePipelineJobsResponse" + metadata_type: "DeleteOperationMetadata" + }; + } + // Cancels a PipelineJob. // Starts asynchronous cancellation on the PipelineJob. The server // makes a best effort to cancel the pipeline, but success is not @@ -435,6 +451,37 @@ message DeletePipelineJobRequest { ]; } +// Request message for +// [PipelineService.BatchDeletePipelineJobs][google.cloud.aiplatform.v1beta1.PipelineService.BatchDeletePipelineJobs]. +message BatchDeletePipelineJobsRequest { + // Required. The name of the PipelineJobs' parent resource. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "aiplatform.googleapis.com/PipelineJob" + } + ]; + + // Required. The names of the PipelineJobs to delete. + // A maximum of 32 PipelineJobs can be deleted in a batch. + // Format: + // `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}` + repeated string names = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/PipelineJob" + } + ]; +} + +// Response message for +// [PipelineService.BatchDeletePipelineJobs][google.cloud.aiplatform.v1beta1.PipelineService.BatchDeletePipelineJobs]. +message BatchDeletePipelineJobsResponse { + // PipelineJobs deleted. + repeated PipelineJob pipeline_jobs = 1; +} + // Request message for // [PipelineService.CancelPipelineJob][google.cloud.aiplatform.v1beta1.PipelineService.CancelPipelineJob]. message CancelPipelineJobRequest { diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/prediction_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/prediction_service.proto index 14a7bca2d4dc..55b67ed4add6 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/prediction_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/prediction_service.proto @@ -343,7 +343,7 @@ message ExplainResponse { repeated Explanation explanations = 1; // This field stores the results of the explanations run in parallel with - // the default explanation strategy/method. + // The default explanation strategy/method. map concurrent_explanations = 4; // ID of the Endpoint's DeployedModel that served this explanation. diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/study.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/study.proto index 1075216a6c21..7f0d690d1c7c 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/study.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/study.proto @@ -21,6 +21,7 @@ import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; @@ -213,6 +214,17 @@ message TrialContext { repeated Trial.Parameter parameters = 2; } +// Time-based Constraint for Study +message StudyTimeConstraint { + oneof constraint { + // Counts the wallclock time passed since the creation of this Study. + google.protobuf.Duration max_duration = 1; + + // Compares the wallclock time to this time. Must use UTC timezone. + google.protobuf.Timestamp end_time = 2; + } +} + // Represents specification of a Study. message StudySpec { // Represents a metric to optimize. @@ -557,6 +569,62 @@ message StudySpec { [(google.api.field_behavior) = OUTPUT_ONLY]; } + // The configuration (stopping conditions) for automated stopping of a Study. + // Conditions include trial budgets, time budgets, and convergence detection. + message StudyStoppingConfig { + // If true, a Study enters STOPPING_ASAP whenever it would normally enters + // STOPPING state. + // + // The bottom line is: set to true if you want to interrupt on-going + // evaluations of Trials as soon as the study stopping condition is met. + // (Please see Study.State documentation for the source of truth). + google.protobuf.BoolValue should_stop_asap = 1; + + // Each "stopping rule" in this proto specifies an "if" condition. Before + // Vizier would generate a new suggestion, it first checks each specified + // stopping rule, from top to bottom in this list. + // Note that the first few rules (e.g. minimum_runtime_constraint, + // min_num_trials) will prevent other stopping rules from being evaluated + // until they are met. For example, setting `min_num_trials=5` and + // `always_stop_after= 1 hour` means that the Study will ONLY stop after it + // has 5 COMPLETED trials, even if more than an hour has passed since its + // creation. It follows the first applicable rule (whose "if" condition is + // satisfied) to make a stopping decision. If none of the specified rules + // are applicable, then Vizier decides that the study should not stop. + // If Vizier decides that the study should stop, the study enters + // STOPPING state (or STOPPING_ASAP if should_stop_asap = true). + // IMPORTANT: The automatic study state transition happens precisely as + // described above; that is, deleting trials or updating StudyConfig NEVER + // automatically moves the study state back to ACTIVE. If you want to + // _resume_ a Study that was stopped, 1) change the stopping conditions if + // necessary, 2) activate the study, and then 3) ask for suggestions. + // If the specified time or duration has not passed, do not stop the + // study. + StudyTimeConstraint minimum_runtime_constraint = 2; + + // If the specified time or duration has passed, stop the study. + StudyTimeConstraint maximum_runtime_constraint = 3; + + // If there are fewer than this many COMPLETED trials, do not stop the + // study. + google.protobuf.Int32Value min_num_trials = 4; + + // If there are more than this many trials, stop the study. + google.protobuf.Int32Value max_num_trials = 5; + + // If the objective value has not improved for this many consecutive + // trials, stop the study. + // + // WARNING: Effective only for single-objective studies. + google.protobuf.Int32Value max_num_trials_no_progress = 6; + + // If the objective value has not improved for this much time, stop the + // study. + // + // WARNING: Effective only for single-objective studies. + google.protobuf.Duration max_duration_no_progress = 7; + } + // The available search algorithms for the Study. enum Algorithm { // The default algorithm used by Vertex AI for [hyperparameter @@ -650,6 +718,10 @@ message StudySpec { // The configuration info/options for transfer learning. Currently supported // for Vertex AI Vizier service, not HyperParameterTuningJob TransferLearningConfig transfer_learning_config = 10; + + // Conditions for automated stopping of a Study. Enable automated stopping by + // configuring at least one condition. + optional StudyStoppingConfig study_stopping_config = 11; } // A message representing a Measurement of a Trial. A Measurement contains diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/create/SyncCreateSetCredentialsProvider.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..373937581c9c --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceSettings; +import com.google.cloud.aiplatform.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + FeatureOnlineStoreAdminServiceSettings featureOnlineStoreAdminServiceSettings = + FeatureOnlineStoreAdminServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create(featureOnlineStoreAdminServiceSettings); + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_Create_SetCredentialsProvider_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/create/SyncCreateSetEndpoint.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..ad37fde86ea4 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_Create_SetEndpoint_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceSettings; +import com.google.cloud.aiplatform.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + FeatureOnlineStoreAdminServiceSettings featureOnlineStoreAdminServiceSettings = + FeatureOnlineStoreAdminServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create(featureOnlineStoreAdminServiceSettings); + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_Create_SetEndpoint_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureonlinestore/AsyncCreateFeatureOnlineStore.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureonlinestore/AsyncCreateFeatureOnlineStore.java new file mode 100644 index 000000000000..0b0456fe4a78 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureonlinestore/AsyncCreateFeatureOnlineStore.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_CreateFeatureOnlineStore_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest; +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateFeatureOnlineStore { + + public static void main(String[] args) throws Exception { + asyncCreateFeatureOnlineStore(); + } + + public static void asyncCreateFeatureOnlineStore() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + CreateFeatureOnlineStoreRequest request = + CreateFeatureOnlineStoreRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFeatureOnlineStore(FeatureOnlineStore.newBuilder().build()) + .setFeatureOnlineStoreId("featureOnlineStoreId1046065331") + .build(); + ApiFuture future = + featureOnlineStoreAdminServiceClient + .createFeatureOnlineStoreCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_CreateFeatureOnlineStore_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureonlinestore/AsyncCreateFeatureOnlineStoreLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureonlinestore/AsyncCreateFeatureOnlineStoreLRO.java new file mode 100644 index 000000000000..a443fd005608 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureonlinestore/AsyncCreateFeatureOnlineStoreLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_CreateFeatureOnlineStore_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest; +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.LocationName; + +public class AsyncCreateFeatureOnlineStoreLRO { + + public static void main(String[] args) throws Exception { + asyncCreateFeatureOnlineStoreLRO(); + } + + public static void asyncCreateFeatureOnlineStoreLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + CreateFeatureOnlineStoreRequest request = + CreateFeatureOnlineStoreRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFeatureOnlineStore(FeatureOnlineStore.newBuilder().build()) + .setFeatureOnlineStoreId("featureOnlineStoreId1046065331") + .build(); + OperationFuture future = + featureOnlineStoreAdminServiceClient + .createFeatureOnlineStoreOperationCallable() + .futureCall(request); + // Do something. + FeatureOnlineStore response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_CreateFeatureOnlineStore_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureonlinestore/SyncCreateFeatureOnlineStore.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureonlinestore/SyncCreateFeatureOnlineStore.java new file mode 100644 index 000000000000..b9adadf3e3bd --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureonlinestore/SyncCreateFeatureOnlineStore.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_CreateFeatureOnlineStore_sync] +import com.google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest; +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.LocationName; + +public class SyncCreateFeatureOnlineStore { + + public static void main(String[] args) throws Exception { + syncCreateFeatureOnlineStore(); + } + + public static void syncCreateFeatureOnlineStore() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + CreateFeatureOnlineStoreRequest request = + CreateFeatureOnlineStoreRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFeatureOnlineStore(FeatureOnlineStore.newBuilder().build()) + .setFeatureOnlineStoreId("featureOnlineStoreId1046065331") + .build(); + FeatureOnlineStore response = + featureOnlineStoreAdminServiceClient.createFeatureOnlineStoreAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_CreateFeatureOnlineStore_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureonlinestore/SyncCreateFeatureOnlineStoreLocationnameFeatureonlinestoreString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureonlinestore/SyncCreateFeatureOnlineStoreLocationnameFeatureonlinestoreString.java new file mode 100644 index 000000000000..1041181d905a --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureonlinestore/SyncCreateFeatureOnlineStoreLocationnameFeatureonlinestoreString.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_CreateFeatureOnlineStore_LocationnameFeatureonlinestoreString_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.LocationName; + +public class SyncCreateFeatureOnlineStoreLocationnameFeatureonlinestoreString { + + public static void main(String[] args) throws Exception { + syncCreateFeatureOnlineStoreLocationnameFeatureonlinestoreString(); + } + + public static void syncCreateFeatureOnlineStoreLocationnameFeatureonlinestoreString() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + FeatureOnlineStore featureOnlineStore = FeatureOnlineStore.newBuilder().build(); + String featureOnlineStoreId = "featureOnlineStoreId1046065331"; + FeatureOnlineStore response = + featureOnlineStoreAdminServiceClient + .createFeatureOnlineStoreAsync(parent, featureOnlineStore, featureOnlineStoreId) + .get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_CreateFeatureOnlineStore_LocationnameFeatureonlinestoreString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureonlinestore/SyncCreateFeatureOnlineStoreStringFeatureonlinestoreString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureonlinestore/SyncCreateFeatureOnlineStoreStringFeatureonlinestoreString.java new file mode 100644 index 000000000000..6eb33624bb71 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureonlinestore/SyncCreateFeatureOnlineStoreStringFeatureonlinestoreString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_CreateFeatureOnlineStore_StringFeatureonlinestoreString_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.LocationName; + +public class SyncCreateFeatureOnlineStoreStringFeatureonlinestoreString { + + public static void main(String[] args) throws Exception { + syncCreateFeatureOnlineStoreStringFeatureonlinestoreString(); + } + + public static void syncCreateFeatureOnlineStoreStringFeatureonlinestoreString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + FeatureOnlineStore featureOnlineStore = FeatureOnlineStore.newBuilder().build(); + String featureOnlineStoreId = "featureOnlineStoreId1046065331"; + FeatureOnlineStore response = + featureOnlineStoreAdminServiceClient + .createFeatureOnlineStoreAsync(parent, featureOnlineStore, featureOnlineStoreId) + .get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_CreateFeatureOnlineStore_StringFeatureonlinestoreString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureview/AsyncCreateFeatureView.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureview/AsyncCreateFeatureView.java new file mode 100644 index 000000000000..d7b1c77ab7a1 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureview/AsyncCreateFeatureView.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_CreateFeatureView_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.CreateFeatureViewRequest; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreName; +import com.google.cloud.aiplatform.v1.FeatureView; +import com.google.longrunning.Operation; + +public class AsyncCreateFeatureView { + + public static void main(String[] args) throws Exception { + asyncCreateFeatureView(); + } + + public static void asyncCreateFeatureView() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + CreateFeatureViewRequest request = + CreateFeatureViewRequest.newBuilder() + .setParent( + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]") + .toString()) + .setFeatureView(FeatureView.newBuilder().build()) + .setFeatureViewId("featureViewId-1437334218") + .setRunSyncImmediately(true) + .build(); + ApiFuture future = + featureOnlineStoreAdminServiceClient.createFeatureViewCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_CreateFeatureView_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureview/AsyncCreateFeatureViewLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureview/AsyncCreateFeatureViewLRO.java new file mode 100644 index 000000000000..843741b384ab --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureview/AsyncCreateFeatureViewLRO.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_CreateFeatureView_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateFeatureViewRequest; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreName; +import com.google.cloud.aiplatform.v1.FeatureView; + +public class AsyncCreateFeatureViewLRO { + + public static void main(String[] args) throws Exception { + asyncCreateFeatureViewLRO(); + } + + public static void asyncCreateFeatureViewLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + CreateFeatureViewRequest request = + CreateFeatureViewRequest.newBuilder() + .setParent( + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]") + .toString()) + .setFeatureView(FeatureView.newBuilder().build()) + .setFeatureViewId("featureViewId-1437334218") + .setRunSyncImmediately(true) + .build(); + OperationFuture future = + featureOnlineStoreAdminServiceClient + .createFeatureViewOperationCallable() + .futureCall(request); + // Do something. + FeatureView response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_CreateFeatureView_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureview/SyncCreateFeatureView.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureview/SyncCreateFeatureView.java new file mode 100644 index 000000000000..55227e2c6b31 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureview/SyncCreateFeatureView.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_CreateFeatureView_sync] +import com.google.cloud.aiplatform.v1.CreateFeatureViewRequest; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreName; +import com.google.cloud.aiplatform.v1.FeatureView; + +public class SyncCreateFeatureView { + + public static void main(String[] args) throws Exception { + syncCreateFeatureView(); + } + + public static void syncCreateFeatureView() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + CreateFeatureViewRequest request = + CreateFeatureViewRequest.newBuilder() + .setParent( + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]") + .toString()) + .setFeatureView(FeatureView.newBuilder().build()) + .setFeatureViewId("featureViewId-1437334218") + .setRunSyncImmediately(true) + .build(); + FeatureView response = + featureOnlineStoreAdminServiceClient.createFeatureViewAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_CreateFeatureView_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureview/SyncCreateFeatureViewFeatureonlinestorenameFeatureviewString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureview/SyncCreateFeatureViewFeatureonlinestorenameFeatureviewString.java new file mode 100644 index 000000000000..0e36aad5d06b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureview/SyncCreateFeatureViewFeatureonlinestorenameFeatureviewString.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_CreateFeatureView_FeatureonlinestorenameFeatureviewString_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreName; +import com.google.cloud.aiplatform.v1.FeatureView; + +public class SyncCreateFeatureViewFeatureonlinestorenameFeatureviewString { + + public static void main(String[] args) throws Exception { + syncCreateFeatureViewFeatureonlinestorenameFeatureviewString(); + } + + public static void syncCreateFeatureViewFeatureonlinestorenameFeatureviewString() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + FeatureOnlineStoreName parent = + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]"); + FeatureView featureView = FeatureView.newBuilder().build(); + String featureViewId = "featureViewId-1437334218"; + FeatureView response = + featureOnlineStoreAdminServiceClient + .createFeatureViewAsync(parent, featureView, featureViewId) + .get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_CreateFeatureView_FeatureonlinestorenameFeatureviewString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureview/SyncCreateFeatureViewStringFeatureviewString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureview/SyncCreateFeatureViewStringFeatureviewString.java new file mode 100644 index 000000000000..4b7464a82d35 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/createfeatureview/SyncCreateFeatureViewStringFeatureviewString.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_CreateFeatureView_StringFeatureviewString_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreName; +import com.google.cloud.aiplatform.v1.FeatureView; + +public class SyncCreateFeatureViewStringFeatureviewString { + + public static void main(String[] args) throws Exception { + syncCreateFeatureViewStringFeatureviewString(); + } + + public static void syncCreateFeatureViewStringFeatureviewString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + String parent = + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]").toString(); + FeatureView featureView = FeatureView.newBuilder().build(); + String featureViewId = "featureViewId-1437334218"; + FeatureView response = + featureOnlineStoreAdminServiceClient + .createFeatureViewAsync(parent, featureView, featureViewId) + .get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_CreateFeatureView_StringFeatureviewString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureonlinestore/AsyncDeleteFeatureOnlineStore.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureonlinestore/AsyncDeleteFeatureOnlineStore.java new file mode 100644 index 000000000000..4acbb292dabf --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureonlinestore/AsyncDeleteFeatureOnlineStore.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_DeleteFeatureOnlineStore_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreName; +import com.google.longrunning.Operation; + +public class AsyncDeleteFeatureOnlineStore { + + public static void main(String[] args) throws Exception { + asyncDeleteFeatureOnlineStore(); + } + + public static void asyncDeleteFeatureOnlineStore() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + DeleteFeatureOnlineStoreRequest request = + DeleteFeatureOnlineStoreRequest.newBuilder() + .setName( + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]") + .toString()) + .setForce(true) + .build(); + ApiFuture future = + featureOnlineStoreAdminServiceClient + .deleteFeatureOnlineStoreCallable() + .futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_DeleteFeatureOnlineStore_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureonlinestore/AsyncDeleteFeatureOnlineStoreLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureonlinestore/AsyncDeleteFeatureOnlineStoreLRO.java new file mode 100644 index 000000000000..4031825f65d5 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureonlinestore/AsyncDeleteFeatureOnlineStoreLRO.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_DeleteFeatureOnlineStore_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreName; +import com.google.protobuf.Empty; + +public class AsyncDeleteFeatureOnlineStoreLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteFeatureOnlineStoreLRO(); + } + + public static void asyncDeleteFeatureOnlineStoreLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + DeleteFeatureOnlineStoreRequest request = + DeleteFeatureOnlineStoreRequest.newBuilder() + .setName( + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]") + .toString()) + .setForce(true) + .build(); + OperationFuture future = + featureOnlineStoreAdminServiceClient + .deleteFeatureOnlineStoreOperationCallable() + .futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_DeleteFeatureOnlineStore_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureonlinestore/SyncDeleteFeatureOnlineStore.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureonlinestore/SyncDeleteFeatureOnlineStore.java new file mode 100644 index 000000000000..42e484dd86ed --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureonlinestore/SyncDeleteFeatureOnlineStore.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_DeleteFeatureOnlineStore_sync] +import com.google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreName; +import com.google.protobuf.Empty; + +public class SyncDeleteFeatureOnlineStore { + + public static void main(String[] args) throws Exception { + syncDeleteFeatureOnlineStore(); + } + + public static void syncDeleteFeatureOnlineStore() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + DeleteFeatureOnlineStoreRequest request = + DeleteFeatureOnlineStoreRequest.newBuilder() + .setName( + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]") + .toString()) + .setForce(true) + .build(); + featureOnlineStoreAdminServiceClient.deleteFeatureOnlineStoreAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_DeleteFeatureOnlineStore_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureonlinestore/SyncDeleteFeatureOnlineStoreFeatureonlinestorenameBoolean.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureonlinestore/SyncDeleteFeatureOnlineStoreFeatureonlinestorenameBoolean.java new file mode 100644 index 000000000000..f4d927de8621 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureonlinestore/SyncDeleteFeatureOnlineStoreFeatureonlinestorenameBoolean.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_DeleteFeatureOnlineStore_FeatureonlinestorenameBoolean_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreName; +import com.google.protobuf.Empty; + +public class SyncDeleteFeatureOnlineStoreFeatureonlinestorenameBoolean { + + public static void main(String[] args) throws Exception { + syncDeleteFeatureOnlineStoreFeatureonlinestorenameBoolean(); + } + + public static void syncDeleteFeatureOnlineStoreFeatureonlinestorenameBoolean() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + FeatureOnlineStoreName name = + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]"); + boolean force = true; + featureOnlineStoreAdminServiceClient.deleteFeatureOnlineStoreAsync(name, force).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_DeleteFeatureOnlineStore_FeatureonlinestorenameBoolean_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureonlinestore/SyncDeleteFeatureOnlineStoreStringBoolean.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureonlinestore/SyncDeleteFeatureOnlineStoreStringBoolean.java new file mode 100644 index 000000000000..c5c6882d328d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureonlinestore/SyncDeleteFeatureOnlineStoreStringBoolean.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_DeleteFeatureOnlineStore_StringBoolean_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreName; +import com.google.protobuf.Empty; + +public class SyncDeleteFeatureOnlineStoreStringBoolean { + + public static void main(String[] args) throws Exception { + syncDeleteFeatureOnlineStoreStringBoolean(); + } + + public static void syncDeleteFeatureOnlineStoreStringBoolean() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + String name = + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]").toString(); + boolean force = true; + featureOnlineStoreAdminServiceClient.deleteFeatureOnlineStoreAsync(name, force).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_DeleteFeatureOnlineStore_StringBoolean_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureview/AsyncDeleteFeatureView.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureview/AsyncDeleteFeatureView.java new file mode 100644 index 000000000000..e865ee80e7cd --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureview/AsyncDeleteFeatureView.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_DeleteFeatureView_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewName; +import com.google.longrunning.Operation; + +public class AsyncDeleteFeatureView { + + public static void main(String[] args) throws Exception { + asyncDeleteFeatureView(); + } + + public static void asyncDeleteFeatureView() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + DeleteFeatureViewRequest request = + DeleteFeatureViewRequest.newBuilder() + .setName( + FeatureViewName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .build(); + ApiFuture future = + featureOnlineStoreAdminServiceClient.deleteFeatureViewCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_DeleteFeatureView_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureview/AsyncDeleteFeatureViewLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureview/AsyncDeleteFeatureViewLRO.java new file mode 100644 index 000000000000..0e36d15747e3 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureview/AsyncDeleteFeatureViewLRO.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_DeleteFeatureView_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewName; +import com.google.protobuf.Empty; + +public class AsyncDeleteFeatureViewLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteFeatureViewLRO(); + } + + public static void asyncDeleteFeatureViewLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + DeleteFeatureViewRequest request = + DeleteFeatureViewRequest.newBuilder() + .setName( + FeatureViewName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .build(); + OperationFuture future = + featureOnlineStoreAdminServiceClient + .deleteFeatureViewOperationCallable() + .futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_DeleteFeatureView_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureview/SyncDeleteFeatureView.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureview/SyncDeleteFeatureView.java new file mode 100644 index 000000000000..422a543534a9 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureview/SyncDeleteFeatureView.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_DeleteFeatureView_sync] +import com.google.cloud.aiplatform.v1.DeleteFeatureViewRequest; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewName; +import com.google.protobuf.Empty; + +public class SyncDeleteFeatureView { + + public static void main(String[] args) throws Exception { + syncDeleteFeatureView(); + } + + public static void syncDeleteFeatureView() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + DeleteFeatureViewRequest request = + DeleteFeatureViewRequest.newBuilder() + .setName( + FeatureViewName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .build(); + featureOnlineStoreAdminServiceClient.deleteFeatureViewAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_DeleteFeatureView_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureview/SyncDeleteFeatureViewFeatureviewname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureview/SyncDeleteFeatureViewFeatureviewname.java new file mode 100644 index 000000000000..967f8c3f3af5 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureview/SyncDeleteFeatureViewFeatureviewname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_DeleteFeatureView_Featureviewname_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewName; +import com.google.protobuf.Empty; + +public class SyncDeleteFeatureViewFeatureviewname { + + public static void main(String[] args) throws Exception { + syncDeleteFeatureViewFeatureviewname(); + } + + public static void syncDeleteFeatureViewFeatureviewname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + FeatureViewName name = + FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); + featureOnlineStoreAdminServiceClient.deleteFeatureViewAsync(name).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_DeleteFeatureView_Featureviewname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureview/SyncDeleteFeatureViewString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureview/SyncDeleteFeatureViewString.java new file mode 100644 index 000000000000..0335a2b1c872 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/deletefeatureview/SyncDeleteFeatureViewString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_DeleteFeatureView_String_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewName; +import com.google.protobuf.Empty; + +public class SyncDeleteFeatureViewString { + + public static void main(String[] args) throws Exception { + syncDeleteFeatureViewString(); + } + + public static void syncDeleteFeatureViewString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + String name = + FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString(); + featureOnlineStoreAdminServiceClient.deleteFeatureViewAsync(name).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_DeleteFeatureView_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureonlinestore/AsyncGetFeatureOnlineStore.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureonlinestore/AsyncGetFeatureOnlineStore.java new file mode 100644 index 000000000000..c177698caf31 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureonlinestore/AsyncGetFeatureOnlineStore.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureOnlineStore_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreName; +import com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest; + +public class AsyncGetFeatureOnlineStore { + + public static void main(String[] args) throws Exception { + asyncGetFeatureOnlineStore(); + } + + public static void asyncGetFeatureOnlineStore() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + GetFeatureOnlineStoreRequest request = + GetFeatureOnlineStoreRequest.newBuilder() + .setName( + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]") + .toString()) + .build(); + ApiFuture future = + featureOnlineStoreAdminServiceClient.getFeatureOnlineStoreCallable().futureCall(request); + // Do something. + FeatureOnlineStore response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureOnlineStore_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureonlinestore/SyncGetFeatureOnlineStore.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureonlinestore/SyncGetFeatureOnlineStore.java new file mode 100644 index 000000000000..6cc26898431a --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureonlinestore/SyncGetFeatureOnlineStore.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureOnlineStore_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreName; +import com.google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest; + +public class SyncGetFeatureOnlineStore { + + public static void main(String[] args) throws Exception { + syncGetFeatureOnlineStore(); + } + + public static void syncGetFeatureOnlineStore() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + GetFeatureOnlineStoreRequest request = + GetFeatureOnlineStoreRequest.newBuilder() + .setName( + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]") + .toString()) + .build(); + FeatureOnlineStore response = + featureOnlineStoreAdminServiceClient.getFeatureOnlineStore(request); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureOnlineStore_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureonlinestore/SyncGetFeatureOnlineStoreFeatureonlinestorename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureonlinestore/SyncGetFeatureOnlineStoreFeatureonlinestorename.java new file mode 100644 index 000000000000..8dd1e184fd21 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureonlinestore/SyncGetFeatureOnlineStoreFeatureonlinestorename.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureOnlineStore_Featureonlinestorename_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreName; + +public class SyncGetFeatureOnlineStoreFeatureonlinestorename { + + public static void main(String[] args) throws Exception { + syncGetFeatureOnlineStoreFeatureonlinestorename(); + } + + public static void syncGetFeatureOnlineStoreFeatureonlinestorename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + FeatureOnlineStoreName name = + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]"); + FeatureOnlineStore response = + featureOnlineStoreAdminServiceClient.getFeatureOnlineStore(name); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureOnlineStore_Featureonlinestorename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureonlinestore/SyncGetFeatureOnlineStoreString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureonlinestore/SyncGetFeatureOnlineStoreString.java new file mode 100644 index 000000000000..b46d4e9a93da --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureonlinestore/SyncGetFeatureOnlineStoreString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureOnlineStore_String_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreName; + +public class SyncGetFeatureOnlineStoreString { + + public static void main(String[] args) throws Exception { + syncGetFeatureOnlineStoreString(); + } + + public static void syncGetFeatureOnlineStoreString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + String name = + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]").toString(); + FeatureOnlineStore response = + featureOnlineStoreAdminServiceClient.getFeatureOnlineStore(name); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureOnlineStore_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureview/AsyncGetFeatureView.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureview/AsyncGetFeatureView.java new file mode 100644 index 000000000000..37cb2d934138 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureview/AsyncGetFeatureView.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureView_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureView; +import com.google.cloud.aiplatform.v1.FeatureViewName; +import com.google.cloud.aiplatform.v1.GetFeatureViewRequest; + +public class AsyncGetFeatureView { + + public static void main(String[] args) throws Exception { + asyncGetFeatureView(); + } + + public static void asyncGetFeatureView() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + GetFeatureViewRequest request = + GetFeatureViewRequest.newBuilder() + .setName( + FeatureViewName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .build(); + ApiFuture future = + featureOnlineStoreAdminServiceClient.getFeatureViewCallable().futureCall(request); + // Do something. + FeatureView response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureView_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureview/SyncGetFeatureView.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureview/SyncGetFeatureView.java new file mode 100644 index 000000000000..f2947540aa19 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureview/SyncGetFeatureView.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureView_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureView; +import com.google.cloud.aiplatform.v1.FeatureViewName; +import com.google.cloud.aiplatform.v1.GetFeatureViewRequest; + +public class SyncGetFeatureView { + + public static void main(String[] args) throws Exception { + syncGetFeatureView(); + } + + public static void syncGetFeatureView() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + GetFeatureViewRequest request = + GetFeatureViewRequest.newBuilder() + .setName( + FeatureViewName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .build(); + FeatureView response = featureOnlineStoreAdminServiceClient.getFeatureView(request); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureView_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureview/SyncGetFeatureViewFeatureviewname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureview/SyncGetFeatureViewFeatureviewname.java new file mode 100644 index 000000000000..f4da7ce3d73c --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureview/SyncGetFeatureViewFeatureviewname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureView_Featureviewname_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureView; +import com.google.cloud.aiplatform.v1.FeatureViewName; + +public class SyncGetFeatureViewFeatureviewname { + + public static void main(String[] args) throws Exception { + syncGetFeatureViewFeatureviewname(); + } + + public static void syncGetFeatureViewFeatureviewname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + FeatureViewName name = + FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); + FeatureView response = featureOnlineStoreAdminServiceClient.getFeatureView(name); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureView_Featureviewname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureview/SyncGetFeatureViewString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureview/SyncGetFeatureViewString.java new file mode 100644 index 000000000000..9ca6afdf61d9 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureview/SyncGetFeatureViewString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureView_String_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureView; +import com.google.cloud.aiplatform.v1.FeatureViewName; + +public class SyncGetFeatureViewString { + + public static void main(String[] args) throws Exception { + syncGetFeatureViewString(); + } + + public static void syncGetFeatureViewString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + String name = + FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString(); + FeatureView response = featureOnlineStoreAdminServiceClient.getFeatureView(name); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureView_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureviewsync/AsyncGetFeatureViewSync.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureviewsync/AsyncGetFeatureViewSync.java new file mode 100644 index 000000000000..c10f5a2e6dab --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureviewsync/AsyncGetFeatureViewSync.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureViewSync_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewSync; +import com.google.cloud.aiplatform.v1.FeatureViewSyncName; +import com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest; + +public class AsyncGetFeatureViewSync { + + public static void main(String[] args) throws Exception { + asyncGetFeatureViewSync(); + } + + public static void asyncGetFeatureViewSync() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + GetFeatureViewSyncRequest request = + GetFeatureViewSyncRequest.newBuilder() + .setName( + FeatureViewSyncName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .build(); + ApiFuture future = + featureOnlineStoreAdminServiceClient.getFeatureViewSyncCallable().futureCall(request); + // Do something. + FeatureViewSync response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureViewSync_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureviewsync/SyncGetFeatureViewSync.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureviewsync/SyncGetFeatureViewSync.java new file mode 100644 index 000000000000..0c230f70ebcb --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureviewsync/SyncGetFeatureViewSync.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureViewSync_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewSync; +import com.google.cloud.aiplatform.v1.FeatureViewSyncName; +import com.google.cloud.aiplatform.v1.GetFeatureViewSyncRequest; + +public class SyncGetFeatureViewSync { + + public static void main(String[] args) throws Exception { + syncGetFeatureViewSync(); + } + + public static void syncGetFeatureViewSync() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + GetFeatureViewSyncRequest request = + GetFeatureViewSyncRequest.newBuilder() + .setName( + FeatureViewSyncName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .build(); + FeatureViewSync response = featureOnlineStoreAdminServiceClient.getFeatureViewSync(request); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureViewSync_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureviewsync/SyncGetFeatureViewSyncFeatureviewsyncname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureviewsync/SyncGetFeatureViewSyncFeatureviewsyncname.java new file mode 100644 index 000000000000..892213c103fe --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureviewsync/SyncGetFeatureViewSyncFeatureviewsyncname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureViewSync_Featureviewsyncname_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewSync; +import com.google.cloud.aiplatform.v1.FeatureViewSyncName; + +public class SyncGetFeatureViewSyncFeatureviewsyncname { + + public static void main(String[] args) throws Exception { + syncGetFeatureViewSyncFeatureviewsyncname(); + } + + public static void syncGetFeatureViewSyncFeatureviewsyncname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + FeatureViewSyncName name = + FeatureViewSyncName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); + FeatureViewSync response = featureOnlineStoreAdminServiceClient.getFeatureViewSync(name); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureViewSync_Featureviewsyncname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureviewsync/SyncGetFeatureViewSyncString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureviewsync/SyncGetFeatureViewSyncString.java new file mode 100644 index 000000000000..f6b1374d438b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getfeatureviewsync/SyncGetFeatureViewSyncString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureViewSync_String_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewSync; +import com.google.cloud.aiplatform.v1.FeatureViewSyncName; + +public class SyncGetFeatureViewSyncString { + + public static void main(String[] args) throws Exception { + syncGetFeatureViewSyncString(); + } + + public static void syncGetFeatureViewSyncString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + String name = + FeatureViewSyncName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString(); + FeatureViewSync response = featureOnlineStoreAdminServiceClient.getFeatureViewSync(name); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetFeatureViewSync_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getiampolicy/AsyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..11d6c3dfa8ee --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = + featureOnlineStoreAdminServiceClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getiampolicy/SyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..4a11f2228fbb --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetIamPolicy_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = featureOnlineStoreAdminServiceClient.getIamPolicy(request); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getlocation/AsyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..e37912b539d6 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getlocation/AsyncGetLocation.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + featureOnlineStoreAdminServiceClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetLocation_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getlocation/SyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..57895d10be44 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/getlocation/SyncGetLocation.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetLocation_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = featureOnlineStoreAdminServiceClient.getLocation(request); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_GetLocation_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureonlinestores/AsyncListFeatureOnlineStores.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureonlinestores/AsyncListFeatureOnlineStores.java new file mode 100644 index 000000000000..eeb225b7f080 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureonlinestores/AsyncListFeatureOnlineStores.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureOnlineStores_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest; +import com.google.cloud.aiplatform.v1.LocationName; + +public class AsyncListFeatureOnlineStores { + + public static void main(String[] args) throws Exception { + asyncListFeatureOnlineStores(); + } + + public static void asyncListFeatureOnlineStores() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + ListFeatureOnlineStoresRequest request = + ListFeatureOnlineStoresRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + featureOnlineStoreAdminServiceClient + .listFeatureOnlineStoresPagedCallable() + .futureCall(request); + // Do something. + for (FeatureOnlineStore element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureOnlineStores_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureonlinestores/AsyncListFeatureOnlineStoresPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureonlinestores/AsyncListFeatureOnlineStoresPaged.java new file mode 100644 index 000000000000..2c6dd5a055ea --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureonlinestores/AsyncListFeatureOnlineStoresPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureOnlineStores_Paged_async] +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest; +import com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.common.base.Strings; + +public class AsyncListFeatureOnlineStoresPaged { + + public static void main(String[] args) throws Exception { + asyncListFeatureOnlineStoresPaged(); + } + + public static void asyncListFeatureOnlineStoresPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + ListFeatureOnlineStoresRequest request = + ListFeatureOnlineStoresRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListFeatureOnlineStoresResponse response = + featureOnlineStoreAdminServiceClient.listFeatureOnlineStoresCallable().call(request); + for (FeatureOnlineStore element : response.getFeatureOnlineStoresList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureOnlineStores_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureonlinestores/SyncListFeatureOnlineStores.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureonlinestores/SyncListFeatureOnlineStores.java new file mode 100644 index 000000000000..b9f2dcf39c52 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureonlinestores/SyncListFeatureOnlineStores.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureOnlineStores_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest; +import com.google.cloud.aiplatform.v1.LocationName; + +public class SyncListFeatureOnlineStores { + + public static void main(String[] args) throws Exception { + syncListFeatureOnlineStores(); + } + + public static void syncListFeatureOnlineStores() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + ListFeatureOnlineStoresRequest request = + ListFeatureOnlineStoresRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .build(); + for (FeatureOnlineStore element : + featureOnlineStoreAdminServiceClient.listFeatureOnlineStores(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureOnlineStores_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureonlinestores/SyncListFeatureOnlineStoresLocationname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureonlinestores/SyncListFeatureOnlineStoresLocationname.java new file mode 100644 index 000000000000..bf17fefb4abd --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureonlinestores/SyncListFeatureOnlineStoresLocationname.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureOnlineStores_Locationname_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.LocationName; + +public class SyncListFeatureOnlineStoresLocationname { + + public static void main(String[] args) throws Exception { + syncListFeatureOnlineStoresLocationname(); + } + + public static void syncListFeatureOnlineStoresLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (FeatureOnlineStore element : + featureOnlineStoreAdminServiceClient.listFeatureOnlineStores(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureOnlineStores_Locationname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureonlinestores/SyncListFeatureOnlineStoresString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureonlinestores/SyncListFeatureOnlineStoresString.java new file mode 100644 index 000000000000..4e0a9f9a004a --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureonlinestores/SyncListFeatureOnlineStoresString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureOnlineStores_String_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.LocationName; + +public class SyncListFeatureOnlineStoresString { + + public static void main(String[] args) throws Exception { + syncListFeatureOnlineStoresString(); + } + + public static void syncListFeatureOnlineStoresString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (FeatureOnlineStore element : + featureOnlineStoreAdminServiceClient.listFeatureOnlineStores(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureOnlineStores_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviews/AsyncListFeatureViews.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviews/AsyncListFeatureViews.java new file mode 100644 index 000000000000..db23ed51c0b0 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviews/AsyncListFeatureViews.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureViews_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreName; +import com.google.cloud.aiplatform.v1.FeatureView; +import com.google.cloud.aiplatform.v1.ListFeatureViewsRequest; + +public class AsyncListFeatureViews { + + public static void main(String[] args) throws Exception { + asyncListFeatureViews(); + } + + public static void asyncListFeatureViews() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + ListFeatureViewsRequest request = + ListFeatureViewsRequest.newBuilder() + .setParent( + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]") + .toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + featureOnlineStoreAdminServiceClient.listFeatureViewsPagedCallable().futureCall(request); + // Do something. + for (FeatureView element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureViews_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviews/AsyncListFeatureViewsPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviews/AsyncListFeatureViewsPaged.java new file mode 100644 index 000000000000..91f5040d7a1d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviews/AsyncListFeatureViewsPaged.java @@ -0,0 +1,67 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureViews_Paged_async] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreName; +import com.google.cloud.aiplatform.v1.FeatureView; +import com.google.cloud.aiplatform.v1.ListFeatureViewsRequest; +import com.google.cloud.aiplatform.v1.ListFeatureViewsResponse; +import com.google.common.base.Strings; + +public class AsyncListFeatureViewsPaged { + + public static void main(String[] args) throws Exception { + asyncListFeatureViewsPaged(); + } + + public static void asyncListFeatureViewsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + ListFeatureViewsRequest request = + ListFeatureViewsRequest.newBuilder() + .setParent( + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]") + .toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListFeatureViewsResponse response = + featureOnlineStoreAdminServiceClient.listFeatureViewsCallable().call(request); + for (FeatureView element : response.getFeatureViewsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureViews_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviews/SyncListFeatureViews.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviews/SyncListFeatureViews.java new file mode 100644 index 000000000000..d39508d4b755 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviews/SyncListFeatureViews.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureViews_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreName; +import com.google.cloud.aiplatform.v1.FeatureView; +import com.google.cloud.aiplatform.v1.ListFeatureViewsRequest; + +public class SyncListFeatureViews { + + public static void main(String[] args) throws Exception { + syncListFeatureViews(); + } + + public static void syncListFeatureViews() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + ListFeatureViewsRequest request = + ListFeatureViewsRequest.newBuilder() + .setParent( + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]") + .toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .build(); + for (FeatureView element : + featureOnlineStoreAdminServiceClient.listFeatureViews(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureViews_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviews/SyncListFeatureViewsFeatureonlinestorename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviews/SyncListFeatureViewsFeatureonlinestorename.java new file mode 100644 index 000000000000..6a72d9a5a029 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviews/SyncListFeatureViewsFeatureonlinestorename.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureViews_Featureonlinestorename_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreName; +import com.google.cloud.aiplatform.v1.FeatureView; + +public class SyncListFeatureViewsFeatureonlinestorename { + + public static void main(String[] args) throws Exception { + syncListFeatureViewsFeatureonlinestorename(); + } + + public static void syncListFeatureViewsFeatureonlinestorename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + FeatureOnlineStoreName parent = + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]"); + for (FeatureView element : + featureOnlineStoreAdminServiceClient.listFeatureViews(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureViews_Featureonlinestorename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviews/SyncListFeatureViewsString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviews/SyncListFeatureViewsString.java new file mode 100644 index 000000000000..6a2959c529e7 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviews/SyncListFeatureViewsString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureViews_String_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreName; +import com.google.cloud.aiplatform.v1.FeatureView; + +public class SyncListFeatureViewsString { + + public static void main(String[] args) throws Exception { + syncListFeatureViewsString(); + } + + public static void syncListFeatureViewsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + String parent = + FeatureOnlineStoreName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]").toString(); + for (FeatureView element : + featureOnlineStoreAdminServiceClient.listFeatureViews(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureViews_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviewsyncs/AsyncListFeatureViewSyncs.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviewsyncs/AsyncListFeatureViewSyncs.java new file mode 100644 index 000000000000..3a6c3b0fca96 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviewsyncs/AsyncListFeatureViewSyncs.java @@ -0,0 +1,62 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureViewSyncs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewName; +import com.google.cloud.aiplatform.v1.FeatureViewSync; +import com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest; + +public class AsyncListFeatureViewSyncs { + + public static void main(String[] args) throws Exception { + asyncListFeatureViewSyncs(); + } + + public static void asyncListFeatureViewSyncs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + ListFeatureViewSyncsRequest request = + ListFeatureViewSyncsRequest.newBuilder() + .setParent( + FeatureViewName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + featureOnlineStoreAdminServiceClient + .listFeatureViewSyncsPagedCallable() + .futureCall(request); + // Do something. + for (FeatureViewSync element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureViewSyncs_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviewsyncs/AsyncListFeatureViewSyncsPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviewsyncs/AsyncListFeatureViewSyncsPaged.java new file mode 100644 index 000000000000..6e5cc2975c95 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviewsyncs/AsyncListFeatureViewSyncsPaged.java @@ -0,0 +1,68 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureViewSyncs_Paged_async] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewName; +import com.google.cloud.aiplatform.v1.FeatureViewSync; +import com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest; +import com.google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse; +import com.google.common.base.Strings; + +public class AsyncListFeatureViewSyncsPaged { + + public static void main(String[] args) throws Exception { + asyncListFeatureViewSyncsPaged(); + } + + public static void asyncListFeatureViewSyncsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + ListFeatureViewSyncsRequest request = + ListFeatureViewSyncsRequest.newBuilder() + .setParent( + FeatureViewName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListFeatureViewSyncsResponse response = + featureOnlineStoreAdminServiceClient.listFeatureViewSyncsCallable().call(request); + for (FeatureViewSync element : response.getFeatureViewSyncsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureViewSyncs_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviewsyncs/SyncListFeatureViewSyncs.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviewsyncs/SyncListFeatureViewSyncs.java new file mode 100644 index 000000000000..85c1a27d63cc --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviewsyncs/SyncListFeatureViewSyncs.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureViewSyncs_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewName; +import com.google.cloud.aiplatform.v1.FeatureViewSync; +import com.google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest; + +public class SyncListFeatureViewSyncs { + + public static void main(String[] args) throws Exception { + syncListFeatureViewSyncs(); + } + + public static void syncListFeatureViewSyncs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + ListFeatureViewSyncsRequest request = + ListFeatureViewSyncsRequest.newBuilder() + .setParent( + FeatureViewName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .build(); + for (FeatureViewSync element : + featureOnlineStoreAdminServiceClient.listFeatureViewSyncs(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureViewSyncs_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviewsyncs/SyncListFeatureViewSyncsFeatureviewname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviewsyncs/SyncListFeatureViewSyncsFeatureviewname.java new file mode 100644 index 000000000000..4586836a1540 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviewsyncs/SyncListFeatureViewSyncsFeatureviewname.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureViewSyncs_Featureviewname_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewName; +import com.google.cloud.aiplatform.v1.FeatureViewSync; + +public class SyncListFeatureViewSyncsFeatureviewname { + + public static void main(String[] args) throws Exception { + syncListFeatureViewSyncsFeatureviewname(); + } + + public static void syncListFeatureViewSyncsFeatureviewname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + FeatureViewName parent = + FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); + for (FeatureViewSync element : + featureOnlineStoreAdminServiceClient.listFeatureViewSyncs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureViewSyncs_Featureviewname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviewsyncs/SyncListFeatureViewSyncsString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviewsyncs/SyncListFeatureViewSyncsString.java new file mode 100644 index 000000000000..81919d7c9f7f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listfeatureviewsyncs/SyncListFeatureViewSyncsString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureViewSyncs_String_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewName; +import com.google.cloud.aiplatform.v1.FeatureViewSync; + +public class SyncListFeatureViewSyncsString { + + public static void main(String[] args) throws Exception { + syncListFeatureViewSyncsString(); + } + + public static void syncListFeatureViewSyncsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + String parent = + FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString(); + for (FeatureViewSync element : + featureOnlineStoreAdminServiceClient.listFeatureViewSyncs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListFeatureViewSyncs_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listlocations/AsyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..57d04407314f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listlocations/AsyncListLocations.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + featureOnlineStoreAdminServiceClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListLocations_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listlocations/AsyncListLocationsPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..f8c90056675d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListLocations_Paged_async] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + featureOnlineStoreAdminServiceClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListLocations_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listlocations/SyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..ffc43a2e3278 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/listlocations/SyncListLocations.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListLocations_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : + featureOnlineStoreAdminServiceClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_ListLocations_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/setiampolicy/AsyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..a167c5d0c1b0 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + featureOnlineStoreAdminServiceClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_SetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/setiampolicy/SyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..030cb1bcd330 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_SetIamPolicy_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = featureOnlineStoreAdminServiceClient.setIamPolicy(request); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_SetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/syncfeatureview/AsyncSyncFeatureView.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/syncfeatureview/AsyncSyncFeatureView.java new file mode 100644 index 000000000000..8a3c4c0dd1f1 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/syncfeatureview/AsyncSyncFeatureView.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_SyncFeatureView_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewName; +import com.google.cloud.aiplatform.v1.SyncFeatureViewRequest; +import com.google.cloud.aiplatform.v1.SyncFeatureViewResponse; + +public class AsyncSyncFeatureView { + + public static void main(String[] args) throws Exception { + asyncSyncFeatureView(); + } + + public static void asyncSyncFeatureView() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + SyncFeatureViewRequest request = + SyncFeatureViewRequest.newBuilder() + .setFeatureView( + FeatureViewName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .build(); + ApiFuture future = + featureOnlineStoreAdminServiceClient.syncFeatureViewCallable().futureCall(request); + // Do something. + SyncFeatureViewResponse response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_SyncFeatureView_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/syncfeatureview/SyncSyncFeatureView.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/syncfeatureview/SyncSyncFeatureView.java new file mode 100644 index 000000000000..ae485e38e433 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/syncfeatureview/SyncSyncFeatureView.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_SyncFeatureView_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewName; +import com.google.cloud.aiplatform.v1.SyncFeatureViewRequest; +import com.google.cloud.aiplatform.v1.SyncFeatureViewResponse; + +public class SyncSyncFeatureView { + + public static void main(String[] args) throws Exception { + syncSyncFeatureView(); + } + + public static void syncSyncFeatureView() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + SyncFeatureViewRequest request = + SyncFeatureViewRequest.newBuilder() + .setFeatureView( + FeatureViewName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .build(); + SyncFeatureViewResponse response = + featureOnlineStoreAdminServiceClient.syncFeatureView(request); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_SyncFeatureView_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/syncfeatureview/SyncSyncFeatureViewFeatureviewname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/syncfeatureview/SyncSyncFeatureViewFeatureviewname.java new file mode 100644 index 000000000000..009844a9d2e1 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/syncfeatureview/SyncSyncFeatureViewFeatureviewname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_SyncFeatureView_Featureviewname_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewName; +import com.google.cloud.aiplatform.v1.SyncFeatureViewResponse; + +public class SyncSyncFeatureViewFeatureviewname { + + public static void main(String[] args) throws Exception { + syncSyncFeatureViewFeatureviewname(); + } + + public static void syncSyncFeatureViewFeatureviewname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + FeatureViewName featureView = + FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); + SyncFeatureViewResponse response = + featureOnlineStoreAdminServiceClient.syncFeatureView(featureView); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_SyncFeatureView_Featureviewname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/syncfeatureview/SyncSyncFeatureViewString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/syncfeatureview/SyncSyncFeatureViewString.java new file mode 100644 index 000000000000..30fdd6268961 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/syncfeatureview/SyncSyncFeatureViewString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_SyncFeatureView_String_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewName; +import com.google.cloud.aiplatform.v1.SyncFeatureViewResponse; + +public class SyncSyncFeatureViewString { + + public static void main(String[] args) throws Exception { + syncSyncFeatureViewString(); + } + + public static void syncSyncFeatureViewString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + String featureView = + FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString(); + SyncFeatureViewResponse response = + featureOnlineStoreAdminServiceClient.syncFeatureView(featureView); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_SyncFeatureView_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/testiampermissions/AsyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..e5616d5f6212 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + featureOnlineStoreAdminServiceClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_TestIamPermissions_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/testiampermissions/SyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..908edd96d98b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_TestIamPermissions_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = + featureOnlineStoreAdminServiceClient.testIamPermissions(request); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_TestIamPermissions_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureonlinestore/AsyncUpdateFeatureOnlineStore.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureonlinestore/AsyncUpdateFeatureOnlineStore.java new file mode 100644 index 000000000000..3bd040f1f3d1 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureonlinestore/AsyncUpdateFeatureOnlineStore.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_UpdateFeatureOnlineStore_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateFeatureOnlineStore { + + public static void main(String[] args) throws Exception { + asyncUpdateFeatureOnlineStore(); + } + + public static void asyncUpdateFeatureOnlineStore() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + UpdateFeatureOnlineStoreRequest request = + UpdateFeatureOnlineStoreRequest.newBuilder() + .setFeatureOnlineStore(FeatureOnlineStore.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + featureOnlineStoreAdminServiceClient + .updateFeatureOnlineStoreCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_UpdateFeatureOnlineStore_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureonlinestore/AsyncUpdateFeatureOnlineStoreLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureonlinestore/AsyncUpdateFeatureOnlineStoreLRO.java new file mode 100644 index 000000000000..3a69e10499da --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureonlinestore/AsyncUpdateFeatureOnlineStoreLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_UpdateFeatureOnlineStore_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateFeatureOnlineStoreLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateFeatureOnlineStoreLRO(); + } + + public static void asyncUpdateFeatureOnlineStoreLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + UpdateFeatureOnlineStoreRequest request = + UpdateFeatureOnlineStoreRequest.newBuilder() + .setFeatureOnlineStore(FeatureOnlineStore.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + OperationFuture future = + featureOnlineStoreAdminServiceClient + .updateFeatureOnlineStoreOperationCallable() + .futureCall(request); + // Do something. + FeatureOnlineStore response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_UpdateFeatureOnlineStore_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureonlinestore/SyncUpdateFeatureOnlineStore.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureonlinestore/SyncUpdateFeatureOnlineStore.java new file mode 100644 index 000000000000..73db89ef937c --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureonlinestore/SyncUpdateFeatureOnlineStore.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_UpdateFeatureOnlineStore_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateFeatureOnlineStore { + + public static void main(String[] args) throws Exception { + syncUpdateFeatureOnlineStore(); + } + + public static void syncUpdateFeatureOnlineStore() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + UpdateFeatureOnlineStoreRequest request = + UpdateFeatureOnlineStoreRequest.newBuilder() + .setFeatureOnlineStore(FeatureOnlineStore.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + FeatureOnlineStore response = + featureOnlineStoreAdminServiceClient.updateFeatureOnlineStoreAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_UpdateFeatureOnlineStore_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureonlinestore/SyncUpdateFeatureOnlineStoreFeatureonlinestoreFieldmask.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureonlinestore/SyncUpdateFeatureOnlineStoreFeatureonlinestoreFieldmask.java new file mode 100644 index 000000000000..46e178d47c9e --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureonlinestore/SyncUpdateFeatureOnlineStoreFeatureonlinestoreFieldmask.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_UpdateFeatureOnlineStore_FeatureonlinestoreFieldmask_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStore; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateFeatureOnlineStoreFeatureonlinestoreFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateFeatureOnlineStoreFeatureonlinestoreFieldmask(); + } + + public static void syncUpdateFeatureOnlineStoreFeatureonlinestoreFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + FeatureOnlineStore featureOnlineStore = FeatureOnlineStore.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + FeatureOnlineStore response = + featureOnlineStoreAdminServiceClient + .updateFeatureOnlineStoreAsync(featureOnlineStore, updateMask) + .get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_UpdateFeatureOnlineStore_FeatureonlinestoreFieldmask_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureview/AsyncUpdateFeatureView.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureview/AsyncUpdateFeatureView.java new file mode 100644 index 000000000000..174da19f5ed1 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureview/AsyncUpdateFeatureView.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_UpdateFeatureView_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureView; +import com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateFeatureView { + + public static void main(String[] args) throws Exception { + asyncUpdateFeatureView(); + } + + public static void asyncUpdateFeatureView() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + UpdateFeatureViewRequest request = + UpdateFeatureViewRequest.newBuilder() + .setFeatureView(FeatureView.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + featureOnlineStoreAdminServiceClient.updateFeatureViewCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_UpdateFeatureView_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureview/AsyncUpdateFeatureViewLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureview/AsyncUpdateFeatureViewLRO.java new file mode 100644 index 000000000000..86216eac7fbb --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureview/AsyncUpdateFeatureViewLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_UpdateFeatureView_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureView; +import com.google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateFeatureViewLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateFeatureViewLRO(); + } + + public static void asyncUpdateFeatureViewLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + UpdateFeatureViewRequest request = + UpdateFeatureViewRequest.newBuilder() + .setFeatureView(FeatureView.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + OperationFuture future = + featureOnlineStoreAdminServiceClient + .updateFeatureViewOperationCallable() + .futureCall(request); + // Do something. + FeatureView response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_UpdateFeatureView_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureview/SyncUpdateFeatureView.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureview/SyncUpdateFeatureView.java new file mode 100644 index 000000000000..7185291857e6 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureview/SyncUpdateFeatureView.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_UpdateFeatureView_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureView; +import com.google.cloud.aiplatform.v1.UpdateFeatureViewRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateFeatureView { + + public static void main(String[] args) throws Exception { + syncUpdateFeatureView(); + } + + public static void syncUpdateFeatureView() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + UpdateFeatureViewRequest request = + UpdateFeatureViewRequest.newBuilder() + .setFeatureView(FeatureView.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + FeatureView response = + featureOnlineStoreAdminServiceClient.updateFeatureViewAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_UpdateFeatureView_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureview/SyncUpdateFeatureViewFeatureviewFieldmask.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureview/SyncUpdateFeatureViewFeatureviewFieldmask.java new file mode 100644 index 000000000000..8082c09f1b7e --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservice/updatefeatureview/SyncUpdateFeatureViewFeatureviewFieldmask.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminService_UpdateFeatureView_FeatureviewFieldmask_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceClient; +import com.google.cloud.aiplatform.v1.FeatureView; +import com.google.protobuf.FieldMask; + +public class SyncUpdateFeatureViewFeatureviewFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateFeatureViewFeatureviewFieldmask(); + } + + public static void syncUpdateFeatureViewFeatureviewFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreAdminServiceClient featureOnlineStoreAdminServiceClient = + FeatureOnlineStoreAdminServiceClient.create()) { + FeatureView featureView = FeatureView.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + FeatureView response = + featureOnlineStoreAdminServiceClient + .updateFeatureViewAsync(featureView, updateMask) + .get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminService_UpdateFeatureView_FeatureviewFieldmask_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservicesettings/getfeatureonlinestore/SyncGetFeatureOnlineStore.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservicesettings/getfeatureonlinestore/SyncGetFeatureOnlineStore.java new file mode 100644 index 000000000000..15e9689c246f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreadminservicesettings/getfeatureonlinestore/SyncGetFeatureOnlineStore.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminServiceSettings_GetFeatureOnlineStore_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreAdminServiceSettings; +import java.time.Duration; + +public class SyncGetFeatureOnlineStore { + + public static void main(String[] args) throws Exception { + syncGetFeatureOnlineStore(); + } + + public static void syncGetFeatureOnlineStore() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + FeatureOnlineStoreAdminServiceSettings.Builder featureOnlineStoreAdminServiceSettingsBuilder = + FeatureOnlineStoreAdminServiceSettings.newBuilder(); + featureOnlineStoreAdminServiceSettingsBuilder + .getFeatureOnlineStoreSettings() + .setRetrySettings( + featureOnlineStoreAdminServiceSettingsBuilder + .getFeatureOnlineStoreSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + FeatureOnlineStoreAdminServiceSettings featureOnlineStoreAdminServiceSettings = + featureOnlineStoreAdminServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminServiceSettings_GetFeatureOnlineStore_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/create/SyncCreateSetCredentialsProvider.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..25007672dd2d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceSettings; +import com.google.cloud.aiplatform.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + FeatureOnlineStoreServiceSettings featureOnlineStoreServiceSettings = + FeatureOnlineStoreServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient = + FeatureOnlineStoreServiceClient.create(featureOnlineStoreServiceSettings); + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreService_Create_SetCredentialsProvider_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/create/SyncCreateSetEndpoint.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..112430676fc6 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreService_Create_SetEndpoint_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceSettings; +import com.google.cloud.aiplatform.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + FeatureOnlineStoreServiceSettings featureOnlineStoreServiceSettings = + FeatureOnlineStoreServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient = + FeatureOnlineStoreServiceClient.create(featureOnlineStoreServiceSettings); + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreService_Create_SetEndpoint_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/fetchfeaturevalues/AsyncFetchFeatureValues.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/fetchfeaturevalues/AsyncFetchFeatureValues.java new file mode 100644 index 000000000000..546e80960b1e --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/fetchfeaturevalues/AsyncFetchFeatureValues.java @@ -0,0 +1,58 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreService_FetchFeatureValues_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewDataFormat; +import com.google.cloud.aiplatform.v1.FeatureViewDataKey; +import com.google.cloud.aiplatform.v1.FeatureViewName; +import com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest; +import com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse; + +public class AsyncFetchFeatureValues { + + public static void main(String[] args) throws Exception { + asyncFetchFeatureValues(); + } + + public static void asyncFetchFeatureValues() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient = + FeatureOnlineStoreServiceClient.create()) { + FetchFeatureValuesRequest request = + FetchFeatureValuesRequest.newBuilder() + .setFeatureView( + FeatureViewName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .setDataKey(FeatureViewDataKey.newBuilder().build()) + .setDataFormat(FeatureViewDataFormat.forNumber(0)) + .build(); + ApiFuture future = + featureOnlineStoreServiceClient.fetchFeatureValuesCallable().futureCall(request); + // Do something. + FetchFeatureValuesResponse response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreService_FetchFeatureValues_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValues.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValues.java new file mode 100644 index 000000000000..bf5810f533f6 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValues.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreService_FetchFeatureValues_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewDataFormat; +import com.google.cloud.aiplatform.v1.FeatureViewDataKey; +import com.google.cloud.aiplatform.v1.FeatureViewName; +import com.google.cloud.aiplatform.v1.FetchFeatureValuesRequest; +import com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse; + +public class SyncFetchFeatureValues { + + public static void main(String[] args) throws Exception { + syncFetchFeatureValues(); + } + + public static void syncFetchFeatureValues() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient = + FeatureOnlineStoreServiceClient.create()) { + FetchFeatureValuesRequest request = + FetchFeatureValuesRequest.newBuilder() + .setFeatureView( + FeatureViewName.of( + "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString()) + .setDataKey(FeatureViewDataKey.newBuilder().build()) + .setDataFormat(FeatureViewDataFormat.forNumber(0)) + .build(); + FetchFeatureValuesResponse response = + featureOnlineStoreServiceClient.fetchFeatureValues(request); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreService_FetchFeatureValues_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValuesFeatureviewnameFeatureviewdatakey.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValuesFeatureviewnameFeatureviewdatakey.java new file mode 100644 index 000000000000..d8d4bae65c41 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValuesFeatureviewnameFeatureviewdatakey.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreService_FetchFeatureValues_FeatureviewnameFeatureviewdatakey_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewDataKey; +import com.google.cloud.aiplatform.v1.FeatureViewName; +import com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse; + +public class SyncFetchFeatureValuesFeatureviewnameFeatureviewdatakey { + + public static void main(String[] args) throws Exception { + syncFetchFeatureValuesFeatureviewnameFeatureviewdatakey(); + } + + public static void syncFetchFeatureValuesFeatureviewnameFeatureviewdatakey() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient = + FeatureOnlineStoreServiceClient.create()) { + FeatureViewName featureView = + FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); + FeatureViewDataKey dataKey = FeatureViewDataKey.newBuilder().build(); + FetchFeatureValuesResponse response = + featureOnlineStoreServiceClient.fetchFeatureValues(featureView, dataKey); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreService_FetchFeatureValues_FeatureviewnameFeatureviewdatakey_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValuesStringFeatureviewdatakey.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValuesStringFeatureviewdatakey.java new file mode 100644 index 000000000000..f83d657827ac --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValuesStringFeatureviewdatakey.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreService_FetchFeatureValues_StringFeatureviewdatakey_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient; +import com.google.cloud.aiplatform.v1.FeatureViewDataKey; +import com.google.cloud.aiplatform.v1.FeatureViewName; +import com.google.cloud.aiplatform.v1.FetchFeatureValuesResponse; + +public class SyncFetchFeatureValuesStringFeatureviewdatakey { + + public static void main(String[] args) throws Exception { + syncFetchFeatureValuesStringFeatureviewdatakey(); + } + + public static void syncFetchFeatureValuesStringFeatureviewdatakey() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient = + FeatureOnlineStoreServiceClient.create()) { + String featureView = + FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") + .toString(); + FeatureViewDataKey dataKey = FeatureViewDataKey.newBuilder().build(); + FetchFeatureValuesResponse response = + featureOnlineStoreServiceClient.fetchFeatureValues(featureView, dataKey); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreService_FetchFeatureValues_StringFeatureviewdatakey_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/getiampolicy/AsyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..8bd61f74eb63 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreService_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient = + FeatureOnlineStoreServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = + featureOnlineStoreServiceClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreService_GetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/getiampolicy/SyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..43217fc4b0df --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreService_GetIamPolicy_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient = + FeatureOnlineStoreServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = featureOnlineStoreServiceClient.getIamPolicy(request); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreService_GetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/getlocation/AsyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..8ffd234173e5 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/getlocation/AsyncGetLocation.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreService_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient = + FeatureOnlineStoreServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + featureOnlineStoreServiceClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreService_GetLocation_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/getlocation/SyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..98540cf29fcc --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/getlocation/SyncGetLocation.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreService_GetLocation_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient = + FeatureOnlineStoreServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = featureOnlineStoreServiceClient.getLocation(request); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreService_GetLocation_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/listlocations/AsyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..814b13052525 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/listlocations/AsyncListLocations.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreService_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient = + FeatureOnlineStoreServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + featureOnlineStoreServiceClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreService_ListLocations_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/listlocations/AsyncListLocationsPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..f23bb69a8266 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreService_ListLocations_Paged_async] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient = + FeatureOnlineStoreServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + featureOnlineStoreServiceClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreService_ListLocations_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/listlocations/SyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..f8d7f0f163cc --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/listlocations/SyncListLocations.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreService_ListLocations_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient = + FeatureOnlineStoreServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : featureOnlineStoreServiceClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreService_ListLocations_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/setiampolicy/AsyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..c9df08a51c3a --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreService_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient = + FeatureOnlineStoreServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + featureOnlineStoreServiceClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreService_SetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/setiampolicy/SyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..a174edc03c1e --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreService_SetIamPolicy_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient = + FeatureOnlineStoreServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = featureOnlineStoreServiceClient.setIamPolicy(request); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreService_SetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/testiampermissions/AsyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..5ba58df1477d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreService_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient = + FeatureOnlineStoreServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + featureOnlineStoreServiceClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreService_TestIamPermissions_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/testiampermissions/SyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..7413ce127a8b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservice/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreService_TestIamPermissions_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureOnlineStoreServiceClient featureOnlineStoreServiceClient = + FeatureOnlineStoreServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = + featureOnlineStoreServiceClient.testIamPermissions(request); + } + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreService_TestIamPermissions_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservicesettings/fetchfeaturevalues/SyncFetchFeatureValues.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservicesettings/fetchfeaturevalues/SyncFetchFeatureValues.java new file mode 100644 index 000000000000..cfc9ae0fb091 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureonlinestoreservicesettings/fetchfeaturevalues/SyncFetchFeatureValues.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreServiceSettings_FetchFeatureValues_sync] +import com.google.cloud.aiplatform.v1.FeatureOnlineStoreServiceSettings; +import java.time.Duration; + +public class SyncFetchFeatureValues { + + public static void main(String[] args) throws Exception { + syncFetchFeatureValues(); + } + + public static void syncFetchFeatureValues() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + FeatureOnlineStoreServiceSettings.Builder featureOnlineStoreServiceSettingsBuilder = + FeatureOnlineStoreServiceSettings.newBuilder(); + featureOnlineStoreServiceSettingsBuilder + .fetchFeatureValuesSettings() + .setRetrySettings( + featureOnlineStoreServiceSettingsBuilder + .fetchFeatureValuesSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + FeatureOnlineStoreServiceSettings featureOnlineStoreServiceSettings = + featureOnlineStoreServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreServiceSettings_FetchFeatureValues_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/create/SyncCreateSetCredentialsProvider.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..80fda0433b85 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceSettings; +import com.google.cloud.aiplatform.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + FeatureRegistryServiceSettings featureRegistryServiceSettings = + FeatureRegistryServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create(featureRegistryServiceSettings); + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_Create_SetCredentialsProvider_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/create/SyncCreateSetEndpoint.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..c42de62d734e --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_Create_SetEndpoint_sync] +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceSettings; +import com.google.cloud.aiplatform.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + FeatureRegistryServiceSettings featureRegistryServiceSettings = + FeatureRegistryServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create(featureRegistryServiceSettings); + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_Create_SetEndpoint_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/AsyncCreateFeature.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/AsyncCreateFeature.java new file mode 100644 index 000000000000..2f34ac1f9997 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/AsyncCreateFeature.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_CreateFeature_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.CreateFeatureRequest; +import com.google.cloud.aiplatform.v1.EntityTypeName; +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.longrunning.Operation; + +public class AsyncCreateFeature { + + public static void main(String[] args) throws Exception { + asyncCreateFeature(); + } + + public static void asyncCreateFeature() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + CreateFeatureRequest request = + CreateFeatureRequest.newBuilder() + .setParent( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") + .toString()) + .setFeature(Feature.newBuilder().build()) + .setFeatureId("featureId-420503887") + .build(); + ApiFuture future = + featureRegistryServiceClient.createFeatureCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_CreateFeature_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/AsyncCreateFeatureLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/AsyncCreateFeatureLRO.java new file mode 100644 index 000000000000..342b2990baef --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/AsyncCreateFeatureLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_CreateFeature_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.CreateFeatureOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateFeatureRequest; +import com.google.cloud.aiplatform.v1.EntityTypeName; +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; + +public class AsyncCreateFeatureLRO { + + public static void main(String[] args) throws Exception { + asyncCreateFeatureLRO(); + } + + public static void asyncCreateFeatureLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + CreateFeatureRequest request = + CreateFeatureRequest.newBuilder() + .setParent( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") + .toString()) + .setFeature(Feature.newBuilder().build()) + .setFeatureId("featureId-420503887") + .build(); + OperationFuture future = + featureRegistryServiceClient.createFeatureOperationCallable().futureCall(request); + // Do something. + Feature response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_CreateFeature_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/SyncCreateFeature.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/SyncCreateFeature.java new file mode 100644 index 000000000000..809d03b9fda1 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/SyncCreateFeature.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_CreateFeature_sync] +import com.google.cloud.aiplatform.v1.CreateFeatureRequest; +import com.google.cloud.aiplatform.v1.EntityTypeName; +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; + +public class SyncCreateFeature { + + public static void main(String[] args) throws Exception { + syncCreateFeature(); + } + + public static void syncCreateFeature() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + CreateFeatureRequest request = + CreateFeatureRequest.newBuilder() + .setParent( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") + .toString()) + .setFeature(Feature.newBuilder().build()) + .setFeatureId("featureId-420503887") + .build(); + Feature response = featureRegistryServiceClient.createFeatureAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_CreateFeature_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/SyncCreateFeatureEntitytypenameFeatureString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/SyncCreateFeatureEntitytypenameFeatureString.java new file mode 100644 index 000000000000..f1d09d21c404 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/SyncCreateFeatureEntitytypenameFeatureString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_CreateFeature_EntitytypenameFeatureString_sync] +import com.google.cloud.aiplatform.v1.EntityTypeName; +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; + +public class SyncCreateFeatureEntitytypenameFeatureString { + + public static void main(String[] args) throws Exception { + syncCreateFeatureEntitytypenameFeatureString(); + } + + public static void syncCreateFeatureEntitytypenameFeatureString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + EntityTypeName parent = + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); + Feature feature = Feature.newBuilder().build(); + String featureId = "featureId-420503887"; + Feature response = + featureRegistryServiceClient.createFeatureAsync(parent, feature, featureId).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_CreateFeature_EntitytypenameFeatureString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/SyncCreateFeatureFeaturegroupnameFeatureString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/SyncCreateFeatureFeaturegroupnameFeatureString.java new file mode 100644 index 000000000000..fd9c95ffde7b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/SyncCreateFeatureFeaturegroupnameFeatureString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_CreateFeature_FeaturegroupnameFeatureString_sync] +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureGroupName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; + +public class SyncCreateFeatureFeaturegroupnameFeatureString { + + public static void main(String[] args) throws Exception { + syncCreateFeatureFeaturegroupnameFeatureString(); + } + + public static void syncCreateFeatureFeaturegroupnameFeatureString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + Feature feature = Feature.newBuilder().build(); + String featureId = "featureId-420503887"; + Feature response = + featureRegistryServiceClient.createFeatureAsync(parent, feature, featureId).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_CreateFeature_FeaturegroupnameFeatureString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/SyncCreateFeatureStringFeatureString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/SyncCreateFeatureStringFeatureString.java new file mode 100644 index 000000000000..254d9e909397 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeature/SyncCreateFeatureStringFeatureString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_CreateFeature_StringFeatureString_sync] +import com.google.cloud.aiplatform.v1.EntityTypeName; +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; + +public class SyncCreateFeatureStringFeatureString { + + public static void main(String[] args) throws Exception { + syncCreateFeatureStringFeatureString(); + } + + public static void syncCreateFeatureStringFeatureString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + String parent = + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") + .toString(); + Feature feature = Feature.newBuilder().build(); + String featureId = "featureId-420503887"; + Feature response = + featureRegistryServiceClient.createFeatureAsync(parent, feature, featureId).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_CreateFeature_StringFeatureString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeaturegroup/AsyncCreateFeatureGroup.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeaturegroup/AsyncCreateFeatureGroup.java new file mode 100644 index 000000000000..75fe565c917f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeaturegroup/AsyncCreateFeatureGroup.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_CreateFeatureGroup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest; +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateFeatureGroup { + + public static void main(String[] args) throws Exception { + asyncCreateFeatureGroup(); + } + + public static void asyncCreateFeatureGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + CreateFeatureGroupRequest request = + CreateFeatureGroupRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFeatureGroup(FeatureGroup.newBuilder().build()) + .setFeatureGroupId("featureGroupId-1768466396") + .build(); + ApiFuture future = + featureRegistryServiceClient.createFeatureGroupCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_CreateFeatureGroup_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeaturegroup/AsyncCreateFeatureGroupLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeaturegroup/AsyncCreateFeatureGroupLRO.java new file mode 100644 index 000000000000..9f1dd2f3dfa8 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeaturegroup/AsyncCreateFeatureGroupLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_CreateFeatureGroup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest; +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.LocationName; + +public class AsyncCreateFeatureGroupLRO { + + public static void main(String[] args) throws Exception { + asyncCreateFeatureGroupLRO(); + } + + public static void asyncCreateFeatureGroupLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + CreateFeatureGroupRequest request = + CreateFeatureGroupRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFeatureGroup(FeatureGroup.newBuilder().build()) + .setFeatureGroupId("featureGroupId-1768466396") + .build(); + OperationFuture future = + featureRegistryServiceClient.createFeatureGroupOperationCallable().futureCall(request); + // Do something. + FeatureGroup response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_CreateFeatureGroup_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeaturegroup/SyncCreateFeatureGroup.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeaturegroup/SyncCreateFeatureGroup.java new file mode 100644 index 000000000000..276396a6ee9f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeaturegroup/SyncCreateFeatureGroup.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_CreateFeatureGroup_sync] +import com.google.cloud.aiplatform.v1.CreateFeatureGroupRequest; +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.LocationName; + +public class SyncCreateFeatureGroup { + + public static void main(String[] args) throws Exception { + syncCreateFeatureGroup(); + } + + public static void syncCreateFeatureGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + CreateFeatureGroupRequest request = + CreateFeatureGroupRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFeatureGroup(FeatureGroup.newBuilder().build()) + .setFeatureGroupId("featureGroupId-1768466396") + .build(); + FeatureGroup response = featureRegistryServiceClient.createFeatureGroupAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_CreateFeatureGroup_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeaturegroup/SyncCreateFeatureGroupLocationnameFeaturegroupString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeaturegroup/SyncCreateFeatureGroupLocationnameFeaturegroupString.java new file mode 100644 index 000000000000..f2cf329b4304 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeaturegroup/SyncCreateFeatureGroupLocationnameFeaturegroupString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_CreateFeatureGroup_LocationnameFeaturegroupString_sync] +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.LocationName; + +public class SyncCreateFeatureGroupLocationnameFeaturegroupString { + + public static void main(String[] args) throws Exception { + syncCreateFeatureGroupLocationnameFeaturegroupString(); + } + + public static void syncCreateFeatureGroupLocationnameFeaturegroupString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + FeatureGroup featureGroup = FeatureGroup.newBuilder().build(); + String featureGroupId = "featureGroupId-1768466396"; + FeatureGroup response = + featureRegistryServiceClient + .createFeatureGroupAsync(parent, featureGroup, featureGroupId) + .get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_CreateFeatureGroup_LocationnameFeaturegroupString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeaturegroup/SyncCreateFeatureGroupStringFeaturegroupString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeaturegroup/SyncCreateFeatureGroupStringFeaturegroupString.java new file mode 100644 index 000000000000..250f35e44ec2 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/createfeaturegroup/SyncCreateFeatureGroupStringFeaturegroupString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_CreateFeatureGroup_StringFeaturegroupString_sync] +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.LocationName; + +public class SyncCreateFeatureGroupStringFeaturegroupString { + + public static void main(String[] args) throws Exception { + syncCreateFeatureGroupStringFeaturegroupString(); + } + + public static void syncCreateFeatureGroupStringFeaturegroupString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + FeatureGroup featureGroup = FeatureGroup.newBuilder().build(); + String featureGroupId = "featureGroupId-1768466396"; + FeatureGroup response = + featureRegistryServiceClient + .createFeatureGroupAsync(parent, featureGroup, featureGroupId) + .get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_CreateFeatureGroup_StringFeaturegroupString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeature/AsyncDeleteFeature.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeature/AsyncDeleteFeature.java new file mode 100644 index 000000000000..dcf147c1848c --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeature/AsyncDeleteFeature.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_DeleteFeature_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.DeleteFeatureRequest; +import com.google.cloud.aiplatform.v1.FeatureName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteFeature { + + public static void main(String[] args) throws Exception { + asyncDeleteFeature(); + } + + public static void asyncDeleteFeature() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + DeleteFeatureRequest request = + DeleteFeatureRequest.newBuilder() + .setName( + FeatureName.ofProjectLocationFeatureGroupFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]") + .toString()) + .build(); + ApiFuture future = + featureRegistryServiceClient.deleteFeatureCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_DeleteFeature_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeature/AsyncDeleteFeatureLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeature/AsyncDeleteFeatureLRO.java new file mode 100644 index 000000000000..0e21ae7ec7a8 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeature/AsyncDeleteFeatureLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_DeleteFeature_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.DeleteFeatureRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.FeatureName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteFeatureLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteFeatureLRO(); + } + + public static void asyncDeleteFeatureLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + DeleteFeatureRequest request = + DeleteFeatureRequest.newBuilder() + .setName( + FeatureName.ofProjectLocationFeatureGroupFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]") + .toString()) + .build(); + OperationFuture future = + featureRegistryServiceClient.deleteFeatureOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_DeleteFeature_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeature/SyncDeleteFeature.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeature/SyncDeleteFeature.java new file mode 100644 index 000000000000..b9867bf1400f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeature/SyncDeleteFeature.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_DeleteFeature_sync] +import com.google.cloud.aiplatform.v1.DeleteFeatureRequest; +import com.google.cloud.aiplatform.v1.FeatureName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteFeature { + + public static void main(String[] args) throws Exception { + syncDeleteFeature(); + } + + public static void syncDeleteFeature() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + DeleteFeatureRequest request = + DeleteFeatureRequest.newBuilder() + .setName( + FeatureName.ofProjectLocationFeatureGroupFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]") + .toString()) + .build(); + featureRegistryServiceClient.deleteFeatureAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_DeleteFeature_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeature/SyncDeleteFeatureFeaturename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeature/SyncDeleteFeatureFeaturename.java new file mode 100644 index 000000000000..a8eaa2a13ab6 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeature/SyncDeleteFeatureFeaturename.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_DeleteFeature_Featurename_sync] +import com.google.cloud.aiplatform.v1.FeatureName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteFeatureFeaturename { + + public static void main(String[] args) throws Exception { + syncDeleteFeatureFeaturename(); + } + + public static void syncDeleteFeatureFeaturename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + FeatureName name = + FeatureName.ofProjectLocationFeatureGroupFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]"); + featureRegistryServiceClient.deleteFeatureAsync(name).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_DeleteFeature_Featurename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeature/SyncDeleteFeatureString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeature/SyncDeleteFeatureString.java new file mode 100644 index 000000000000..58bd1f49c485 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeature/SyncDeleteFeatureString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_DeleteFeature_String_sync] +import com.google.cloud.aiplatform.v1.FeatureName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteFeatureString { + + public static void main(String[] args) throws Exception { + syncDeleteFeatureString(); + } + + public static void syncDeleteFeatureString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + String name = + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") + .toString(); + featureRegistryServiceClient.deleteFeatureAsync(name).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_DeleteFeature_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeaturegroup/AsyncDeleteFeatureGroup.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeaturegroup/AsyncDeleteFeatureGroup.java new file mode 100644 index 000000000000..0f80f9758889 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeaturegroup/AsyncDeleteFeatureGroup.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_DeleteFeatureGroup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest; +import com.google.cloud.aiplatform.v1.FeatureGroupName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteFeatureGroup { + + public static void main(String[] args) throws Exception { + asyncDeleteFeatureGroup(); + } + + public static void asyncDeleteFeatureGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + DeleteFeatureGroupRequest request = + DeleteFeatureGroupRequest.newBuilder() + .setName(FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) + .setForce(true) + .build(); + ApiFuture future = + featureRegistryServiceClient.deleteFeatureGroupCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_DeleteFeatureGroup_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeaturegroup/AsyncDeleteFeatureGroupLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeaturegroup/AsyncDeleteFeatureGroupLRO.java new file mode 100644 index 000000000000..3e43bc8c03eb --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeaturegroup/AsyncDeleteFeatureGroupLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_DeleteFeatureGroup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.FeatureGroupName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteFeatureGroupLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteFeatureGroupLRO(); + } + + public static void asyncDeleteFeatureGroupLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + DeleteFeatureGroupRequest request = + DeleteFeatureGroupRequest.newBuilder() + .setName(FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) + .setForce(true) + .build(); + OperationFuture future = + featureRegistryServiceClient.deleteFeatureGroupOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_DeleteFeatureGroup_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeaturegroup/SyncDeleteFeatureGroup.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeaturegroup/SyncDeleteFeatureGroup.java new file mode 100644 index 000000000000..1c3cd8bb0cec --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeaturegroup/SyncDeleteFeatureGroup.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_DeleteFeatureGroup_sync] +import com.google.cloud.aiplatform.v1.DeleteFeatureGroupRequest; +import com.google.cloud.aiplatform.v1.FeatureGroupName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteFeatureGroup { + + public static void main(String[] args) throws Exception { + syncDeleteFeatureGroup(); + } + + public static void syncDeleteFeatureGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + DeleteFeatureGroupRequest request = + DeleteFeatureGroupRequest.newBuilder() + .setName(FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) + .setForce(true) + .build(); + featureRegistryServiceClient.deleteFeatureGroupAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_DeleteFeatureGroup_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeaturegroup/SyncDeleteFeatureGroupFeaturegroupnameBoolean.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeaturegroup/SyncDeleteFeatureGroupFeaturegroupnameBoolean.java new file mode 100644 index 000000000000..843f716eeec0 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeaturegroup/SyncDeleteFeatureGroupFeaturegroupnameBoolean.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_DeleteFeatureGroup_FeaturegroupnameBoolean_sync] +import com.google.cloud.aiplatform.v1.FeatureGroupName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteFeatureGroupFeaturegroupnameBoolean { + + public static void main(String[] args) throws Exception { + syncDeleteFeatureGroupFeaturegroupnameBoolean(); + } + + public static void syncDeleteFeatureGroupFeaturegroupnameBoolean() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + FeatureGroupName name = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + boolean force = true; + featureRegistryServiceClient.deleteFeatureGroupAsync(name, force).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_DeleteFeatureGroup_FeaturegroupnameBoolean_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeaturegroup/SyncDeleteFeatureGroupStringBoolean.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeaturegroup/SyncDeleteFeatureGroupStringBoolean.java new file mode 100644 index 000000000000..17f246852b99 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/deletefeaturegroup/SyncDeleteFeatureGroupStringBoolean.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_DeleteFeatureGroup_StringBoolean_sync] +import com.google.cloud.aiplatform.v1.FeatureGroupName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteFeatureGroupStringBoolean { + + public static void main(String[] args) throws Exception { + syncDeleteFeatureGroupStringBoolean(); + } + + public static void syncDeleteFeatureGroupStringBoolean() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + String name = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString(); + boolean force = true; + featureRegistryServiceClient.deleteFeatureGroupAsync(name, force).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_DeleteFeatureGroup_StringBoolean_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeature/AsyncGetFeature.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeature/AsyncGetFeature.java new file mode 100644 index 000000000000..dc67f6fa37a5 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeature/AsyncGetFeature.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_GetFeature_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.GetFeatureRequest; + +public class AsyncGetFeature { + + public static void main(String[] args) throws Exception { + asyncGetFeature(); + } + + public static void asyncGetFeature() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + GetFeatureRequest request = + GetFeatureRequest.newBuilder() + .setName( + FeatureName.ofProjectLocationFeatureGroupFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]") + .toString()) + .build(); + ApiFuture future = + featureRegistryServiceClient.getFeatureCallable().futureCall(request); + // Do something. + Feature response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_GetFeature_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeature/SyncGetFeature.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeature/SyncGetFeature.java new file mode 100644 index 000000000000..b22b611b4f26 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeature/SyncGetFeature.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_GetFeature_sync] +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.GetFeatureRequest; + +public class SyncGetFeature { + + public static void main(String[] args) throws Exception { + syncGetFeature(); + } + + public static void syncGetFeature() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + GetFeatureRequest request = + GetFeatureRequest.newBuilder() + .setName( + FeatureName.ofProjectLocationFeatureGroupFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]") + .toString()) + .build(); + Feature response = featureRegistryServiceClient.getFeature(request); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_GetFeature_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeature/SyncGetFeatureFeaturename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeature/SyncGetFeatureFeaturename.java new file mode 100644 index 000000000000..0358822915a1 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeature/SyncGetFeatureFeaturename.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_GetFeature_Featurename_sync] +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; + +public class SyncGetFeatureFeaturename { + + public static void main(String[] args) throws Exception { + syncGetFeatureFeaturename(); + } + + public static void syncGetFeatureFeaturename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + FeatureName name = + FeatureName.ofProjectLocationFeatureGroupFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]"); + Feature response = featureRegistryServiceClient.getFeature(name); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_GetFeature_Featurename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeature/SyncGetFeatureString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeature/SyncGetFeatureString.java new file mode 100644 index 000000000000..f0db57109523 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeature/SyncGetFeatureString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_GetFeature_String_sync] +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; + +public class SyncGetFeatureString { + + public static void main(String[] args) throws Exception { + syncGetFeatureString(); + } + + public static void syncGetFeatureString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + String name = + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") + .toString(); + Feature response = featureRegistryServiceClient.getFeature(name); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_GetFeature_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeaturegroup/AsyncGetFeatureGroup.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeaturegroup/AsyncGetFeatureGroup.java new file mode 100644 index 000000000000..77b4e312625d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeaturegroup/AsyncGetFeatureGroup.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_GetFeatureGroup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.FeatureGroupName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.GetFeatureGroupRequest; + +public class AsyncGetFeatureGroup { + + public static void main(String[] args) throws Exception { + asyncGetFeatureGroup(); + } + + public static void asyncGetFeatureGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + GetFeatureGroupRequest request = + GetFeatureGroupRequest.newBuilder() + .setName(FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) + .build(); + ApiFuture future = + featureRegistryServiceClient.getFeatureGroupCallable().futureCall(request); + // Do something. + FeatureGroup response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_GetFeatureGroup_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeaturegroup/SyncGetFeatureGroup.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeaturegroup/SyncGetFeatureGroup.java new file mode 100644 index 000000000000..a6ba16777c63 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeaturegroup/SyncGetFeatureGroup.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_GetFeatureGroup_sync] +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.FeatureGroupName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.GetFeatureGroupRequest; + +public class SyncGetFeatureGroup { + + public static void main(String[] args) throws Exception { + syncGetFeatureGroup(); + } + + public static void syncGetFeatureGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + GetFeatureGroupRequest request = + GetFeatureGroupRequest.newBuilder() + .setName(FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) + .build(); + FeatureGroup response = featureRegistryServiceClient.getFeatureGroup(request); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_GetFeatureGroup_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeaturegroup/SyncGetFeatureGroupFeaturegroupname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeaturegroup/SyncGetFeatureGroupFeaturegroupname.java new file mode 100644 index 000000000000..9aa6ae4f986d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeaturegroup/SyncGetFeatureGroupFeaturegroupname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_GetFeatureGroup_Featuregroupname_sync] +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.FeatureGroupName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; + +public class SyncGetFeatureGroupFeaturegroupname { + + public static void main(String[] args) throws Exception { + syncGetFeatureGroupFeaturegroupname(); + } + + public static void syncGetFeatureGroupFeaturegroupname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + FeatureGroupName name = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + FeatureGroup response = featureRegistryServiceClient.getFeatureGroup(name); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_GetFeatureGroup_Featuregroupname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeaturegroup/SyncGetFeatureGroupString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeaturegroup/SyncGetFeatureGroupString.java new file mode 100644 index 000000000000..af02a1fa8b42 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getfeaturegroup/SyncGetFeatureGroupString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_GetFeatureGroup_String_sync] +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.FeatureGroupName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; + +public class SyncGetFeatureGroupString { + + public static void main(String[] args) throws Exception { + syncGetFeatureGroupString(); + } + + public static void syncGetFeatureGroupString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + String name = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString(); + FeatureGroup response = featureRegistryServiceClient.getFeatureGroup(name); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_GetFeatureGroup_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getiampolicy/AsyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..ba6bf9b4fc04 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = + featureRegistryServiceClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_GetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getiampolicy/SyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..0c4c3ea7dc12 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_GetIamPolicy_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = featureRegistryServiceClient.getIamPolicy(request); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_GetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getlocation/AsyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..d76b4a1dc239 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getlocation/AsyncGetLocation.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + featureRegistryServiceClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_GetLocation_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getlocation/SyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..6051254f9705 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/getlocation/SyncGetLocation.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_GetLocation_sync] +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = featureRegistryServiceClient.getLocation(request); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_GetLocation_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeaturegroups/AsyncListFeatureGroups.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeaturegroups/AsyncListFeatureGroups.java new file mode 100644 index 000000000000..4bd7b43043fb --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeaturegroups/AsyncListFeatureGroups.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_ListFeatureGroups_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest; +import com.google.cloud.aiplatform.v1.LocationName; + +public class AsyncListFeatureGroups { + + public static void main(String[] args) throws Exception { + asyncListFeatureGroups(); + } + + public static void asyncListFeatureGroups() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + ListFeatureGroupsRequest request = + ListFeatureGroupsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + featureRegistryServiceClient.listFeatureGroupsPagedCallable().futureCall(request); + // Do something. + for (FeatureGroup element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_ListFeatureGroups_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeaturegroups/AsyncListFeatureGroupsPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeaturegroups/AsyncListFeatureGroupsPaged.java new file mode 100644 index 000000000000..9e12846936e5 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeaturegroups/AsyncListFeatureGroupsPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_ListFeatureGroups_Paged_async] +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest; +import com.google.cloud.aiplatform.v1.ListFeatureGroupsResponse; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.common.base.Strings; + +public class AsyncListFeatureGroupsPaged { + + public static void main(String[] args) throws Exception { + asyncListFeatureGroupsPaged(); + } + + public static void asyncListFeatureGroupsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + ListFeatureGroupsRequest request = + ListFeatureGroupsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListFeatureGroupsResponse response = + featureRegistryServiceClient.listFeatureGroupsCallable().call(request); + for (FeatureGroup element : response.getFeatureGroupsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_ListFeatureGroups_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeaturegroups/SyncListFeatureGroups.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeaturegroups/SyncListFeatureGroups.java new file mode 100644 index 000000000000..c9915dfab543 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeaturegroups/SyncListFeatureGroups.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_ListFeatureGroups_sync] +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.ListFeatureGroupsRequest; +import com.google.cloud.aiplatform.v1.LocationName; + +public class SyncListFeatureGroups { + + public static void main(String[] args) throws Exception { + syncListFeatureGroups(); + } + + public static void syncListFeatureGroups() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + ListFeatureGroupsRequest request = + ListFeatureGroupsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .build(); + for (FeatureGroup element : + featureRegistryServiceClient.listFeatureGroups(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_ListFeatureGroups_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeaturegroups/SyncListFeatureGroupsLocationname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeaturegroups/SyncListFeatureGroupsLocationname.java new file mode 100644 index 000000000000..104f6ba69905 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeaturegroups/SyncListFeatureGroupsLocationname.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_ListFeatureGroups_Locationname_sync] +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.LocationName; + +public class SyncListFeatureGroupsLocationname { + + public static void main(String[] args) throws Exception { + syncListFeatureGroupsLocationname(); + } + + public static void syncListFeatureGroupsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (FeatureGroup element : + featureRegistryServiceClient.listFeatureGroups(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_ListFeatureGroups_Locationname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeaturegroups/SyncListFeatureGroupsString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeaturegroups/SyncListFeatureGroupsString.java new file mode 100644 index 000000000000..7f132ac11a25 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeaturegroups/SyncListFeatureGroupsString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_ListFeatureGroups_String_sync] +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.LocationName; + +public class SyncListFeatureGroupsString { + + public static void main(String[] args) throws Exception { + syncListFeatureGroupsString(); + } + + public static void syncListFeatureGroupsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (FeatureGroup element : + featureRegistryServiceClient.listFeatureGroups(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_ListFeatureGroups_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/AsyncListFeatures.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/AsyncListFeatures.java new file mode 100644 index 000000000000..d132d6608a48 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/AsyncListFeatures.java @@ -0,0 +1,62 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_ListFeatures_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EntityTypeName; +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.ListFeaturesRequest; +import com.google.protobuf.FieldMask; + +public class AsyncListFeatures { + + public static void main(String[] args) throws Exception { + asyncListFeatures(); + } + + public static void asyncListFeatures() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + ListFeaturesRequest request = + ListFeaturesRequest.newBuilder() + .setParent( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") + .toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .setReadMask(FieldMask.newBuilder().build()) + .setLatestStatsCount(-878108489) + .build(); + ApiFuture future = + featureRegistryServiceClient.listFeaturesPagedCallable().futureCall(request); + // Do something. + for (Feature element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_ListFeatures_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/AsyncListFeaturesPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/AsyncListFeaturesPaged.java new file mode 100644 index 000000000000..8d06b52ecf94 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/AsyncListFeaturesPaged.java @@ -0,0 +1,70 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_ListFeatures_Paged_async] +import com.google.cloud.aiplatform.v1.EntityTypeName; +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.ListFeaturesRequest; +import com.google.cloud.aiplatform.v1.ListFeaturesResponse; +import com.google.common.base.Strings; +import com.google.protobuf.FieldMask; + +public class AsyncListFeaturesPaged { + + public static void main(String[] args) throws Exception { + asyncListFeaturesPaged(); + } + + public static void asyncListFeaturesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + ListFeaturesRequest request = + ListFeaturesRequest.newBuilder() + .setParent( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") + .toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .setReadMask(FieldMask.newBuilder().build()) + .setLatestStatsCount(-878108489) + .build(); + while (true) { + ListFeaturesResponse response = + featureRegistryServiceClient.listFeaturesCallable().call(request); + for (Feature element : response.getFeaturesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_ListFeatures_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/SyncListFeatures.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/SyncListFeatures.java new file mode 100644 index 000000000000..4e9fe69442a9 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/SyncListFeatures.java @@ -0,0 +1,58 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_ListFeatures_sync] +import com.google.cloud.aiplatform.v1.EntityTypeName; +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.ListFeaturesRequest; +import com.google.protobuf.FieldMask; + +public class SyncListFeatures { + + public static void main(String[] args) throws Exception { + syncListFeatures(); + } + + public static void syncListFeatures() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + ListFeaturesRequest request = + ListFeaturesRequest.newBuilder() + .setParent( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") + .toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .setReadMask(FieldMask.newBuilder().build()) + .setLatestStatsCount(-878108489) + .build(); + for (Feature element : featureRegistryServiceClient.listFeatures(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_ListFeatures_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/SyncListFeaturesEntitytypename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/SyncListFeaturesEntitytypename.java new file mode 100644 index 000000000000..6f45394e44d3 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/SyncListFeaturesEntitytypename.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_ListFeatures_Entitytypename_sync] +import com.google.cloud.aiplatform.v1.EntityTypeName; +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; + +public class SyncListFeaturesEntitytypename { + + public static void main(String[] args) throws Exception { + syncListFeaturesEntitytypename(); + } + + public static void syncListFeaturesEntitytypename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + EntityTypeName parent = + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); + for (Feature element : featureRegistryServiceClient.listFeatures(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_ListFeatures_Entitytypename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/SyncListFeaturesFeaturegroupname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/SyncListFeaturesFeaturegroupname.java new file mode 100644 index 000000000000..fbf4859ab3a6 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/SyncListFeaturesFeaturegroupname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_ListFeatures_Featuregroupname_sync] +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureGroupName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; + +public class SyncListFeaturesFeaturegroupname { + + public static void main(String[] args) throws Exception { + syncListFeaturesFeaturegroupname(); + } + + public static void syncListFeaturesFeaturegroupname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + for (Feature element : featureRegistryServiceClient.listFeatures(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_ListFeatures_Featuregroupname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/SyncListFeaturesString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/SyncListFeaturesString.java new file mode 100644 index 000000000000..fc7889d82b11 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listfeatures/SyncListFeaturesString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_ListFeatures_String_sync] +import com.google.cloud.aiplatform.v1.EntityTypeName; +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; + +public class SyncListFeaturesString { + + public static void main(String[] args) throws Exception { + syncListFeaturesString(); + } + + public static void syncListFeaturesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + String parent = + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") + .toString(); + for (Feature element : featureRegistryServiceClient.listFeatures(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_ListFeatures_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listlocations/AsyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..7c26ad164211 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listlocations/AsyncListLocations.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + featureRegistryServiceClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_ListLocations_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listlocations/AsyncListLocationsPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..03c3501f2d41 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_ListLocations_Paged_async] +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + featureRegistryServiceClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_ListLocations_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listlocations/SyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..4ed87bb6c2ac --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/listlocations/SyncListLocations.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_ListLocations_sync] +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : featureRegistryServiceClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_ListLocations_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/setiampolicy/AsyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..7cd5d2201dba --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + featureRegistryServiceClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_SetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/setiampolicy/SyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..079edf2ace37 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_SetIamPolicy_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = featureRegistryServiceClient.setIamPolicy(request); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_SetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/testiampermissions/AsyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..9744a2d401e2 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + featureRegistryServiceClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_TestIamPermissions_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/testiampermissions/SyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..9b1853adabd4 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_TestIamPermissions_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = + featureRegistryServiceClient.testIamPermissions(request); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_TestIamPermissions_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeature/AsyncUpdateFeature.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeature/AsyncUpdateFeature.java new file mode 100644 index 000000000000..abfe32cf5230 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeature/AsyncUpdateFeature.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_UpdateFeature_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.UpdateFeatureRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateFeature { + + public static void main(String[] args) throws Exception { + asyncUpdateFeature(); + } + + public static void asyncUpdateFeature() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + UpdateFeatureRequest request = + UpdateFeatureRequest.newBuilder() + .setFeature(Feature.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + featureRegistryServiceClient.updateFeatureCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_UpdateFeature_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeature/AsyncUpdateFeatureLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeature/AsyncUpdateFeatureLRO.java new file mode 100644 index 000000000000..e7ba0ccfb190 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeature/AsyncUpdateFeatureLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_UpdateFeature_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdateFeatureRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateFeatureLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateFeatureLRO(); + } + + public static void asyncUpdateFeatureLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + UpdateFeatureRequest request = + UpdateFeatureRequest.newBuilder() + .setFeature(Feature.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + OperationFuture future = + featureRegistryServiceClient.updateFeatureOperationCallable().futureCall(request); + // Do something. + Feature response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_UpdateFeature_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeature/SyncUpdateFeature.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeature/SyncUpdateFeature.java new file mode 100644 index 000000000000..3bd734aaec0e --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeature/SyncUpdateFeature.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_UpdateFeature_sync] +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.UpdateFeatureRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateFeature { + + public static void main(String[] args) throws Exception { + syncUpdateFeature(); + } + + public static void syncUpdateFeature() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + UpdateFeatureRequest request = + UpdateFeatureRequest.newBuilder() + .setFeature(Feature.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Feature response = featureRegistryServiceClient.updateFeatureAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_UpdateFeature_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeature/SyncUpdateFeatureFeatureFieldmask.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeature/SyncUpdateFeatureFeatureFieldmask.java new file mode 100644 index 000000000000..e484434d4264 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeature/SyncUpdateFeatureFeatureFieldmask.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_UpdateFeature_FeatureFieldmask_sync] +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateFeatureFeatureFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateFeatureFeatureFieldmask(); + } + + public static void syncUpdateFeatureFeatureFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + Feature feature = Feature.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Feature response = featureRegistryServiceClient.updateFeatureAsync(feature, updateMask).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_UpdateFeature_FeatureFieldmask_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeaturegroup/AsyncUpdateFeatureGroup.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeaturegroup/AsyncUpdateFeatureGroup.java new file mode 100644 index 000000000000..8f4d31470545 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeaturegroup/AsyncUpdateFeatureGroup.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_UpdateFeatureGroup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateFeatureGroup { + + public static void main(String[] args) throws Exception { + asyncUpdateFeatureGroup(); + } + + public static void asyncUpdateFeatureGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + UpdateFeatureGroupRequest request = + UpdateFeatureGroupRequest.newBuilder() + .setFeatureGroup(FeatureGroup.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + featureRegistryServiceClient.updateFeatureGroupCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_UpdateFeatureGroup_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeaturegroup/AsyncUpdateFeatureGroupLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeaturegroup/AsyncUpdateFeatureGroupLRO.java new file mode 100644 index 000000000000..4e5ae86fb668 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeaturegroup/AsyncUpdateFeatureGroupLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_UpdateFeatureGroup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateFeatureGroupLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateFeatureGroupLRO(); + } + + public static void asyncUpdateFeatureGroupLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + UpdateFeatureGroupRequest request = + UpdateFeatureGroupRequest.newBuilder() + .setFeatureGroup(FeatureGroup.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + OperationFuture future = + featureRegistryServiceClient.updateFeatureGroupOperationCallable().futureCall(request); + // Do something. + FeatureGroup response = future.get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_UpdateFeatureGroup_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeaturegroup/SyncUpdateFeatureGroup.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeaturegroup/SyncUpdateFeatureGroup.java new file mode 100644 index 000000000000..1290a4206ac1 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeaturegroup/SyncUpdateFeatureGroup.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_UpdateFeatureGroup_sync] +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateFeatureGroup { + + public static void main(String[] args) throws Exception { + syncUpdateFeatureGroup(); + } + + public static void syncUpdateFeatureGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + UpdateFeatureGroupRequest request = + UpdateFeatureGroupRequest.newBuilder() + .setFeatureGroup(FeatureGroup.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + FeatureGroup response = featureRegistryServiceClient.updateFeatureGroupAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_UpdateFeatureGroup_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeaturegroup/SyncUpdateFeatureGroupFeaturegroupFieldmask.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeaturegroup/SyncUpdateFeatureGroupFeaturegroupFieldmask.java new file mode 100644 index 000000000000..7ce91d028b44 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservice/updatefeaturegroup/SyncUpdateFeatureGroupFeaturegroupFieldmask.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryService_UpdateFeatureGroup_FeaturegroupFieldmask_sync] +import com.google.cloud.aiplatform.v1.FeatureGroup; +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateFeatureGroupFeaturegroupFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateFeatureGroupFeaturegroupFieldmask(); + } + + public static void syncUpdateFeatureGroupFeaturegroupFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeatureRegistryServiceClient featureRegistryServiceClient = + FeatureRegistryServiceClient.create()) { + FeatureGroup featureGroup = FeatureGroup.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + FeatureGroup response = + featureRegistryServiceClient.updateFeatureGroupAsync(featureGroup, updateMask).get(); + } + } +} +// [END aiplatform_v1_generated_FeatureRegistryService_UpdateFeatureGroup_FeaturegroupFieldmask_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservicesettings/getfeaturegroup/SyncGetFeatureGroup.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservicesettings/getfeaturegroup/SyncGetFeatureGroup.java new file mode 100644 index 000000000000..bb2bc7868b90 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featureregistryservicesettings/getfeaturegroup/SyncGetFeatureGroup.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeatureRegistryServiceSettings_GetFeatureGroup_sync] +import com.google.cloud.aiplatform.v1.FeatureRegistryServiceSettings; +import java.time.Duration; + +public class SyncGetFeatureGroup { + + public static void main(String[] args) throws Exception { + syncGetFeatureGroup(); + } + + public static void syncGetFeatureGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + FeatureRegistryServiceSettings.Builder featureRegistryServiceSettingsBuilder = + FeatureRegistryServiceSettings.newBuilder(); + featureRegistryServiceSettingsBuilder + .getFeatureGroupSettings() + .setRetrySettings( + featureRegistryServiceSettingsBuilder + .getFeatureGroupSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + FeatureRegistryServiceSettings featureRegistryServiceSettings = + featureRegistryServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1_generated_FeatureRegistryServiceSettings_GetFeatureGroup_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/createfeature/SyncCreateFeatureFeaturegroupnameFeature.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/createfeature/SyncCreateFeatureFeaturegroupnameFeature.java new file mode 100644 index 000000000000..29024db3f07f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/createfeature/SyncCreateFeatureFeaturegroupnameFeature.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeaturestoreService_CreateFeature_FeaturegroupnameFeature_sync] +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureGroupName; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceClient; + +public class SyncCreateFeatureFeaturegroupnameFeature { + + public static void main(String[] args) throws Exception { + syncCreateFeatureFeaturegroupnameFeature(); + } + + public static void syncCreateFeatureFeaturegroupnameFeature() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { + FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + Feature feature = Feature.newBuilder().build(); + Feature response = featurestoreServiceClient.createFeatureAsync(parent, feature).get(); + } + } +} +// [END aiplatform_v1_generated_FeaturestoreService_CreateFeature_FeaturegroupnameFeature_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/createfeature/SyncCreateFeatureFeaturegroupnameFeatureString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/createfeature/SyncCreateFeatureFeaturegroupnameFeatureString.java new file mode 100644 index 000000000000..ef5206931d70 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/createfeature/SyncCreateFeatureFeaturegroupnameFeatureString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeaturestoreService_CreateFeature_FeaturegroupnameFeatureString_sync] +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureGroupName; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceClient; + +public class SyncCreateFeatureFeaturegroupnameFeatureString { + + public static void main(String[] args) throws Exception { + syncCreateFeatureFeaturegroupnameFeatureString(); + } + + public static void syncCreateFeatureFeaturegroupnameFeatureString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { + FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + Feature feature = Feature.newBuilder().build(); + String featureId = "featureId-420503887"; + Feature response = + featurestoreServiceClient.createFeatureAsync(parent, feature, featureId).get(); + } + } +} +// [END aiplatform_v1_generated_FeaturestoreService_CreateFeature_FeaturegroupnameFeatureString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/deletefeature/AsyncDeleteFeature.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/deletefeature/AsyncDeleteFeature.java index 38bb8967c1b9..a37e93089674 100644 --- a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/deletefeature/AsyncDeleteFeature.java +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/deletefeature/AsyncDeleteFeature.java @@ -39,7 +39,7 @@ public static void asyncDeleteFeature() throws Exception { DeleteFeatureRequest request = DeleteFeatureRequest.newBuilder() .setName( - FeatureName.of( + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString()) .build(); diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/deletefeature/AsyncDeleteFeatureLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/deletefeature/AsyncDeleteFeatureLRO.java index 031fd61caa37..2aa71973543c 100644 --- a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/deletefeature/AsyncDeleteFeatureLRO.java +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/deletefeature/AsyncDeleteFeatureLRO.java @@ -40,7 +40,7 @@ public static void asyncDeleteFeatureLRO() throws Exception { DeleteFeatureRequest request = DeleteFeatureRequest.newBuilder() .setName( - FeatureName.of( + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString()) .build(); diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/deletefeature/SyncDeleteFeature.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/deletefeature/SyncDeleteFeature.java index 94e5ab2582c4..e9cbf758feff 100644 --- a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/deletefeature/SyncDeleteFeature.java +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/deletefeature/SyncDeleteFeature.java @@ -38,7 +38,7 @@ public static void syncDeleteFeature() throws Exception { DeleteFeatureRequest request = DeleteFeatureRequest.newBuilder() .setName( - FeatureName.of( + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString()) .build(); diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/deletefeature/SyncDeleteFeatureFeaturename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/deletefeature/SyncDeleteFeatureFeaturename.java index 79d1e50c2491..cc48587285c5 100644 --- a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/deletefeature/SyncDeleteFeatureFeaturename.java +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/deletefeature/SyncDeleteFeatureFeaturename.java @@ -35,7 +35,8 @@ public static void syncDeleteFeatureFeaturename() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { FeatureName name = - FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]"); + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]"); featurestoreServiceClient.deleteFeatureAsync(name).get(); } } diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/deletefeature/SyncDeleteFeatureString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/deletefeature/SyncDeleteFeatureString.java index bfb14b982724..c1f2d5e1e3c5 100644 --- a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/deletefeature/SyncDeleteFeatureString.java +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/deletefeature/SyncDeleteFeatureString.java @@ -35,7 +35,8 @@ public static void syncDeleteFeatureString() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String name = - FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString(); featurestoreServiceClient.deleteFeatureAsync(name).get(); } diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/getfeature/AsyncGetFeature.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/getfeature/AsyncGetFeature.java index ca73950c00e1..d7332437d68d 100644 --- a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/getfeature/AsyncGetFeature.java +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/getfeature/AsyncGetFeature.java @@ -39,7 +39,7 @@ public static void asyncGetFeature() throws Exception { GetFeatureRequest request = GetFeatureRequest.newBuilder() .setName( - FeatureName.of( + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString()) .build(); diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/getfeature/SyncGetFeature.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/getfeature/SyncGetFeature.java index 6677319e485e..3b8a31364d74 100644 --- a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/getfeature/SyncGetFeature.java +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/getfeature/SyncGetFeature.java @@ -38,7 +38,7 @@ public static void syncGetFeature() throws Exception { GetFeatureRequest request = GetFeatureRequest.newBuilder() .setName( - FeatureName.of( + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString()) .build(); diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/getfeature/SyncGetFeatureFeaturename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/getfeature/SyncGetFeatureFeaturename.java index 2456ebdb3ac6..9e5434c87baf 100644 --- a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/getfeature/SyncGetFeatureFeaturename.java +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/getfeature/SyncGetFeatureFeaturename.java @@ -35,7 +35,8 @@ public static void syncGetFeatureFeaturename() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { FeatureName name = - FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]"); + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]"); Feature response = featurestoreServiceClient.getFeature(name); } } diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/getfeature/SyncGetFeatureString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/getfeature/SyncGetFeatureString.java index 3261e7d61075..1c36a59d0e33 100644 --- a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/getfeature/SyncGetFeatureString.java +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/getfeature/SyncGetFeatureString.java @@ -35,7 +35,8 @@ public static void syncGetFeatureString() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String name = - FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") + FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( + "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString(); Feature response = featurestoreServiceClient.getFeature(name); } diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/listfeatures/SyncListFeaturesFeaturegroupname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/listfeatures/SyncListFeaturesFeaturegroupname.java new file mode 100644 index 000000000000..f852ca3b59e7 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/featurestoreservice/listfeatures/SyncListFeaturesFeaturegroupname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_FeaturestoreService_ListFeatures_Featuregroupname_sync] +import com.google.cloud.aiplatform.v1.Feature; +import com.google.cloud.aiplatform.v1.FeatureGroupName; +import com.google.cloud.aiplatform.v1.FeaturestoreServiceClient; + +public class SyncListFeaturesFeaturegroupname { + + public static void main(String[] args) throws Exception { + syncListFeaturesFeaturegroupname(); + } + + public static void syncListFeaturesFeaturegroupname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { + FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); + for (Feature element : featurestoreServiceClient.listFeatures(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_FeaturestoreService_ListFeatures_Featuregroupname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/computetokens/AsyncComputeTokens.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/computetokens/AsyncComputeTokens.java new file mode 100644 index 000000000000..dae33f05d97c --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/computetokens/AsyncComputeTokens.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_ComputeTokens_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.ComputeTokensRequest; +import com.google.cloud.aiplatform.v1.ComputeTokensResponse; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.protobuf.Value; +import java.util.ArrayList; + +public class AsyncComputeTokens { + + public static void main(String[] args) throws Exception { + asyncComputeTokens(); + } + + public static void asyncComputeTokens() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + ComputeTokensRequest request = + ComputeTokensRequest.newBuilder() + .setEndpoint( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllInstances(new ArrayList()) + .build(); + ApiFuture future = + llmUtilityServiceClient.computeTokensCallable().futureCall(request); + // Do something. + ComputeTokensResponse response = future.get(); + } + } +} +// [END aiplatform_v1_generated_LlmUtilityService_ComputeTokens_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/computetokens/SyncComputeTokens.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/computetokens/SyncComputeTokens.java new file mode 100644 index 000000000000..775eab660f69 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/computetokens/SyncComputeTokens.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_ComputeTokens_sync] +import com.google.cloud.aiplatform.v1.ComputeTokensRequest; +import com.google.cloud.aiplatform.v1.ComputeTokensResponse; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.protobuf.Value; +import java.util.ArrayList; + +public class SyncComputeTokens { + + public static void main(String[] args) throws Exception { + syncComputeTokens(); + } + + public static void syncComputeTokens() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + ComputeTokensRequest request = + ComputeTokensRequest.newBuilder() + .setEndpoint( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllInstances(new ArrayList()) + .build(); + ComputeTokensResponse response = llmUtilityServiceClient.computeTokens(request); + } + } +} +// [END aiplatform_v1_generated_LlmUtilityService_ComputeTokens_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/computetokens/SyncComputeTokensEndpointnameListvalue.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/computetokens/SyncComputeTokensEndpointnameListvalue.java new file mode 100644 index 000000000000..5c34d4d876b5 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/computetokens/SyncComputeTokensEndpointnameListvalue.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_ComputeTokens_EndpointnameListvalue_sync] +import com.google.cloud.aiplatform.v1.ComputeTokensResponse; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.protobuf.Value; +import java.util.ArrayList; +import java.util.List; + +public class SyncComputeTokensEndpointnameListvalue { + + public static void main(String[] args) throws Exception { + syncComputeTokensEndpointnameListvalue(); + } + + public static void syncComputeTokensEndpointnameListvalue() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + EndpointName endpoint = + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + List instances = new ArrayList<>(); + ComputeTokensResponse response = llmUtilityServiceClient.computeTokens(endpoint, instances); + } + } +} +// [END aiplatform_v1_generated_LlmUtilityService_ComputeTokens_EndpointnameListvalue_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/computetokens/SyncComputeTokensStringListvalue.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/computetokens/SyncComputeTokensStringListvalue.java new file mode 100644 index 000000000000..cbc5220cd26d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/computetokens/SyncComputeTokensStringListvalue.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_ComputeTokens_StringListvalue_sync] +import com.google.cloud.aiplatform.v1.ComputeTokensResponse; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.protobuf.Value; +import java.util.ArrayList; +import java.util.List; + +public class SyncComputeTokensStringListvalue { + + public static void main(String[] args) throws Exception { + syncComputeTokensStringListvalue(); + } + + public static void syncComputeTokensStringListvalue() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + String endpoint = + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString(); + List instances = new ArrayList<>(); + ComputeTokensResponse response = llmUtilityServiceClient.computeTokens(endpoint, instances); + } + } +} +// [END aiplatform_v1_generated_LlmUtilityService_ComputeTokens_StringListvalue_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/counttokens/AsyncCountTokens.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/counttokens/AsyncCountTokens.java new file mode 100644 index 000000000000..c6f2ea819487 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/counttokens/AsyncCountTokens.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_CountTokens_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.CountTokensRequest; +import com.google.cloud.aiplatform.v1.CountTokensResponse; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.protobuf.Value; +import java.util.ArrayList; + +public class AsyncCountTokens { + + public static void main(String[] args) throws Exception { + asyncCountTokens(); + } + + public static void asyncCountTokens() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + CountTokensRequest request = + CountTokensRequest.newBuilder() + .setEndpoint( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllInstances(new ArrayList()) + .build(); + ApiFuture future = + llmUtilityServiceClient.countTokensCallable().futureCall(request); + // Do something. + CountTokensResponse response = future.get(); + } + } +} +// [END aiplatform_v1_generated_LlmUtilityService_CountTokens_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/counttokens/SyncCountTokens.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/counttokens/SyncCountTokens.java new file mode 100644 index 000000000000..b1dde6a48e62 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/counttokens/SyncCountTokens.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_CountTokens_sync] +import com.google.cloud.aiplatform.v1.CountTokensRequest; +import com.google.cloud.aiplatform.v1.CountTokensResponse; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.protobuf.Value; +import java.util.ArrayList; + +public class SyncCountTokens { + + public static void main(String[] args) throws Exception { + syncCountTokens(); + } + + public static void syncCountTokens() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + CountTokensRequest request = + CountTokensRequest.newBuilder() + .setEndpoint( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllInstances(new ArrayList()) + .build(); + CountTokensResponse response = llmUtilityServiceClient.countTokens(request); + } + } +} +// [END aiplatform_v1_generated_LlmUtilityService_CountTokens_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/counttokens/SyncCountTokensEndpointnameListvalue.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/counttokens/SyncCountTokensEndpointnameListvalue.java new file mode 100644 index 000000000000..a96af6c6360b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/counttokens/SyncCountTokensEndpointnameListvalue.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_CountTokens_EndpointnameListvalue_sync] +import com.google.cloud.aiplatform.v1.CountTokensResponse; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.protobuf.Value; +import java.util.ArrayList; +import java.util.List; + +public class SyncCountTokensEndpointnameListvalue { + + public static void main(String[] args) throws Exception { + syncCountTokensEndpointnameListvalue(); + } + + public static void syncCountTokensEndpointnameListvalue() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + EndpointName endpoint = + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + List instances = new ArrayList<>(); + CountTokensResponse response = llmUtilityServiceClient.countTokens(endpoint, instances); + } + } +} +// [END aiplatform_v1_generated_LlmUtilityService_CountTokens_EndpointnameListvalue_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/counttokens/SyncCountTokensStringListvalue.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/counttokens/SyncCountTokensStringListvalue.java new file mode 100644 index 000000000000..97f465ca0973 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/counttokens/SyncCountTokensStringListvalue.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_CountTokens_StringListvalue_sync] +import com.google.cloud.aiplatform.v1.CountTokensResponse; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.protobuf.Value; +import java.util.ArrayList; +import java.util.List; + +public class SyncCountTokensStringListvalue { + + public static void main(String[] args) throws Exception { + syncCountTokensStringListvalue(); + } + + public static void syncCountTokensStringListvalue() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + String endpoint = + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString(); + List instances = new ArrayList<>(); + CountTokensResponse response = llmUtilityServiceClient.countTokens(endpoint, instances); + } + } +} +// [END aiplatform_v1_generated_LlmUtilityService_CountTokens_StringListvalue_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/create/SyncCreateSetCredentialsProvider.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..e4493d33c37f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.cloud.aiplatform.v1.LlmUtilityServiceSettings; +import com.google.cloud.aiplatform.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + LlmUtilityServiceSettings llmUtilityServiceSettings = + LlmUtilityServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + LlmUtilityServiceClient llmUtilityServiceClient = + LlmUtilityServiceClient.create(llmUtilityServiceSettings); + } +} +// [END aiplatform_v1_generated_LlmUtilityService_Create_SetCredentialsProvider_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/create/SyncCreateSetEndpoint.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..8896a1475080 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_Create_SetEndpoint_sync] +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.cloud.aiplatform.v1.LlmUtilityServiceSettings; +import com.google.cloud.aiplatform.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + LlmUtilityServiceSettings llmUtilityServiceSettings = + LlmUtilityServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + LlmUtilityServiceClient llmUtilityServiceClient = + LlmUtilityServiceClient.create(llmUtilityServiceSettings); + } +} +// [END aiplatform_v1_generated_LlmUtilityService_Create_SetEndpoint_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/getiampolicy/AsyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..c5802a90e690 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = llmUtilityServiceClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1_generated_LlmUtilityService_GetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/getiampolicy/SyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..1bcd79c776ea --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_GetIamPolicy_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = llmUtilityServiceClient.getIamPolicy(request); + } + } +} +// [END aiplatform_v1_generated_LlmUtilityService_GetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/getlocation/AsyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..76b90c861c34 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/getlocation/AsyncGetLocation.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + llmUtilityServiceClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END aiplatform_v1_generated_LlmUtilityService_GetLocation_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/getlocation/SyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..37f16cffd49f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_GetLocation_sync] +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = llmUtilityServiceClient.getLocation(request); + } + } +} +// [END aiplatform_v1_generated_LlmUtilityService_GetLocation_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/listlocations/AsyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..88e1d1f9607e --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + llmUtilityServiceClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_LlmUtilityService_ListLocations_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/listlocations/AsyncListLocationsPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..7333ce1b7573 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_ListLocations_Paged_async] +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + llmUtilityServiceClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1_generated_LlmUtilityService_ListLocations_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/listlocations/SyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..7abfe2938bae --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_ListLocations_sync] +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : llmUtilityServiceClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_LlmUtilityService_ListLocations_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/setiampolicy/AsyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..5259875579a2 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = llmUtilityServiceClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1_generated_LlmUtilityService_SetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/setiampolicy/SyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..0dd0c2f73a63 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_SetIamPolicy_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = llmUtilityServiceClient.setIamPolicy(request); + } + } +} +// [END aiplatform_v1_generated_LlmUtilityService_SetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/testiampermissions/AsyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..22eaeba58e15 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + llmUtilityServiceClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END aiplatform_v1_generated_LlmUtilityService_TestIamPermissions_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/testiampermissions/SyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..542c62a85fc3 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservice/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityService_TestIamPermissions_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.LlmUtilityServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = llmUtilityServiceClient.testIamPermissions(request); + } + } +} +// [END aiplatform_v1_generated_LlmUtilityService_TestIamPermissions_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservicesettings/counttokens/SyncCountTokens.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservicesettings/counttokens/SyncCountTokens.java new file mode 100644 index 000000000000..828056571747 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/llmutilityservicesettings/counttokens/SyncCountTokens.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_LlmUtilityServiceSettings_CountTokens_sync] +import com.google.cloud.aiplatform.v1.LlmUtilityServiceSettings; +import java.time.Duration; + +public class SyncCountTokens { + + public static void main(String[] args) throws Exception { + syncCountTokens(); + } + + public static void syncCountTokens() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + LlmUtilityServiceSettings.Builder llmUtilityServiceSettingsBuilder = + LlmUtilityServiceSettings.newBuilder(); + llmUtilityServiceSettingsBuilder + .countTokensSettings() + .setRetrySettings( + llmUtilityServiceSettingsBuilder + .countTokensSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + LlmUtilityServiceSettings llmUtilityServiceSettings = llmUtilityServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1_generated_LlmUtilityServiceSettings_CountTokens_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/featureonlinestoreadminservicestubsettings/getfeatureonlinestore/SyncGetFeatureOnlineStore.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/featureonlinestoreadminservicestubsettings/getfeatureonlinestore/SyncGetFeatureOnlineStore.java new file mode 100644 index 000000000000..433d878d0d2f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/featureonlinestoreadminservicestubsettings/getfeatureonlinestore/SyncGetFeatureOnlineStore.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.stub.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreAdminServiceStubSettings_GetFeatureOnlineStore_sync] +import com.google.cloud.aiplatform.v1.stub.FeatureOnlineStoreAdminServiceStubSettings; +import java.time.Duration; + +public class SyncGetFeatureOnlineStore { + + public static void main(String[] args) throws Exception { + syncGetFeatureOnlineStore(); + } + + public static void syncGetFeatureOnlineStore() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + FeatureOnlineStoreAdminServiceStubSettings.Builder + featureOnlineStoreAdminServiceSettingsBuilder = + FeatureOnlineStoreAdminServiceStubSettings.newBuilder(); + featureOnlineStoreAdminServiceSettingsBuilder + .getFeatureOnlineStoreSettings() + .setRetrySettings( + featureOnlineStoreAdminServiceSettingsBuilder + .getFeatureOnlineStoreSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + FeatureOnlineStoreAdminServiceStubSettings featureOnlineStoreAdminServiceSettings = + featureOnlineStoreAdminServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreAdminServiceStubSettings_GetFeatureOnlineStore_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/featureonlinestoreservicestubsettings/fetchfeaturevalues/SyncFetchFeatureValues.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/featureonlinestoreservicestubsettings/fetchfeaturevalues/SyncFetchFeatureValues.java new file mode 100644 index 000000000000..25ec5ff870ac --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/featureonlinestoreservicestubsettings/fetchfeaturevalues/SyncFetchFeatureValues.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.stub.samples; + +// [START aiplatform_v1_generated_FeatureOnlineStoreServiceStubSettings_FetchFeatureValues_sync] +import com.google.cloud.aiplatform.v1.stub.FeatureOnlineStoreServiceStubSettings; +import java.time.Duration; + +public class SyncFetchFeatureValues { + + public static void main(String[] args) throws Exception { + syncFetchFeatureValues(); + } + + public static void syncFetchFeatureValues() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + FeatureOnlineStoreServiceStubSettings.Builder featureOnlineStoreServiceSettingsBuilder = + FeatureOnlineStoreServiceStubSettings.newBuilder(); + featureOnlineStoreServiceSettingsBuilder + .fetchFeatureValuesSettings() + .setRetrySettings( + featureOnlineStoreServiceSettingsBuilder + .fetchFeatureValuesSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + FeatureOnlineStoreServiceStubSettings featureOnlineStoreServiceSettings = + featureOnlineStoreServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1_generated_FeatureOnlineStoreServiceStubSettings_FetchFeatureValues_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/featureregistryservicestubsettings/getfeaturegroup/SyncGetFeatureGroup.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/featureregistryservicestubsettings/getfeaturegroup/SyncGetFeatureGroup.java new file mode 100644 index 000000000000..9f86855780f9 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/featureregistryservicestubsettings/getfeaturegroup/SyncGetFeatureGroup.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.stub.samples; + +// [START aiplatform_v1_generated_FeatureRegistryServiceStubSettings_GetFeatureGroup_sync] +import com.google.cloud.aiplatform.v1.stub.FeatureRegistryServiceStubSettings; +import java.time.Duration; + +public class SyncGetFeatureGroup { + + public static void main(String[] args) throws Exception { + syncGetFeatureGroup(); + } + + public static void syncGetFeatureGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + FeatureRegistryServiceStubSettings.Builder featureRegistryServiceSettingsBuilder = + FeatureRegistryServiceStubSettings.newBuilder(); + featureRegistryServiceSettingsBuilder + .getFeatureGroupSettings() + .setRetrySettings( + featureRegistryServiceSettingsBuilder + .getFeatureGroupSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + FeatureRegistryServiceStubSettings featureRegistryServiceSettings = + featureRegistryServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1_generated_FeatureRegistryServiceStubSettings_GetFeatureGroup_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/llmutilityservicestubsettings/counttokens/SyncCountTokens.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/llmutilityservicestubsettings/counttokens/SyncCountTokens.java new file mode 100644 index 000000000000..8ead1721ac4a --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/llmutilityservicestubsettings/counttokens/SyncCountTokens.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1.stub.samples; + +// [START aiplatform_v1_generated_LlmUtilityServiceStubSettings_CountTokens_sync] +import com.google.cloud.aiplatform.v1.stub.LlmUtilityServiceStubSettings; +import java.time.Duration; + +public class SyncCountTokens { + + public static void main(String[] args) throws Exception { + syncCountTokens(); + } + + public static void syncCountTokens() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + LlmUtilityServiceStubSettings.Builder llmUtilityServiceSettingsBuilder = + LlmUtilityServiceStubSettings.newBuilder(); + llmUtilityServiceSettingsBuilder + .countTokensSettings() + .setRetrySettings( + llmUtilityServiceSettingsBuilder + .countTokensSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + LlmUtilityServiceStubSettings llmUtilityServiceSettings = + llmUtilityServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1_generated_LlmUtilityServiceStubSettings_CountTokens_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/AsyncFetchFeatureValues.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/AsyncFetchFeatureValues.java index b8a328f3eef0..e3ec975bf109 100644 --- a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/AsyncFetchFeatureValues.java +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/AsyncFetchFeatureValues.java @@ -19,6 +19,8 @@ // [START aiplatform_v1beta1_generated_FeatureOnlineStoreService_FetchFeatureValues_async] import com.google.api.core.ApiFuture; import com.google.cloud.aiplatform.v1beta1.FeatureOnlineStoreServiceClient; +import com.google.cloud.aiplatform.v1beta1.FeatureViewDataFormat; +import com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey; import com.google.cloud.aiplatform.v1beta1.FeatureViewName; import com.google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest; import com.google.cloud.aiplatform.v1beta1.FetchFeatureValuesResponse; @@ -43,6 +45,8 @@ public static void asyncFetchFeatureValues() throws Exception { FeatureViewName.of( "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") .toString()) + .setDataKey(FeatureViewDataKey.newBuilder().build()) + .setDataFormat(FeatureViewDataFormat.forNumber(0)) .build(); ApiFuture future = featureOnlineStoreServiceClient.fetchFeatureValuesCallable().futureCall(request); diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValues.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValues.java index b5840b19109c..29f748f4531a 100644 --- a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValues.java +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValues.java @@ -18,6 +18,8 @@ // [START aiplatform_v1beta1_generated_FeatureOnlineStoreService_FetchFeatureValues_sync] import com.google.cloud.aiplatform.v1beta1.FeatureOnlineStoreServiceClient; +import com.google.cloud.aiplatform.v1beta1.FeatureViewDataFormat; +import com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey; import com.google.cloud.aiplatform.v1beta1.FeatureViewName; import com.google.cloud.aiplatform.v1beta1.FetchFeatureValuesRequest; import com.google.cloud.aiplatform.v1beta1.FetchFeatureValuesResponse; @@ -42,6 +44,8 @@ public static void syncFetchFeatureValues() throws Exception { FeatureViewName.of( "[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") .toString()) + .setDataKey(FeatureViewDataKey.newBuilder().build()) + .setDataFormat(FeatureViewDataFormat.forNumber(0)) .build(); FetchFeatureValuesResponse response = featureOnlineStoreServiceClient.fetchFeatureValues(request); diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValuesFeatureviewnameString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValuesFeatureviewnameFeatureviewdatakey.java similarity index 78% rename from java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValuesFeatureviewnameString.java rename to java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValuesFeatureviewnameFeatureviewdatakey.java index abb1e8abbdda..cea9359fe799 100644 --- a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValuesFeatureviewnameString.java +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValuesFeatureviewnameFeatureviewdatakey.java @@ -16,18 +16,19 @@ package com.google.cloud.aiplatform.v1beta1.samples; -// [START aiplatform_v1beta1_generated_FeatureOnlineStoreService_FetchFeatureValues_FeatureviewnameString_sync] +// [START aiplatform_v1beta1_generated_FeatureOnlineStoreService_FetchFeatureValues_FeatureviewnameFeatureviewdatakey_sync] import com.google.cloud.aiplatform.v1beta1.FeatureOnlineStoreServiceClient; +import com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey; import com.google.cloud.aiplatform.v1beta1.FeatureViewName; import com.google.cloud.aiplatform.v1beta1.FetchFeatureValuesResponse; -public class SyncFetchFeatureValuesFeatureviewnameString { +public class SyncFetchFeatureValuesFeatureviewnameFeatureviewdatakey { public static void main(String[] args) throws Exception { - syncFetchFeatureValuesFeatureviewnameString(); + syncFetchFeatureValuesFeatureviewnameFeatureviewdatakey(); } - public static void syncFetchFeatureValuesFeatureviewnameString() throws Exception { + public static void syncFetchFeatureValuesFeatureviewnameFeatureviewdatakey() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -37,10 +38,10 @@ public static void syncFetchFeatureValuesFeatureviewnameString() throws Exceptio FeatureOnlineStoreServiceClient.create()) { FeatureViewName featureView = FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]"); - String id = "id3355"; + FeatureViewDataKey dataKey = FeatureViewDataKey.newBuilder().build(); FetchFeatureValuesResponse response = - featureOnlineStoreServiceClient.fetchFeatureValues(featureView, id); + featureOnlineStoreServiceClient.fetchFeatureValues(featureView, dataKey); } } } -// [END aiplatform_v1beta1_generated_FeatureOnlineStoreService_FetchFeatureValues_FeatureviewnameString_sync] +// [END aiplatform_v1beta1_generated_FeatureOnlineStoreService_FetchFeatureValues_FeatureviewnameFeatureviewdatakey_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValuesStringString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValuesStringFeatureviewdatakey.java similarity index 80% rename from java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValuesStringString.java rename to java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValuesStringFeatureviewdatakey.java index 593f9800638f..951889e96d8e 100644 --- a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValuesStringString.java +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/featureonlinestoreservice/fetchfeaturevalues/SyncFetchFeatureValuesStringFeatureviewdatakey.java @@ -16,18 +16,19 @@ package com.google.cloud.aiplatform.v1beta1.samples; -// [START aiplatform_v1beta1_generated_FeatureOnlineStoreService_FetchFeatureValues_StringString_sync] +// [START aiplatform_v1beta1_generated_FeatureOnlineStoreService_FetchFeatureValues_StringFeatureviewdatakey_sync] import com.google.cloud.aiplatform.v1beta1.FeatureOnlineStoreServiceClient; +import com.google.cloud.aiplatform.v1beta1.FeatureViewDataKey; import com.google.cloud.aiplatform.v1beta1.FeatureViewName; import com.google.cloud.aiplatform.v1beta1.FetchFeatureValuesResponse; -public class SyncFetchFeatureValuesStringString { +public class SyncFetchFeatureValuesStringFeatureviewdatakey { public static void main(String[] args) throws Exception { - syncFetchFeatureValuesStringString(); + syncFetchFeatureValuesStringFeatureviewdatakey(); } - public static void syncFetchFeatureValuesStringString() throws Exception { + public static void syncFetchFeatureValuesStringFeatureviewdatakey() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -38,10 +39,10 @@ public static void syncFetchFeatureValuesStringString() throws Exception { String featureView = FeatureViewName.of("[PROJECT]", "[LOCATION]", "[FEATURE_ONLINE_STORE]", "[FEATURE_VIEW]") .toString(); - String id = "id3355"; + FeatureViewDataKey dataKey = FeatureViewDataKey.newBuilder().build(); FetchFeatureValuesResponse response = - featureOnlineStoreServiceClient.fetchFeatureValues(featureView, id); + featureOnlineStoreServiceClient.fetchFeatureValues(featureView, dataKey); } } } -// [END aiplatform_v1beta1_generated_FeatureOnlineStoreService_FetchFeatureValues_StringString_sync] +// [END aiplatform_v1beta1_generated_FeatureOnlineStoreService_FetchFeatureValues_StringFeatureviewdatakey_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/computetokens/AsyncComputeTokens.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/computetokens/AsyncComputeTokens.java new file mode 100644 index 000000000000..34a85ffc5cfc --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/computetokens/AsyncComputeTokens.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_LlmUtilityService_ComputeTokens_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest; +import com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient; +import com.google.protobuf.Value; +import java.util.ArrayList; + +public class AsyncComputeTokens { + + public static void main(String[] args) throws Exception { + asyncComputeTokens(); + } + + public static void asyncComputeTokens() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + ComputeTokensRequest request = + ComputeTokensRequest.newBuilder() + .setEndpoint( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllInstances(new ArrayList()) + .build(); + ApiFuture future = + llmUtilityServiceClient.computeTokensCallable().futureCall(request); + // Do something. + ComputeTokensResponse response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_LlmUtilityService_ComputeTokens_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/computetokens/SyncComputeTokens.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/computetokens/SyncComputeTokens.java new file mode 100644 index 000000000000..47a689879373 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/computetokens/SyncComputeTokens.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_LlmUtilityService_ComputeTokens_sync] +import com.google.cloud.aiplatform.v1beta1.ComputeTokensRequest; +import com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient; +import com.google.protobuf.Value; +import java.util.ArrayList; + +public class SyncComputeTokens { + + public static void main(String[] args) throws Exception { + syncComputeTokens(); + } + + public static void syncComputeTokens() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + ComputeTokensRequest request = + ComputeTokensRequest.newBuilder() + .setEndpoint( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllInstances(new ArrayList()) + .build(); + ComputeTokensResponse response = llmUtilityServiceClient.computeTokens(request); + } + } +} +// [END aiplatform_v1beta1_generated_LlmUtilityService_ComputeTokens_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/computetokens/SyncComputeTokensEndpointnameListvalue.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/computetokens/SyncComputeTokensEndpointnameListvalue.java new file mode 100644 index 000000000000..3f6866538ab8 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/computetokens/SyncComputeTokensEndpointnameListvalue.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_LlmUtilityService_ComputeTokens_EndpointnameListvalue_sync] +import com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient; +import com.google.protobuf.Value; +import java.util.ArrayList; +import java.util.List; + +public class SyncComputeTokensEndpointnameListvalue { + + public static void main(String[] args) throws Exception { + syncComputeTokensEndpointnameListvalue(); + } + + public static void syncComputeTokensEndpointnameListvalue() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + EndpointName endpoint = + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + List instances = new ArrayList<>(); + ComputeTokensResponse response = llmUtilityServiceClient.computeTokens(endpoint, instances); + } + } +} +// [END aiplatform_v1beta1_generated_LlmUtilityService_ComputeTokens_EndpointnameListvalue_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/computetokens/SyncComputeTokensStringListvalue.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/computetokens/SyncComputeTokensStringListvalue.java new file mode 100644 index 000000000000..ac5e621ea5a2 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/computetokens/SyncComputeTokensStringListvalue.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_LlmUtilityService_ComputeTokens_StringListvalue_sync] +import com.google.cloud.aiplatform.v1beta1.ComputeTokensResponse; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient; +import com.google.protobuf.Value; +import java.util.ArrayList; +import java.util.List; + +public class SyncComputeTokensStringListvalue { + + public static void main(String[] args) throws Exception { + syncComputeTokensStringListvalue(); + } + + public static void syncComputeTokensStringListvalue() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + String endpoint = + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString(); + List instances = new ArrayList<>(); + ComputeTokensResponse response = llmUtilityServiceClient.computeTokens(endpoint, instances); + } + } +} +// [END aiplatform_v1beta1_generated_LlmUtilityService_ComputeTokens_StringListvalue_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/create/SyncCreateSetCredentialsProvider.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..cb71409ebb5b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_LlmUtilityService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient; +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceSettings; +import com.google.cloud.aiplatform.v1beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + LlmUtilityServiceSettings llmUtilityServiceSettings = + LlmUtilityServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + LlmUtilityServiceClient llmUtilityServiceClient = + LlmUtilityServiceClient.create(llmUtilityServiceSettings); + } +} +// [END aiplatform_v1beta1_generated_LlmUtilityService_Create_SetCredentialsProvider_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/create/SyncCreateSetEndpoint.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..f46f9ee56b6a --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_LlmUtilityService_Create_SetEndpoint_sync] +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient; +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceSettings; +import com.google.cloud.aiplatform.v1beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + LlmUtilityServiceSettings llmUtilityServiceSettings = + LlmUtilityServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + LlmUtilityServiceClient llmUtilityServiceClient = + LlmUtilityServiceClient.create(llmUtilityServiceSettings); + } +} +// [END aiplatform_v1beta1_generated_LlmUtilityService_Create_SetEndpoint_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/getiampolicy/AsyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..c97ff39ba8d5 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_LlmUtilityService_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = llmUtilityServiceClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_LlmUtilityService_GetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/getiampolicy/SyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..a2fb9402d662 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_LlmUtilityService_GetIamPolicy_sync] +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = llmUtilityServiceClient.getIamPolicy(request); + } + } +} +// [END aiplatform_v1beta1_generated_LlmUtilityService_GetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/getlocation/AsyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..414e753752e7 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/getlocation/AsyncGetLocation.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_LlmUtilityService_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + llmUtilityServiceClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_LlmUtilityService_GetLocation_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/getlocation/SyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..4840ef8d8981 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_LlmUtilityService_GetLocation_sync] +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = llmUtilityServiceClient.getLocation(request); + } + } +} +// [END aiplatform_v1beta1_generated_LlmUtilityService_GetLocation_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/listlocations/AsyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..13da04105717 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_LlmUtilityService_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + llmUtilityServiceClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_LlmUtilityService_ListLocations_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/listlocations/AsyncListLocationsPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..8d9417e12f29 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_LlmUtilityService_ListLocations_Paged_async] +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + llmUtilityServiceClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1beta1_generated_LlmUtilityService_ListLocations_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/listlocations/SyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..a1e148c3236b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_LlmUtilityService_ListLocations_sync] +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : llmUtilityServiceClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_LlmUtilityService_ListLocations_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/setiampolicy/AsyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..0327e67a5035 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_LlmUtilityService_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = llmUtilityServiceClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_LlmUtilityService_SetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/setiampolicy/SyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..6e12e88c053d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_LlmUtilityService_SetIamPolicy_sync] +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = llmUtilityServiceClient.setIamPolicy(request); + } + } +} +// [END aiplatform_v1beta1_generated_LlmUtilityService_SetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/testiampermissions/AsyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..739070d54fae --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_LlmUtilityService_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + llmUtilityServiceClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_LlmUtilityService_TestIamPermissions_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/testiampermissions/SyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..f814c1b5b9f7 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservice/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_LlmUtilityService_TestIamPermissions_sync] +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = llmUtilityServiceClient.testIamPermissions(request); + } + } +} +// [END aiplatform_v1beta1_generated_LlmUtilityService_TestIamPermissions_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservicesettings/computetokens/SyncComputeTokens.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservicesettings/computetokens/SyncComputeTokens.java new file mode 100644 index 000000000000..da9abf90221f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/llmutilityservicesettings/computetokens/SyncComputeTokens.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_LlmUtilityServiceSettings_ComputeTokens_sync] +import com.google.cloud.aiplatform.v1beta1.LlmUtilityServiceSettings; +import java.time.Duration; + +public class SyncComputeTokens { + + public static void main(String[] args) throws Exception { + syncComputeTokens(); + } + + public static void syncComputeTokens() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + LlmUtilityServiceSettings.Builder llmUtilityServiceSettingsBuilder = + LlmUtilityServiceSettings.newBuilder(); + llmUtilityServiceSettingsBuilder + .computeTokensSettings() + .setRetrySettings( + llmUtilityServiceSettingsBuilder + .computeTokensSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + LlmUtilityServiceSettings llmUtilityServiceSettings = llmUtilityServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1beta1_generated_LlmUtilityServiceSettings_ComputeTokens_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/pipelineservice/batchdeletepipelinejobs/AsyncBatchDeletePipelineJobs.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/pipelineservice/batchdeletepipelinejobs/AsyncBatchDeletePipelineJobs.java new file mode 100644 index 000000000000..ebcaf811ba99 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/pipelineservice/batchdeletepipelinejobs/AsyncBatchDeletePipelineJobs.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_PipelineService_BatchDeletePipelineJobs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.PipelineServiceClient; +import com.google.longrunning.Operation; +import java.util.ArrayList; + +public class AsyncBatchDeletePipelineJobs { + + public static void main(String[] args) throws Exception { + asyncBatchDeletePipelineJobs(); + } + + public static void asyncBatchDeletePipelineJobs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { + BatchDeletePipelineJobsRequest request = + BatchDeletePipelineJobsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .addAllNames(new ArrayList()) + .build(); + ApiFuture future = + pipelineServiceClient.batchDeletePipelineJobsCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_PipelineService_BatchDeletePipelineJobs_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/pipelineservice/batchdeletepipelinejobs/AsyncBatchDeletePipelineJobsLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/pipelineservice/batchdeletepipelinejobs/AsyncBatchDeletePipelineJobsLRO.java new file mode 100644 index 000000000000..b9ffd7e908b2 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/pipelineservice/batchdeletepipelinejobs/AsyncBatchDeletePipelineJobsLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_PipelineService_BatchDeletePipelineJobs_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest; +import com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse; +import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.PipelineServiceClient; +import java.util.ArrayList; + +public class AsyncBatchDeletePipelineJobsLRO { + + public static void main(String[] args) throws Exception { + asyncBatchDeletePipelineJobsLRO(); + } + + public static void asyncBatchDeletePipelineJobsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { + BatchDeletePipelineJobsRequest request = + BatchDeletePipelineJobsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .addAllNames(new ArrayList()) + .build(); + OperationFuture future = + pipelineServiceClient.batchDeletePipelineJobsOperationCallable().futureCall(request); + // Do something. + BatchDeletePipelineJobsResponse response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_PipelineService_BatchDeletePipelineJobs_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/pipelineservice/batchdeletepipelinejobs/SyncBatchDeletePipelineJobs.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/pipelineservice/batchdeletepipelinejobs/SyncBatchDeletePipelineJobs.java new file mode 100644 index 000000000000..5fea1ceb157d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/pipelineservice/batchdeletepipelinejobs/SyncBatchDeletePipelineJobs.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_PipelineService_BatchDeletePipelineJobs_sync] +import com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsRequest; +import com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.PipelineServiceClient; +import java.util.ArrayList; + +public class SyncBatchDeletePipelineJobs { + + public static void main(String[] args) throws Exception { + syncBatchDeletePipelineJobs(); + } + + public static void syncBatchDeletePipelineJobs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { + BatchDeletePipelineJobsRequest request = + BatchDeletePipelineJobsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .addAllNames(new ArrayList()) + .build(); + BatchDeletePipelineJobsResponse response = + pipelineServiceClient.batchDeletePipelineJobsAsync(request).get(); + } + } +} +// [END aiplatform_v1beta1_generated_PipelineService_BatchDeletePipelineJobs_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/pipelineservice/batchdeletepipelinejobs/SyncBatchDeletePipelineJobsLocationnameListstring.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/pipelineservice/batchdeletepipelinejobs/SyncBatchDeletePipelineJobsLocationnameListstring.java new file mode 100644 index 000000000000..26cf1786cbab --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/pipelineservice/batchdeletepipelinejobs/SyncBatchDeletePipelineJobsLocationnameListstring.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_PipelineService_BatchDeletePipelineJobs_LocationnameListstring_sync] +import com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.PipelineServiceClient; +import java.util.ArrayList; +import java.util.List; + +public class SyncBatchDeletePipelineJobsLocationnameListstring { + + public static void main(String[] args) throws Exception { + syncBatchDeletePipelineJobsLocationnameListstring(); + } + + public static void syncBatchDeletePipelineJobsLocationnameListstring() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List names = new ArrayList<>(); + BatchDeletePipelineJobsResponse response = + pipelineServiceClient.batchDeletePipelineJobsAsync(parent, names).get(); + } + } +} +// [END aiplatform_v1beta1_generated_PipelineService_BatchDeletePipelineJobs_LocationnameListstring_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/pipelineservice/batchdeletepipelinejobs/SyncBatchDeletePipelineJobsStringListstring.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/pipelineservice/batchdeletepipelinejobs/SyncBatchDeletePipelineJobsStringListstring.java new file mode 100644 index 000000000000..860a25d2f3b4 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/pipelineservice/batchdeletepipelinejobs/SyncBatchDeletePipelineJobsStringListstring.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_PipelineService_BatchDeletePipelineJobs_StringListstring_sync] +import com.google.cloud.aiplatform.v1beta1.BatchDeletePipelineJobsResponse; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.PipelineServiceClient; +import java.util.ArrayList; +import java.util.List; + +public class SyncBatchDeletePipelineJobsStringListstring { + + public static void main(String[] args) throws Exception { + syncBatchDeletePipelineJobsStringListstring(); + } + + public static void syncBatchDeletePipelineJobsStringListstring() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + List names = new ArrayList<>(); + BatchDeletePipelineJobsResponse response = + pipelineServiceClient.batchDeletePipelineJobsAsync(parent, names).get(); + } + } +} +// [END aiplatform_v1beta1_generated_PipelineService_BatchDeletePipelineJobs_StringListstring_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/stub/llmutilityservicestubsettings/computetokens/SyncComputeTokens.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/stub/llmutilityservicestubsettings/computetokens/SyncComputeTokens.java new file mode 100644 index 000000000000..3e636da3fe56 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/stub/llmutilityservicestubsettings/computetokens/SyncComputeTokens.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.aiplatform.v1beta1.stub.samples; + +// [START aiplatform_v1beta1_generated_LlmUtilityServiceStubSettings_ComputeTokens_sync] +import com.google.cloud.aiplatform.v1beta1.stub.LlmUtilityServiceStubSettings; +import java.time.Duration; + +public class SyncComputeTokens { + + public static void main(String[] args) throws Exception { + syncComputeTokens(); + } + + public static void syncComputeTokens() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + LlmUtilityServiceStubSettings.Builder llmUtilityServiceSettingsBuilder = + LlmUtilityServiceStubSettings.newBuilder(); + llmUtilityServiceSettingsBuilder + .computeTokensSettings() + .setRetrySettings( + llmUtilityServiceSettingsBuilder + .computeTokensSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + LlmUtilityServiceStubSettings llmUtilityServiceSettings = + llmUtilityServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1beta1_generated_LlmUtilityServiceStubSettings_ComputeTokens_sync]