
    Q                     >   d Z ddlmZ ddlmZ ddlmZ ddl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 g dZ ej&                  ej(                  j*                  ej(                  j,                         G d dej.                               Zddde_        y)z@Command for configuring autoscaling of a managed instance group.    )absolute_import)division)unicode_literalsN)encoding)base_classes)managed_instance_groups_utils)base)flags)files)
creationTimestampidkindnameregionselfLinkstatusstatusDetailstargetzonec                   &    e Zd ZdZed        Zd Zy)ExportAutoscalingzBExport autoscaling parameters of a managed instance group to JSON.c                 l    t         j                  j                  |        | j                  dddd       y )Nz--autoscaling-filePATHTzDPath of the file to which autoscaling configuration will be written.)metavarrequiredhelp)instance_groups_flags%MULTISCOPE_INSTANCE_GROUP_MANAGER_ARGAddArgumentadd_argument)parsers    Alib/surface/compute/instance_groups/managed/export_autoscaling.pyArgszExportAutoscaling.Args'   s:    ??KK
	      c                    t        j                  | j                               }|j                  }t	        j
                  ||j                  |      }t        j                  ||j                  |      }|r)t        j                  |      }t        D ]
  }||v s||=  nd }t        j                  |j                  t        j                   |             y )N)r   ComputeApiHolderReleaseTrackclientr   CreateGroupReference	resourcesr   AutoscalerForMigByRefr   MessageToDict_IGNORED_FIELDSr   WriteFileContentsautoscaling_filejsondumps)selfargsholderr(   igm_ref
autoscalerautoscaler_dictfs           r"   RunzExportAutoscaling.Run2   s    **4+<+<+>?F]]F#88  $(G /DD  '+J ..z:o!a   o	D114::o3NOr$   N)__name__
__module____qualname____doc__staticmethodr#   r9    r$   r"   r   r   #   s    J Pr$   r   z9Export autoscaling parameters of a managed instance groupa*  
        *{command}* exports the autoscaling parameters of the specified managed
instance group.

Autoscalers can use one or more autoscaling signals. Information on using
multiple autoscaling signals can be found here: [](https://cloud.google.com/compute/docs/autoscaler/multiple-signals)
        )briefDESCRIPTION)r=   
__future__r   r   r   r0   apitools.base.pyr   googlecloudsdk.api_lib.computer   r   googlecloudsdk.callioper	   2googlecloudsdk.command_lib.compute.instance_groupsr
   r   googlecloudsdk.core.utilr   r-   ReleaseTracksr'   BETAALPHACommandr   detailed_helpr?   r$   r"   <module>rM      s    G &  '  % 7 H ( ] *L D%%**D,=,=,C,CDP P EPF I	#  r$   