
     ^                     @   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d Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z d Z!d Z"d Z#d  Z$d! Z%d" Z&d# Z'd$ Z(d% Z)d& Z*d' Z+d( Z,d) Z-d* Z.d+ Z/d, Z0d- Z1d. Z2d/ Z3d0 Z4d1 Z5d2 Z6d3 Z7d4 Z8d5 Z9d6 Z:d7 Z;d8 Z<dSd9Z=dSd:Z>d; Z?dSd<Z@dSd=ZAdSd>ZBdSd?ZCdSd@ZDdSdAZEdSdBZFdSdCZGdSdDZHdSdEZIdSdFZJdSdGZKdH ZLdI ZMdSdJZNdSdKZOdSdLZPdSdMZQdSdNZRdSdOZSdP ZTdSdQZUyR)Tz.Shared resource args for the Dataplex surface.    )absolute_import)division)unicode_literals)concepts)deps)	yaml_data)concept_parsers)
propertiesz@%!#DATAPLEX_GENERATE_UUID@%!#c                  N    t        j                  ddt         j                        S )zGets Project spec.zdataplex.projectsprojects)resource_name
projectsId)r   ResourceSpec DEFAULT_PROJECT_ATTRIBUTE_CONFIG     8lib/googlecloudsdk/command_lib/dataplex/resource_args.pyGetProjectSpecr      s$    			::
 r   c                  r    t        j                  ddt         j                  t               t	                     S )zGets Lake resource spec.z!dataplex.projects.locations.lakeslakes)r   r   locationsIdlakesId)r   r   r   LocationAttributeConfigLakeAttributeConfigr   r   r   GetLakeResourceSpecr   (   s0    			)::)+!#
 r   c            	          t        j                  ddt         j                  t               t	               t                     S )zGets Zone resource spec.z'dataplex.projects.locations.lakes.zoneszones)r   r   r   r   zonesId)r   r   r   r   r   ZoneAttributeConfigr   r   r   GetZoneResourceSpecr    3   6    			/::)+!#!#
 r   c            
          t        j                  ddt         j                  t               t	               t               t                     S )zGets Asset resource spec.z.dataplex.projects.locations.lakes.zones.assetsassets)r   r   r   r   r   assetsId)r   r   r   r   r   r   AssetAttributeConfigr   r   r   GetAssetResourceSpecr&   ?   s<    			6::)+!#!##%
 r   c            	          t        j                  ddt         j                  t               t	               t                     S )zGets Content resource spec.z.dataplex.projects.locations.lakes.contentitemscontent)r   r   r   r   contentitemsId)r   r   r   r   r   ContentAttributeConfigr   r   r   GetContentitemResourceSpecr+   L   s6    			6::)+!#+-
 r   c            	          t        j                  ddt         j                  t               t	               t                     S )zGets Task resource spec.z'dataplex.projects.locations.lakes.taskstasks)r   r   r   r   tasksId)r   r   r   r   r   TaskAttributeConfigr   r   r   GetTaskResourceSpecr0   X   r!   r   c            	          t        j                  ddt         j                  t               t	               t                     S )zGets Environment resource spec.z.dataplex.projects.locations.lakes.environmentsenvironments)r   r   r   r   environmentsId)r   r   r   r   r   EnvironmentAttributeConfigr   r   r   GetEnvironmentResourceSpecr5   d   s6    			6"::)+!#/1
 r   c                  r    t        j                  ddt         j                  t               t	                     S )zGets Datascan resource spec.z%dataplex.projects.locations.dataScansdatascan)r   r   r   dataScansId)r   r   r   r   DatascanAttributeConfigr   r   r   GetDatascanResourceSpecr:   p   s0    			-::)+)+
 r   c                  r    t        j                  ddt         j                  t               t	                     S )z Gets DataTaxonomy resource spec.z*dataplex.projects.locations.dataTaxonomieszdata taxonomy)r   r   r   dataTaxonomiesId)r   r   r   r   DataTaxonomyAttributeConfigr   r   r   GetDataTaxonomyResourceSpecr>   {   s0    			2#::)+24
 r   c                  r    t        j                  ddt         j                  t               t	                     S )z(Gets DataAttributeBinding resource spec.z1dataplex.projects.locations.dataAttributeBindingszdata attribute binding)r   r   r   dataAttributeBindingsId)r   r   r   r   #DataAttributeBindingAttributeConfigr   r   r   #GetDataAttributeBindingResourceSpecrB      s0    			9,::)+AC
 r   c            	          t        j                  ddt         j                  t               t	               t                     S )z"Gets Data Attribute resource spec.z5dataplex.projects.locations.dataTaxonomies.attributeszdata attribute)r   r   r   r<   attributesId)r   r   r   r   r=   DataAttributeConfigr   r   r   GetDataAttributeResourceSpecrF      s6    			=$::)+24&(
 r   c                  r    t        j                  ddt         j                  t               t	                     S )zGets Entry Group resource spec.z'dataplex.projects.locations.entryGroupszentry group)r   r   r   entryGroupsId)r   r   r   r   EntryGroupAttributeConfigr   r   r   !GetDataplexEntryGroupResourceSpecrJ      0    			/!::)+-/
 r   c                  r    t        j                  ddt         j                  t               t	                     S )zGets Aspect Type resource spec.z'dataplex.projects.locations.aspectTypeszaspect type)r   r   r   aspectTypesId)r   r   r   r   AspectTypeAttributeConfigr   r   r   !GetDataplexAspectTypeResourceSpecrO      rK   r   c                  r    t        j                  ddt         j                  t               t	                     S )zGets Entry Type resource spec.&dataplex.projects.locations.entryTypes
entry typer   r   r   entryTypesId)r   r   r   r   EntryTypeAttributeConfigr   r   r    GetDataplexEntryTypeResourceSpecrV      s0    			. ::)++-
 r   c                  f    t        j                  ddt               t               t	                     S )zGets EntryType resource spec.rQ   rR   rS   )r   r   EntryTypeProjectAttributeConfig EntryTypeLocationAttributeConfigEntryTypeConfigr   r   r   GetEntryTypeResourceSpecr[      s-    			. 0224"$
 r   c            	          t        j                  ddt         j                  t               t	               t                     S )zGets Entry Link resource spec.z2dataplex.projects.locations.entryGroups.entryLinksz
entry link)r   r   r   rH   entryLinksId)r   r   r   r   rI   EntryLinkAttributeConfigr   r   r    GetDataplexEntryLinkResourceSpecr_      s6    			: ::)+-/+-
 r   c                  r    t        j                  ddt         j                  t               t	                     S )z"Gets GovernanceRule resource spec.z+dataplex.projects.locations.governanceRuleszgovernance rule)r   r   r   governanceRulesId)r   r   r   r   GovernanceRuleAttributeConfigr   r   r   GetGovernanceRuleResourceSpecrc      s0    			3%::)+57
 r   c                  r    t        j                  ddt         j                  t               t	                     S )zGets Glossary resource spec.z&dataplex.projects.locations.glossariesglossary)r   r   r   glossariesId)r   r   r   r   GlossaryAttributeConfigr   r   r   GetGlossaryResourceSpecrh      s0    			.::)+*,
 r   c            	          t        j                  ddt         j                  t               t	               t                     S )z%Gets Glossary Category resource spec.z1dataplex.projects.locations.glossaries.categorieszglossary category)r   r   r   rf   categoriesId)r   r   r   r   rg   GlossaryCategoryAttributeConfigr   r   r   GetGlossaryCategoryResourceSpecrl      s6    			9'::)+*,24
 r   c            	          t        j                  ddt         j                  t               t	               t                     S )z!Gets Glossary Term resource spec.z,dataplex.projects.locations.glossaries.termszglossary term)r   r   r   rf   termsId)r   r   r   r   rg   GlossaryTermAttributeConfigr   r   r   GetGlossaryTermResourceSpecrp      s6    			4#::)+*,)+
 r   c                  r    t        j                  ddt         j                  t               t	                     S )z Gets Metadata Job resource spec.z(dataplex.projects.locations.metadataJobszmetadata job)r   r   r   metadataJobsId)r   r   r   r   MetadataJobAttributeConfigr   r   r   GetMetadataJobResourceSpecrt     s0    			0"::)+/1
 r   c                  f    t        j                  ddt               t               t	                     S )z$Gets EncryptionConfig resource spec.z2dataplex.organizations.locations.encryptionConfigszencryption config)r   organizationsIdr   encryptionConfigsId)r   r   OrganizationAttributeConfigr   EncryptionConfigAttributeConfigr   r   r   GetEncryptionConfigResourceSpecrz     s-    			:'13)+9;
 r   c                  0    t        j                  dd      S )Nzentry-type-projectz&The project of the EntryType resource.name	help_textr    ResourceParameterAttributeConfigr   r   r   rX   rX     s    		2	28
 r   c                  0    t        j                  dd      S )Nzentry-type-locationz'The location of the EntryType resource.r|   r   r   r   r   rY   rY      s    		2	2 9
 r   c                      t        j                  dt        j                  t	        j
                  d            gd      S )Nlocationzdataplex/locationz&The location of the Dataplex resource.r}   fallthroughsr~   )r   r   r   PropertyFallthroughr
   
FromStringr   r   r   r   r   '  s<    		2	2

"
":#8#89L#M
N 9
 r   c                  0    t        j                  dd      S )Nlakez-The identifier of the Dataplex lake resource.r|   r   r   r   r   r   r   1      		2	2L
 r   c                  0    t        j                  dd      S )Nzonez-The identifier of the Dataplex zone resource.r|   r   r   r   r   r   r   7  r   r   c                  0    t        j                  dd      S )Nassetz.The identifier of the Dataplex asset resource.r|   r   r   r   r   r%   r%   =  s    		2	2N
 r   c                  0    t        j                  dd      S )Nr(   z"The name of the {resource} to use.r|   r   r   r   r   r*   r*   C  s    		2	2 D
 r   c                  0    t        j                  dd      S )NenvironmentThe name of {resource} to use.r|   r   r   r   r   r4   r4   I      		2	2$D
 r   c                  0    t        j                  dd      S )Ndata_taxonomyr   r|   r   r   r   r   r=   r=   O      		2	2&F
 r   c                  0    t        j                  dd      S )Ndata_attributer   r|   r   r   r   r   rE   rE   U  s    		2	2'G
 r   c                  0    t        j                  dd      S )Ndata_attribute_bindingr   r|   r   r   r   r   rA   rA   [  s    		2	2#/O
 r   c                  0    t        j                  dd      S )Nzentry-groupr   r|   r   r   r   r   rI   rI   a  r   r   c                  0    t        j                  dd      S )Naspect_typer   r|   r   r   r   r   rN   rN   g  r   r   c                  0    t        j                  dd      S N
entry_typer   r|   r   r   r   r   rU   rU   m      		2	2#C
 r   c                  0    t        j                  dd      S )Nz
entry-linkr   r|   r   r   r   r   r^   r^   s  r   r   c                  0    t        j                  dd      S )N	dataScansr   r|   r   r   r   r   r9   r9   y  s    		2	2"B
 r   c                  0    t        j                  dd      S r   r   r   r   r   rZ   rZ     r   r   c                  0    t        j                  dd      S )Ngovernance_ruler   r|   r   r   r   r   rb   rb     s    		2	2(H
 r   c                  0    t        j                  dd      S )Nre   r   r|   r   r   r   r   rg   rg     s    		2	2!A
 r   c                  0    t        j                  dd      S )Nglossary_categoryr   r|   r   r   r   r   rk   rk         		2	2*J
 r   c                  0    t        j                  dd      S )Nglossary_termr   r|   r   r   r   r   ro   ro     r   r   c                  f    t        j                  dt        j                  t        d      gd      S )Nmetadata_jobz9job ID is optional and will be generated if not specified)hintr   r   )r   r   r   ValueFallthroughGENERATE_IDr   r   r   rs   rs     s8    		2	2
 

N 1
 r   c                  0    t        j                  dd      S )Nencryption_configr   r|   r   r   r   r   ry   ry     r   r   c                  0    t        j                  dd      S )Norganizationr   r|   r   r   r   r   rx   rx     s    		2	2%E
 r   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )z1Adds a resource argument for a Dataplex Datascan.r7   z
--datascanzAArguments and flags that define the Dataplex datascan you want {}Trequired)r	   ConceptParserForResourcer:   formatAddToParserparserverb
positionalr}   s       r   AddDatascanResourceArgr     M    !|$		&	&	2	2
Ivd| 
3 
 Kr   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )z'Adds a resource argument for a project.projectz	--projectz7Arguments and flags that define the project you want {}Tr   )r	   r   r   r   r   r   r   s       r   AddProjectArgr     sO     k$		&	&	2	2
?FFtL	 
3 

 Kr   c                  0    t        j                  dd      S )Ntaskz-The identifier of the Dataplex task resource.r|   r   r   r   r   r/   r/     r   r   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )z-Adds a resource argument for a Dataplex Lake.r   z--lakez=Arguments and flags that define the Dataplex lake you want {}Tr   )r	   r   r   r   r   r   r   s       r   AddLakeResourceArgr     T    8$		&	&	2	2
ELL
  
3 
 Kr   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )z-Adds a resource argument for a Dataplex Zone.r   z--zonez=Arguments and flags that define the Dataplex zone you want {}Tr   )r	   r   r   r    r   r   r   s       r   AddZoneResourceArgr     r   r   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )z.Adds a resource argument for a Dataplex Asset.r   z--assetz>Arguments and flags that define the Dataplex asset you want {}Tr   )r	   r   r   r&   r   r   r   s       r   AddAssetResourceArgr     sT    I$		&	&	2	2
FMM
  
3 
 Kr   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )z0Adds a resource argument for a Dataplex Content.r(   z	--contentzThe Content {}Tr   )r	   r   r   r+   r   r   r   s       r   AddContentitemResourceArgr     sO     k$		&	&	2	2
 "d#	 
3 

 Kr   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )z-Adds a resource argument for a Dataplex Task.r   z--taskz=Arguments and flags that define the Dataplex task you want {}Tr   )r	   r   r   r0   r   r   r   s       r   AddTaskResourceArgr     r   r   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )z4Adds a resource argument for a Dataplex Environment.r   z--environmentzThe Environment {}Tr   )r	   r   r   r5   r   r   r   s       r   AddEnvironmentResourceArgr     sO    $/$		&	&	2	2
 "!!$'	 
3 

 Kr   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )z6Adds a resource argument for a Dataplex Data Taxonomy.r   z--data_taxonomyzThe DataTaxonomy {}Tr   )r	   r   r   r>   r   r   r   s       r   AddDataTaxonomyResourceArgr      sP    &,=$		&	&	2	2
!#""4(	 
3 

 Kr   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )z2Adds a resource argument for a Dataplex Attribute.r   z--data_attributezThe DataAttribute {}Tr   )r	   r   r   rF   r   r   r   s       r   AddAttributeResourceArgr   +  sQ    '	-?$		&	&	2	2
"$##D)	 
3 

 Kr   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )z=Adds a resource argument for a Dataplex DataAttributeBinding.r   z--data_attribute_bindingzThe DataAttributeBinding {}Tr   )r	   r   r   rB   r   r   r   s       r   "AddDataAttributeBindingResourceArgr   6  sQ    %/	!5O$		&	&	2	2
)+#**40	 
3 

 Kr   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )z3Adds a resource argument for a Dataplex EntryGroup.entry_groupz--entry-groupzDArguments and flags that define the Dataplex entry group you want {}Tr   )r	   r   r   rJ   r   r   r   s       r    AddDataplexEntryGroupResourceArgr   A  M    $/$		&	&	2	2
')Lvd| 
3 
 Kr   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )z3Adds a resource argument for a Dataplex AspectType.r   z--aspect_typezDArguments and flags that define the Dataplex aspect type you want {}Tr   )r	   r   r   rO   r   r   r   s       r    AddDataplexAspectTypeResourceArgr   M  r   r   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )2Adds a resource argument for a Dataplex EntryType.r   z--entry_typezCArguments and flags that define the Dataplex entry type you want {}Tr   )r	   r   r   rV   r   r   r   s       r   AddDataplexEntryTypeResourceArgr   Y  M    #$		&	&	2	2
&(Kvd| 
3 
 Kr   c                 v    t         j                  j                  dt               dd      j	                  |       S )r   z--entry-typezMArguments and flags that define the Dataplex EntryType you want to reference.Tr   )r	   r   r   r[   r   )r   s    r   AddEntryTypeResourceArgr   e  s=    		&	&	2	2  
3 
 Kr   c                     t         j                  j                  d      }t        j                  j                  dt        j                  j                  |j                         d      dd      j                  |       S )z.Adds a resource argument for a Dataplex Entry.dataplex.entryentryT)is_positionalzIArguments and flags that define the Dataplex Entry you want to reference.r   r   ResourceYAMLDataFromPathr	   r   r   r   r   FromYamlGetDatar   r   
entry_datas     r   AddEntryResourceArgr   p  sp    ))223CD*		&	&	2	2$$Z%7%7%9$N 
3 
 Kr   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )z2Adds a resource argument for a Dataplex EntryLink.
entry_linkz--entry-linkzCArguments and flags that define the Dataplex entry link you want {}Tr   )r	   r   r   r_   r   r   r   s       r   AddDataplexEntryLinkResourceArgr   |  r   r   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )z7Adds a resource argument for a Dataplex GovernanceRule.r   z--governance_rulezHArguments and flags that define the Dataplex governance rule you want {}Tr   )r	   r   r   rc   r   r   r   s       r   AddGovernanceRuleResourceArgr     sO    (	.A$		&	&	2	2
#%Pvd| 
3 
 Kr   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )z1Adds a resource argument for a Dataplex Glossary.re   z
--glossaryzAArguments and flags that define the Dataplex Glossary you want {}Tr   )r	   r   r   rh   r   r   r   s       r   AddGlossaryResourceArgr     r   r   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )z:Adds a resource argument for a Dataplex Glossary Category.r   z--glossary_categoryzJArguments and flags that define the Dataplex Glossary Category you want {}Tr   )r	   r   r   rl   r   r   r   s       r   AddGlossaryCategoryResourceArgr     Q     *	0E$		&	&	2	2
%' 
3 
 Kr   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )z6Adds a resource argument for a Dataplex Glossary Term.r   z--glossary_termzFArguments and flags that define the Dataplex Glossary Term you want {}Tr   )r	   r   r   rp   r   r   r   s       r   AddGlossaryTermResourceArgr     sP    &,=$		&	&	2	2
!# 
3 
 Kr   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )z9Adds a resource argument for a Dataplex EncryptionConfig.r   z--encryption_configzIArguments and flags that define the Dataplex EncryptionConfig you want {}Tr   )r	   r   r   rz   r   r   r   s       r   AddEncryptionConfigResourceArgr    r   r   c           	         t         j                  j                  d      }t        j                  j                  dt        j                  j                  |j                               ddgdgdddd      j                  |       S )	z5Adds a resource argument for a Dataplex Entry parent.r   z--parent-entryzGArguments and flags that define the parent Entry you want to reference.z
--locationz--entry_group)r   r    )command_level_fallthroughsflag_name_overridesr   r   s     r   AddParentEntryResourceArgr    s    ))223CD*		&	&	2	2$$Z%7%7%9:O $n)*"
  
3 
  K!r   c                     |rdnd}t         j                  j                  |t               dj	                  |      d      j                  |       S )z4Adds a resource argument for a Dataplex MetadataJob.r   z--metadata_jobzDArguments and flags that define the Dataplex metdata job you want {}Tr   )r	   r   r   rt   r   r   r   s       r   AddMetadataJobResourceArgr    sN    %+;$		&	&	2	2
 "Lvd| 
3 
 Kr   N)T)V__doc__
__future__r   r   r    googlecloudsdk.calliope.conceptsr   r   $googlecloudsdk.command_lib.util.apisr   (googlecloudsdk.command_lib.util.conceptsr	   googlecloudsdk.corer
   r   r   r   r    r&   r+   r0   r5   r:   r>   rB   rF   rJ   rO   rV   r[   r_   rc   rh   rl   rp   rt   rz   rX   rY   r   r   r   r%   r*   r4   r=   rE   rA   rI   rN   rU   r^   r9   rZ   rb   rg   rk   ro   rs   ry   rx   r   r   r/   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r   r   r   <module>r     s   5 &  ' 5 1 : D * /	
							 	



										,	r   