
                         @    S r SSKJr  SSKJr  SSKJr   " S S5      rg)zConnect Gateway API client.

This does not provide client methods for GatewayService, which expects raw HTTP
requests as provided by e.g. kubectl.
    )Union)util)basec                       \ rS rSrSr\R                  4S\R                  4S jjr	    SS\
S\S\\
S4   S	\\
S4   S
\R                  R                  S\R                  R                  4S jjrSrg)GatewayClient   a  Client for the Connect Gateway API with related helper methods.

If not provided, the default client is for the GA (v1) track. This client
is a thin wrapper around the base client, and does not handle any exceptions.

Fields:
  release_track: The release track of the command [ALPHA, BETA, GA].
  client: The raw GKE Hub API client for the specified release track.
  messages: The matching messages module for the client.
release_trackc                     Ub  UO[         R                  U l        [         R                  " U5      U l        [         R
                  " U5      U l        g )N)r   DEFAULT_TRACKr	   GetClientInstanceclientGetMessagesModulemessages)selfr	   s     Clib/googlecloudsdk/api_lib/container/fleet/connectgateway/client.py__init__GatewayClient.__init__'   s@    &28J8J 	 ((7DK**=9DM    Nnameforce_use_agentversionkubernetes_namespaceoperating_systemreturnc                     U R                   R                  UUUUUS9nU R                  R                  R	                  U5      $ )a  Retrieve connection information for accessing a membership through Connect Gateway.

Args:
  name: The full membership name, in the form
    `projects/*/locations/*/memberships/*`.
  force_use_agent: Whether to force the use of Connect Agent-based
    transport.
  version: The Connect Gateway version to be used in the resulting
    configuration.
  kubernetes_namespace: The namespace to use in the kubeconfig context.
  operating_system: The operating system for which the kubeconfig should be
    generated. The default value of `None` works for supported operating
    systems other than Windows.

Returns:
  The GenerateCredentialsResponse message.
)r   forceUseAgentr   kubernetesNamespaceoperatingSystem)r   DConnectgatewayProjectsLocationsMembershipsGenerateCredentialsRequestr   projects_locations_membershipsGenerateCredentials)r   r   r   r   r   r   reqs          r   r!   !GatewayClient.GenerateCredentials.   sJ    2 --
\
\%0( ] C ;;55II#NNr   )r   r   r	   )FNNN)__name__
__module____qualname____firstlineno____doc__r   r   r   ReleaseTrackr   strboolr   TYPESOperatingSystemGenerateCredentialsResponser!   __static_attributes__ r   r   r   r      s    	 9=8J8J :D$5$5 : $"&/359 O O  O S$Y	 O
 "#t), O 

22 O zz-- O  Or   r   N)r(   typingr   5googlecloudsdk.api_lib.container.fleet.connectgatewayr   googlecloudsdk.callioper   r   r0   r   r   <module>r4      s!     F (3O 3Or   