
                             S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  SSKJr  S	S
S.r\R                  " \R                  R                   5       " S S\R"                  5      5       rg)z+'vmware dns-bind-permission grant' command.    )absolute_import)division)unicode_literals)dnsbindpermission)base)flags)logz
          Grants the bind permission to the customer provided user/service account to bind their DNS zone with the intranet VPC associated with the project.
        av  
          To grant the bind permission to the customer provided user `user@abc.com` to bind their DNS zone with the intranet VPC associated with project `my-project`, run:

            $ {command} --user=user@abc.com --project=my-project

          Or:

            $ {command} --user=user@abc.com

          In the second example, the project is taken from gcloud properties core/project.

          To grant the bind permission to the customer provided service account `service-account@gserviceaccount.com` to bind their DNS zone with the intranet VPC associated with project `my-project`, run:

          $ {command} --service-account=service-account@gserviceaccount.com --project=my-project

          Or:

            $ {command} --service-account=service-account@gserviceaccount.com

          In the second example, the project is taken from gcloud properties core/project.
    )DESCRIPTIONEXAMPLESc                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)Grant6   zGrants a DNS Bind Permission.c                    [         R                  " U 5        [        R                  R	                  U 5        [        R                  R                  U S5        U R                  SS9nUR                  SSSS9  UR                  SSSS9  g	)
z Register flags for this command.T)requiredz--userFz        The consumer provided user which needs to be granted permission to bind with the intranet VPC corresponding to the consumer project. If this field is not provided then the service-account should be provided.
        )r   helpz--service-accountz        The consumer provided service account which needs to be granted permission to bind with the intranet VPC corresponding to the consumer project. If this field is not provided then the user should be provided.
        N)r   AddProjectArgToParserr   
ASYNC_FLAGAddToParser
SetDefaultadd_mutually_exclusive_groupadd_argument)parsergroups     /lib/surface/vmware/dns_bind_permission/grant.pyArgs
Grant.Args<   s     
'OO'OOvt,///>E	   
      c                    UR                   R                  R                  5       n[        R                  " 5       nUR
                  nUR                  X!R                  UR                  S9nU(       a!  [        R                  " UR                  SSS9  g SR                  UR                  5       S9nUR                  UR                  U5      SR                  U5      SS	9  UR!                  U5      n[        R                  " USS
9  U$ )N)userservice_accountzDNS Bind PermissionT)kindis_asyncz,{project}/locations/global/dnsBindPermission)projectz2waiting for DNS Bind Permission [{}] to be grantedF)operation_refmessage
has_result)r!   )CONCEPTSr#   Parser   DNSBindPermissionClientasync_r   r   r    r	   UpdatedResourcenameformatRelativeNameWaitForOperationGetOperationRefGet)selfargsr#   clientr"   	operationdns_bind_permissionresources           r   Run	Grant.RunR   s    mm##))+G668F{{Hii1E1E  I 	
..4t HOO$$& P  ,,Y7EMM
    zz'"H"7 Or    N)__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpstaticmethodr   r8   __static_attributes__r:   r   r   r   r   6   s!    %- *r   r   N)r?   
__future__r   r   r   googlecloudsdk.api_lib.vmwarer   googlecloudsdk.callioper   !googlecloudsdk.command_lib.vmwarer   googlecloudsdk.corer	   r@   ReleaseTracksReleaseTrackGACommandr   r:   r   r   <module>rM      sf    2 &  ' ; ( 3 #	8 D%%(()6DLL 6 *6r   