Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.
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
4 changes: 2 additions & 2 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:8a5d3f6a2e43ed8293f34e06a2f56931d1e88a2694c3bb11b15df4eb256ad163
# created: 2022-04-06T10:30:21.687684602Z
digest: sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416
# created: 2022-04-20T23:42:53.970438194Z
2 changes: 1 addition & 1 deletion 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
51 changes: 26 additions & 25 deletions google/cloud/apigateway/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,37 @@
# limitations under the License.
#

from google.cloud.apigateway_v1.services.api_gateway_service.async_client import (
ApiGatewayServiceAsyncClient,
)
from google.cloud.apigateway_v1.services.api_gateway_service.client import (
ApiGatewayServiceClient,
)
from google.cloud.apigateway_v1.services.api_gateway_service.async_client import (
ApiGatewayServiceAsyncClient,
from google.cloud.apigateway_v1.types.apigateway import (
Api,
ApiConfig,
CreateApiConfigRequest,
CreateApiRequest,
CreateGatewayRequest,
DeleteApiConfigRequest,
DeleteApiRequest,
DeleteGatewayRequest,
Gateway,
GetApiConfigRequest,
GetApiRequest,
GetGatewayRequest,
ListApiConfigsRequest,
ListApiConfigsResponse,
ListApisRequest,
ListApisResponse,
ListGatewaysRequest,
ListGatewaysResponse,
OperationMetadata,
UpdateApiConfigRequest,
UpdateApiRequest,
UpdateGatewayRequest,
)

from google.cloud.apigateway_v1.types.apigateway import Api
from google.cloud.apigateway_v1.types.apigateway import ApiConfig
from google.cloud.apigateway_v1.types.apigateway import CreateApiConfigRequest
from google.cloud.apigateway_v1.types.apigateway import CreateApiRequest
from google.cloud.apigateway_v1.types.apigateway import CreateGatewayRequest
from google.cloud.apigateway_v1.types.apigateway import DeleteApiConfigRequest
from google.cloud.apigateway_v1.types.apigateway import DeleteApiRequest
from google.cloud.apigateway_v1.types.apigateway import DeleteGatewayRequest
from google.cloud.apigateway_v1.types.apigateway import Gateway
from google.cloud.apigateway_v1.types.apigateway import GetApiConfigRequest
from google.cloud.apigateway_v1.types.apigateway import GetApiRequest
from google.cloud.apigateway_v1.types.apigateway import GetGatewayRequest
from google.cloud.apigateway_v1.types.apigateway import ListApiConfigsRequest
from google.cloud.apigateway_v1.types.apigateway import ListApiConfigsResponse
from google.cloud.apigateway_v1.types.apigateway import ListApisRequest
from google.cloud.apigateway_v1.types.apigateway import ListApisResponse
from google.cloud.apigateway_v1.types.apigateway import ListGatewaysRequest
from google.cloud.apigateway_v1.types.apigateway import ListGatewaysResponse
from google.cloud.apigateway_v1.types.apigateway import OperationMetadata
from google.cloud.apigateway_v1.types.apigateway import UpdateApiConfigRequest
from google.cloud.apigateway_v1.types.apigateway import UpdateApiRequest
from google.cloud.apigateway_v1.types.apigateway import UpdateGatewayRequest

__all__ = (
"ApiGatewayServiceClient",
"ApiGatewayServiceAsyncClient",
Expand Down
53 changes: 28 additions & 25 deletions google/cloud/apigateway_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,34 @@
# limitations under the License.
#

from .services.api_gateway_service import ApiGatewayServiceClient
from .services.api_gateway_service import ApiGatewayServiceAsyncClient

from .types.apigateway import Api
from .types.apigateway import ApiConfig
from .types.apigateway import CreateApiConfigRequest
from .types.apigateway import CreateApiRequest
from .types.apigateway import CreateGatewayRequest
from .types.apigateway import DeleteApiConfigRequest
from .types.apigateway import DeleteApiRequest
from .types.apigateway import DeleteGatewayRequest
from .types.apigateway import Gateway
from .types.apigateway import GetApiConfigRequest
from .types.apigateway import GetApiRequest
from .types.apigateway import GetGatewayRequest
from .types.apigateway import ListApiConfigsRequest
from .types.apigateway import ListApiConfigsResponse
from .types.apigateway import ListApisRequest
from .types.apigateway import ListApisResponse
from .types.apigateway import ListGatewaysRequest
from .types.apigateway import ListGatewaysResponse
from .types.apigateway import OperationMetadata
from .types.apigateway import UpdateApiConfigRequest
from .types.apigateway import UpdateApiRequest
from .types.apigateway import UpdateGatewayRequest
from .services.api_gateway_service import (
ApiGatewayServiceAsyncClient,
ApiGatewayServiceClient,
)
from .types.apigateway import (
Api,
ApiConfig,
CreateApiConfigRequest,
CreateApiRequest,
CreateGatewayRequest,
DeleteApiConfigRequest,
DeleteApiRequest,
DeleteGatewayRequest,
Gateway,
GetApiConfigRequest,
GetApiRequest,
GetGatewayRequest,
ListApiConfigsRequest,
ListApiConfigsResponse,
ListApisRequest,
ListApisResponse,
ListGatewaysRequest,
ListGatewaysResponse,
OperationMetadata,
UpdateApiConfigRequest,
UpdateApiRequest,
UpdateGatewayRequest,
)

__all__ = (
"ApiGatewayServiceAsyncClient",
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 ApiGatewayServiceClient
from .async_client import ApiGatewayServiceAsyncClient
from .client import ApiGatewayServiceClient

__all__ = (
"ApiGatewayServiceClient",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
import functools
import re
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

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]
Expand All @@ -33,14 +33,16 @@

from google.api_core import operation # type: ignore
from google.api_core import operation_async # type: ignore
from google.cloud.apigateway_v1.services.api_gateway_service import pagers
from google.cloud.apigateway_v1.types import apigateway
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore
from .transports.base import ApiGatewayServiceTransport, DEFAULT_CLIENT_INFO
from .transports.grpc_asyncio import ApiGatewayServiceGrpcAsyncIOTransport

from google.cloud.apigateway_v1.services.api_gateway_service import pagers
from google.cloud.apigateway_v1.types import apigateway

from .client import ApiGatewayServiceClient
from .transports.base import DEFAULT_CLIENT_INFO, ApiGatewayServiceTransport
from .transports.grpc_asyncio import ApiGatewayServiceGrpcAsyncIOTransport


class ApiGatewayServiceAsyncClient:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
import os
import re
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core import client_options as client_options_lib
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.auth import credentials as ga_credentials # type: ignore
from google.auth.exceptions import MutualTLSChannelError # type: ignore
from google.auth.transport import mtls # type: ignore
from google.auth.transport.grpc import SslCredentials # type: ignore
from google.auth.exceptions import MutualTLSChannelError # type: ignore
from google.oauth2 import service_account # type: ignore
import pkg_resources

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
Expand All @@ -36,12 +36,14 @@

from google.api_core import operation # type: ignore
from google.api_core import operation_async # type: ignore
from google.cloud.apigateway_v1.services.api_gateway_service import pagers
from google.cloud.apigateway_v1.types import apigateway
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore
from .transports.base import ApiGatewayServiceTransport, DEFAULT_CLIENT_INFO

from google.cloud.apigateway_v1.services.api_gateway_service import pagers
from google.cloud.apigateway_v1.types import apigateway

from .transports.base import DEFAULT_CLIENT_INFO, ApiGatewayServiceTransport
from .transports.grpc import ApiGatewayServiceGrpcTransport
from .transports.grpc_asyncio import ApiGatewayServiceGrpcAsyncIOTransport

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
AsyncIterator,
Awaitable,
Callable,
Iterator,
Optional,
Sequence,
Tuple,
Optional,
Iterator,
)

from google.cloud.apigateway_v1.types import apigateway
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from .grpc import ApiGatewayServiceGrpcTransport
from .grpc_asyncio import ApiGatewayServiceGrpcAsyncIOTransport


# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[ApiGatewayServiceTransport]]
_transport_registry["grpc"] = ApiGatewayServiceGrpcTransport
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,18 @@
#
import abc
from typing import Awaitable, Callable, Dict, Optional, Sequence, Union
import pkg_resources

import google.auth # type: ignore
import google.api_core
from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
from google.api_core import gapic_v1, operations_v1
from google.api_core import retry as retries
from google.api_core import operations_v1
import google.auth # type: ignore
from google.auth import credentials as ga_credentials # type: ignore
from google.longrunning import operations_pb2 # type: ignore
from google.oauth2 import service_account # type: ignore
import pkg_resources

from google.cloud.apigateway_v1.types import apigateway
from google.longrunning import operations_pb2 # type: ignore

try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import warnings
from typing import Callable, Dict, Optional, Sequence, Tuple, Union
import warnings

from google.api_core import grpc_helpers
from google.api_core import operations_v1
from google.api_core import gapic_v1
from google.api_core import gapic_v1, grpc_helpers, operations_v1
import google.auth # type: ignore
from google.auth import credentials as ga_credentials # type: ignore
from google.auth.transport.grpc import SslCredentials # type: ignore

from google.longrunning import operations_pb2 # type: ignore
import grpc # type: ignore

from google.cloud.apigateway_v1.types import apigateway
from google.longrunning import operations_pb2 # type: ignore
from .base import ApiGatewayServiceTransport, DEFAULT_CLIENT_INFO

from .base import DEFAULT_CLIENT_INFO, ApiGatewayServiceTransport


class ApiGatewayServiceGrpcTransport(ApiGatewayServiceTransport):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import warnings
from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union
import warnings

from google.api_core import gapic_v1
from google.api_core import grpc_helpers_async
from google.api_core import operations_v1
from google.api_core import gapic_v1, grpc_helpers_async, operations_v1
from google.auth import credentials as ga_credentials # type: ignore
from google.auth.transport.grpc import SslCredentials # type: ignore

from google.longrunning import operations_pb2 # type: ignore
import grpc # type: ignore
from grpc.experimental import aio # type: ignore

from google.cloud.apigateway_v1.types import apigateway
from google.longrunning import operations_pb2 # type: ignore
from .base import ApiGatewayServiceTransport, DEFAULT_CLIENT_INFO

from .base import DEFAULT_CLIENT_INFO, ApiGatewayServiceTransport
from .grpc import ApiGatewayServiceGrpcTransport


Expand Down
4 changes: 1 addition & 3 deletions google/cloud/apigateway_v1/types/apigateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import proto # type: ignore

from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore

import proto # type: ignore

__protobuf__ = proto.module(
package="google.cloud.apigateway.v1",
Expand Down
28 changes: 25 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# Generated by synthtool. DO NOT EDIT!

from __future__ import absolute_import

import os
import pathlib
import shutil
Expand All @@ -25,7 +26,8 @@
import nox

BLACK_VERSION = "black==22.3.0"
BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
ISORT_VERSION = "isort==5.10.1"
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]

DEFAULT_PYTHON_VERSION = "3.8"

Expand Down Expand Up @@ -83,7 +85,7 @@ def lint(session):
session.run(
"black",
"--check",
*BLACK_PATHS,
*LINT_PATHS,
)
session.run("flake8", "google", "tests")

Expand All @@ -94,7 +96,27 @@ def blacken(session):
session.install(BLACK_VERSION)
session.run(
"black",
*BLACK_PATHS,
*LINT_PATHS,
)


@nox.session(python=DEFAULT_PYTHON_VERSION)
def format(session):
"""
Run isort to sort imports. Then run black
to format code to uniform standard.
"""
session.install(BLACK_VERSION, ISORT_VERSION)
# Use the --fss option to sort imports using strict alphabetical order.
# See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections
session.run(
"isort",
"--fss",
*LINT_PATHS,
)
session.run(
"black",
*LINT_PATHS,
)


Expand Down
Loading