
    ]j                     V    d dl Z d dlmZ d dlmZ  G d de      Z G d de      Zd Z	y)	    N)iam_policy_pb2)
policy_pb2c                       e Zd ZdZd Zy)IAMPolicyStub  ## API Overview

    Manages Identity and Access Management (IAM) policies.

    Any implementation of an API that offers access control features
    implements the google.iam.v1.IAMPolicy interface.

    ## Data model

    Access control is applied when a principal (user or service account), takes
    some action on a resource exposed by a service. Resources, identified by
    URI-like names, are the unit of access control specification. Service
    implementations can choose the granularity of access control and the
    supported permissions for their resources.
    For example one database service may allow access control to be
    specified only at the Table level, whereas another might allow access control
    to also be specified at the Column level.

    ## Policy Structure

    See google.iam.v1.Policy

    This is intentionally not a CRUD style API because access control policies
    are created and deleted implicitly with the resources to which they are
    attached.
    c                    |j                  dt        j                  j                  t        j
                  j                        | _        |j                  dt        j                  j                  t        j
                  j                        | _	        |j                  dt        j                  j                  t        j                  j                        | _        y)zGConstructor.

        Args:
          channel: A grpc.Channel.
        z%/google.iam.v1.IAMPolicy/SetIamPolicy)request_serializerresponse_deserializerz%/google.iam.v1.IAMPolicy/GetIamPolicyz+/google.iam.v1.IAMPolicy/TestIamPermissionsN)unary_unary*google_dot_iam_dot_v1_dot_iam__policy__pb2SetIamPolicyRequestSerializeToString%google_dot_iam_dot_v1_dot_policy__pb2Policy
FromStringSetIamPolicyGetIamPolicyRequestGetIamPolicyTestIamPermissionsRequestTestIamPermissionsResponseTestIamPermissions)selfchannels     K/root/env/lib/python3.12/site-packages/google/iam/v1/iam_policy_pb2_grpc.py__init__zIAMPolicyStub.__init__4   s     $//3I]]oo"G"N"N"Y"Y 0 

 $//3I]]oo"G"N"N"Y"Y 0 

 #*"5"59Iccuu"L"g"g"r"r #6 #
    N)__name__
__module____qualname____doc__r    r   r   r   r      s    6
r   r   c                   "    e Zd ZdZd Zd Zd Zy)IAMPolicyServicerr   c                     |j                  t        j                  j                         |j	                  d       t        d      )zhSets the access control policy on the specified resource. Replaces any
        existing policy.
        Method not implemented!set_codegrpc
StatusCodeUNIMPLEMENTEDset_detailsNotImplementedErrorr   requestcontexts      r   r   zIAMPolicyServicer.SetIamPolicyg   s7     	66756!";<<r   c                     |j                  t        j                  j                         |j	                  d       t        d      )zGets the access control policy for a resource.
        Returns an empty policy if the resource exists and does not have a policy
        set.
        r%   r&   r-   s      r   r   zIAMPolicyServicer.GetIamPolicyo   s7    
 	66756!";<<r   c                     |j                  t        j                  j                         |j	                  d       t        d      )a  Returns permissions that a caller has on the specified resource.
        If the resource does not exist, this will return an empty set of
        permissions, not a NOT_FOUND error.

        Note: This operation is designed to be used for building permission-aware
        UIs and command-line tools, not for authorization checking. This operation
        may "fail open" without warning.
        r%   r&   r-   s      r   r   z$IAMPolicyServicer.TestIamPermissionsx   s7     	66756!";<<r   N)r   r   r   r    r   r   r   r!   r   r   r#   r#   K   s    6===r   r#   c                 @   t        j                  | j                  t        j                  j
                  t        j                  j                        t        j                  | j                  t        j                  j
                  t        j                  j                        t        j                  | j                  t        j                  j
                  t        j                  j                        d}t        j                  d|      }|j                  |f       y )N)request_deserializerresponse_serializer)r   r   r   zgoogle.iam.v1.IAMPolicy)r(   unary_unary_rpc_method_handlerr   r   r   r   r   r   r   r   r   r   r   r   method_handlers_generic_handleradd_generic_rpc_handlers)servicerserverrpc_method_handlersgeneric_handlers       r   add_IAMPolicyServicer_to_serverr<      s    ;;!!!K!_!_!j!j E L L ^ ^

 ;;!!!K!_!_!j!j E L L ^ ^

 #AA''!K!e!e!p!p J e e w w
" ::!#6O ##_$67r   )
r(   google.iam.v1r   r   r   r   objectr   r#   r<   r!   r   r   <module>r?      s/   $  V M0
F 0
f8= 8=v8r   