
                         N    d Z ddlmZ ddlmZ ddlmZ ddlmZ  G d de      Zy)	z'Format and filter resource info module.    )absolute_import)division)unicode_literals)resource_transformc                   ,    e Zd ZdZ	 	 	 	 	 	 	 ddZd Zy)ResourceInfoa  Format and filter resource info.

  (DEPRECATED) attributes are used by core.resource.resource_registry which
  is being phased out.

  Attributes:
    bypass_cache: True if cache_command output should be used instead of cache.
    cache_command: The gcloud command string that updates the URI cache.
    list_command: The gcloud command string that lists URIs one per line.
    list_format: The default list format string for resource_printer.Print().
    defaults: The resource projection transform defaults.
    transforms: Memoized combined transform symbols dict set by GetTransforms().
    async_collection: (DEPRECATED) The operations collection when --async is
      set.
    collection: (DEPRECATED) Memoized collection name set by Get().

  Special format values:
    None: Ignore this format.
    'default': calliope.base.DEFAULT_FORMAT.
    'error': Resource print using this format is an error.
    'none': Do not print anything.
  Nc                     || _         || _        || _        || _        || _        || _        d | _        d | _        || _        y )N)	bypass_cachecache_commandlist_commandlist_formatdefaults
transforms_transforms
collectionasync_collection)selfr
   r   r   r   r   r   r   s           1lib/googlecloudsdk/core/resource/resource_info.py__init__zResourceInfo.__init__1   sK     %D&D$D"DDM DOD DO,D    c                    | j                   r| j                   S g }|j                  t        j                                | j                  r2t        j                  | j                        }|r|j                  |       | j
                  r|j                  | j
                         t        |      dk(  r|d   | _         | j                   S i | _         |D ]  }| j                   j                  |        | j                   S )zReturns the combined transform symbols dict.

    Returns:
      The builtin transforms combined with the collection specific transforms
      if any.
       r   )r   appendr   GetTransformsr   r   lenupdate)r   all_transformsr   s      r   r   zResourceInfo.GetTransformsE   s     N ,::<= %33DOODj	j) DOO, >a'*d 	 d&*
+ ' r   )FNNNNNN)__name__
__module____qualname____doc__r   r    r   r   r   r      s(    0 "!  $-("r   r   N)	r!   
__future__r   r   r   googlecloudsdk.core.resourcer   objectr   r"   r   r   <module>r&      s$     . &  ' ;N6 Nr   