Skip to content
Open
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import proto # type: ignore

from google.protobuf import struct_pb2 # type: ignore
import google.protobuf.struct_pb2 as struct_pb2 # type: ignore


__protobuf__ = proto.module(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import proto # type: ignore

from google.protobuf import duration_pb2 # type: ignore
from google.protobuf import wrappers_pb2 # type: ignore
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
import google.protobuf.wrappers_pb2 as wrappers_pb2 # type: ignore


__protobuf__ = proto.module(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import proto # type: ignore

from google.protobuf import duration_pb2 # type: ignore
from google.protobuf import wrappers_pb2 # type: ignore
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
import google.protobuf.wrappers_pb2 as wrappers_pb2 # type: ignore


__protobuf__ = proto.module(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import proto # type: ignore

from google.protobuf import duration_pb2 # type: ignore
from google.protobuf import wrappers_pb2 # type: ignore
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
import google.protobuf.wrappers_pb2 as wrappers_pb2 # type: ignore


__protobuf__ = proto.module(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import proto # type: ignore

from google.protobuf import struct_pb2 # type: ignore
import google.protobuf.struct_pb2 as struct_pb2 # type: ignore


__protobuf__ = proto.module(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import proto # type: ignore

from google.protobuf import duration_pb2 # type: ignore
from google.protobuf import wrappers_pb2 # type: ignore
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
import google.protobuf.wrappers_pb2 as wrappers_pb2 # type: ignore


__protobuf__ = proto.module(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import proto # type: ignore

from google.protobuf import duration_pb2 # type: ignore
from google.protobuf import wrappers_pb2 # type: ignore
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
import google.protobuf.wrappers_pb2 as wrappers_pb2 # type: ignore


__protobuf__ = proto.module(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import proto # type: ignore

from google.protobuf import duration_pb2 # type: ignore
from google.protobuf import wrappers_pb2 # type: ignore
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
import google.protobuf.wrappers_pb2 as wrappers_pb2 # type: ignore


__protobuf__ = proto.module(
Expand Down
4 changes: 4 additions & 0 deletions google/cloud/aiplatform_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,8 @@
from .types.io import SharePointSources
from .types.io import SlackSource
from .types.io import TFRecordDestination
from .types.io import VertexMultimodalDatasetDestination
from .types.io import VertexMultimodalDatasetSource
from .types.job_service import CancelBatchPredictionJobRequest
from .types.job_service import CancelCustomJobRequest
from .types.job_service import CancelDataLabelingJobRequest
Expand Down Expand Up @@ -2198,6 +2200,8 @@ def _get_version(dependency_name):
"Value",
"VertexAISearch",
"VertexAiSearchConfig",
"VertexMultimodalDatasetDestination",
"VertexMultimodalDatasetSource",
"VertexRagDataServiceClient",
"VertexRagServiceClient",
"VertexRagStore",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ def from_service_account_info(cls, info: dict, *args, **kwargs):
Returns:
DataFoundryServiceAsyncClient: The constructed client.
"""
return DataFoundryServiceClient.from_service_account_info.__func__(DataFoundryServiceAsyncClient, info, *args, **kwargs) # type: ignore
sa_info_func = (
DataFoundryServiceClient.from_service_account_info.__func__ # type: ignore
)
return sa_info_func(DataFoundryServiceAsyncClient, info, *args, **kwargs)

@classmethod
def from_service_account_file(cls, filename: str, *args, **kwargs):
Expand All @@ -132,7 +135,10 @@ def from_service_account_file(cls, filename: str, *args, **kwargs):
Returns:
DataFoundryServiceAsyncClient: The constructed client.
"""
return DataFoundryServiceClient.from_service_account_file.__func__(DataFoundryServiceAsyncClient, filename, *args, **kwargs) # type: ignore
sa_file_func = (
DataFoundryServiceClient.from_service_account_file.__func__ # type: ignore
)
return sa_file_func(DataFoundryServiceAsyncClient, filename, *args, **kwargs)

from_service_account_json = from_service_account_file

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ def __init__(
be used for service account credentials.
"""

scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES}

# Save the scopes.
self._scopes = scopes
if not hasattr(self, "_ignore_credentials"):
Expand All @@ -103,11 +101,16 @@ def __init__(

if credentials_file is not None:
credentials, _ = google.auth.load_credentials_from_file(
credentials_file, **scopes_kwargs, quota_project_id=quota_project_id
credentials_file,
scopes=scopes,
quota_project_id=quota_project_id,
default_scopes=self.AUTH_SCOPES,
)
elif credentials is None and not self._ignore_credentials:
credentials, _ = google.auth.default(
**scopes_kwargs, quota_project_id=quota_project_id
scopes=scopes,
quota_project_id=quota_project_id,
default_scopes=self.AUTH_SCOPES,
)
# Don't apply audience if the credentials file passed from user.
if hasattr(credentials, "with_gdch_audience"):
Expand Down
29 changes: 15 additions & 14 deletions google/cloud/aiplatform_v1/services/dataset_service/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.AsyncRetry, object, None] # type: ignore

from google.api_core import operation as gac_operation # type: ignore
from google.api_core import operation_async # type: ignore
from google.cloud.aiplatform_v1.services.dataset_service import pagers
from google.cloud.aiplatform_v1.types import annotation
from google.cloud.aiplatform_v1.types import annotation_spec
Expand All @@ -63,10 +61,12 @@
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.longrunning import operations_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import struct_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore
import google.api_core.operation as gac_operation # type: ignore
import google.api_core.operation_async as operation_async # type: ignore
import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
import google.protobuf.struct_pb2 as struct_pb2 # type: ignore
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
from .transports.base import DatasetServiceTransport, DEFAULT_CLIENT_INFO
from .transports.grpc_asyncio import DatasetServiceGrpcAsyncIOTransport
from .client import DatasetServiceClient
Expand Down Expand Up @@ -149,7 +149,10 @@ def from_service_account_info(cls, info: dict, *args, **kwargs):
Returns:
DatasetServiceAsyncClient: The constructed client.
"""
return DatasetServiceClient.from_service_account_info.__func__(DatasetServiceAsyncClient, info, *args, **kwargs) # type: ignore
sa_info_func = (
DatasetServiceClient.from_service_account_info.__func__ # type: ignore
)
return sa_info_func(DatasetServiceAsyncClient, info, *args, **kwargs)

@classmethod
def from_service_account_file(cls, filename: str, *args, **kwargs):
Expand All @@ -165,7 +168,10 @@ def from_service_account_file(cls, filename: str, *args, **kwargs):
Returns:
DatasetServiceAsyncClient: The constructed client.
"""
return DatasetServiceClient.from_service_account_file.__func__(DatasetServiceAsyncClient, filename, *args, **kwargs) # type: ignore
sa_file_func = (
DatasetServiceClient.from_service_account_file.__func__ # type: ignore
)
return sa_file_func(DatasetServiceAsyncClient, filename, *args, **kwargs)

from_service_account_json = from_service_account_file

Expand Down Expand Up @@ -507,7 +513,6 @@ async def sample_get_dataset():
request (Optional[Union[google.cloud.aiplatform_v1.types.GetDatasetRequest, dict]]):
The request object. Request message for
[DatasetService.GetDataset][google.cloud.aiplatform.v1.DatasetService.GetDataset].
Next ID: 4
name (:class:`str`):
Required. The name of the Dataset
resource.
Expand Down Expand Up @@ -1704,7 +1709,6 @@ async def sample_get_dataset_version():
request (Optional[Union[google.cloud.aiplatform_v1.types.GetDatasetVersionRequest, dict]]):
The request object. Request message for
[DatasetService.GetDatasetVersion][google.cloud.aiplatform.v1.DatasetService.GetDatasetVersion].
Next ID: 4
name (:class:`str`):
Required. The resource name of the Dataset version to
delete. Format:
Expand Down Expand Up @@ -2643,10 +2647,7 @@ async def list_annotations(
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
) -> pagers.ListAnnotationsAsyncPager:
r"""Lists Annotations belongs to a dataitem
This RPC is only available in InternalDatasetService. It
is only used for exporting conversation data to CCAI
Insights.
r"""Lists Annotations belongs to a dataitem.

.. code-block:: python

Expand Down
19 changes: 7 additions & 12 deletions google/cloud/aiplatform_v1/services/dataset_service/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@

_LOGGER = std_logging.getLogger(__name__)

from google.api_core import operation as gac_operation # type: ignore
from google.api_core import operation_async # type: ignore
from google.cloud.aiplatform_v1.services.dataset_service import pagers
from google.cloud.aiplatform_v1.types import annotation
from google.cloud.aiplatform_v1.types import annotation_spec
Expand All @@ -79,10 +77,12 @@
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.longrunning import operations_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import struct_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore
import google.api_core.operation as gac_operation # type: ignore
import google.api_core.operation_async as operation_async # type: ignore
import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
import google.protobuf.struct_pb2 as struct_pb2 # type: ignore
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
from .transports.base import DatasetServiceTransport, DEFAULT_CLIENT_INFO
from .transports.grpc import DatasetServiceGrpcTransport
from .transports.grpc_asyncio import DatasetServiceGrpcAsyncIOTransport
Expand Down Expand Up @@ -1091,7 +1091,6 @@ def sample_get_dataset():
request (Union[google.cloud.aiplatform_v1.types.GetDatasetRequest, dict]):
The request object. Request message for
[DatasetService.GetDataset][google.cloud.aiplatform.v1.DatasetService.GetDataset].
Next ID: 4
name (str):
Required. The name of the Dataset
resource.
Expand Down Expand Up @@ -2261,7 +2260,6 @@ def sample_get_dataset_version():
request (Union[google.cloud.aiplatform_v1.types.GetDatasetVersionRequest, dict]):
The request object. Request message for
[DatasetService.GetDatasetVersion][google.cloud.aiplatform.v1.DatasetService.GetDatasetVersion].
Next ID: 4
name (str):
Required. The resource name of the Dataset version to
delete. Format:
Expand Down Expand Up @@ -3177,10 +3175,7 @@ def list_annotations(
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
) -> pagers.ListAnnotationsPager:
r"""Lists Annotations belongs to a dataitem
This RPC is only available in InternalDatasetService. It
is only used for exporting conversation data to CCAI
Insights.
r"""Lists Annotations belongs to a dataitem.

.. code-block:: python

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ def __init__(
be used for service account credentials.
"""

scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES}

# Save the scopes.
self._scopes = scopes
if not hasattr(self, "_ignore_credentials"):
Expand All @@ -109,11 +107,16 @@ def __init__(

if credentials_file is not None:
credentials, _ = google.auth.load_credentials_from_file(
credentials_file, **scopes_kwargs, quota_project_id=quota_project_id
credentials_file,
scopes=scopes,
quota_project_id=quota_project_id,
default_scopes=self.AUTH_SCOPES,
)
elif credentials is None and not self._ignore_credentials:
credentials, _ = google.auth.default(
**scopes_kwargs, quota_project_id=quota_project_id
scopes=scopes,
quota_project_id=quota_project_id,
default_scopes=self.AUTH_SCOPES,
)
# Don't apply audience if the credentials file passed from user.
if hasattr(credentials, "with_gdch_audience"):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -853,10 +853,7 @@ def list_annotations(
]:
r"""Return a callable for the list annotations method over gRPC.

Lists Annotations belongs to a dataitem
This RPC is only available in InternalDatasetService. It
is only used for exporting conversation data to CCAI
Insights.
Lists Annotations belongs to a dataitem.

Returns:
Callable[[~.ListAnnotationsRequest],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -880,10 +880,7 @@ def list_annotations(
]:
r"""Return a callable for the list annotations method over gRPC.

Lists Annotations belongs to a dataitem
This RPC is only available in InternalDatasetService. It
is only used for exporting conversation data to CCAI
Insights.
Lists Annotations belongs to a dataitem.

Returns:
Callable[[~.ListAnnotationsRequest],
Expand Down
Loading
Loading