
                         B   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  \R                   " S
SS9\R"                  " \R$                  R&                  \R$                  R(                  5       " S S\R*                  5      5       5       rg)z*Cloud Pub/Sub subscription modify command.    )
exceptions)subscriptions)base)flags)resource_args)util)log)
propertiesFzPThis command has been renamed. Please use `modify-message-ack-deadline` instead.)
is_removedwarningc                   .    \ rS rSrSr\S 5       rS rSrg)ModifyAckDeadline   zModifies the ACK deadline for a specific Cloud Pub/Sub message.

This method is useful to indicate that more time is needed to process a
message by the subscriber, or to make the message available for
redelivery if the processing was interrupted.
c                     [         R                  " U S5        [        R                  " U SSS9  [        R                  " U SS9  g )Nzmessages belong to.zmodify the deadline for.T)add_deprecated)required)r   AddSubscriptionResourceArgr   AddAckIdFlagAddAckDeadlineFlag)parsers    7lib/surface/pubsub/subscriptions/modify_ack_deadline.pyArgsModifyAckDeadline.Args+   s6    ,,V5JK	v9$O	Vd3    c                 R   [         R                  " 5       nUR                  R                  R	                  5       n[
        R                  " U5      nSn0 n UR                  X4UR                  5      nU V	s/ s H  oS   PM	     n
n	U Vs/ s H  oU
;  d  M
  UPM     nn["        R$                  R'                  SR)                  UR                  SR+                  U5      UR-                  5       5      5        U
(       aW  ["        R$                  R'                  SR)                  UR                  SR+                  U
5      UR-                  5       5      5        U(       a  U$ [.        R0                  R2                  R4                  R7                  5       nU(       a  UR-                  5       UUR                  S.nU$ ! [        R                   aS  n[        R                  " U5      n[        R                  " UR                  R                   5      nU(       d  e  SnAGNSnAff = fs  sn	f s  snf )a   This is what gets called when the user runs this command.

Args:
  args: an argparse namespace. All the arguments that were provided to this
    command invocation.

Returns:
  Display dictionary with information about the new ACK deadline seconds
  for the given subscription and ackId.
NAckIdzUSet ackDeadlineSeconds to [{0}] for messages with ackId [{1}]] for subscription [{2}],z\Set ackDeadlineSeconds to [{0}] for messages with ackId [{1}]] failed for subscription [{2}])subscriptionIdackIdackDeadlineSeconds)r   SubscriptionsClientCONCEPTSsubscriptionParser   ParseAckIdsArgsr   ack_deadlineapi_ex	HttpErrorr   HttpExceptionr   ParseExactlyOnceErrorInfopayloaddetailsr	   statusPrintformatjoinRelativeNamer
   VALUESpubsublegacy_outputGetBool)selfargsclientsubscription_refack_idsresultack_ids_and_failure_reasonserrorexcackfailed_ack_idsack_idsuccessfully_processed_ack_idsr4   s                 r   RunModifyAckDeadline.Run1   s    ..0F}}11779##D)GF"$
''(8(,(9(9;f /JJ.Is'l.INJ$&$6n(DW # & JJ 55;V**"@A)6686:;
 	jj117.!9++-2/0
 #((%%,,::BBDM,99; $ 1 1f MI  $$U+c$($B$B
++

%! ) ) K&s+   F5 5H		H$H$5H	AHH N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   rC   __static_attributes__rE   r   r   r   r      s      4 4
8r   r   N)rJ   apitools.base.pyr   r'   googlecloudsdk.api_lib.pubsubr   googlecloudsdk.api_lib.utilgooglecloudsdk.callioper   !googlecloudsdk.command_lib.pubsubr   r   r   googlecloudsdk.corer	   r
   	DeprecateReleaseTracksReleaseTrackBETAALPHACommandr   rE   r   r   <module>rY      s    1 2 7 2 ( 3 ; 2 # * -. D%%**D,=,=,C,CDF F E	.
Fr   