
                         >   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ dd	lmZ dd	lmZ ej"                  ej$                   ej&                  ej(                  j*                         G d
 dej,                                             Zddie_        y)z&Command for deleting network policies.    )absolute_import)division)unicode_literals)ClassVar)base_classes)client)base)flagsc                   L    e Zd ZU dZeej                     ed<   ed        Z	d Z
y)DeletezDelete a Compute Engine network policy.

  *{command}* is used to delete network policies. A network
  policy is a set of rules that classifies network traffic.
  NETWORK_POLICY_ARGc                     t        j                  dd      | _        | j                  j                  |d       |j                  j                  t         j                         y )NTdelete)required	operation)operation_type)r
   NetworkPolicyArgumentr   AddArgumentdisplay_infoAddCacheUpdaterNetworkPoliciesCompleter)clsparsers     .lib/surface/compute/network_policies/delete.pyArgszDelete.Args*   sO    "88C &&vh&G
''(F(FG    c                     t        j                  | j                               }| j                  j	                  ||j
                        }t        j                  ||j                        }|j                  d      S )N)compute_clientF)only_generate_request)	r   ComputeApiHolderReleaseTrackr   ResolveAsResource	resourcesr   NetworkPolicyr   )selfargsholderrefnetwork_policys        r   Runz
Delete.Run2   sc    **4+<+<+>?F

!
!
3
3D&:J:J
KC))#fmmLN  u ==r   N)__name__
__module____qualname____doc__r   compute_flagsResourceArgument__annotations__classmethodr   r*    r   r   r   r      s3     }==>>H H>r   r   EXAMPLESz    To delete a network policy with name ``my-policy'',
    in region ``my-region'', run:

      $ {command} my-policy --region=my-region
    N)r.   
__future__r   r   r   typingr   googlecloudsdk.api_lib.computer   /googlecloudsdk.api_lib.compute.network_policiesr   googlecloudsdk.callioper	   "googlecloudsdk.command_lib.computer
   r/   3googlecloudsdk.command_lib.compute.network_policiesHiddenUniverseCompatibleReleaseTracksr!   ALPHADeleteCommandr   detailed_helpr3   r   r   <module>rB      s    - &  '  7 B ( E E D%%++,>T > -  >6   r   