diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry/__init__.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry/__init__.py index f585ba4ca5c1..64f9beb2af12 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry/__init__.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry/__init__.py @@ -68,6 +68,8 @@ UpdateFileRequest, ) from google.cloud.artifactregistry_v1.types.generic import GenericArtifact +from google.cloud.artifactregistry_v1.types.go import GoModule +from google.cloud.artifactregistry_v1.types.kfp_artifact import KfpArtifact from google.cloud.artifactregistry_v1.types.package import ( DeletePackageRequest, GetPackageRequest, @@ -179,6 +181,8 @@ "ListFilesResponse", "UpdateFileRequest", "GenericArtifact", + "GoModule", + "KfpArtifact", "DeletePackageRequest", "GetPackageRequest", "ListPackagesRequest", diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/__init__.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/__init__.py index ca834dcbb5a2..bdb0cf828ef8 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/__init__.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/__init__.py @@ -66,6 +66,8 @@ UpdateFileRequest, ) from .types.generic import GenericArtifact +from .types.go import GoModule +from .types.kfp_artifact import KfpArtifact from .types.package import ( DeletePackageRequest, GetPackageRequest, @@ -175,6 +177,7 @@ "GetTagRequest", "GetVPCSCConfigRequest", "GetVersionRequest", + "GoModule", "Hash", "ImportAptArtifactsErrorInfo", "ImportAptArtifactsGcsSource", @@ -186,6 +189,7 @@ "ImportYumArtifactsMetadata", "ImportYumArtifactsRequest", "ImportYumArtifactsResponse", + "KfpArtifact", "ListAttachmentsRequest", "ListAttachmentsResponse", "ListDockerImagesRequest", diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/async_client.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/async_client.py index 432f09ad030b..d5f712826b03 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/async_client.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/async_client.py @@ -2967,8 +2967,10 @@ async def sample_batch_delete_versions(): should not be set. names (:class:`MutableSequence[str]`): Required. The names of the versions - to delete. A maximum of 10000 versions - can be deleted in a batch. + to delete. The maximum number of + versions deleted per batch is determined + by the service and is dependent on the + available resources in the region. This corresponds to the ``names`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/client.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/client.py index 0e00c0264a22..a9ec8d62a77b 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/client.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/client.py @@ -3634,8 +3634,10 @@ def sample_batch_delete_versions(): should not be set. names (MutableSequence[str]): Required. The names of the versions - to delete. A maximum of 10000 versions - can be deleted in a batch. + to delete. The maximum number of + versions deleted per batch is determined + by the service and is dependent on the + available resources in the region. This corresponds to the ``names`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/__init__.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/__init__.py index bca4e1f27d87..aa25b456fbf5 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/__init__.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/__init__.py @@ -57,6 +57,8 @@ UpdateFileRequest, ) from .generic import GenericArtifact +from .go import GoModule +from .kfp_artifact import KfpArtifact from .package import ( DeletePackageRequest, GetPackageRequest, @@ -162,6 +164,8 @@ "ListFilesResponse", "UpdateFileRequest", "GenericArtifact", + "GoModule", + "KfpArtifact", "DeletePackageRequest", "GetPackageRequest", "ListPackagesRequest", diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/go.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/go.py new file mode 100644 index 000000000000..d48924e77a87 --- /dev/null +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/go.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +from google.protobuf import timestamp_pb2 # type: ignore +import proto # type: ignore + +__protobuf__ = proto.module( + package="google.devtools.artifactregistry.v1", + manifest={ + "GoModule", + }, +) + + +class GoModule(proto.Message): + r"""GoModule represents a Go module. + + Attributes: + name (str): + The resource name of a Go module. + version (str): + The version of the Go module. Must be a valid + canonical version as defined in + https://go.dev/ref/mod#glos-canonical-version. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The time when the Go module is + created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The time when the Go module is + updated. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + version: str = proto.Field( + proto.STRING, + number=2, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/kfp_artifact.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/kfp_artifact.py new file mode 100644 index 000000000000..be1bb7428526 --- /dev/null +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/kfp_artifact.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +__protobuf__ = proto.module( + package="google.devtools.artifactregistry.v1", + manifest={ + "KfpArtifact", + }, +) + + +class KfpArtifact(proto.Message): + r"""A detailed representation of a KFP artifact. + + Attributes: + name (str): + Output only. Resource name of the KFP + artifact. Since users don't directly interact + with this resource, the name will be derived + from the associated version. For example, when + version = ".../versions/sha256:abcdef...", the + name will be + ".../kfpArtifacts/sha256:abcdef...". + version (str): + The version associated with the KFP artifact. + Must follow the Semantic Versioning standard. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + version: str = proto.Field( + proto.STRING, + number=2, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/repository.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/repository.py index e254678e15e3..0d91b8a2afae 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/repository.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/repository.py @@ -992,6 +992,9 @@ class Repository(proto.Message): satisfies_pzi (bool): Output only. If set, the repository satisfies physical zone isolation. + registry_uri (str): + Output only. The repository endpoint, for example: + ``us-docker.pkg.dev/my-proj/my-repo``. """ class Format(proto.Enum): @@ -1289,6 +1292,10 @@ class EnablementState(proto.Enum): proto.BOOL, number=22, ) + registry_uri: str = proto.Field( + proto.STRING, + number=26, + ) class ListRepositoriesRequest(proto.Message): diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/version.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/version.py index beb9b9f319f1..5e98b9bbf26f 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/version.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/version.py @@ -304,8 +304,10 @@ class BatchDeleteVersionsRequest(proto.Message): requested versions. names (MutableSequence[str]): Required. The names of the versions to - delete. A maximum of 10000 versions can be - deleted in a batch. + delete. The maximum number of versions deleted + per batch is determined by the service and is + dependent on the available resources in the + region. validate_only (bool): If true, the request is performed without deleting data, following AIP-163. diff --git a/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1/test_artifact_registry.py b/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1/test_artifact_registry.py index dc8e957787e5..7309b612d956 100644 --- a/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1/test_artifact_registry.py +++ b/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1/test_artifact_registry.py @@ -5839,6 +5839,7 @@ def test_get_repository(request_type, transport: str = "grpc"): cleanup_policy_dry_run=True, disallow_unspecified_mode=True, satisfies_pzi=True, + registry_uri="registry_uri_value", ) response = client.get_repository(request) @@ -5860,6 +5861,7 @@ def test_get_repository(request_type, transport: str = "grpc"): assert response.cleanup_policy_dry_run is True assert response.disallow_unspecified_mode is True assert response.satisfies_pzi is True + assert response.registry_uri == "registry_uri_value" def test_get_repository_non_empty_request_with_auto_populated_field(): @@ -5995,6 +5997,7 @@ async def test_get_repository_async( cleanup_policy_dry_run=True, disallow_unspecified_mode=True, satisfies_pzi=True, + registry_uri="registry_uri_value", ) ) response = await client.get_repository(request) @@ -6017,6 +6020,7 @@ async def test_get_repository_async( assert response.cleanup_policy_dry_run is True assert response.disallow_unspecified_mode is True assert response.satisfies_pzi is True + assert response.registry_uri == "registry_uri_value" @pytest.mark.asyncio @@ -6589,6 +6593,7 @@ def test_update_repository(request_type, transport: str = "grpc"): cleanup_policy_dry_run=True, disallow_unspecified_mode=True, satisfies_pzi=True, + registry_uri="registry_uri_value", ) response = client.update_repository(request) @@ -6610,6 +6615,7 @@ def test_update_repository(request_type, transport: str = "grpc"): assert response.cleanup_policy_dry_run is True assert response.disallow_unspecified_mode is True assert response.satisfies_pzi is True + assert response.registry_uri == "registry_uri_value" def test_update_repository_non_empty_request_with_auto_populated_field(): @@ -6747,6 +6753,7 @@ async def test_update_repository_async( cleanup_policy_dry_run=True, disallow_unspecified_mode=True, satisfies_pzi=True, + registry_uri="registry_uri_value", ) ) response = await client.update_repository(request) @@ -6769,6 +6776,7 @@ async def test_update_repository_async( assert response.cleanup_policy_dry_run is True assert response.disallow_unspecified_mode is True assert response.satisfies_pzi is True + assert response.registry_uri == "registry_uri_value" @pytest.mark.asyncio @@ -29421,6 +29429,7 @@ async def test_get_repository_empty_call_grpc_asyncio(): cleanup_policy_dry_run=True, disallow_unspecified_mode=True, satisfies_pzi=True, + registry_uri="registry_uri_value", ) ) await client.get_repository(request=None) @@ -29486,6 +29495,7 @@ async def test_update_repository_empty_call_grpc_asyncio(): cleanup_policy_dry_run=True, disallow_unspecified_mode=True, satisfies_pzi=True, + registry_uri="registry_uri_value", ) ) await client.update_repository(request=None) @@ -31984,6 +31994,7 @@ def test_get_repository_rest_call_success(request_type): cleanup_policy_dry_run=True, disallow_unspecified_mode=True, satisfies_pzi=True, + registry_uri="registry_uri_value", ) # Wrap the value into a proper Response obj @@ -32010,6 +32021,7 @@ def test_get_repository_rest_call_success(request_type): assert response.cleanup_policy_dry_run is True assert response.disallow_unspecified_mode is True assert response.satisfies_pzi is True + assert response.registry_uri == "registry_uri_value" @pytest.mark.parametrize("null_interceptor", [True, False]) @@ -32182,6 +32194,7 @@ def test_create_repository_rest_call_success(request_type): }, "disallow_unspecified_mode": True, "satisfies_pzi": True, + "registry_uri": "registry_uri_value", } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency @@ -32451,6 +32464,7 @@ def test_update_repository_rest_call_success(request_type): }, "disallow_unspecified_mode": True, "satisfies_pzi": True, + "registry_uri": "registry_uri_value", } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency @@ -32535,6 +32549,7 @@ def get_message_fields(field): cleanup_policy_dry_run=True, disallow_unspecified_mode=True, satisfies_pzi=True, + registry_uri="registry_uri_value", ) # Wrap the value into a proper Response obj @@ -32561,6 +32576,7 @@ def get_message_fields(field): assert response.cleanup_policy_dry_run is True assert response.disallow_unspecified_mode is True assert response.satisfies_pzi is True + assert response.registry_uri == "registry_uri_value" @pytest.mark.parametrize("null_interceptor", [True, False])