# -*- 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.
#
import warnings
from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union

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

import grpc  # type: ignore
from grpc.experimental import aio  # type: ignore

from google.api import httpbody_pb2  # type: ignore
from .base import GatewayServiceTransport, DEFAULT_CLIENT_INFO
from .grpc import GatewayServiceGrpcTransport


class GatewayServiceGrpcAsyncIOTransport(GatewayServiceTransport):
    """gRPC AsyncIO backend transport for GatewayService.

    Gateway service is a public API which works as a Kubernetes
    resource model proxy between end users and registered Kubernetes
    clusters. Each RPC in this service matches with an HTTP verb.
    End user will initiate kubectl commands against the Gateway
    service, and Gateway service will forward user requests to
    clusters.

    This class defines the same methods as the primary client, so the
    primary client can load the underlying transport implementation
    and call it.

    It sends protocol buffers over the wire using gRPC (which is built on
    top of HTTP/2); the ``grpcio`` package must be installed.