
                            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                  j                  ej                  j                         G d	 d
ej                                Zy)z)Command to validate an ETD custom module.    )absolute_import)division)unicode_literals)clients)base)flags)parsingc                   &    e Zd ZdZed        Zd Zy)Validatea  Command to validate an ETD custom module.

  ## EXAMPLES

  To validate an Event Threat Detection custom module 'config.json' with a
  module type 'CONFIGURABLE_BAD_IP', run:

    $ {command}
      --organization=organizations/252600681248
      --custom-config-file=config.json
      --module-type=CONFIGURABLE_BAD_IP

  You can also specify the parent more generally:

    $ {command}
      --parent=organizations/252600681248
      --custom-config-file=config.json
      --module-type=CONFIGURABLE_BAD_IP
  c                     t        j                  d      j                  |        t        j                  d      j                  |        t        j                  d      j                  |        y )NT)required)r   CreateParentFlagAddToParser!CreateEtdCustomConfigFilePathFlagCreateModuleTypeFlag)parsers    5lib/surface/scc/manage/custom_modules/etd/validate.pyArgszValidate.Args1   sM    	D)55f=	++T:FFvN	-99&A    c                     t        j                  |      }t        j                  |j                        }|j                  }t        j                         }|j                  |||      S )N)parentcustom_config_jsonmodule_type)r	   GetParentResourceNameFromArgsParseJSONFilecustom_config_filer   r   ETDCustomModuleClientr   )selfargsr   custom_configr   clients         r   RunzValidate.Run7   s^    2248F))$*A*ABM""K**,F??-[   r   N)__name__
__module____qualname____doc__staticmethodr   r"    r   r   r   r      s"    ( B B
	r   r   N)r&   
__future__r   r   r   %googlecloudsdk.api_lib.scc.manage.etdr   googlecloudsdk.callioper   %googlecloudsdk.command_lib.scc.manager   r	   ReleaseTracksReleaseTrackGAALPHACommandr   r(   r   r   <module>r2      sf    0 &  ' 9 ( 7 9 D%%(($*;*;*A*AB$t|| $ C$r   