
                            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	  ej                  ej                  j                  ej                  j                        ej                   G d d	ej                                      Zy
)z,List all route views for Meshes or Gateways.    )absolute_import)division)unicode_literals)base)flags)utilc                   &    e Zd ZdZed        Zd Zy)Lista  Route View for a Mesh or Gateway.

  List all Route Views for a Mesh or Gateway

  ## EXAMPLES

  List Route Views for a mesh.

    $ {command} --mesh projects/-/locations/-/meshes/mesh1
    $ {command} --project $PROJECT --location $LOCATION --mesh
    projects/-/locations/-/meshes/mesh1
  List Route Views for a gateway.

    $ {command} --gateway projects/-/locations/-/gateways/gateway1
    $ {command} --project $PROJECT --location $LOCATION --gateway
    projects/-/locations/-/gateways/gateway1
  c                     t        j                  |        t        j                  |        | j                  j	                  d       y)zSet args for route-views list.z,
     table(
        name:label=NAME
      )N)r   AddFilteredListFlagsAddGatewayAndMeshFlagsdisplay_info	AddFormat)parsers    0lib/surface/network_services/route_views/list.pyArgsz	List.Args1   s9     
v&	  (
!! #     c                    d}|j                  d      r5|j                  j                  j                         }|j	                         }nE|j                  d      r4|j                  j
                  j                         }|j	                         }t        j                  | j                         ||j                  |j                        S )N meshgateway)IsSpecifiedCONCEPTSr   ParseRelativeNamer   r   ListRouteViewsReleaseTrack	page_sizelimit)selfargsnamer   r   s        r   RunzList.Run<   s    D]]%%'d d			)	$%%++-g!!#dT4>>4:: r   N)__name__
__module____qualname____doc__staticmethodr   r#    r   r   r
   r
      s     
$  r   r
   N)r'   
__future__r   r   r   googlecloudsdk.callioper   +googlecloudsdk.command_lib.network_servicesr   r   ReleaseTracksr   ALPHAGADefaultUniverseOnlyListCommandr
   r)   r   r   <module>r2      sw    3 &  ' ( = < T..11 *4 * *r   