
                            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	KJr  SS
KJr  SSKJr  SrSr\\S.r\
R&                  " \
R(                  R*                  5       " S S\
R,                  5      5       rg)GReleases a SQL Server Reporting Services lease on a Cloud SQL instance.    )absolute_import)division)unicode_literals)api_util)
operations)validate)base)flags)log)
propertieszO    Release a SQL Server Reporting Services lease on a Cloud SQL instance.
    zg    To release a SQL Server Reporting Services lease on an instance:

    $ {command} instance-foo
    )DESCRIPTIONEXAMPLESc                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)ReleaseSsrsLease.   r   c                 B    U R                  S[        R                  SS9  g)ak  Args is called by calliope to gather arguments for this command.

Args:
  parser: An argparse parser that you can use to add arguments that go on
    the command line after this command. Positional arguments are allowed.

Returns:
  A dict object representing the operations resource describing the release
  SSRS lease operation if the operation was successful.
instancezCloud SQL instance ID.)	completerhelpN)add_argumentr   InstanceCompleter)parsers    /lib/surface/sql/instances/release_ssrs_lease.pyArgsReleaseSsrsLease.Args4   s&     ))%      c                    [         R                  " [         R                  5      nUR                  nUR                  n[
        R                  " UR                  5        UR                  R                  UR                  S[        R                  R                  R                  R                  0SS9nUR                  UR                  UR                  S9nUR                   R#                  U5      nUR                  R%                  SUR&                  UR                  S9n[(        R*                  R-                  X8S5        [.        R0                  R3                  S5        g	)
a:  Releases a SQL Server Reporting Services lease on a Cloud SQL instance.

Args:
  args: argparse.Namespace, The arguments that this command was invoked
      with.

Returns:
  A dict object representing the operations resource describing the
  release-ssrs-lease operation if the release-ssrs-lease was successful.
projectzsql.instances)params
collection)r   r   zsql.operations)	operationr   zReleasing SSRS leasez"Successfully released SSRS lease.
N)r   	SqlClientAPI_VERSION_DEFAULT
sql_clientsql_messagesr	   ValidateInstanceNamer   resource_parserParser   VALUEScorer   	GetOrFail#SqlInstancesReleaseSsrsLeaseRequest	instancesr   CreateoperationIdr   OperationsV1Beta4WaitForOperationr   statuswrite)	selfargsclientr%   r&   instance_refrequestresultoperation_refs	            r   RunReleaseSsrsLease.RunF   s)     < <=F""J&&L!!$--0))//:,,1199CCD" 0 $L
 >>&&$$ ? G
 !!227;F**11$$$$ 2 &M
   11*2HJ JJ:;r    N)__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpstaticmethodr   r<   __static_attributes__r>   r   r   r   r   .   s!    O- "$<r   r   N)rC   
__future__r   r   r   googlecloudsdk.api_lib.sqlr   r   r	   googlecloudsdk.callioper
   googlecloudsdk.command_lib.sqlr   googlecloudsdk.corer   r   r   r   rD   ReleaseTracksReleaseTrackGACommandr   r>   r   r   <module>rQ      s|    N &  ' / 1 / ( 0 # *  D%%(();<t|| ;< *;<r   