Skip to content

Commit

Permalink
🦉 Updates from OwlBot post-processor
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] committed Jul 12, 2023
1 parent 330ca6b commit acb959d
Show file tree
Hide file tree
Showing 1,685 changed files with 5,977 additions and 681,086 deletions.
1 change: 1 addition & 0 deletions docs/aiplatform_v1beta1/services.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Services for Google Cloud Aiplatform v1beta1 API
migration_service
model_garden_service
model_service
persistent_resource_service
pipeline_service
prediction_service
schedule_service
Expand Down
30 changes: 30 additions & 0 deletions google/cloud/aiplatform_v1beta1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
from .services.model_garden_service import ModelGardenServiceAsyncClient
from .services.model_service import ModelServiceClient
from .services.model_service import ModelServiceAsyncClient
from .services.persistent_resource_service import PersistentResourceServiceClient
from .services.persistent_resource_service import PersistentResourceServiceAsyncClient
from .services.pipeline_service import PipelineServiceClient
from .services.pipeline_service import PipelineServiceAsyncClient
from .services.prediction_service import PredictionServiceClient
Expand Down Expand Up @@ -91,6 +93,7 @@
from .types.dataset_service import CreateDatasetRequest
from .types.dataset_service import DataItemView
from .types.dataset_service import DeleteDatasetRequest
from .types.dataset_service import DeleteSavedQueryRequest
from .types.dataset_service import ExportDataOperationMetadata
from .types.dataset_service import ExportDataRequest
from .types.dataset_service import ExportDataResponse
Expand Down Expand Up @@ -461,6 +464,16 @@
from .types.nas_job import NasTrialDetail
from .types.operation import DeleteOperationMetadata
from .types.operation import GenericOperationMetadata
from .types.persistent_resource import PersistentResource
from .types.persistent_resource import ResourcePool
from .types.persistent_resource import ResourceRuntimeSpec
from .types.persistent_resource import ServiceAccountSpec
from .types.persistent_resource_service import CreatePersistentResourceOperationMetadata
from .types.persistent_resource_service import CreatePersistentResourceRequest
from .types.persistent_resource_service import DeletePersistentResourceRequest
from .types.persistent_resource_service import GetPersistentResourceRequest
from .types.persistent_resource_service import ListPersistentResourcesRequest
from .types.persistent_resource_service import ListPersistentResourcesResponse
from .types.pipeline_failure_policy import PipelineFailurePolicy
from .types.pipeline_job import PipelineJob
from .types.pipeline_job import PipelineJobDetail
Expand Down Expand Up @@ -550,6 +563,8 @@
from .types.tensorboard_service import ListTensorboardTimeSeriesResponse
from .types.tensorboard_service import ReadTensorboardBlobDataRequest
from .types.tensorboard_service import ReadTensorboardBlobDataResponse
from .types.tensorboard_service import ReadTensorboardSizeRequest
from .types.tensorboard_service import ReadTensorboardSizeResponse
from .types.tensorboard_service import ReadTensorboardTimeSeriesDataRequest
from .types.tensorboard_service import ReadTensorboardTimeSeriesDataResponse
from .types.tensorboard_service import ReadTensorboardUsageRequest
Expand Down Expand Up @@ -615,6 +630,7 @@
"MigrationServiceAsyncClient",
"ModelGardenServiceAsyncClient",
"ModelServiceAsyncClient",
"PersistentResourceServiceAsyncClient",
"PipelineServiceAsyncClient",
"PredictionServiceAsyncClient",
"ScheduleServiceAsyncClient",
Expand Down Expand Up @@ -708,6 +724,8 @@
"CreateMetadataStoreRequest",
"CreateModelDeploymentMonitoringJobRequest",
"CreateNasJobRequest",
"CreatePersistentResourceOperationMetadata",
"CreatePersistentResourceRequest",
"CreatePipelineJobRequest",
"CreateScheduleRequest",
"CreateSpecialistPoolOperationMetadata",
Expand Down Expand Up @@ -755,7 +773,9 @@
"DeleteModelVersionRequest",
"DeleteNasJobRequest",
"DeleteOperationMetadata",
"DeletePersistentResourceRequest",
"DeletePipelineJobRequest",
"DeleteSavedQueryRequest",
"DeleteScheduleRequest",
"DeleteSpecialistPoolRequest",
"DeleteStudyRequest",
Expand Down Expand Up @@ -858,6 +878,7 @@
"GetModelRequest",
"GetNasJobRequest",
"GetNasTrialDetailRequest",
"GetPersistentResourceRequest",
"GetPipelineJobRequest",
"GetPublisherModelRequest",
"GetScheduleRequest",
Expand Down Expand Up @@ -947,6 +968,8 @@
"ListNasTrialDetailsResponse",
"ListOptimalTrialsRequest",
"ListOptimalTrialsResponse",
"ListPersistentResourcesRequest",
"ListPersistentResourcesResponse",
"ListPipelineJobsRequest",
"ListPipelineJobsResponse",
"ListSavedQueriesRequest",
Expand Down Expand Up @@ -1015,6 +1038,8 @@
"NfsMount",
"PauseModelDeploymentMonitoringJobRequest",
"PauseScheduleRequest",
"PersistentResource",
"PersistentResourceServiceClient",
"PipelineFailurePolicy",
"PipelineJob",
"PipelineJobDetail",
Expand Down Expand Up @@ -1057,6 +1082,8 @@
"ReadIndexDatapointsResponse",
"ReadTensorboardBlobDataRequest",
"ReadTensorboardBlobDataResponse",
"ReadTensorboardSizeRequest",
"ReadTensorboardSizeResponse",
"ReadTensorboardTimeSeriesDataRequest",
"ReadTensorboardTimeSeriesDataResponse",
"ReadTensorboardUsageRequest",
Expand All @@ -1065,6 +1092,8 @@
"RemoveContextChildrenResponse",
"RemoveDatapointsRequest",
"RemoveDatapointsResponse",
"ResourcePool",
"ResourceRuntimeSpec",
"ResourcesConsumed",
"ResumeModelDeploymentMonitoringJobRequest",
"ResumeScheduleRequest",
Expand All @@ -1084,6 +1113,7 @@
"SearchMigratableResourcesResponse",
"SearchModelDeploymentMonitoringStatsAnomaliesRequest",
"SearchModelDeploymentMonitoringStatsAnomaliesResponse",
"ServiceAccountSpec",
"SmoothGradConfig",
"SpecialistPool",
"SpecialistPoolServiceClient",
Expand Down
74 changes: 74 additions & 0 deletions google/cloud/aiplatform_v1beta1/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
"delete_dataset"
]
},
"DeleteSavedQuery": {
"methods": [
"delete_saved_query"
]
},
"ExportData": {
"methods": [
"export_data"
Expand Down Expand Up @@ -85,6 +90,11 @@
"delete_dataset"
]
},
"DeleteSavedQuery": {
"methods": [
"delete_saved_query"
]
},
"ExportData": {
"methods": [
"export_data"
Expand Down Expand Up @@ -1727,6 +1737,60 @@
}
}
},
"PersistentResourceService": {
"clients": {
"grpc": {
"libraryClient": "PersistentResourceServiceClient",
"rpcs": {
"CreatePersistentResource": {
"methods": [
"create_persistent_resource"
]
},
"DeletePersistentResource": {
"methods": [
"delete_persistent_resource"
]
},
"GetPersistentResource": {
"methods": [
"get_persistent_resource"
]
},
"ListPersistentResources": {
"methods": [
"list_persistent_resources"
]
}
}
},
"grpc-async": {
"libraryClient": "PersistentResourceServiceAsyncClient",
"rpcs": {
"CreatePersistentResource": {
"methods": [
"create_persistent_resource"
]
},
"DeletePersistentResource": {
"methods": [
"delete_persistent_resource"
]
},
"GetPersistentResource": {
"methods": [
"get_persistent_resource"
]
},
"ListPersistentResources": {
"methods": [
"list_persistent_resources"
]
}
}
}
}
},
"PipelineService": {
"clients": {
"grpc": {
Expand Down Expand Up @@ -2143,6 +2207,11 @@
"read_tensorboard_blob_data"
]
},
"ReadTensorboardSize": {
"methods": [
"read_tensorboard_size"
]
},
"ReadTensorboardTimeSeriesData": {
"methods": [
"read_tensorboard_time_series_data"
Expand Down Expand Up @@ -2293,6 +2362,11 @@
"read_tensorboard_blob_data"
]
},
"ReadTensorboardSize": {
"methods": [
"read_tensorboard_size"
]
},
"ReadTensorboardTimeSeriesData": {
"methods": [
"read_tensorboard_time_series_data"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@


class DatasetServiceAsyncClient:
"""The service that handles the CRUD of Vertex AI Dataset and
its child resources.
"""The service that manages Vertex AI Dataset and its child
resources.
"""

_client: DatasetServiceClient
Expand Down Expand Up @@ -1430,6 +1430,131 @@ async def sample_list_saved_queries():
# Done; return the response.
return response

async def delete_saved_query(
self,
request: Optional[Union[dataset_service.DeleteSavedQueryRequest, dict]] = None,
*,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Deletes a SavedQuery.
.. code-block:: python
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1beta1
async def sample_delete_saved_query():
# Create a client
client = aiplatform_v1beta1.DatasetServiceAsyncClient()
# Initialize request argument(s)
request = aiplatform_v1beta1.DeleteSavedQueryRequest(
name="name_value",
)
# Make the request
operation = client.delete_saved_query(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Args:
request (Optional[Union[google.cloud.aiplatform_v1beta1.types.DeleteSavedQueryRequest, dict]]):
The request object. Request message for
[DatasetService.DeleteSavedQuery][google.cloud.aiplatform.v1beta1.DatasetService.DeleteSavedQuery].
name (:class:`str`):
Required. The resource name of the SavedQuery to delete.
Format:
``projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}``
This corresponds to the ``name`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
sent along with the request as metadata.
Returns:
google.api_core.operation_async.AsyncOperation:
An object representing a long-running operation.
The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated
empty messages in your APIs. A typical example is to
use it as the request or the response type of an API
method. For instance:
service Foo {
rpc Bar(google.protobuf.Empty) returns
(google.protobuf.Empty);
}
"""
# Create or coerce a protobuf request object.
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
raise ValueError(
"If the `request` argument is set, then none of "
"the individual field arguments should be set."
)

request = dataset_service.DeleteSavedQueryRequest(request)

# If we have keyword arguments corresponding to fields on the
# request, apply these.
if name is not None:
request.name = name

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.delete_saved_query,
default_timeout=None,
client_info=DEFAULT_CLIENT_INFO,
)

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
)

# Send the request.
response = await rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Wrap the response in an operation future.
response = operation_async.from_gapic(
response,
self._client._transport.operations_client,
empty_pb2.Empty,
metadata_type=gca_operation.DeleteOperationMetadata,
)

# Done; return the response.
return response

async def get_annotation_spec(
self,
request: Optional[Union[dataset_service.GetAnnotationSpecRequest, dict]] = None,
Expand Down
Loading

0 comments on commit acb959d

Please sign in to comment.