
                         ~    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Z G d	 d
ej                        Zy)z/The command to enable Identity Service Feature.    )absolute_import)division)unicode_literals)file_parsers)base)utilsz    To enable the Identity Service Feature, run:

    $ {command}

    To enable the Identity Service Feature with a fleet-level default membership configuration, run:

    $ {command} --fleet-default-member-config=/path/to/identity-service.yaml
c                   2    e Zd ZdZdeiZdZed        Zd Z	y)EnablezhEnable the Identity Service Feature.

  This command enables the Identity Service Feature in a fleet.
  EXAMPLESidentityservicec                 4    |j                  dt        d       y )Nz--fleet-default-member-configa  The path to an identity-service.yaml identity configuration
        file. If specified, this configuration would be the default Identity
        Service configuration for all memberships in your fleet. It could be
        overridden with a membership-specific configuration by using the
        the `Apply` command with the `--config` argument.

        To enable the Identity Service Feature with a fleet-level default
        membership configuration, run:

          $ {command} --fleet-default-member-config=/path/to/identity-service.yaml)typehelp)add_argumentstr)clsparsers     6lib/surface/container/fleet/identity_service/enable.pyArgszEnable.Args0   s!    
'	V      c                    |j                   s)| j                  | j                  j                               S t	        j
                  |j                   t        j                        }t        j                  || j                        }| j                  j                  | j                  j                  |            }| j                  |      S )N)	file_path	item_type)r   )fleetDefaultMemberConfig)
fleet_default_member_configr
   messagesFeaturer   YamlConfigFileLoginConfigObjectr   parse_config"CommonFleetDefaultMemberConfigSpec)selfargsloaded_configmember_configfeatures        r   Runz
Enable.RunA   s    ++[[..011 !//22002M
 &&}dmmDM mm##!%	+	+M	+	J $ LG ;;wr   N)
__name__
__module____qualname____doc__r   detailed_helpfeature_nameclassmethodr   r'    r   r   r
   r
   &   s/    
 x(-",   r   r
   N)r+   
__future__r   r   r   (googlecloudsdk.command_lib.anthos.commonr   3googlecloudsdk.command_lib.container.fleet.featuresr   ;googlecloudsdk.command_lib.container.fleet.identity_servicer   r   EnableCommandr
   r/   r   r   <module>r5      s5    6 &  ' A D M, T , r   