
    0                     2    S r SSKJr  SSKJr  S rS rS rg)z?Hooks for Simulation declarative style commands implementation.    )util)
propertiesc                     [         R                  R                  R                  R	                  5       nUc  [        S5      eSU-   S-   Ul        U$ )zOAdd parent path to request, since it isn't automatically populated by apitools.z#Required field project not providedz	projects/z/locations/global)r   VALUEScoreprojectGet
ValueErrorparent)
unused_refunused_argsrequestr   s       Elib/googlecloudsdk/command_lib/network_management/simulation/hooks.pySetProjectAsParentr      sJ    ""**..0'_
:
;;(+>>'.	.    c                      g)zSet location ID to global.global r   r   r   SetLocationGlobalr      s    	r   c                     UR                   (       a[  [        R                  " U5      n[        R                  " UR                   UUR                  UR
                  UR                  S9Ul        U$ )zReads the firewall-service, route-service exported resources configs and transform them into the API accepted format and update the request proto.)file_formatsimulation_typeoriginal_config_file)proposed_config_filer   GetSimulationApiVersionFromArgsPrepareSimulationChangesr   r   r   
simulation)r   argsr   api_versions       r   "ProcessSimulationConfigChangesFiler    #   s\    	66t<K66!!$$,,!66G 
.r   N)__doc__8googlecloudsdk.command_lib.network_management.simulationr   googlecloudsdk.corer   r   r   r    r   r   r   <module>r$      s     F I *
r   