
    
                     n    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 d
 Zy)zGFunctions to validate that config changes can be applied to a resource.    )absolute_import)division)print_function)unicode_literals)container_resource)
exceptions)flags)
console_ioc                    | "t        j                  |d      r|j                  syt        j                  |d      r|j                  }n;t        j
                  | j                  v r| j                  t        j
                     }ny|t        j                  k7  r|t        j                  k7  ryt        j                         rt        j                  ddd       yt        j                  dj                  |            )	a  Validates that the VPC connector can be safely removed.

  Does nothing if 'clear_vpc_connector' is not present in args with value True.

  Args:
    service: A Cloud Run service object.
    args: Namespace object containing the specified command line arguments.

  Raises:
    exceptions.ConfigurationError: If the command cannot prompt and
      VPC egress is set to 'all' or 'all-traffic'.
    console_io.OperationCancelledError: If the user answers no to the
      confirmation prompt.
  Nclear_vpc_connector
vpc_egresszRemoving the VPC connector from this service will clear the VPC egress setting and route outbound traffic to the public internet.FT)messagedefaultcancel_on_nozCannot remove VPC connector with VPC egress set to "{}". Set `--vpc-egress=private-ranges-only` or run this command interactively and provide confirmation to continue.)r	   FlagIsExplicitlySetr   r   r   EGRESS_SETTINGS_ANNOTATIONtemplate_annotationsEGRESS_SETTINGS_ALLEGRESS_SETTINGS_ALL_TRAFFICr
   	CanPromptPromptContinuer   ConfigurationErrorformat)serviceargsegresss      @lib/googlecloudsdk/command_lib/run/resource_change_validators.pyValidateClearVpcConnectorr      s     o

#
#D*?
@

"
"

t\2__F448T8TT))557F "666">>>
P	 
'
'	>>DfVnN N    N)__doc__
__future__r   r   r   r   googlecloudsdk.api_lib.runr   googlecloudsdk.command_lib.runr   r	   googlecloudsdk.core.consoler
   r    r   r   <module>r&      s)    N &  % ' 9 5 0 2+Nr   