Skip to content

Commit

Permalink
chore: Update gapic-generator-python to v1.6.1 (#225)
Browse files Browse the repository at this point in the history
* 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: googleapis/googleapis-gen@c8aa327
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

* set manifest to true in .github/release-please.yml

* add release-please-config.json

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 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: googleapis/googleapis-gen@61ef576
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: googleapis/googleapis-gen@ab0e217
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: googleapis/googleapis-gen@555c094
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTU1YzA5NDVlNjA2NDllMzg3MzlhZTY0YmM0NTcxOWNkZjcyMTc4ZiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* use templated owlbot.py and setup.py

* configure release-please to use manifest

* run nox format session

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <[email protected]>
  • Loading branch information
3 people authored Nov 26, 2022
1 parent f2c11f8 commit 4ea3aff
Show file tree
Hide file tree
Showing 91 changed files with 1,647 additions and 2,872 deletions.
1 change: 1 addition & 0 deletions packages/google-cloud-workflows/.github/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
releaseType: python
handleGHRelease: true
manifest: true
# NOTE: this section is generated by synthtool.languages.python
# See https://github.com/googleapis/synthtool/blob/master/synthtool/languages/python.py
branches:
Expand Down
3 changes: 3 additions & 0 deletions packages/google-cloud-workflows/.release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.7.4"
}
2 changes: 1 addition & 1 deletion packages/google-cloud-workflows/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os
import shlex
import sys

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Workflows Executions v1 API

.. automodule:: google.cloud.workflows.executions_v1.types
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Workflows Executions v1beta API

.. automodule:: google.cloud.workflows.executions_v1beta.types
:members:
:undoc-members:
:show-inheritance:
17 changes: 9 additions & 8 deletions packages/google-cloud-workflows/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

.. include:: multiprocessing.rst

This package includes clients for multiple versions of the Workflows API By default, you will get ``v1``, the latest version.
This package includes clients for multiple versions of Cloud Workflows.
By default, you will get version ``workflows_v1``.

v1
---

API Reference
-------------
.. toctree::
:maxdepth: 2

Expand All @@ -14,9 +16,7 @@ v1
workflows_v1/types
executions_v1/types

The previous beta release, spelled ``v1beta`` is provided to continue to support code previously written against it. In order to use it, you will want to import from it e.g., ``google.cloud.workflows_v1`` in lieu of ``google.cloud.workflows`` (or the equivalent ``google.cloud.workflows_v1``).

v1beta
API Reference
-------------
.. toctree::
:maxdepth: 2
Expand All @@ -26,12 +26,13 @@ v1beta
workflows_v1beta/types
executions_v1beta/types


Changelog
---------

For a list of all ``google-cloud-workflows`` releases:

.. toctree::
:maxdepth: 2
:maxdepth: 2

changelog
changelog
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Workflows v1 API

.. automodule:: google.cloud.workflows_v1.types
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Workflows v1beta API

.. automodule:: google.cloud.workflows_v1beta.types
:members:
:undoc-members:
:show-inheritance:
25 changes: 15 additions & 10 deletions packages/google-cloud-workflows/google/cloud/workflows/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,25 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.workflows import gapic_version as package_version

__version__ = package_version.__version__


from google.cloud.workflows_v1.services.workflows.client import WorkflowsClient
from google.cloud.workflows_v1.services.workflows.async_client import (
WorkflowsAsyncClient,
)

from google.cloud.workflows_v1.types.workflows import CreateWorkflowRequest
from google.cloud.workflows_v1.types.workflows import DeleteWorkflowRequest
from google.cloud.workflows_v1.types.workflows import GetWorkflowRequest
from google.cloud.workflows_v1.types.workflows import ListWorkflowsRequest
from google.cloud.workflows_v1.types.workflows import ListWorkflowsResponse
from google.cloud.workflows_v1.types.workflows import OperationMetadata
from google.cloud.workflows_v1.types.workflows import UpdateWorkflowRequest
from google.cloud.workflows_v1.types.workflows import Workflow
from google.cloud.workflows_v1.services.workflows.client import WorkflowsClient
from google.cloud.workflows_v1.types.workflows import (
CreateWorkflowRequest,
DeleteWorkflowRequest,
GetWorkflowRequest,
ListWorkflowsRequest,
ListWorkflowsResponse,
OperationMetadata,
UpdateWorkflowRequest,
Workflow,
)

__all__ = (
"WorkflowsClient",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,27 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.workflows.executions import gapic_version as package_version

__version__ = package_version.__version__


from google.cloud.workflows.executions_v1.services.executions.async_client import (
ExecutionsAsyncClient,
)
from google.cloud.workflows.executions_v1.services.executions.client import (
ExecutionsClient,
)
from google.cloud.workflows.executions_v1.services.executions.async_client import (
ExecutionsAsyncClient,
from google.cloud.workflows.executions_v1.types.executions import (
CancelExecutionRequest,
CreateExecutionRequest,
Execution,
ExecutionView,
GetExecutionRequest,
ListExecutionsRequest,
ListExecutionsResponse,
)

from google.cloud.workflows.executions_v1.types.executions import CancelExecutionRequest
from google.cloud.workflows.executions_v1.types.executions import CreateExecutionRequest
from google.cloud.workflows.executions_v1.types.executions import Execution
from google.cloud.workflows.executions_v1.types.executions import GetExecutionRequest
from google.cloud.workflows.executions_v1.types.executions import ListExecutionsRequest
from google.cloud.workflows.executions_v1.types.executions import ListExecutionsResponse
from google.cloud.workflows.executions_v1.types.executions import ExecutionView

__all__ = (
"ExecutionsClient",
"ExecutionsAsyncClient",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# Copyright 2022 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.
#
__version__ = "0.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.workflows.executions import gapic_version as package_version

from .services.executions import ExecutionsClient
from .services.executions import ExecutionsAsyncClient
__version__ = package_version.__version__

from .types.executions import CancelExecutionRequest
from .types.executions import CreateExecutionRequest
from .types.executions import Execution
from .types.executions import GetExecutionRequest
from .types.executions import ListExecutionsRequest
from .types.executions import ListExecutionsResponse
from .types.executions import ExecutionView

from .services.executions import ExecutionsAsyncClient, ExecutionsClient
from .types.executions import (
CancelExecutionRequest,
CreateExecutionRequest,
Execution,
ExecutionView,
GetExecutionRequest,
ListExecutionsRequest,
ListExecutionsResponse,
)

__all__ = (
"ExecutionsAsyncClient",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .client import ExecutionsClient
from .async_client import ExecutionsAsyncClient
from .client import ExecutionsClient

__all__ = (
"ExecutionsClient",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,39 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources
from typing import (
Dict,
Mapping,
MutableMapping,
MutableSequence,
Optional,
Sequence,
Tuple,
Type,
Union,
)

from google.api_core.client_options import ClientOptions
from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
from google.api_core import retry as retries
from google.api_core.client_options import ClientOptions
from google.auth import credentials as ga_credentials # type: ignore
from google.oauth2 import service_account # type: ignore
import pkg_resources

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

from google.protobuf import timestamp_pb2 # type: ignore

from google.cloud.workflows.executions_v1.services.executions import pagers
from google.cloud.workflows.executions_v1.types import executions
from google.protobuf import timestamp_pb2 # type: ignore
from .transports.base import ExecutionsTransport, DEFAULT_CLIENT_INFO
from .transports.grpc_asyncio import ExecutionsGrpcAsyncIOTransport

from .client import ExecutionsClient
from .transports.base import DEFAULT_CLIENT_INFO, ExecutionsTransport
from .transports.grpc_asyncio import ExecutionsGrpcAsyncIOTransport


class ExecutionsAsyncClient:
Expand Down Expand Up @@ -157,9 +169,9 @@ def transport(self) -> ExecutionsTransport:
def __init__(
self,
*,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, ExecutionsTransport] = "grpc_asyncio",
client_options: ClientOptions = None,
client_options: Optional[ClientOptions] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the executions client.
Expand Down Expand Up @@ -203,11 +215,11 @@ def __init__(

async def list_executions(
self,
request: Union[executions.ListExecutionsRequest, dict] = None,
request: Optional[Union[executions.ListExecutionsRequest, dict]] = None,
*,
parent: str = None,
parent: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListExecutionsAsyncPager:
r"""Returns a list of executions which belong to the
Expand Down Expand Up @@ -244,7 +256,7 @@ async def sample_list_executions():
print(response)
Args:
request (Union[google.cloud.workflows.executions_v1.types.ListExecutionsRequest, dict]):
request (Optional[Union[google.cloud.workflows.executions_v1.types.ListExecutionsRequest, dict]]):
The request object. Request for the
[ListExecutions][]
method.
Expand Down Expand Up @@ -326,12 +338,12 @@ async def sample_list_executions():

async def create_execution(
self,
request: Union[executions.CreateExecutionRequest, dict] = None,
request: Optional[Union[executions.CreateExecutionRequest, dict]] = None,
*,
parent: str = None,
execution: executions.Execution = None,
parent: Optional[str] = None,
execution: Optional[executions.Execution] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> executions.Execution:
r"""Creates a new execution using the latest revision of
Expand Down Expand Up @@ -364,7 +376,7 @@ async def sample_create_execution():
print(response)
Args:
request (Union[google.cloud.workflows.executions_v1.types.CreateExecutionRequest, dict]):
request (Optional[Union[google.cloud.workflows.executions_v1.types.CreateExecutionRequest, dict]]):
The request object. Request for the
[CreateExecution][google.cloud.workflows.executions.v1.Executions.CreateExecution]
method.
Expand Down Expand Up @@ -442,11 +454,11 @@ async def sample_create_execution():

async def get_execution(
self,
request: Union[executions.GetExecutionRequest, dict] = None,
request: Optional[Union[executions.GetExecutionRequest, dict]] = None,
*,
name: str = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> executions.Execution:
r"""Returns an execution of the given name.
Expand Down Expand Up @@ -478,7 +490,7 @@ async def sample_get_execution():
print(response)
Args:
request (Union[google.cloud.workflows.executions_v1.types.GetExecutionRequest, dict]):
request (Optional[Union[google.cloud.workflows.executions_v1.types.GetExecutionRequest, dict]]):
The request object. Request for the
[GetExecution][google.cloud.workflows.executions.v1.Executions.GetExecution]
method.
Expand Down Expand Up @@ -546,11 +558,11 @@ async def sample_get_execution():

async def cancel_execution(
self,
request: Union[executions.CancelExecutionRequest, dict] = None,
request: Optional[Union[executions.CancelExecutionRequest, dict]] = None,
*,
name: str = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> executions.Execution:
r"""Cancels an execution of the given name.
Expand Down Expand Up @@ -582,7 +594,7 @@ async def sample_cancel_execution():
print(response)
Args:
request (Union[google.cloud.workflows.executions_v1.types.CancelExecutionRequest, dict]):
request (Optional[Union[google.cloud.workflows.executions_v1.types.CancelExecutionRequest, dict]]):
The request object. Request for the
[CancelExecution][google.cloud.workflows.executions.v1.Executions.CancelExecution]
method.
Expand Down Expand Up @@ -658,7 +670,7 @@ async def __aexit__(self, exc_type, exc, tb):
try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution(
"google-cloud-workflow",
"google-cloud-workflows",
).version,
)
except pkg_resources.DistributionNotFound:
Expand Down
Loading

0 comments on commit 4ea3aff

Please sign in to comment.