
                         P   S r SSKJr  SSKJr  SSKJr  SSKrSSKJr  SSK	J
r
  SrS	rS
r\S\S\S0r\S\S\S0r\R                   " \\\   4\\\   4\\\   4/5      r\R                   " \\\   4\S4\S4/5      r\R                   " \S4\\\   4\\\   4/5      rS rS rS rg)zCProvides getters and validators for the platform flag and property.    )absolute_import)division)unicode_literalsN)
exceptions)
propertiesmanagedgke
kuberneteszCloud Run (fully managed)z-Cloud Run for Anthos deployed on Google Cloudz'Cloud Run for Anthos deployed on VMwarezFully managed version of Cloud Run. Use with the `--region` flag or set the [run/region] property to specify a Cloud Run region.zCloud Run for Anthos on Google Cloud. Use with the `--cluster` and `--cluster-location` flags or set the [run/cluster] and [run/cluster_location] properties to specify a cluster in a given zone.zUse a Knative-compatible kubernetes cluster. Use with the `--kubeconfig` and `--context` flags to specify a kubeconfig file and the context for connecting.zDCloud Run for Anthos on Google Cloud. Not supported by this command.zLUse a Knative-compatible kubernetes cluster.  Not supported by this command.zBFully managed version of Cloud Run. Not supported by this command.c                  f    [         R                  R                  R                  R	                  5       $ )zReturns the platform to run on.

If set by the user, returns whatever value they specified without any
validation. If not set by the user, default to managed

)r   VALUESrunplatformGet     /lib/googlecloudsdk/command_lib/run/platforms.pyGetPlatformr   Q   s%     
					'	'	+	+	--r   c                     [        5       [        :w  a1  [        R                  " SSR	                  [        5       [        S95      eU$ )a*  Validate the specified platform is managed.

This method is referenced by the declarative iam commands which only work
against the managed platform.

Args:
  unused_ref: ref to the service.
  unused_args: Namespace, The args namespace.
  req: The request to be made.

Returns:
  Unmodified request
z
--platformzThe platform [{platform}] is not supported by this operation. Specify `--platform {managed}` or run `gcloud config set run/platform {managed}`.)r   r   )r   PLATFORM_MANAGEDcalliope_exceptionsBadArgumentExceptionformat)
unused_refunused_argsreqs      r   ValidatePlatformIsManagedr   [   sH     ]&&

2
2 66<f ],< 7= 7>? ?
 
*r   c                  $    [        5       [        :H  $ )N)r   r   r   r   r   	IsManagedr   r   s    	*	**r   )__doc__
__future__r   r   r   collectionsgooglecloudsdk.callioper   r   googlecloudsdk.corer   r   PLATFORM_GKEPLATFORM_KUBERNETESPLATFORM_SHORT_DESCRIPTIONS_PLATFORM_LONG_DESCRIPTIONSOrderedDict	PLATFORMSPLATFORMS_MANAGED_ONLYPLATFORMS_ANTHOS_ONLYr   r   r   r   r   r   <module>r,      sA   J &  '  E * "  1AB  
* 
$ 
;   ##23CDE.|<=56IJK% 	 %0023CDEKMS	2   $//IK.|<=56IJK	1  ..+r   