
    J                         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 ej                   ej                  ej                  j                  ej                  j                          G d	 d
ej"                                      Zy)zCommand to get an SCC service.    )absolute_import)division)unicode_literals)clients)base)flags)parsingc                   &    e Zd ZdZed        Zd Zy)Describea?  Get the details of a Security Command Center service.

  Get the details of a Security Command Center service. It
  resolves INHERITED enablement states
  to ENABLED or DISABLED for services at ancestor levels. For example, if
  the service is enabled
  at the ancestor level, services for all child resources will have the
  enablement state set to
  ENABLED.

  ## EXAMPLES

  To get the details of a Security Command Center service with name
  `sha` for organization `123`, run:

    $ {command} sha --organization=123

  To get the details of a Security Command Center service with name
  `sha` for folder `456`, run:

    $ {command} sha --folder=456

  To get the details of a Security Command Center service with ID
  `sha` for project `789`, run:

    $ {command} sha --project=789

  You can also specify the parent more generally:

    $ {command} sha --parent=organizations/123

  To get the details of modules, `[ABC, DEF]` of a Security Command
  Center service with name `sha` for organization `123`, run:

    $ {command} sha --module-list=[ABC, DEF] --organization=123
  c                     t        j                         j                  |        t        j                  d      j                  |        t        j                         j                  |        y )NT)required)r   CreateServiceNameArgAddToParserCreateParentFlagCreateModuleList)parsers    +lib/surface/scc/manage/services/describe.pyArgszDescribe.ArgsC   sI    	 ,,V4	D)55f=	((0    c                    t        j                  |      }t        j                  |      }t        j                         }|j                  |      }|s|S |j                  j                  D cg c]  }|j                  |v r| }}|S c c}w )N)	r	   GetServiceNameFromArgsGetModuleListFromArgsr   SecurityCenterServicesClientGetmodulesadditionalPropertieskey)selfargsnamemodule_listclientresponsemodule_valuefiltered_responses           r   RunzDescribe.RunI   s    ))$/D//5K113Fzz$Ho '..CCCl, C  
 s   ,BN)__name__
__module____qualname____doc__staticmethodr   r&    r   r   r   r      s!    #J 1 1
r   r   N)r*   
__future__r   r   r   *googlecloudsdk.api_lib.scc.manage.servicesr   googlecloudsdk.callioper   %googlecloudsdk.command_lib.scc.manager   r	   DefaultUniverseOnlyReleaseTracksReleaseTrackGAALPHADescribeCommandr   r,   r   r   <module>r7      sv    % &  ' > ( 7 9 D%%(($*;*;*A*AB;t## ; C ;r   