
                             S r SSKJr  SSKJr  SSKJr  SSKJr  \R                   " S S\R                  5      5       rg)	zCImplementation of enable command for enabling storage intelligence.    )storage_intelligence_api)base)flags)logc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
Enable   zEnables storage intelligence.z
          Enable storage intelligence plan for the organization, sub-folder or project
          along with filters. The command sets `STANDARD` edition by default if
          no other edition flags like ``--trial-edition`` are specified.
      a  
          To remove buckets from the storage intelligence plan, Use the following
          command with ``--exclude-bucket-id-regexes'' flag.
          to specify list of bucket id regexes.,

            $ {command} --organization=my-org --exclude-bucket-id-regexes="my-bucket-.*"

          To apply location based filters in the storage intelligence plan, Use
          ``--include-locations'' or ``--exclude-locations'' flags to specify allowed
          list of locations or excluded list of locations. The following
          command updates storage intelligence plan of sub-folder `123456` with the
          specified list of included locations.,

            $ {command} --sub-folder=123456 --include-locations="us-east1","us-west1"

          The following command enables storage intelligence with Trial edition
          for the given project,

            $ {command} --project=my-project --trial-edition
      )DESCRIPTIONEXAMPLESc                     UR                  S5        [        R                  " U5        UR                  SS9n[        R                  " U5        g )NFSETTINGS)category)SetSortArgsr   ,add_storage_intelligence_configs_level_flags	add_group/add_storage_intelligence_configs_settings_flags)clsparsersettingss      2lib/surface/storage/intelligence_configs/enable.pyArgsEnable.Args8   s?    
u	66v>4H	99(C    c           
         [         R                  " 5       nUR                  (       aR  UR                  UR                  S UR                  UR
                  UR                  UR                  UR                  S9nOUR                  (       aR  UR                  UR                  S UR                  UR
                  UR                  UR                  UR                  S9nOQUR                  UR                  S UR                  UR
                  UR                  UR                  UR                  S9n[        R                  R                  SR!                  UR"                  5      5        U$ )N)inherit_from_parenttrial_editioninclude_locationsexclude_locationsinclude_bucket_id_regexesexclude_bucket_id_regexesz7Successfully enabled storage intelligence plan for {}.
)r   StorageIntelligenceApiproject"update_project_intelligence_configr   r   r   r   r    
sub_folder%update_sub_folder_intelligence_config'update_organization_intelligence_configorganizationr   statusPrintformatname)selfargsclientintelligence_configs       r   Run
Enable.Run?   sB   %<<>F||

3
3ll"& .. $ 6 6 $ 6 6(,(F(F(,(F(F 4   
"HH
//"** 22 22$($B$B$($B$B I  #JJ


"** 22 22$($B$B$($B$B K  JJBII$$	

 r    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpclassmethodr   r0   __static_attributes__r2   r   r   r   r      s1    %


-2 D D)r   r   N)r7   googlecloudsdk.api_lib.storager   googlecloudsdk.callioper   "googlecloudsdk.command_lib.storager   googlecloudsdk.corer   DefaultUniverseOnlyCommandr   r2   r   r   <module>rA      s?     J C ( 4 # KT\\ K Kr   