Skip to content

Commit 2707bb6

Browse files
feat: generate libraries
1 parent d4e6a4a commit 2707bb6

File tree

104 files changed

+24271
-481
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+24271
-481
lines changed

.librarian/state.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ libraries:
473473
tag_format: '{id}-v{version}'
474474
- id: google-cloud-artifact-registry
475475
version: 1.17.0
476-
last_generated_commit: c2db528a3e4d12b95666c719ee0db30a3d4c78ad
476+
last_generated_commit: 535d161c24965e9ed1a0b27032cc1c8b4beab818
477477
apis:
478478
- path: google/devtools/artifactregistry/v1
479479
service_config: artifactregistry_v1.yaml
@@ -990,7 +990,7 @@ libraries:
990990
tag_format: '{id}-v{version}'
991991
- id: google-cloud-build
992992
version: 3.33.0
993-
last_generated_commit: 3322511885371d2b2253f209ccc3aa60d4100cfd
993+
last_generated_commit: 535d161c24965e9ed1a0b27032cc1c8b4beab818
994994
apis:
995995
- path: google/devtools/cloudbuild/v1
996996
service_config: cloudbuild_v1.yaml
@@ -1043,7 +1043,7 @@ libraries:
10431043
tag_format: '{id}-v{version}'
10441044
- id: google-cloud-channel
10451045
version: 1.24.0
1046-
last_generated_commit: 3322511885371d2b2253f209ccc3aa60d4100cfd
1046+
last_generated_commit: 535d161c24965e9ed1a0b27032cc1c8b4beab818
10471047
apis:
10481048
- path: google/cloud/channel/v1
10491049
service_config: cloudchannel_v1.yaml
@@ -1939,7 +1939,7 @@ libraries:
19391939
tag_format: '{id}-v{version}'
19401940
- id: google-cloud-gke-multicloud
19411941
version: 0.6.22
1942-
last_generated_commit: 3322511885371d2b2253f209ccc3aa60d4100cfd
1942+
last_generated_commit: 535d161c24965e9ed1a0b27032cc1c8b4beab818
19431943
apis:
19441944
- path: google/cloud/gkemulticloud/v1
19451945
service_config: gkemulticloud_v1.yaml
@@ -2479,7 +2479,7 @@ libraries:
24792479
tag_format: '{id}-v{version}'
24802480
- id: google-cloud-network-security
24812481
version: 0.9.21
2482-
last_generated_commit: c9ff4f1cd26f1fe63e6d1c11a198366b70ebdb84
2482+
last_generated_commit: 535d161c24965e9ed1a0b27032cc1c8b4beab818
24832483
apis:
24842484
- path: google/cloud/networksecurity/v1alpha1
24852485
service_config: networksecurity_v1alpha1.yaml
@@ -2651,7 +2651,7 @@ libraries:
26512651
tag_format: '{id}-v{version}'
26522652
- id: google-cloud-parallelstore
26532653
version: 0.3.0
2654-
last_generated_commit: 3322511885371d2b2253f209ccc3aa60d4100cfd
2654+
last_generated_commit: 535d161c24965e9ed1a0b27032cc1c8b4beab818
26552655
apis:
26562656
- path: google/cloud/parallelstore/v1
26572657
service_config: parallelstore_v1.yaml
@@ -3962,7 +3962,7 @@ libraries:
39623962
tag_format: '{id}-v{version}'
39633963
- id: google-shopping-merchant-accounts
39643964
version: 1.1.0
3965-
last_generated_commit: a17b84add8318f780fcc8a027815d5fee644b9f7
3965+
last_generated_commit: 535d161c24965e9ed1a0b27032cc1c8b4beab818
39663966
apis:
39673967
- path: google/shopping/merchant/accounts/v1
39683968
service_config: merchantapi_v1.yaml
@@ -4244,7 +4244,7 @@ libraries:
42444244
tag_format: '{id}-v{version}'
42454245
- id: googleapis-common-protos
42464246
version: 1.72.0
4247-
last_generated_commit: c9ff4f1cd26f1fe63e6d1c11a198366b70ebdb84
4247+
last_generated_commit: 535d161c24965e9ed1a0b27032cc1c8b4beab818
42484248
apis:
42494249
- path: google/api
42504250
service_config: serviceconfig.yaml

packages/google-cloud-artifact-registry/google/cloud/artifactregistry/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@
5959
ListAttachmentsRequest,
6060
ListAttachmentsResponse,
6161
)
62+
from google.cloud.artifactregistry_v1.types.export import (
63+
ExportArtifactMetadata,
64+
ExportArtifactRequest,
65+
ExportArtifactResponse,
66+
)
6267
from google.cloud.artifactregistry_v1.types.file import (
6368
DeleteFileRequest,
6469
File,
@@ -175,6 +180,9 @@
175180
"GetAttachmentRequest",
176181
"ListAttachmentsRequest",
177182
"ListAttachmentsResponse",
183+
"ExportArtifactMetadata",
184+
"ExportArtifactRequest",
185+
"ExportArtifactResponse",
178186
"DeleteFileRequest",
179187
"File",
180188
"GetFileRequest",

packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@
5757
ListAttachmentsRequest,
5858
ListAttachmentsResponse,
5959
)
60+
from .types.export import (
61+
ExportArtifactMetadata,
62+
ExportArtifactRequest,
63+
ExportArtifactResponse,
64+
)
6065
from .types.file import (
6166
DeleteFileRequest,
6267
File,
@@ -163,6 +168,9 @@
163168
"DeleteTagRequest",
164169
"DeleteVersionRequest",
165170
"DockerImage",
171+
"ExportArtifactMetadata",
172+
"ExportArtifactRequest",
173+
"ExportArtifactResponse",
166174
"File",
167175
"GenericArtifact",
168176
"GetAttachmentRequest",

packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/gapic_metadata.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@
7070
"delete_version"
7171
]
7272
},
73+
"ExportArtifact": {
74+
"methods": [
75+
"export_artifact"
76+
]
77+
},
7378
"GetAttachment": {
7479
"methods": [
7580
"get_attachment"
@@ -320,6 +325,11 @@
320325
"delete_version"
321326
]
322327
},
328+
"ExportArtifact": {
329+
"methods": [
330+
"export_artifact"
331+
]
332+
},
323333
"GetAttachment": {
324334
"methods": [
325335
"get_attachment"
@@ -570,6 +580,11 @@
570580
"delete_version"
571581
]
572582
},
583+
"ExportArtifact": {
584+
"methods": [
585+
"export_artifact"
586+
]
587+
},
573588
"GetAttachment": {
574589
"methods": [
575590
"get_attachment"

packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/async_client.py

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
from google.cloud.artifactregistry_v1.types import apt_artifact, artifact
6262
from google.cloud.artifactregistry_v1.types import attachment
6363
from google.cloud.artifactregistry_v1.types import attachment as gda_attachment
64+
from google.cloud.artifactregistry_v1.types import export
6465
from google.cloud.artifactregistry_v1.types import file
6566
from google.cloud.artifactregistry_v1.types import file as gda_file
6667
from google.cloud.artifactregistry_v1.types import package
@@ -6278,6 +6279,111 @@ async def sample_delete_attachment():
62786279
# Done; return the response.
62796280
return response
62806281

6282+
async def export_artifact(
6283+
self,
6284+
request: Optional[Union[export.ExportArtifactRequest, dict]] = None,
6285+
*,
6286+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
6287+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
6288+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
6289+
) -> operation_async.AsyncOperation:
6290+
r"""Exports an artifact.
6291+
6292+
.. code-block:: python
6293+
6294+
# This snippet has been automatically generated and should be regarded as a
6295+
# code template only.
6296+
# It will require modifications to work:
6297+
# - It may require correct/in-range values for request initialization.
6298+
# - It may require specifying regional endpoints when creating the service
6299+
# client as shown in:
6300+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
6301+
from google.cloud import artifactregistry_v1
6302+
6303+
async def sample_export_artifact():
6304+
# Create a client
6305+
client = artifactregistry_v1.ArtifactRegistryAsyncClient()
6306+
6307+
# Initialize request argument(s)
6308+
request = artifactregistry_v1.ExportArtifactRequest(
6309+
source_version="source_version_value",
6310+
gcs_path="gcs_path_value",
6311+
repository="repository_value",
6312+
)
6313+
6314+
# Make the request
6315+
operation = client.export_artifact(request=request)
6316+
6317+
print("Waiting for operation to complete...")
6318+
6319+
response = (await operation).result()
6320+
6321+
# Handle the response
6322+
print(response)
6323+
6324+
Args:
6325+
request (Optional[Union[google.cloud.artifactregistry_v1.types.ExportArtifactRequest, dict]]):
6326+
The request object. The request for exporting an artifact
6327+
to a destination.
6328+
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
6329+
should be retried.
6330+
timeout (float): The timeout for this request.
6331+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
6332+
sent along with the request as metadata. Normally, each value must be of type `str`,
6333+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
6334+
be of type `bytes`.
6335+
6336+
Returns:
6337+
google.api_core.operation_async.AsyncOperation:
6338+
An object representing a long-running operation.
6339+
6340+
The result type for the operation will be
6341+
:class:`google.cloud.artifactregistry_v1.types.ExportArtifactResponse`
6342+
The response for exporting an artifact to a destination.
6343+
6344+
"""
6345+
# Create or coerce a protobuf request object.
6346+
# - Use the request object if provided (there's no risk of modifying the input as
6347+
# there are no flattened fields), or create one.
6348+
if not isinstance(request, export.ExportArtifactRequest):
6349+
request = export.ExportArtifactRequest(request)
6350+
6351+
# Wrap the RPC method; this adds retry and timeout information,
6352+
# and friendly error handling.
6353+
rpc = self._client._transport._wrapped_methods[
6354+
self._client._transport.export_artifact
6355+
]
6356+
6357+
# Certain fields should be provided within the metadata header;
6358+
# add these here.
6359+
metadata = tuple(metadata) + (
6360+
gapic_v1.routing_header.to_grpc_metadata(
6361+
(("repository", request.repository),)
6362+
),
6363+
)
6364+
6365+
# Validate the universe domain.
6366+
self._client._validate_universe_domain()
6367+
6368+
# Send the request.
6369+
response = await rpc(
6370+
request,
6371+
retry=retry,
6372+
timeout=timeout,
6373+
metadata=metadata,
6374+
)
6375+
6376+
# Wrap the response in an operation future.
6377+
response = operation_async.from_gapic(
6378+
response,
6379+
self._client._transport.operations_client,
6380+
export.ExportArtifactResponse,
6381+
metadata_type=export.ExportArtifactMetadata,
6382+
)
6383+
6384+
# Done; return the response.
6385+
return response
6386+
62816387
async def get_operation(
62826388
self,
62836389
request: Optional[operations_pb2.GetOperationRequest] = None,

packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/client.py

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
from google.cloud.artifactregistry_v1.types import apt_artifact, artifact
7979
from google.cloud.artifactregistry_v1.types import attachment
8080
from google.cloud.artifactregistry_v1.types import attachment as gda_attachment
81+
from google.cloud.artifactregistry_v1.types import export
8182
from google.cloud.artifactregistry_v1.types import file
8283
from google.cloud.artifactregistry_v1.types import file as gda_file
8384
from google.cloud.artifactregistry_v1.types import package
@@ -6873,6 +6874,109 @@ def sample_delete_attachment():
68736874
# Done; return the response.
68746875
return response
68756876

6877+
def export_artifact(
6878+
self,
6879+
request: Optional[Union[export.ExportArtifactRequest, dict]] = None,
6880+
*,
6881+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
6882+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
6883+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
6884+
) -> operation.Operation:
6885+
r"""Exports an artifact.
6886+
6887+
.. code-block:: python
6888+
6889+
# This snippet has been automatically generated and should be regarded as a
6890+
# code template only.
6891+
# It will require modifications to work:
6892+
# - It may require correct/in-range values for request initialization.
6893+
# - It may require specifying regional endpoints when creating the service
6894+
# client as shown in:
6895+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
6896+
from google.cloud import artifactregistry_v1
6897+
6898+
def sample_export_artifact():
6899+
# Create a client
6900+
client = artifactregistry_v1.ArtifactRegistryClient()
6901+
6902+
# Initialize request argument(s)
6903+
request = artifactregistry_v1.ExportArtifactRequest(
6904+
source_version="source_version_value",
6905+
gcs_path="gcs_path_value",
6906+
repository="repository_value",
6907+
)
6908+
6909+
# Make the request
6910+
operation = client.export_artifact(request=request)
6911+
6912+
print("Waiting for operation to complete...")
6913+
6914+
response = operation.result()
6915+
6916+
# Handle the response
6917+
print(response)
6918+
6919+
Args:
6920+
request (Union[google.cloud.artifactregistry_v1.types.ExportArtifactRequest, dict]):
6921+
The request object. The request for exporting an artifact
6922+
to a destination.
6923+
retry (google.api_core.retry.Retry): Designation of what errors, if any,
6924+
should be retried.
6925+
timeout (float): The timeout for this request.
6926+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
6927+
sent along with the request as metadata. Normally, each value must be of type `str`,
6928+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
6929+
be of type `bytes`.
6930+
6931+
Returns:
6932+
google.api_core.operation.Operation:
6933+
An object representing a long-running operation.
6934+
6935+
The result type for the operation will be
6936+
:class:`google.cloud.artifactregistry_v1.types.ExportArtifactResponse`
6937+
The response for exporting an artifact to a destination.
6938+
6939+
"""
6940+
# Create or coerce a protobuf request object.
6941+
# - Use the request object if provided (there's no risk of modifying the input as
6942+
# there are no flattened fields), or create one.
6943+
if not isinstance(request, export.ExportArtifactRequest):
6944+
request = export.ExportArtifactRequest(request)
6945+
6946+
# Wrap the RPC method; this adds retry and timeout information,
6947+
# and friendly error handling.
6948+
rpc = self._transport._wrapped_methods[self._transport.export_artifact]
6949+
6950+
# Certain fields should be provided within the metadata header;
6951+
# add these here.
6952+
metadata = tuple(metadata) + (
6953+
gapic_v1.routing_header.to_grpc_metadata(
6954+
(("repository", request.repository),)
6955+
),
6956+
)
6957+
6958+
# Validate the universe domain.
6959+
self._validate_universe_domain()
6960+
6961+
# Send the request.
6962+
response = rpc(
6963+
request,
6964+
retry=retry,
6965+
timeout=timeout,
6966+
metadata=metadata,
6967+
)
6968+
6969+
# Wrap the response in an operation future.
6970+
response = operation.from_gapic(
6971+
response,
6972+
self._transport.operations_client,
6973+
export.ExportArtifactResponse,
6974+
metadata_type=export.ExportArtifactMetadata,
6975+
)
6976+
6977+
# Done; return the response.
6978+
return response
6979+
68766980
def __enter__(self) -> "ArtifactRegistryClient":
68776981
return self
68786982

0 commit comments

Comments
 (0)