
    M                         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 d	d
dZ ej                  ej                  j                         G d dej                                Zy)7Command to create a experiment in the Project/Location.    )absolute_import)division)unicode_literals)experiments)base)
exceptions)flagsz{description}z         To create a experiment with the id `my-experiment` and file path `my/path/to/yaml`, run:

          $ {command} my-experiment --file=my/path/to/yaml
        )DESCRIPTIONEXAMPLESc                   *    e Zd ZdZeZed        Zd Zy)Creater   c                 .    t        j                  |        y )N)r
   AddCreateExperimentFlags)parsers    1lib/surface/fault_injection/experiments/create.pyArgszCreate.Args+   s    	""6*    c                    t        j                         }|j                  j                  j	                         }|j                         }|j                         st        j                  dd      |j                  st        j                  dd      |j                  |j                         |j                  |j                               S )zRun the create command.
experimentz experiment id must be non-empty.zfile path must be non-empty.)r   experiment_configparent)r   ExperimentsClientCONCEPTSr   ParseParentNamer	   InvalidArgumentExceptionfiler   RelativeName)selfargsclientexp_ref
parent_refs        r   Runz
Create.Run/   s    **,Fmm&&,,.G!J<<>//
:  99//
6  ==<<>))&&(   r   N)	__name__
__module____qualname____doc___DETAILED_HELPdetailed_helpstaticmethodr   r&    r   r   r   r   %   s!    ? -+ +r   r   N)r*   
__future__r   r   r   &googlecloudsdk.api_lib.fault_injectionr   googlecloudsdk.callioper   r	   *googlecloudsdk.command_lib.fault_injectionr
   r+   ReleaseTracksReleaseTrackALPHACreateCommandr   r.   r   r   <module>r7      sj    > &  ' > ( . < # D%%++,T  -r   