
                  
          d Z ddlmZ ddlmZ ddlmZ ddlZddl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$                  dd      Z e	j$                  dd ej(                  d ej*                  d      d            Z e	j.                  dddgddd      Z e	j$                  ddd      Zd Zd  Zy)!z/Shared flags definitions for multiple commands.    )absolute_import)division)print_functionN)actions)base)errors)resource_args)concept_parsers)
propertiesz--page-tokena  
      Response objects will return a non-null value for page-token to
      indicate that there is at least one additional page of data. User can
      either directly request that page by specifying the page-token
      explicitly or let gcloud fetch one-page-at-a-time.)helpz--read-timez
      Time used as a reference point when filtering. Absence of this field
      will default to the API's version of NOW. See $ gcloud topic datetimes
      for information on supported time formats.z            The --read-time option is deprecated.
            For more information, [see the deprecation notice](https://cloud.google.com/security-command-center/docs/release-notes#April_15_2024)
            on the SCC release notes page.F)warnremoved)r   actionz--api-versionv1	v2enabledzr
      This is a temporary flag to be used for testing the Security Command
      Center v2 api before its launch.T)choiceshelp_strdefaulthiddenz
--locationaY  
      When data residency controls are enabled, this attribute specifies the location in which
      the resource is located and applicable. The `location` attribute can be
      provided as part of the fully specified resource name or with the `--location`
      argument on the command line. The default location is `global`.
      NOTE: If you override the endpoint to a [regional endpoint](https://cloud.google.com/security-command-center/docs/reference/rest/index.html?rep_location=global#regional-service-endpoint)
      you must specify the correct [data location](https://cloud.google.com/security-command-center/docs/data-residency-support#locations) using this flag.
      The default location on this command is unrelated to the default location
      that is specified when data residency controls are enabled
      for Security Command Center.global)r   r   c            	          ddddddddgdgd	d
} t        j                  dddddd|       g}t        j                  |g       gS )z$Add Parent as a positional resource.parentzsecuritycenter.organizationsorganizationsIda:  (Optional) Provide the full resource name,
          [RESOURCE_TYPE/RESOURCE_ID], of the parent organization, folder, or
          project resource. For example, `organizations/123` or `parent/456`.
          If the parent is an organization, you can specify just the
          organization ID. For example, `123`.z5googlecloudsdk.command_lib.scc.flags:GetDefaultParentzSet the parent property in configuration using `gcloud
              config set scc/parent` if it is not specified in command line)hookhint)parameter_nameattribute_namer   fallthroughsfalse)name
collection
attributesdisable_auto_completersz'to be used for the `gcloud scc` commandz{name} organization, folder, or project in the Google Cloud resource hierarchy {verb}. Specify the argument as either [RESOURCE_TYPE/RESOURCE_ID] or [RESOURCE_ID], as shown in the preceding examples.TF)verbr    	help_textrequiredprefixes
positionalresource_data)r	   GetResourcePresentationSpecr
   ConceptParser)parent_spec_data	arg_specss     +lib/googlecloudsdk/command_lib/scc/flags.pyAppendParentArgr/   S   s     2-$2 NO  	 ")#* //8%
 ()  
'
'	2
6	77    c                  z   t        j                  d      } t        j                  d      }t        j                  j                  j
                  j                         }|j                  |      rd|z   }| j                  |      s7|j                  d      s&|j                  d      st        j                  d      |S )z@Converts user input to one of: organization, project, or folder.zorganizations/[0-9]+$z[0-9]+zorganizations/z	projects/zfolders/zWParent must match either [0-9]+, organizations/[0-9]+, projects/.*
      or folders/.*.)recompiler   VALUESsccr   Getmatch
startswithr   InvalidSCCInputError)organization_resource_pattern
id_patternr   s      r.   GetDefaultParentr<   |   s    "$**-D"Ezz(#*  ''++-&f&F#))&1			;	'			:	&

%
%	  
-r0   )__doc__
__future__r   r   r   r2   textwrapgooglecloudsdk.callioper   r   googlecloudsdk.command_lib.sccr   $googlecloudsdk.command_lib.util.argsr	   (googlecloudsdk.command_lib.util.conceptsr
   googlecloudsdk.corer   ArgumentPAGE_TOKEN_FLAGDeprecationActiondedentREAD_TIME_FLAGChoiceArgumentAPI_VERSION_FLAGLOCATION_FLAGr/   r<    r0   r.   <module>rN      s     6 &  % 	  + ( 1 > D *$--
< 
4 %7$$X__ . /   '4&&;*   	
&  &8Rr0   