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
16 changes: 8 additions & 8 deletions .librarian/state.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ libraries:
tag_format: '{id}-v{version}'
- id: google-cloud-artifact-registry
version: 1.17.0
last_generated_commit: c2db528a3e4d12b95666c719ee0db30a3d4c78ad
last_generated_commit: 535d161c24965e9ed1a0b27032cc1c8b4beab818
apis:
- path: google/devtools/artifactregistry/v1
service_config: artifactregistry_v1.yaml
Expand Down Expand Up @@ -990,7 +990,7 @@ libraries:
tag_format: '{id}-v{version}'
- id: google-cloud-build
version: 3.33.0
last_generated_commit: 3322511885371d2b2253f209ccc3aa60d4100cfd
last_generated_commit: 535d161c24965e9ed1a0b27032cc1c8b4beab818
apis:
- path: google/devtools/cloudbuild/v1
service_config: cloudbuild_v1.yaml
Expand Down Expand Up @@ -1043,7 +1043,7 @@ libraries:
tag_format: '{id}-v{version}'
- id: google-cloud-channel
version: 1.24.0
last_generated_commit: 3322511885371d2b2253f209ccc3aa60d4100cfd
last_generated_commit: 535d161c24965e9ed1a0b27032cc1c8b4beab818
apis:
- path: google/cloud/channel/v1
service_config: cloudchannel_v1.yaml
Expand Down Expand Up @@ -1939,7 +1939,7 @@ libraries:
tag_format: '{id}-v{version}'
- id: google-cloud-gke-multicloud
version: 0.6.22
last_generated_commit: 3322511885371d2b2253f209ccc3aa60d4100cfd
last_generated_commit: 535d161c24965e9ed1a0b27032cc1c8b4beab818
apis:
- path: google/cloud/gkemulticloud/v1
service_config: gkemulticloud_v1.yaml
Expand Down Expand Up @@ -2479,7 +2479,7 @@ libraries:
tag_format: '{id}-v{version}'
- id: google-cloud-network-security
version: 0.9.21
last_generated_commit: c9ff4f1cd26f1fe63e6d1c11a198366b70ebdb84
last_generated_commit: 535d161c24965e9ed1a0b27032cc1c8b4beab818
apis:
- path: google/cloud/networksecurity/v1alpha1
service_config: networksecurity_v1alpha1.yaml
Expand Down Expand Up @@ -2651,7 +2651,7 @@ libraries:
tag_format: '{id}-v{version}'
- id: google-cloud-parallelstore
version: 0.3.0
last_generated_commit: 3322511885371d2b2253f209ccc3aa60d4100cfd
last_generated_commit: 535d161c24965e9ed1a0b27032cc1c8b4beab818
apis:
- path: google/cloud/parallelstore/v1
service_config: parallelstore_v1.yaml
Expand Down Expand Up @@ -3962,7 +3962,7 @@ libraries:
tag_format: '{id}-v{version}'
- id: google-shopping-merchant-accounts
version: 1.1.0
last_generated_commit: a17b84add8318f780fcc8a027815d5fee644b9f7
last_generated_commit: 535d161c24965e9ed1a0b27032cc1c8b4beab818
apis:
- path: google/shopping/merchant/accounts/v1
service_config: merchantapi_v1.yaml
Expand Down Expand Up @@ -4244,7 +4244,7 @@ libraries:
tag_format: '{id}-v{version}'
- id: googleapis-common-protos
version: 1.72.0
last_generated_commit: c9ff4f1cd26f1fe63e6d1c11a198366b70ebdb84
last_generated_commit: 535d161c24965e9ed1a0b27032cc1c8b4beab818
apis:
- path: google/api
service_config: serviceconfig.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
ListAttachmentsRequest,
ListAttachmentsResponse,
)
from google.cloud.artifactregistry_v1.types.export import (
ExportArtifactMetadata,
ExportArtifactRequest,
ExportArtifactResponse,
)
from google.cloud.artifactregistry_v1.types.file import (
DeleteFileRequest,
File,
Expand Down Expand Up @@ -175,6 +180,9 @@
"GetAttachmentRequest",
"ListAttachmentsRequest",
"ListAttachmentsResponse",
"ExportArtifactMetadata",
"ExportArtifactRequest",
"ExportArtifactResponse",
"DeleteFileRequest",
"File",
"GetFileRequest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
ListAttachmentsRequest,
ListAttachmentsResponse,
)
from .types.export import (
ExportArtifactMetadata,
ExportArtifactRequest,
ExportArtifactResponse,
)
from .types.file import (
DeleteFileRequest,
File,
Expand Down Expand Up @@ -163,6 +168,9 @@
"DeleteTagRequest",
"DeleteVersionRequest",
"DockerImage",
"ExportArtifactMetadata",
"ExportArtifactRequest",
"ExportArtifactResponse",
"File",
"GenericArtifact",
"GetAttachmentRequest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
"delete_version"
]
},
"ExportArtifact": {
"methods": [
"export_artifact"
]
},
"GetAttachment": {
"methods": [
"get_attachment"
Expand Down Expand Up @@ -320,6 +325,11 @@
"delete_version"
]
},
"ExportArtifact": {
"methods": [
"export_artifact"
]
},
"GetAttachment": {
"methods": [
"get_attachment"
Expand Down Expand Up @@ -570,6 +580,11 @@
"delete_version"
]
},
"ExportArtifact": {
"methods": [
"export_artifact"
]
},
"GetAttachment": {
"methods": [
"get_attachment"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
from google.cloud.artifactregistry_v1.types import apt_artifact, artifact
from google.cloud.artifactregistry_v1.types import attachment
from google.cloud.artifactregistry_v1.types import attachment as gda_attachment
from google.cloud.artifactregistry_v1.types import export
from google.cloud.artifactregistry_v1.types import file
from google.cloud.artifactregistry_v1.types import file as gda_file
from google.cloud.artifactregistry_v1.types import package
Expand Down Expand Up @@ -6278,6 +6279,111 @@ async def sample_delete_attachment():
# Done; return the response.
return response

async def export_artifact(
self,
request: Optional[Union[export.ExportArtifactRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
) -> operation_async.AsyncOperation:
r"""Exports an artifact.

.. 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 artifactregistry_v1

async def sample_export_artifact():
# Create a client
client = artifactregistry_v1.ArtifactRegistryAsyncClient()

# Initialize request argument(s)
request = artifactregistry_v1.ExportArtifactRequest(
source_version="source_version_value",
gcs_path="gcs_path_value",
repository="repository_value",
)

# Make the request
operation = client.export_artifact(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()

# Handle the response
print(response)

Args:
request (Optional[Union[google.cloud.artifactregistry_v1.types.ExportArtifactRequest, dict]]):
The request object. The request for exporting an artifact
to a destination.
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
sent along with the request as metadata. Normally, each value must be of type `str`,
but for metadata keys ending with the suffix `-bin`, the corresponding values must
be of type `bytes`.

Returns:
google.api_core.operation_async.AsyncOperation:
An object representing a long-running operation.

The result type for the operation will be
:class:`google.cloud.artifactregistry_v1.types.ExportArtifactResponse`
The response for exporting an artifact to a destination.

"""
# Create or coerce a protobuf request object.
# - Use the request object if provided (there's no risk of modifying the input as
# there are no flattened fields), or create one.
if not isinstance(request, export.ExportArtifactRequest):
request = export.ExportArtifactRequest(request)

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
rpc = self._client._transport._wrapped_methods[
self._client._transport.export_artifact
]

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

# Validate the universe domain.
self._client._validate_universe_domain()

# 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,
export.ExportArtifactResponse,
metadata_type=export.ExportArtifactMetadata,
)

# Done; return the response.
return response

async def get_operation(
self,
request: Optional[operations_pb2.GetOperationRequest] = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
from google.cloud.artifactregistry_v1.types import apt_artifact, artifact
from google.cloud.artifactregistry_v1.types import attachment
from google.cloud.artifactregistry_v1.types import attachment as gda_attachment
from google.cloud.artifactregistry_v1.types import export
from google.cloud.artifactregistry_v1.types import file
from google.cloud.artifactregistry_v1.types import file as gda_file
from google.cloud.artifactregistry_v1.types import package
Expand Down Expand Up @@ -6873,6 +6874,109 @@ def sample_delete_attachment():
# Done; return the response.
return response

def export_artifact(
self,
request: Optional[Union[export.ExportArtifactRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
) -> operation.Operation:
r"""Exports an artifact.

.. 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 artifactregistry_v1

def sample_export_artifact():
# Create a client
client = artifactregistry_v1.ArtifactRegistryClient()

# Initialize request argument(s)
request = artifactregistry_v1.ExportArtifactRequest(
source_version="source_version_value",
gcs_path="gcs_path_value",
repository="repository_value",
)

# Make the request
operation = client.export_artifact(request=request)

print("Waiting for operation to complete...")

response = operation.result()

# Handle the response
print(response)

Args:
request (Union[google.cloud.artifactregistry_v1.types.ExportArtifactRequest, dict]):
The request object. The request for exporting an artifact
to a destination.
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, Union[str, bytes]]]): Key/value pairs which should be
sent along with the request as metadata. Normally, each value must be of type `str`,
but for metadata keys ending with the suffix `-bin`, the corresponding values must
be of type `bytes`.

Returns:
google.api_core.operation.Operation:
An object representing a long-running operation.

The result type for the operation will be
:class:`google.cloud.artifactregistry_v1.types.ExportArtifactResponse`
The response for exporting an artifact to a destination.

"""
# Create or coerce a protobuf request object.
# - Use the request object if provided (there's no risk of modifying the input as
# there are no flattened fields), or create one.
if not isinstance(request, export.ExportArtifactRequest):
request = export.ExportArtifactRequest(request)

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
rpc = self._transport._wrapped_methods[self._transport.export_artifact]

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

# Validate the universe domain.
self._validate_universe_domain()

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

# Wrap the response in an operation future.
response = operation.from_gapic(
response,
self._transport.operations_client,
export.ExportArtifactResponse,
metadata_type=export.ExportArtifactMetadata,
)

# Done; return the response.
return response

def __enter__(self) -> "ArtifactRegistryClient":
return self

Expand Down
Loading
Loading