
    9
                         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	lmZ  G d
 dej                        Zy)z9Command to create a monitored project in a metrics scope.    )absolute_import)division)unicode_literals)metrics_scopes)base)flags)util)logc                   &    e Zd ZdZed        Zd Zy)Deletea  Delete a monitored project in a metrics scope.

  This command can fail for the following reasons:
  * The projects specified do not exist.
  * The active account does not have permission to access one of the given
  project.

  More details can be found at
  https://cloud.google.com/monitoring/api/ref_v3/rest/v1/locations.global.metricsScopes.projects/delete

  ## EXAMPLES

  The following command adds a monitored project with the ID
  `monitored-project-1` to a metrics scope with project id `metrics-scope-1`
  assuming the `metrics-scope-1` is the default project:

    $ {command} projects/monitored-project-1

  The following command adds a monitored project with the ID
  `monitored-project-1` to a metrics scope with project id `metrics-scope-1`:

    $ {command} projects/monitored-project-1 --project=metrics-scope-1
    $ {command}
    locations/global/metricsScopes/metrics-scope-1/projects/monitored-project-1
  c                 L    t        j                  d      j                  |        y )Ndelete)r   %GetMonitoredResourceContainerNameFlagAddToParser)parsers    /lib/surface/monitoring/metrics_scopes/delete.pyArgszDelete.Args7   s    	//9EEfM    c                     t        j                         }t        j                  |j                  d      \  }}|j                  ||      }t        j                  |j                  ||      d       |S )NTzmonitored project)	r   MetricsScopeClientmonitoring_utilParseMonitoredProject!monitored_resource_container_namer   r
   DeletedResourceMonitoredProjectName)selfargsclientmetrics_scope_refmonitored_project_refresults         r   Runz
Delete.Run;   sr    ..0F--22D	
 -,
 ]],.CDF##$57LM Mr   N)__name__
__module____qualname____doc__staticmethodr   r"    r   r   r   r      s"    4 N Nr   r   N)r&   
__future__r   r   r   !googlecloudsdk.api_lib.monitoringr   googlecloudsdk.callioper   %googlecloudsdk.command_lib.monitoringr   r	   r   googlecloudsdk.corer
   DeleteCommandr   r(   r   r   <module>r/      s5    @ &  ' < ( 7 I #*T *r   