Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit 76d2a14

Browse files
feat: add Pipeline.secret_environment, Action.secret_environment, VirtualMachine.reservation (#148)
* chore: update to gapic-generator-python 1.5.0 feat: add support for `google.cloud.<api>.__version__` PiperOrigin-RevId: 484665853 Source-Link: googleapis/googleapis@8eb249a Source-Link: https://github.com/googleapis/googleapis-gen/commit/c8aa327b5f478865fc3fd91e3c2768e54e26ad44 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzhhYTMyN2I1ZjQ3ODg2NWZjM2ZkOTFlM2MyNzY4ZTU0ZTI2YWQ0NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update version in gapic_version.py * add .release-please-manifest.json with correct version * add owlbot.py to exclude generated gapic_version.py * add release-please-config.json * chore: Update to gapic-generator-python 1.6.0 feat(python): Add typing to proto.Message based class attributes feat(python): Snippetgen handling of repeated enum field PiperOrigin-RevId: 487326846 Source-Link: googleapis/googleapis@da380c7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/61ef5762ee6731a0cbbfea22fd0eecee51ab1c8e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjFlZjU3NjJlZTY3MzFhMGNiYmZlYTIyZmQwZWVjZWU1MWFiMWM4ZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: new APIs added to reflect updates to the filestore service - Add ENTERPRISE Tier - Add snapshot APIs: RevertInstance, ListSnapshots, CreateSnapshot, DeleteSnapshot, UpdateSnapshot - Add multi-share APIs: ListShares, GetShare, CreateShare, DeleteShare, UpdateShare - Add ConnectMode to NetworkConfig (for Private Service Access support) - New status codes (SUSPENDED/SUSPENDING, REVERTING/RESUMING) - Add SuspensionReason (for KMS related suspension) - Add new fields to Instance information: max_capacity_gb, capacity_step_size_gb, max_share_count, capacity_gb, multi_share_enabled PiperOrigin-RevId: 487492758 Source-Link: googleapis/googleapis@5be5981 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ab0e217f560cc2c1afc11441c2eab6b6950efd2b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWIwZTIxN2Y1NjBjYzJjMWFmYzExNDQxYzJlYWI2YjY5NTBlZmQyYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update path to snippet metadata json * chore: Update gapic-generator-python to v1.6.1 PiperOrigin-RevId: 488036204 Source-Link: googleapis/googleapis@08f275f Source-Link: https://github.com/googleapis/googleapis-gen/commit/555c0945e60649e38739ae64bc45719cdf72178f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTU1YzA5NDVlNjA2NDllMzg3MzlhZTY0YmM0NTcxOWNkZjcyMTc4ZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add Pipeline.secret_environment, Action.secret_environment, VirtualMachine.reservation PiperOrigin-RevId: 488460572 Source-Link: googleapis/googleapis@c2f6dac Source-Link: https://github.com/googleapis/googleapis-gen/commit/2b4b17aeaa09c61bf86c702502bdf2d1644afb79 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmI0YjE3YWVhYTA5YzYxYmY4NmM3MDI1MDJiZGYyZDE2NDRhZmI3OSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * configure release please to use manifest Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 9b8a1e6 commit 76d2a14

24 files changed

Lines changed: 2646 additions & 314 deletions

.github/release-please.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
releaseType: python
22
handleGHRelease: true
3+
manifest: true

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.7.2"
3+
}

docs/lifesciences_v2beta/types.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Types for Google Cloud Lifesciences v2beta API
33

44
.. automodule:: google.cloud.lifesciences_v2beta.types
55
:members:
6-
:undoc-members:
76
:show-inheritance:

google/cloud/lifesciences/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
from google.cloud.lifesciences import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

1721
from google.cloud.lifesciences_v2beta.services.workflows_service_v2_beta.async_client import (
1822
WorkflowsServiceV2BetaAsyncClient,
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
__version__ = "0.7.2" # {x-release-please-version}

google/cloud/lifesciences_v2beta/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
from google.cloud.lifesciences import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

1721
from .services.workflows_service_v2_beta import (
1822
WorkflowsServiceV2BetaAsyncClient,

google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/async_client.py

Lines changed: 288 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,17 @@
1616
from collections import OrderedDict
1717
import functools
1818
import re
19-
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
19+
from typing import (
20+
Dict,
21+
Mapping,
22+
MutableMapping,
23+
MutableSequence,
24+
Optional,
25+
Sequence,
26+
Tuple,
27+
Type,
28+
Union,
29+
)
2030

2131
from google.api_core import exceptions as core_exceptions
2232
from google.api_core import gapic_v1
@@ -33,6 +43,8 @@
3343

3444
from google.api_core import operation # type: ignore
3545
from google.api_core import operation_async # type: ignore
46+
from google.cloud.location import locations_pb2 # type: ignore
47+
from google.longrunning import operations_pb2
3648

3749
from google.cloud.lifesciences_v2beta.types import workflows
3850

@@ -164,9 +176,9 @@ def transport(self) -> WorkflowsServiceV2BetaTransport:
164176
def __init__(
165177
self,
166178
*,
167-
credentials: ga_credentials.Credentials = None,
179+
credentials: Optional[ga_credentials.Credentials] = None,
168180
transport: Union[str, WorkflowsServiceV2BetaTransport] = "grpc_asyncio",
169-
client_options: ClientOptions = None,
181+
client_options: Optional[ClientOptions] = None,
170182
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
171183
) -> None:
172184
"""Instantiates the workflows service v2 beta client.
@@ -210,10 +222,10 @@ def __init__(
210222

211223
async def run_pipeline(
212224
self,
213-
request: Union[workflows.RunPipelineRequest, dict] = None,
225+
request: Optional[Union[workflows.RunPipelineRequest, dict]] = None,
214226
*,
215227
retry: OptionalRetry = gapic_v1.method.DEFAULT,
216-
timeout: float = None,
228+
timeout: Optional[float] = None,
217229
metadata: Sequence[Tuple[str, str]] = (),
218230
) -> operation_async.AsyncOperation:
219231
r"""Runs a pipeline. The returned Operation's [metadata]
@@ -265,7 +277,7 @@ async def sample_run_pipeline():
265277
print(response)
266278
267279
Args:
268-
request (Union[google.cloud.lifesciences_v2beta.types.RunPipelineRequest, dict]):
280+
request (Optional[Union[google.cloud.lifesciences_v2beta.types.RunPipelineRequest, dict]]):
269281
The request object. The arguments to the `RunPipeline`
270282
method. The requesting user must have the
271283
`iam.serviceAccounts.actAs` permission for the Cloud
@@ -320,6 +332,276 @@ async def sample_run_pipeline():
320332
# Done; return the response.
321333
return response
322334

335+
async def list_operations(
336+
self,
337+
request: Optional[operations_pb2.ListOperationsRequest] = None,
338+
*,
339+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
340+
timeout: Optional[float] = None,
341+
metadata: Sequence[Tuple[str, str]] = (),
342+
) -> operations_pb2.ListOperationsResponse:
343+
r"""Lists operations that match the specified filter in the request.
344+
345+
Args:
346+
request (:class:`~.operations_pb2.ListOperationsRequest`):
347+
The request object. Request message for
348+
`ListOperations` method.
349+
retry (google.api_core.retry.Retry): Designation of what errors,
350+
if any, should be retried.
351+
timeout (float): The timeout for this request.
352+
metadata (Sequence[Tuple[str, str]]): Strings which should be
353+
sent along with the request as metadata.
354+
Returns:
355+
~.operations_pb2.ListOperationsResponse:
356+
Response message for ``ListOperations`` method.
357+
"""
358+
# Create or coerce a protobuf request object.
359+
# The request isn't a proto-plus wrapped type,
360+
# so it must be constructed via keyword expansion.
361+
if isinstance(request, dict):
362+
request = operations_pb2.ListOperationsRequest(**request)
363+
364+
# Wrap the RPC method; this adds retry and timeout information,
365+
# and friendly error handling.
366+
rpc = gapic_v1.method.wrap_method(
367+
self._client._transport.list_operations,
368+
default_timeout=None,
369+
client_info=DEFAULT_CLIENT_INFO,
370+
)
371+
372+
# Certain fields should be provided within the metadata header;
373+
# add these here.
374+
metadata = tuple(metadata) + (
375+
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
376+
)
377+
378+
# Send the request.
379+
response = await rpc(
380+
request,
381+
retry=retry,
382+
timeout=timeout,
383+
metadata=metadata,
384+
)
385+
386+
# Done; return the response.
387+
return response
388+
389+
async def get_operation(
390+
self,
391+
request: Optional[operations_pb2.GetOperationRequest] = None,
392+
*,
393+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
394+
timeout: Optional[float] = None,
395+
metadata: Sequence[Tuple[str, str]] = (),
396+
) -> operations_pb2.Operation:
397+
r"""Gets the latest state of a long-running operation.
398+
399+
Args:
400+
request (:class:`~.operations_pb2.GetOperationRequest`):
401+
The request object. Request message for
402+
`GetOperation` method.
403+
retry (google.api_core.retry.Retry): Designation of what errors,
404+
if any, should be retried.
405+
timeout (float): The timeout for this request.
406+
metadata (Sequence[Tuple[str, str]]): Strings which should be
407+
sent along with the request as metadata.
408+
Returns:
409+
~.operations_pb2.Operation:
410+
An ``Operation`` object.
411+
"""
412+
# Create or coerce a protobuf request object.
413+
# The request isn't a proto-plus wrapped type,
414+
# so it must be constructed via keyword expansion.
415+
if isinstance(request, dict):
416+
request = operations_pb2.GetOperationRequest(**request)
417+
418+
# Wrap the RPC method; this adds retry and timeout information,
419+
# and friendly error handling.
420+
rpc = gapic_v1.method.wrap_method(
421+
self._client._transport.get_operation,
422+
default_timeout=None,
423+
client_info=DEFAULT_CLIENT_INFO,
424+
)
425+
426+
# Certain fields should be provided within the metadata header;
427+
# add these here.
428+
metadata = tuple(metadata) + (
429+
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
430+
)
431+
432+
# Send the request.
433+
response = await rpc(
434+
request,
435+
retry=retry,
436+
timeout=timeout,
437+
metadata=metadata,
438+
)
439+
440+
# Done; return the response.
441+
return response
442+
443+
async def cancel_operation(
444+
self,
445+
request: Optional[operations_pb2.CancelOperationRequest] = None,
446+
*,
447+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
448+
timeout: Optional[float] = None,
449+
metadata: Sequence[Tuple[str, str]] = (),
450+
) -> None:
451+
r"""Starts asynchronous cancellation on a long-running operation.
452+
453+
The server makes a best effort to cancel the operation, but success
454+
is not guaranteed. If the server doesn't support this method, it returns
455+
`google.rpc.Code.UNIMPLEMENTED`.
456+
457+
Args:
458+
request (:class:`~.operations_pb2.CancelOperationRequest`):
459+
The request object. Request message for
460+
`CancelOperation` method.
461+
retry (google.api_core.retry.Retry): Designation of what errors,
462+
if any, should be retried.
463+
timeout (float): The timeout for this request.
464+
metadata (Sequence[Tuple[str, str]]): Strings which should be
465+
sent along with the request as metadata.
466+
Returns:
467+
None
468+
"""
469+
# Create or coerce a protobuf request object.
470+
# The request isn't a proto-plus wrapped type,
471+
# so it must be constructed via keyword expansion.
472+
if isinstance(request, dict):
473+
request = operations_pb2.CancelOperationRequest(**request)
474+
475+
# Wrap the RPC method; this adds retry and timeout information,
476+
# and friendly error handling.
477+
rpc = gapic_v1.method.wrap_method(
478+
self._client._transport.cancel_operation,
479+
default_timeout=None,
480+
client_info=DEFAULT_CLIENT_INFO,
481+
)
482+
483+
# Certain fields should be provided within the metadata header;
484+
# add these here.
485+
metadata = tuple(metadata) + (
486+
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
487+
)
488+
489+
# Send the request.
490+
await rpc(
491+
request,
492+
retry=retry,
493+
timeout=timeout,
494+
metadata=metadata,
495+
)
496+
497+
async def get_location(
498+
self,
499+
request: Optional[locations_pb2.GetLocationRequest] = None,
500+
*,
501+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
502+
timeout: Optional[float] = None,
503+
metadata: Sequence[Tuple[str, str]] = (),
504+
) -> locations_pb2.Location:
505+
r"""Gets information about a location.
506+
507+
Args:
508+
request (:class:`~.location_pb2.GetLocationRequest`):
509+
The request object. Request message for
510+
`GetLocation` method.
511+
retry (google.api_core.retry.Retry): Designation of what errors,
512+
if any, should be retried.
513+
timeout (float): The timeout for this request.
514+
metadata (Sequence[Tuple[str, str]]): Strings which should be
515+
sent along with the request as metadata.
516+
Returns:
517+
~.location_pb2.Location:
518+
Location object.
519+
"""
520+
# Create or coerce a protobuf request object.
521+
# The request isn't a proto-plus wrapped type,
522+
# so it must be constructed via keyword expansion.
523+
if isinstance(request, dict):
524+
request = locations_pb2.GetLocationRequest(**request)
525+
526+
# Wrap the RPC method; this adds retry and timeout information,
527+
# and friendly error handling.
528+
rpc = gapic_v1.method.wrap_method(
529+
self._client._transport.get_location,
530+
default_timeout=None,
531+
client_info=DEFAULT_CLIENT_INFO,
532+
)
533+
534+
# Certain fields should be provided within the metadata header;
535+
# add these here.
536+
metadata = tuple(metadata) + (
537+
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
538+
)
539+
540+
# Send the request.
541+
response = await rpc(
542+
request,
543+
retry=retry,
544+
timeout=timeout,
545+
metadata=metadata,
546+
)
547+
548+
# Done; return the response.
549+
return response
550+
551+
async def list_locations(
552+
self,
553+
request: Optional[locations_pb2.ListLocationsRequest] = None,
554+
*,
555+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
556+
timeout: Optional[float] = None,
557+
metadata: Sequence[Tuple[str, str]] = (),
558+
) -> locations_pb2.ListLocationsResponse:
559+
r"""Lists information about the supported locations for this service.
560+
561+
Args:
562+
request (:class:`~.location_pb2.ListLocationsRequest`):
563+
The request object. Request message for
564+
`ListLocations` method.
565+
retry (google.api_core.retry.Retry): Designation of what errors,
566+
if any, should be retried.
567+
timeout (float): The timeout for this request.
568+
metadata (Sequence[Tuple[str, str]]): Strings which should be
569+
sent along with the request as metadata.
570+
Returns:
571+
~.location_pb2.ListLocationsResponse:
572+
Response message for ``ListLocations`` method.
573+
"""
574+
# Create or coerce a protobuf request object.
575+
# The request isn't a proto-plus wrapped type,
576+
# so it must be constructed via keyword expansion.
577+
if isinstance(request, dict):
578+
request = locations_pb2.ListLocationsRequest(**request)
579+
580+
# Wrap the RPC method; this adds retry and timeout information,
581+
# and friendly error handling.
582+
rpc = gapic_v1.method.wrap_method(
583+
self._client._transport.list_locations,
584+
default_timeout=None,
585+
client_info=DEFAULT_CLIENT_INFO,
586+
)
587+
588+
# Certain fields should be provided within the metadata header;
589+
# add these here.
590+
metadata = tuple(metadata) + (
591+
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
592+
)
593+
594+
# Send the request.
595+
response = await rpc(
596+
request,
597+
retry=retry,
598+
timeout=timeout,
599+
metadata=metadata,
600+
)
601+
602+
# Done; return the response.
603+
return response
604+
323605
async def __aenter__(self):
324606
return self
325607

0 commit comments

Comments
 (0)