Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -179,6 +181,8 @@
"ListFilesResponse",
"UpdateFileRequest",
"GenericArtifact",
"GoModule",
"KfpArtifact",
"DeletePackageRequest",
"GetPackageRequest",
"ListPackagesRequest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -175,6 +177,7 @@
"GetTagRequest",
"GetVPCSCConfigRequest",
"GetVersionRequest",
"GoModule",
"Hash",
"ImportAptArtifactsErrorInfo",
"ImportAptArtifactsGcsSource",
Expand All @@ -186,6 +189,7 @@
"ImportYumArtifactsMetadata",
"ImportYumArtifactsRequest",
"ImportYumArtifactsResponse",
"KfpArtifact",
"ListAttachmentsRequest",
"ListAttachmentsResponse",
"ListDockerImagesRequest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
UpdateFileRequest,
)
from .generic import GenericArtifact
from .go import GoModule
from .kfp_artifact import KfpArtifact
from .package import (
DeletePackageRequest,
GetPackageRequest,
Expand Down Expand Up @@ -162,6 +164,8 @@
"ListFilesResponse",
"UpdateFileRequest",
"GenericArtifact",
"GoModule",
"KfpArtifact",
"DeletePackageRequest",
"GetPackageRequest",
"ListPackagesRequest",
Expand Down
Original file line number Diff line number Diff line change
@@ -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))
Original file line number Diff line number Diff line change
@@ -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))
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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():
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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)

Expand All @@ -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():
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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])
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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])
Expand Down