
                         J   S r SSKJr  SSKJr  SSKJr  SSK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r\
R                   " \
R"                  R$                  \
R"                  R&                  5       " S
 S\R(                  \R*                  \R,                  5      5       rg)z0The command to enable Config Management feature.    )absolute_import)division)unicode_literalsN)api_lib)core)base)commandc                   8    \ rS rSrSrSr\S 5       rS rS r	Sr
g)	Enable   aL  Enable Config Management feature.

Enables the Config Management feature in a fleet.
Without any flags, this command no-ops if the feature is already enabled.
This command can also enable the feature with a [fleet-default membership
configuration](https://cloud.google.com/kubernetes-engine/fleet-management/docs/manage-features)
for Config Sync.

## EXAMPLES

To enable the Config Management feature, run:

  $ {command}

To enable the Config Management feature with a fleet-default membership
configuration for Config Sync, run:

  $ {command} --fleet-default-member-config=config.yaml
configmanagementc                 $    UR                  SSS9  g )Nz--fleet-default-member-configa  Path to YAML file that contains the [fleet-default membership configuration](https://cloud.google.com/kubernetes-engine/fleet-management/docs/manage-features) to enable with a new feature. This file shares the syntax of the `--config` flag on the `apply` command: see recognized fields [here](https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/reference/gcloud-apply-fields). Errors if the Policy Controller or Hierarchy Controller field is set. This flag will also enable or update the fleet-default membership configuration on an existing feature. See the `apply` command for how to sync a membership to the fleet-default membership configuration.)help)add_argument)clsparsers     7lib/surface/container/fleet/config_management/enable.pyArgsEnable.Args8   s    
'9      c                      U R                  U5      ng ! [        R                  R                  R                  R
                   a-  n[        R                  R                  R                  USS9eS nAff = f)Nz	{message})error_format)	enable_feature_with_fdcapitoolsr   py
exceptions	HttpErrorr   utilHttpException)selfargs_es       r   Run
Enable.RunK   s`    O

&
&t
,a==&&00 OLL##11!+1NNOs    2A3(A..A3c                    U R                   R                  5       nUR                  (       aM  U R                  UR                  5      nU R                   R	                  US9Ul         U R                  S/U5      $ U R                  U5      $ ! [        R                  R                   aG  n[        R                  " U5      [        R                  " U R                  5       5      :w  a  e  SnANqSnAff = f)zEnable feature and fleet-default membership configuration, if specified.

Args:
  args: Command arguments.
Returns:
  Enabled or updated GKE Hub Feature.
)r   fleet_default_member_configN)messagesFeaturer'   parse_config_management"CommonFleetDefaultMemberConfigSpecfleetDefaultMemberConfigUpdater   r   Errorsix	text_typeFeatureNotEnabledErrorr   )r    r!   featurespecr#   s        r   r   Enable.enable_feature_with_fdcR   s     mm##%G''))$*J*JKd
--
:
:# ;  &
{{9:GDD ;;w __"" ==s}}T-H-H-JKK
 Ls   &B
 
C/(=C**C/ N)__name__
__module____qualname____firstlineno____doc__feature_nameclassmethodr   r$   r   __static_attributes__r5   r   r   r   r      s+    ( $, $O r   r   )r:   
__future__r   r   r   r   googlecloudsdkr   r   googlecloudsdk.callioper   <googlecloudsdk.command_lib.container.fleet.config_managementr	   3googlecloudsdk.command_lib.container.fleet.featuresfeatures_baser/   ReleaseTracksReleaseTrackALPHABETAEnableCommandUpdateCommandCommonr   r5   r   r   <module>rK      s    7 &  '  "  ( P U 
 D%%++T->->-C-CDH ]((((^^H  EH r   