Skip to content

Commit d682fac

Browse files
gcf-owl-bot[bot]copybara-github
authored andcommitted
Copybara import of the project:
-- 9655f21 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: adds DWS and spot VM feature support to custom batch predictions 2.0 PiperOrigin-RevId: 787184611 Source-Link: googleapis/googleapis@9abc113 Source-Link: googleapis/googleapis-gen@80b7edf Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODBiN2VkZjI1MGQxNzNlNTU3Y2RmMDgwMmM3YTdmNTBmNGZjMDQxOSJ9 -- 5fe30c1 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md -- 78e077f by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: build: add scripts to publish to Bazel Central Registry (BCR) PiperOrigin-RevId: 788097378 chore: regenerate gapic yaml and service yaml for privilegedaccessmanager by augmentation configs PiperOrigin-RevId: 788127000 chore: regenerate gapic yaml and service yaml for recaptchaenterprise beta by augmentation configs PiperOrigin-RevId: 788127088 chore: regenerate gapic yaml and service yaml for recaptchaenterprise by augmentation configs PiperOrigin-RevId: 788127191 chore: regenerate gapic yaml and service yaml for config by augmentation configs PiperOrigin-RevId: 788127291 chore: regenerate gapic yaml and service yaml for metastore alpha by augmentation configs PiperOrigin-RevId: 788127383 build: include all contents of the .bcr folder PiperOrigin-RevId: 788127546 feat: Remove private preview label from Model Armor protos PiperOrigin-RevId: 788251106 feat: add a FooBar API PiperOrigin-RevId: 788269006 feat: add the VeoTuningSpec PiperOrigin-RevId: 788536453 docs: update comments for rpc BatchCreatePullRequestComments, ResolvePullRequestComments and UnresolvePullRequestComments PiperOrigin-RevId: 788541778 build: include .bazelignore in this repository PiperOrigin-RevId: 788552876 Source-Link: googleapis/googleapis@8e5eb7e Source-Link: googleapis/googleapis-gen@c594542 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzU5NDU0MjQ1ZmRjMmI4YWM4MjlmNzZiNGM3OTcyZTQzYjQ2Yzc2ZCJ9 -- 16718c4 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md -- 85ae78e by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: add enable_datapoint_upsert_logging to google.cloud.aiplatform.v1.DeployedIndex PiperOrigin-RevId: 788600466 Source-Link: googleapis/googleapis@1bc3759 Source-Link: googleapis/googleapis-gen@6e29fb0 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmUyOWZiMGJjMWJiNWJjNzg4MzNiN2RhOTMyOTI0ZjJmN2U4YTQ2MSJ9 -- c3b90d4 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md -- 79568c1 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: Added the ability to use the Model Armor service for content sanitization PiperOrigin-RevId: 788957149 Source-Link: googleapis/googleapis@2d4fbff Source-Link: googleapis/googleapis-gen@fc4a4a0 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZmM0YTRhMDk5NTdiOGUwODA4YmJlNzBjZWJjNGQzMGRmY2NiMTBmNCJ9 -- 4875e7b by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md -- 8bd2e95 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: add enable_datapoint_upsert_logging to google.cloud.aiplatform.v1.DeployedIndex PiperOrigin-RevId: 789091292 Source-Link: googleapis/googleapis@abf48aa Source-Link: googleapis/googleapis-gen@06f6925 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDZmNjkyNWFkZTdkOGQwZWJkMjkxMzdlZTNiZTI0NTMyZWQ4OGQzNyJ9 -- aa2724d by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md -- 0c60393 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: add `DeploymentStage` for CreateEndpointOperationMetadata and DeployModelOperationMetadata docs: update MutateDeployedModel documentation PiperOrigin-RevId: 789150946 Source-Link: googleapis/googleapis@0e31cfe Source-Link: googleapis/googleapis-gen@3d4256d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2Q0MjU2ZGM5ZTNjN2VhODUyNjBmNWJjYTZlOWE2YWE4ZDM3YzU3NSJ9 -- fa2aca2 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md -- 157ce71 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: add `DeploymentStage` for CreateEndpointOperationMetadata and DeployModelOperationMetadata docs: update MutateDeployedModel documentation PiperOrigin-RevId: 789152949 Source-Link: googleapis/googleapis@e468628 Source-Link: googleapis/googleapis-gen@290211f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjkwMjExZmMwZjkxYjk0MDE0NDM0NzI1NGNjZTc1YjliMzczNjE4OCJ9 -- e54d37d by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md -- a47784d by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: add field ReasoningEngineSpec.service_account feat: add field ReasoningEngine.encryption_spec PiperOrigin-RevId: 789364610 Source-Link: googleapis/googleapis@bc9d698 Source-Link: googleapis/googleapis-gen@11671ae Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTE2NzFhZWFmZDNmODU1YWU3ZWFmMjJhZTNkNDI2YTM3YWJlYjhjMyJ9 -- 6032f38 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md -- 15dad37 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: add exclude_domains for grounding with GoogleSearch and EnterpriseWebSearch PiperOrigin-RevId: 790759548 Source-Link: googleapis/googleapis@ebcf3f5 Source-Link: googleapis/googleapis-gen@3d1ac34 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2QxYWMzNDI2NjEyOGEwZThkNzE3NjI3MGQ0ZTM2OWE4NjkwODMzNCJ9 -- faf5f86 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md -- 5639079 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: add embedding_metadata to google.cloud.aiplatform.v1.Index PiperOrigin-RevId: 790786891 Source-Link: googleapis/googleapis@5d7a4a6 Source-Link: googleapis/googleapis-gen@97ad4f6 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTdhZDRmNjQ3ZGRlZGQyYmVkNTFjODBhN2E2OGFlOWEzNzJkOGJiYSJ9 -- 201dfcd by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md -- 0d6759c by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: add embedding_metadata to google.cloud.aiplatform.v1.Index PiperOrigin-RevId: 790792075 Source-Link: googleapis/googleapis@cf13adf Source-Link: googleapis/googleapis-gen@c2c20f0 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzJjMjBmMDkyMjQyZDIzMTA4N2VjOTI3ZTI2ZDkwZDJlMDZhOTJmNSJ9 -- 774444d by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md -- 5631079 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: A new value `NVIDIA_GB200` is added to enum `AcceleratorType` PiperOrigin-RevId: 790824087 Source-Link: googleapis/googleapis@d2dbcdb Source-Link: googleapis/googleapis-gen@5dd29a4 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWRkMjlhNGVlYjI0ZDVlYzg2YjkzZTI0NWQ4OGExMDE2MTY1NGQxMSJ9 -- 2c7faac by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md -- 5b91611 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: A new value `NVIDIA_GB200` is added to enum `AcceleratorType` PiperOrigin-RevId: 790827122 Source-Link: googleapis/googleapis@682be6a Source-Link: googleapis/googleapis-gen@6907d56 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjkwN2Q1NmRjOTUzMDY2MzE5YmQ1NWYyZTkxYzBlNzg0ZjVmOWM1ZCJ9 -- 7aaec41 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: add exclude_domains for grounding with GoogleSearch and EnterpriseWebSearch PiperOrigin-RevId: 790856925 Source-Link: googleapis/googleapis@04158d4 Source-Link: googleapis/googleapis-gen@cd45833 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2Q0NTgzMzk2ZWUyNGMwY2FmM2U1ZDc0NzIwNWZjNWQ2MDIyNWNkNiJ9 -- ba48835 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md -- a4acc1f by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: Online Prediction DeployModel API to support custom metrics based autoscaling PiperOrigin-RevId: 790876508 Source-Link: googleapis/googleapis@f26b1c8 Source-Link: googleapis/googleapis-gen@fe9e26e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZmU5ZTI2ZTFmOWQ5NDAwNTY1OGE2ZGE3NmRjMDAyMzE5YTQ0OWUzOSJ9 -- f527396 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md -- ec3ff8f by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: add FeatureViewDirectWrite API in v1 PiperOrigin-RevId: 790876671 Source-Link: googleapis/googleapis@8c74a4f Source-Link: googleapis/googleapis-gen@43879fb Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDM4NzlmYmFhN2ZlOWY3NGI2NWFiMjVhNzM3ZDUxNTI5ZjEwN2Y3MiJ9 -- bbf07b0 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md COPYBARA_INTEGRATE_REVIEW=#5658 from googleapis:owl-bot-copy 507b089 PiperOrigin-RevId: 791817849
1 parent bc2e8f4 commit d682fac

File tree

75 files changed

+2000
-107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+2000
-107
lines changed

google/cloud/aiplatform_v1/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
from .types.content import GroundingSupport
120120
from .types.content import LogprobsResult
121121
from .types.content import ModalityTokenCount
122+
from .types.content import ModelArmorConfig
122123
from .types.content import Part
123124
from .types.content import RetrievalMetadata
124125
from .types.content import SafetyRating
@@ -198,6 +199,7 @@
198199
UpdateDeploymentResourcePoolOperationMetadata,
199200
)
200201
from .types.deployment_resource_pool_service import UpdateDeploymentResourcePoolRequest
202+
from .types.deployment_stage import DeploymentStage
201203
from .types.encryption_spec import EncryptionSpec
202204
from .types.endpoint import ClientConnectionConfig
203205
from .types.endpoint import DeployedModel
@@ -393,6 +395,8 @@
393395
from .types.feature_online_store_admin_service import UpdateFeatureViewOperationMetadata
394396
from .types.feature_online_store_admin_service import UpdateFeatureViewRequest
395397
from .types.feature_online_store_service import FeatureViewDataKey
398+
from .types.feature_online_store_service import FeatureViewDirectWriteRequest
399+
from .types.feature_online_store_service import FeatureViewDirectWriteResponse
396400
from .types.feature_online_store_service import FetchFeatureValuesRequest
397401
from .types.feature_online_store_service import FetchFeatureValuesResponse
398402
from .types.feature_online_store_service import NearestNeighborQuery
@@ -1319,6 +1323,7 @@
13191323
"DeployedModelRef",
13201324
"DeploymentResourcePool",
13211325
"DeploymentResourcePoolServiceClient",
1326+
"DeploymentStage",
13221327
"DestinationFeatureSetting",
13231328
"DirectPredictRequest",
13241329
"DirectPredictResponse",
@@ -1392,6 +1397,8 @@
13921397
"FeatureView",
13931398
"FeatureViewDataFormat",
13941399
"FeatureViewDataKey",
1400+
"FeatureViewDirectWriteRequest",
1401+
"FeatureViewDirectWriteResponse",
13951402
"FeatureViewSync",
13961403
"Featurestore",
13971404
"FeaturestoreMonitoringConfig",
@@ -1644,6 +1651,7 @@
16441651
"Modality",
16451652
"ModalityTokenCount",
16461653
"Model",
1654+
"ModelArmorConfig",
16471655
"ModelContainerSpec",
16481656
"ModelDeploymentMonitoringBigQueryTable",
16491657
"ModelDeploymentMonitoringJob",

google/cloud/aiplatform_v1/gapic_metadata.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,11 @@
825825
"grpc": {
826826
"libraryClient": "FeatureOnlineStoreServiceClient",
827827
"rpcs": {
828+
"FeatureViewDirectWrite": {
829+
"methods": [
830+
"feature_view_direct_write"
831+
]
832+
},
828833
"FetchFeatureValues": {
829834
"methods": [
830835
"fetch_feature_values"
@@ -840,6 +845,11 @@
840845
"grpc-async": {
841846
"libraryClient": "FeatureOnlineStoreServiceAsyncClient",
842847
"rpcs": {
848+
"FeatureViewDirectWrite": {
849+
"methods": [
850+
"feature_view_direct_write"
851+
]
852+
},
843853
"FetchFeatureValues": {
844854
"methods": [
845855
"fetch_feature_values"
@@ -855,6 +865,11 @@
855865
"rest": {
856866
"libraryClient": "FeatureOnlineStoreServiceClient",
857867
"rpcs": {
868+
"FeatureViewDirectWrite": {
869+
"methods": [
870+
"feature_view_direct_write"
871+
]
872+
},
858873
"FetchFeatureValues": {
859874
"methods": [
860875
"fetch_feature_values"

google/cloud/aiplatform_v1/services/endpoint_service/async_client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,8 +1460,9 @@ async def mutate_deployed_model(
14601460
) -> operation_async.AsyncOperation:
14611461
r"""Updates an existing deployed model. Updatable fields include
14621462
``min_replica_count``, ``max_replica_count``,
1463-
``autoscaling_metric_specs``, ``disable_container_logging`` (v1
1464-
only), and ``enable_container_logging`` (v1beta1 only).
1463+
``required_replica_count``, ``autoscaling_metric_specs``,
1464+
``disable_container_logging`` (v1 only), and
1465+
``enable_container_logging`` (v1beta1 only).
14651466
14661467
.. code-block:: python
14671468
@@ -1521,6 +1522,8 @@ async def sample_mutate_deployed_model():
15211522
[DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources]
15221523
or
15231524
[AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
1525+
- ``required_replica_count`` in
1526+
[DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources]
15241527
- [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
15251528
- ``disable_container_logging`` (v1 only)
15261529
- ``enable_container_logging`` (v1beta1 only)

google/cloud/aiplatform_v1/services/endpoint_service/client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1986,8 +1986,9 @@ def mutate_deployed_model(
19861986
) -> gac_operation.Operation:
19871987
r"""Updates an existing deployed model. Updatable fields include
19881988
``min_replica_count``, ``max_replica_count``,
1989-
``autoscaling_metric_specs``, ``disable_container_logging`` (v1
1990-
only), and ``enable_container_logging`` (v1beta1 only).
1989+
``required_replica_count``, ``autoscaling_metric_specs``,
1990+
``disable_container_logging`` (v1 only), and
1991+
``enable_container_logging`` (v1beta1 only).
19911992
19921993
.. code-block:: python
19931994
@@ -2047,6 +2048,8 @@ def sample_mutate_deployed_model():
20472048
[DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources]
20482049
or
20492050
[AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
2051+
- ``required_replica_count`` in
2052+
[DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources]
20502053
- [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
20512054
- ``disable_container_logging`` (v1 only)
20522055
- ``enable_container_logging`` (v1beta1 only)

google/cloud/aiplatform_v1/services/endpoint_service/transports/grpc.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,8 +571,9 @@ def mutate_deployed_model(
571571
572572
Updates an existing deployed model. Updatable fields include
573573
``min_replica_count``, ``max_replica_count``,
574-
``autoscaling_metric_specs``, ``disable_container_logging`` (v1
575-
only), and ``enable_container_logging`` (v1beta1 only).
574+
``required_replica_count``, ``autoscaling_metric_specs``,
575+
``disable_container_logging`` (v1 only), and
576+
``enable_container_logging`` (v1beta1 only).
576577
577578
Returns:
578579
Callable[[~.MutateDeployedModelRequest],

google/cloud/aiplatform_v1/services/endpoint_service/transports/grpc_asyncio.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,8 +592,9 @@ def mutate_deployed_model(
592592
593593
Updates an existing deployed model. Updatable fields include
594594
``min_replica_count``, ``max_replica_count``,
595-
``autoscaling_metric_specs``, ``disable_container_logging`` (v1
596-
only), and ``enable_container_logging`` (v1beta1 only).
595+
``required_replica_count``, ``autoscaling_metric_specs``,
596+
``disable_container_logging`` (v1 only), and
597+
``enable_container_logging`` (v1beta1 only).
597598
598599
Returns:
599600
Callable[[~.MutateDeployedModelRequest],

google/cloud/aiplatform_v1/services/feature_online_store_service/async_client.py

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
MutableMapping,
2424
MutableSequence,
2525
Optional,
26+
AsyncIterable,
27+
Awaitable,
28+
AsyncIterator,
2629
Sequence,
2730
Tuple,
2831
Type,
@@ -51,6 +54,7 @@
5154
from google.iam.v1 import policy_pb2 # type: ignore
5255
from google.longrunning import operations_pb2 # type: ignore
5356
from google.protobuf import struct_pb2 # type: ignore
57+
from google.rpc import status_pb2 # type: ignore
5458
from .transports.base import FeatureOnlineStoreServiceTransport, DEFAULT_CLIENT_INFO
5559
from .transports.grpc_asyncio import FeatureOnlineStoreServiceGrpcAsyncIOTransport
5660
from .client import FeatureOnlineStoreServiceClient
@@ -533,6 +537,102 @@ async def sample_search_nearest_entities():
533537
# Done; return the response.
534538
return response
535539

540+
def feature_view_direct_write(
541+
self,
542+
requests: Optional[
543+
AsyncIterator[feature_online_store_service.FeatureViewDirectWriteRequest]
544+
] = None,
545+
*,
546+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
547+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
548+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
549+
) -> Awaitable[
550+
AsyncIterable[feature_online_store_service.FeatureViewDirectWriteResponse]
551+
]:
552+
r"""Bidirectional streaming RPC to directly write to
553+
feature values in a feature view. Requests may not have
554+
a one-to-one mapping to responses and responses may be
555+
returned out-of-order to reduce latency.
556+
557+
.. code-block:: python
558+
559+
# This snippet has been automatically generated and should be regarded as a
560+
# code template only.
561+
# It will require modifications to work:
562+
# - It may require correct/in-range values for request initialization.
563+
# - It may require specifying regional endpoints when creating the service
564+
# client as shown in:
565+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
566+
from google.cloud import aiplatform_v1
567+
568+
async def sample_feature_view_direct_write():
569+
# Create a client
570+
client = aiplatform_v1.FeatureOnlineStoreServiceAsyncClient()
571+
572+
# Initialize request argument(s)
573+
request = aiplatform_v1.FeatureViewDirectWriteRequest(
574+
)
575+
576+
# This method expects an iterator which contains
577+
# 'aiplatform_v1.FeatureViewDirectWriteRequest' objects
578+
# Here we create a generator that yields a single `request` for
579+
# demonstrative purposes.
580+
requests = [request]
581+
582+
def request_generator():
583+
for request in requests:
584+
yield request
585+
586+
# Make the request
587+
stream = await client.feature_view_direct_write(requests=request_generator())
588+
589+
# Handle the response
590+
async for response in stream:
591+
print(response)
592+
593+
Args:
594+
requests (AsyncIterator[`google.cloud.aiplatform_v1.types.FeatureViewDirectWriteRequest`]):
595+
The request object AsyncIterator. Request message for
596+
[FeatureOnlineStoreService.FeatureViewDirectWrite][google.cloud.aiplatform.v1.FeatureOnlineStoreService.FeatureViewDirectWrite].
597+
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
598+
should be retried.
599+
timeout (float): The timeout for this request.
600+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
601+
sent along with the request as metadata. Normally, each value must be of type `str`,
602+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
603+
be of type `bytes`.
604+
605+
Returns:
606+
AsyncIterable[google.cloud.aiplatform_v1.types.FeatureViewDirectWriteResponse]:
607+
Response message for
608+
[FeatureOnlineStoreService.FeatureViewDirectWrite][google.cloud.aiplatform.v1.FeatureOnlineStoreService.FeatureViewDirectWrite].
609+
610+
"""
611+
612+
# Wrap the RPC method; this adds retry and timeout information,
613+
# and friendly error handling.
614+
rpc = self._client._transport._wrapped_methods[
615+
self._client._transport.feature_view_direct_write
616+
]
617+
618+
# Certain fields should be provided within the metadata header;
619+
# add these here.
620+
metadata = tuple(metadata) + (gapic_v1.routing_header.to_grpc_metadata(()),)
621+
622+
# Validate the universe domain.
623+
self._client._validate_universe_domain()
624+
625+
# Send the request.
626+
response = rpc(
627+
requests,
628+
retry=retry,
629+
timeout=timeout,
630+
metadata=metadata,
631+
)
632+
633+
# Done; return the response.
634+
return response
635+
536636
async def list_operations(
537637
self,
538638
request: Optional[operations_pb2.ListOperationsRequest] = None,

google/cloud/aiplatform_v1/services/feature_online_store_service/client.py

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
MutableMapping,
2727
MutableSequence,
2828
Optional,
29+
Iterable,
30+
Iterator,
2931
Sequence,
3032
Tuple,
3133
Type,
@@ -67,6 +69,7 @@
6769
from google.iam.v1 import policy_pb2 # type: ignore
6870
from google.longrunning import operations_pb2 # type: ignore
6971
from google.protobuf import struct_pb2 # type: ignore
72+
from google.rpc import status_pb2 # type: ignore
7073
from .transports.base import FeatureOnlineStoreServiceTransport, DEFAULT_CLIENT_INFO
7174
from .transports.grpc import FeatureOnlineStoreServiceGrpcTransport
7275
from .transports.grpc_asyncio import FeatureOnlineStoreServiceGrpcAsyncIOTransport
@@ -988,6 +991,100 @@ def sample_search_nearest_entities():
988991
# Done; return the response.
989992
return response
990993

994+
def feature_view_direct_write(
995+
self,
996+
requests: Optional[
997+
Iterator[feature_online_store_service.FeatureViewDirectWriteRequest]
998+
] = None,
999+
*,
1000+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1001+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1002+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
1003+
) -> Iterable[feature_online_store_service.FeatureViewDirectWriteResponse]:
1004+
r"""Bidirectional streaming RPC to directly write to
1005+
feature values in a feature view. Requests may not have
1006+
a one-to-one mapping to responses and responses may be
1007+
returned out-of-order to reduce latency.
1008+
1009+
.. code-block:: python
1010+
1011+
# This snippet has been automatically generated and should be regarded as a
1012+
# code template only.
1013+
# It will require modifications to work:
1014+
# - It may require correct/in-range values for request initialization.
1015+
# - It may require specifying regional endpoints when creating the service
1016+
# client as shown in:
1017+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
1018+
from google.cloud import aiplatform_v1
1019+
1020+
def sample_feature_view_direct_write():
1021+
# Create a client
1022+
client = aiplatform_v1.FeatureOnlineStoreServiceClient()
1023+
1024+
# Initialize request argument(s)
1025+
request = aiplatform_v1.FeatureViewDirectWriteRequest(
1026+
)
1027+
1028+
# This method expects an iterator which contains
1029+
# 'aiplatform_v1.FeatureViewDirectWriteRequest' objects
1030+
# Here we create a generator that yields a single `request` for
1031+
# demonstrative purposes.
1032+
requests = [request]
1033+
1034+
def request_generator():
1035+
for request in requests:
1036+
yield request
1037+
1038+
# Make the request
1039+
stream = client.feature_view_direct_write(requests=request_generator())
1040+
1041+
# Handle the response
1042+
for response in stream:
1043+
print(response)
1044+
1045+
Args:
1046+
requests (Iterator[google.cloud.aiplatform_v1.types.FeatureViewDirectWriteRequest]):
1047+
The request object iterator. Request message for
1048+
[FeatureOnlineStoreService.FeatureViewDirectWrite][google.cloud.aiplatform.v1.FeatureOnlineStoreService.FeatureViewDirectWrite].
1049+
retry (google.api_core.retry.Retry): Designation of what errors, if any,
1050+
should be retried.
1051+
timeout (float): The timeout for this request.
1052+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1053+
sent along with the request as metadata. Normally, each value must be of type `str`,
1054+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
1055+
be of type `bytes`.
1056+
1057+
Returns:
1058+
Iterable[google.cloud.aiplatform_v1.types.FeatureViewDirectWriteResponse]:
1059+
Response message for
1060+
[FeatureOnlineStoreService.FeatureViewDirectWrite][google.cloud.aiplatform.v1.FeatureOnlineStoreService.FeatureViewDirectWrite].
1061+
1062+
"""
1063+
1064+
# Wrap the RPC method; this adds retry and timeout information,
1065+
# and friendly error handling.
1066+
rpc = self._transport._wrapped_methods[
1067+
self._transport.feature_view_direct_write
1068+
]
1069+
1070+
# Certain fields should be provided within the metadata header;
1071+
# add these here.
1072+
metadata = tuple(metadata) + (gapic_v1.routing_header.to_grpc_metadata(()),)
1073+
1074+
# Validate the universe domain.
1075+
self._validate_universe_domain()
1076+
1077+
# Send the request.
1078+
response = rpc(
1079+
requests,
1080+
retry=retry,
1081+
timeout=timeout,
1082+
metadata=metadata,
1083+
)
1084+
1085+
# Done; return the response.
1086+
return response
1087+
9911088
def __enter__(self) -> "FeatureOnlineStoreServiceClient":
9921089
return self
9931090

0 commit comments

Comments
 (0)