
    0	                     n    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  G d dej                        Z
y	)
z1The command to disable Policy Controller Feature.    )absolute_import)division)unicode_literals)base)flagsc                   *    e Zd ZdZdZed        Zd Zy)DisablezDisable (Uninstall) Policy Controller.

  Uninstalls Policy Controller.

  ## EXAMPLES

  To uninstall Policy Controller, run:

    $ {command}
  policycontrollerc                     |j                  d      }t        j                         j                  |       t        j                  |d      }|j                          y )NT)mutexdisable)add_argument_groupr   no_fleet_default_cfg_flagAddToParser	PocoFlagsadd_memberships)clsparser	top_group	cmd_flagss       7lib/surface/container/fleet/policycontroller/disable.pyArgszDisable.Args'   sJ     )))5I	##%11)<	95I    c                    i }| j                   j                  j                  | j                   j                  j                  j                        }| j                   j                  |      }t	        j
                  |ddd      }|D ]=  }|}| j                   j                  | j                   j                  |            ||<   ? | j                   j                  | j                  j                  |            }| j                  dg|      S )	N)installSpecTF)promptprompt_cancelsearch)policyControllerHubConfig)r
   )membershipSpecsmembership_specs)messagesPolicyControllerHubConfigInstallSpecValueValuesEnumINSTALL_SPEC_NOT_INSTALLEDr   ParseMembershipsPluralMembershipFeatureSpecPolicyControllerMembershipSpecFeature	hubclientToMembershipSpecsUpdate)	selfargsr!   poco_not_installedpoco_hub_configmemberships
membershipmembership_pathpatchs	            r   RunzDisable.Run0   s   @@[[//JJee mm==& > O --TtK "
"o*.--*M*M==GG(7 H  +N +' " MM!!889IJ " E ;;*+U33r   N)__name__
__module____qualname____doc__feature_nameclassmethodr   r5    r   r   r	   r	      s%    	 $,   4r   r	   N)r9   
__future__r   r   r   3googlecloudsdk.command_lib.container.fleet.featuresr   ;googlecloudsdk.command_lib.container.fleet.policycontrollerr   UpdateCommandr	   r<   r   r   <module>rA      s+    8 &  ' D M04d   04r   