Skip to content

Commit 7936db8

Browse files
1 parent f84b488 commit 7936db8

File tree

2,980 files changed

+3786
-2716522
lines changed

Some content is hidden

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

2,980 files changed

+3786
-2716522
lines changed

google/cloud/aiplatform_v1/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,8 @@
407407
from .types.feature_online_store_service import FeatureViewDirectWriteResponse
408408
from .types.feature_online_store_service import FetchFeatureValuesRequest
409409
from .types.feature_online_store_service import FetchFeatureValuesResponse
410+
from .types.feature_online_store_service import GenerateFetchAccessTokenRequest
411+
from .types.feature_online_store_service import GenerateFetchAccessTokenResponse
410412
from .types.feature_online_store_service import NearestNeighborQuery
411413
from .types.feature_online_store_service import NearestNeighbors
412414
from .types.feature_online_store_service import SearchNearestEntitiesRequest
@@ -1442,6 +1444,8 @@
14421444
"GenAiTuningServiceClient",
14431445
"GenerateContentRequest",
14441446
"GenerateContentResponse",
1447+
"GenerateFetchAccessTokenRequest",
1448+
"GenerateFetchAccessTokenResponse",
14451449
"GenerateSyntheticDataRequest",
14461450
"GenerateSyntheticDataResponse",
14471451
"GenerationConfig",

google/cloud/aiplatform_v1/gapic_metadata.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,11 @@
869869
"fetch_feature_values"
870870
]
871871
},
872+
"GenerateFetchAccessToken": {
873+
"methods": [
874+
"generate_fetch_access_token"
875+
]
876+
},
872877
"SearchNearestEntities": {
873878
"methods": [
874879
"search_nearest_entities"
@@ -889,6 +894,11 @@
889894
"fetch_feature_values"
890895
]
891896
},
897+
"GenerateFetchAccessToken": {
898+
"methods": [
899+
"generate_fetch_access_token"
900+
]
901+
},
892902
"SearchNearestEntities": {
893903
"methods": [
894904
"search_nearest_entities"
@@ -909,6 +919,11 @@
909919
"fetch_feature_values"
910920
]
911921
},
922+
"GenerateFetchAccessToken": {
923+
"methods": [
924+
"generate_fetch_access_token"
925+
]
926+
},
912927
"SearchNearestEntities": {
913928
"methods": [
914929
"search_nearest_entities"

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

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
from google.iam.v1 import policy_pb2 # type: ignore
5555
from google.longrunning import operations_pb2 # type: ignore
5656
from google.protobuf import struct_pb2 # type: ignore
57+
from google.protobuf import timestamp_pb2 # type: ignore
5758
from google.rpc import status_pb2 # type: ignore
5859
from .transports.base import FeatureOnlineStoreServiceTransport, DEFAULT_CLIENT_INFO
5960
from .transports.grpc_asyncio import FeatureOnlineStoreServiceGrpcAsyncIOTransport
@@ -635,6 +636,101 @@ def request_generator():
635636
# Done; return the response.
636637
return response
637638

639+
async def generate_fetch_access_token(
640+
self,
641+
request: Optional[
642+
Union[feature_online_store_service.GenerateFetchAccessTokenRequest, dict]
643+
] = None,
644+
*,
645+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
646+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
647+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
648+
) -> feature_online_store_service.GenerateFetchAccessTokenResponse:
649+
r"""RPC to generate an access token for the given feature
650+
view. FeatureViews under the same FeatureOnlineStore
651+
share the same access token.
652+
653+
.. code-block:: python
654+
655+
# This snippet has been automatically generated and should be regarded as a
656+
# code template only.
657+
# It will require modifications to work:
658+
# - It may require correct/in-range values for request initialization.
659+
# - It may require specifying regional endpoints when creating the service
660+
# client as shown in:
661+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
662+
from google.cloud import aiplatform_v1
663+
664+
async def sample_generate_fetch_access_token():
665+
# Create a client
666+
client = aiplatform_v1.FeatureOnlineStoreServiceAsyncClient()
667+
668+
# Initialize request argument(s)
669+
request = aiplatform_v1.GenerateFetchAccessTokenRequest(
670+
)
671+
672+
# Make the request
673+
response = await client.generate_fetch_access_token(request=request)
674+
675+
# Handle the response
676+
print(response)
677+
678+
Args:
679+
request (Optional[Union[google.cloud.aiplatform_v1.types.GenerateFetchAccessTokenRequest, dict]]):
680+
The request object. Request message for
681+
[FeatureOnlineStoreService.GenerateFetchAccessToken][google.cloud.aiplatform.v1.FeatureOnlineStoreService.GenerateFetchAccessToken].
682+
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
683+
should be retried.
684+
timeout (float): The timeout for this request.
685+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
686+
sent along with the request as metadata. Normally, each value must be of type `str`,
687+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
688+
be of type `bytes`.
689+
690+
Returns:
691+
google.cloud.aiplatform_v1.types.GenerateFetchAccessTokenResponse:
692+
Response message for
693+
[FeatureOnlineStoreService.GenerateFetchAccessToken][google.cloud.aiplatform.v1.FeatureOnlineStoreService.GenerateFetchAccessToken].
694+
695+
"""
696+
# Create or coerce a protobuf request object.
697+
# - Use the request object if provided (there's no risk of modifying the input as
698+
# there are no flattened fields), or create one.
699+
if not isinstance(
700+
request, feature_online_store_service.GenerateFetchAccessTokenRequest
701+
):
702+
request = feature_online_store_service.GenerateFetchAccessTokenRequest(
703+
request
704+
)
705+
706+
# Wrap the RPC method; this adds retry and timeout information,
707+
# and friendly error handling.
708+
rpc = self._client._transport._wrapped_methods[
709+
self._client._transport.generate_fetch_access_token
710+
]
711+
712+
# Certain fields should be provided within the metadata header;
713+
# add these here.
714+
metadata = tuple(metadata) + (
715+
gapic_v1.routing_header.to_grpc_metadata(
716+
(("feature_view", request.feature_view),)
717+
),
718+
)
719+
720+
# Validate the universe domain.
721+
self._client._validate_universe_domain()
722+
723+
# Send the request.
724+
response = await rpc(
725+
request,
726+
retry=retry,
727+
timeout=timeout,
728+
metadata=metadata,
729+
)
730+
731+
# Done; return the response.
732+
return response
733+
638734
async def list_operations(
639735
self,
640736
request: Optional[operations_pb2.ListOperationsRequest] = None,

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

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
from google.iam.v1 import policy_pb2 # type: ignore
7070
from google.longrunning import operations_pb2 # type: ignore
7171
from google.protobuf import struct_pb2 # type: ignore
72+
from google.protobuf import timestamp_pb2 # type: ignore
7273
from google.rpc import status_pb2 # type: ignore
7374
from .transports.base import FeatureOnlineStoreServiceTransport, DEFAULT_CLIENT_INFO
7475
from .transports.grpc import FeatureOnlineStoreServiceGrpcTransport
@@ -1087,6 +1088,101 @@ def request_generator():
10871088
# Done; return the response.
10881089
return response
10891090

1091+
def generate_fetch_access_token(
1092+
self,
1093+
request: Optional[
1094+
Union[feature_online_store_service.GenerateFetchAccessTokenRequest, dict]
1095+
] = None,
1096+
*,
1097+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1098+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1099+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
1100+
) -> feature_online_store_service.GenerateFetchAccessTokenResponse:
1101+
r"""RPC to generate an access token for the given feature
1102+
view. FeatureViews under the same FeatureOnlineStore
1103+
share the same access token.
1104+
1105+
.. code-block:: python
1106+
1107+
# This snippet has been automatically generated and should be regarded as a
1108+
# code template only.
1109+
# It will require modifications to work:
1110+
# - It may require correct/in-range values for request initialization.
1111+
# - It may require specifying regional endpoints when creating the service
1112+
# client as shown in:
1113+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
1114+
from google.cloud import aiplatform_v1
1115+
1116+
def sample_generate_fetch_access_token():
1117+
# Create a client
1118+
client = aiplatform_v1.FeatureOnlineStoreServiceClient()
1119+
1120+
# Initialize request argument(s)
1121+
request = aiplatform_v1.GenerateFetchAccessTokenRequest(
1122+
)
1123+
1124+
# Make the request
1125+
response = client.generate_fetch_access_token(request=request)
1126+
1127+
# Handle the response
1128+
print(response)
1129+
1130+
Args:
1131+
request (Union[google.cloud.aiplatform_v1.types.GenerateFetchAccessTokenRequest, dict]):
1132+
The request object. Request message for
1133+
[FeatureOnlineStoreService.GenerateFetchAccessToken][google.cloud.aiplatform.v1.FeatureOnlineStoreService.GenerateFetchAccessToken].
1134+
retry (google.api_core.retry.Retry): Designation of what errors, if any,
1135+
should be retried.
1136+
timeout (float): The timeout for this request.
1137+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1138+
sent along with the request as metadata. Normally, each value must be of type `str`,
1139+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
1140+
be of type `bytes`.
1141+
1142+
Returns:
1143+
google.cloud.aiplatform_v1.types.GenerateFetchAccessTokenResponse:
1144+
Response message for
1145+
[FeatureOnlineStoreService.GenerateFetchAccessToken][google.cloud.aiplatform.v1.FeatureOnlineStoreService.GenerateFetchAccessToken].
1146+
1147+
"""
1148+
# Create or coerce a protobuf request object.
1149+
# - Use the request object if provided (there's no risk of modifying the input as
1150+
# there are no flattened fields), or create one.
1151+
if not isinstance(
1152+
request, feature_online_store_service.GenerateFetchAccessTokenRequest
1153+
):
1154+
request = feature_online_store_service.GenerateFetchAccessTokenRequest(
1155+
request
1156+
)
1157+
1158+
# Wrap the RPC method; this adds retry and timeout information,
1159+
# and friendly error handling.
1160+
rpc = self._transport._wrapped_methods[
1161+
self._transport.generate_fetch_access_token
1162+
]
1163+
1164+
# Certain fields should be provided within the metadata header;
1165+
# add these here.
1166+
metadata = tuple(metadata) + (
1167+
gapic_v1.routing_header.to_grpc_metadata(
1168+
(("feature_view", request.feature_view),)
1169+
),
1170+
)
1171+
1172+
# Validate the universe domain.
1173+
self._validate_universe_domain()
1174+
1175+
# Send the request.
1176+
response = rpc(
1177+
request,
1178+
retry=retry,
1179+
timeout=timeout,
1180+
metadata=metadata,
1181+
)
1182+
1183+
# Done; return the response.
1184+
return response
1185+
10901186
def __enter__(self) -> "FeatureOnlineStoreServiceClient":
10911187
return self
10921188

google/cloud/aiplatform_v1/services/feature_online_store_service/transports/base.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ def _prep_wrapped_messages(self, client_info):
153153
default_timeout=None,
154154
client_info=client_info,
155155
),
156+
self.generate_fetch_access_token: gapic_v1.method.wrap_method(
157+
self.generate_fetch_access_token,
158+
default_timeout=None,
159+
client_info=client_info,
160+
),
156161
self.get_location: gapic_v1.method.wrap_method(
157162
self.get_location,
158163
default_timeout=None,
@@ -250,6 +255,18 @@ def feature_view_direct_write(
250255
]:
251256
raise NotImplementedError()
252257

258+
@property
259+
def generate_fetch_access_token(
260+
self,
261+
) -> Callable[
262+
[feature_online_store_service.GenerateFetchAccessTokenRequest],
263+
Union[
264+
feature_online_store_service.GenerateFetchAccessTokenResponse,
265+
Awaitable[feature_online_store_service.GenerateFetchAccessTokenResponse],
266+
],
267+
]:
268+
raise NotImplementedError()
269+
253270
@property
254271
def list_operations(
255272
self,

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,39 @@ def feature_view_direct_write(
421421
)
422422
return self._stubs["feature_view_direct_write"]
423423

424+
@property
425+
def generate_fetch_access_token(
426+
self,
427+
) -> Callable[
428+
[feature_online_store_service.GenerateFetchAccessTokenRequest],
429+
feature_online_store_service.GenerateFetchAccessTokenResponse,
430+
]:
431+
r"""Return a callable for the generate fetch access token method over gRPC.
432+
433+
RPC to generate an access token for the given feature
434+
view. FeatureViews under the same FeatureOnlineStore
435+
share the same access token.
436+
437+
Returns:
438+
Callable[[~.GenerateFetchAccessTokenRequest],
439+
~.GenerateFetchAccessTokenResponse]:
440+
A function that, when called, will call the underlying RPC
441+
on the server.
442+
"""
443+
# Generate a "stub function" on-the-fly which will actually make
444+
# the request.
445+
# gRPC handles serialization and deserialization, so we just need
446+
# to pass in the functions for each.
447+
if "generate_fetch_access_token" not in self._stubs:
448+
self._stubs["generate_fetch_access_token"] = (
449+
self._logged_channel.unary_unary(
450+
"/google.cloud.aiplatform.v1.FeatureOnlineStoreService/GenerateFetchAccessToken",
451+
request_serializer=feature_online_store_service.GenerateFetchAccessTokenRequest.serialize,
452+
response_deserializer=feature_online_store_service.GenerateFetchAccessTokenResponse.deserialize,
453+
)
454+
)
455+
return self._stubs["generate_fetch_access_token"]
456+
424457
def close(self):
425458
self._logged_channel.close()
426459

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

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,39 @@ def feature_view_direct_write(
429429
)
430430
return self._stubs["feature_view_direct_write"]
431431

432+
@property
433+
def generate_fetch_access_token(
434+
self,
435+
) -> Callable[
436+
[feature_online_store_service.GenerateFetchAccessTokenRequest],
437+
Awaitable[feature_online_store_service.GenerateFetchAccessTokenResponse],
438+
]:
439+
r"""Return a callable for the generate fetch access token method over gRPC.
440+
441+
RPC to generate an access token for the given feature
442+
view. FeatureViews under the same FeatureOnlineStore
443+
share the same access token.
444+
445+
Returns:
446+
Callable[[~.GenerateFetchAccessTokenRequest],
447+
Awaitable[~.GenerateFetchAccessTokenResponse]]:
448+
A function that, when called, will call the underlying RPC
449+
on the server.
450+
"""
451+
# Generate a "stub function" on-the-fly which will actually make
452+
# the request.
453+
# gRPC handles serialization and deserialization, so we just need
454+
# to pass in the functions for each.
455+
if "generate_fetch_access_token" not in self._stubs:
456+
self._stubs["generate_fetch_access_token"] = (
457+
self._logged_channel.unary_unary(
458+
"/google.cloud.aiplatform.v1.FeatureOnlineStoreService/GenerateFetchAccessToken",
459+
request_serializer=feature_online_store_service.GenerateFetchAccessTokenRequest.serialize,
460+
response_deserializer=feature_online_store_service.GenerateFetchAccessTokenResponse.deserialize,
461+
)
462+
)
463+
return self._stubs["generate_fetch_access_token"]
464+
432465
def _prep_wrapped_messages(self, client_info):
433466
"""Precompute the wrapped methods, overriding the base class method to use async wrappers."""
434467
self._wrapped_methods = {
@@ -447,6 +480,11 @@ def _prep_wrapped_messages(self, client_info):
447480
default_timeout=None,
448481
client_info=client_info,
449482
),
483+
self.generate_fetch_access_token: self._wrap_method(
484+
self.generate_fetch_access_token,
485+
default_timeout=None,
486+
client_info=client_info,
487+
),
450488
self.get_location: self._wrap_method(
451489
self.get_location,
452490
default_timeout=None,

0 commit comments

Comments
 (0)