
                             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d
lmZ ddlmZ dZdZdZdZddZ	 	 	 	 ddedee   fdZd Zy)z*Flags for Security Profile Group commands.    )absolute_import)division)unicode_literals)List)spg_api)concepts)deps)concept_parsers)presentation_specs)	resourcesz8networksecurity.organizations.locations.securityProfilesz=networksecurity.organizations.locations.securityProfileGroupsz--threat-prevention-profileSECURITY_PROFILE_GROUPc                 ,    | j                  d|d       y )Nz--descriptionz/Brief description of the security profile group)requiredhelp)add_argument)parserr   s     <lib/googlecloudsdk/command_lib/network_security/spg_flags.pyAddProfileGroupDescriptionr   (   s    <      Narg_namearg_aliasesc                 V   t        j                  |      }t        j                  j	                         j                  t        |      }|j                  d      r|dd }t        j                  dddt        j                  d      t        j                  t        j                  t              g|d      g      }	t        j                  d	d
dt        j                  d      t        j                  t        j                  t              g|d      g      }
t        j                  ddd      }|r|D ]  }d| d}d| d}| j                  |ddd       | j                  |ddd       |	j                  j                  dt        j                  |             |
j                  j                  dt        j                  |              t        j                   t"        d||	|
|      }t%        j&                  d| ||||d      }t)        j*                  |g      j-                  |       S )a  Adds Security Profile resource.

  Args:
    parser: The parser for the command.
    release_track: The release track for the command.
    arg_name: The name used for the arg, e.g. "--threat-prevention-profile" or
      "--custom-mirroring-profile".
    help_text: The help text for the resource.
    group: The group that the resource is an argument of.
    required: Whether the resource is required.
    arg_aliases: The list of aliases for the arg, for backwards compatibility.
      Sub-flags named {alias}-organization and {alias}-location will be added to
      the parser and used as fallthrough args for the resource.

  Returns:
      The resource parser.
  z--   Norganizationz(Organization ID of the Security Profile.organizationsIdz--organization)parameter_namefallthroughslocationzd
      Location of the {resource}.
      NOTE: Only `global` security profiles are supported.
      locationsIdz
--locationnamez$Name of security profile {resource}.securityProfilesIdr   z-organizationz	-locationFTz(Flag to preserve backward compatibility.)r   hiddenr   r   zSecurity Profile)api_versionr   r   r!   )r    concept_specr   
group_helpgroupprefixes)r   GetApiVersionr   REGISTRYCloneGetCollectionInfo+_SECURITY_PROFILE_GROUP_RESOURCE_COLLECTION
startswithr    ResourceParameterAttributeConfigr	   ArgFallthroughFullySpecifiedAnchorFallthroughr   r   insertResourceSpec%_SECURITY_PROFILE_RESOURCE_COLLECTIONr   ResourcePresentationSpecr
   ConceptParserAddToParser)r   release_trackr   	help_textr'   r   r   r$   collection_infoorganization_resource_speclocation_resource_specprofile_id_resource_spec	arg_aliasorg_flag_aliasloc_flag_aliasresource_specpresentation_specs                    r   AddSecurityProfileResourcerC   0   sP   4 %%m4+&&,,.@@1;/ |H'HH0&


.
/

.
.%%A
 	 $ $DD
 #


l
+

.
.%%A
 * &FF,)  	I;m4nI;i0n
9	   
9	   !--44
T  0 ))00
T  0) !0 ''+0(1- )AAz?  
	&	&(9':	;	G	G	OOr   c                 r   t         }t        j                  t        dt	        j
                  |      t        j                  ddd      t        j                  ddd      t        j                  dd	d
            }t        j                  ||dd      }t        j                  |g      j                  |       S )zAdds Security Profile Group.security_profile_groupr   z)Organization ID of Security Profile Groupr   r"   r   z$location of the {resource} - Global.r   z*Name of security profile group {resource}.securityProfileGroupsId)resource_collectionresource_namer$   r   r   rF   TzSecurity Profile Group Name.)r    r%   r   r&   )%_SECURITY_PROFILE_GROUP_RESOURCE_NAMEr   r3   r-   r   r)   r/   r   r5   r
   r6   r7   )r   r8   r    rA   rB   s        r   AddSecurityProfileGroupResourcerJ      s    	.$''E,''6??

5*
 ;;

0&
 'GG
"
62-( )AA /	 
	&	&(9':	;	G	G	OOr   )F)z"Path to Security Profile resource.NFN)__doc__
__future__r   r   r   typingr   ?googlecloudsdk.api_lib.network_security.security_profile_groupsr    googlecloudsdk.calliope.conceptsr   r	   (googlecloudsdk.command_lib.util.conceptsr
   r   googlecloudsdk.corer   r4   r-   (_THREAT_PREVENTION_PROFILE_RESOURCE_NAMErI   r   strrC   rJ    r   r   <module>rU      s    1 &  '  S 5 1 D G ) ? & D , ,I ((@ % 3
!xP xP cxPvPr   