
    %              
           S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  Sr
S	 rS
 rS rS\S\S\S\S\4
S jrS rS rS rS rS rS rS rg)z.Helper class to handle non-compute references.    )absolute_import)division)unicode_literals)network_security)network_services)	resourcesz-https://certificatemanager.googleapis.com/v1/c                 (    SR                  XX#XE5      $ )zECreates a reference to a non-compute resource in the full URL format.z{}{}/{}/locations/{}/{}/{})format)base_uricontainer_typecontainer_namelocationcollection_nameresource_names         9lib/googlecloudsdk/command_lib/compute/reference_utils.pyBuildFullResourceUrlr      s!     
&	,	,X-;-<
M M    c                     [        U SXX45      $ )Note: base_uri ends with slash.projectsr   r   project_namer   r   r   s        r   +BuildFullResourceUrlForProjectBasedResourcer   &   s     
h
L-
> >r   c                      [        U SUSX#5      $ )r   organizationsglobalr   )r   org_idr   r   s       r   'BuildFullResourceUrlForOrgBasedResourcer   .   s     
h-
> >r   r   r   bac_namerelease_trackreturnc                 D    [        [        R                  " U5      U USUS9$ )a  Builds the URL for a BackendAuthenticationConfig resource.

Args:
  project_name: The project name of the BackendAuthenticationConfig.
  location: The location of the BackendAuthenticationConfig.
  bac_name: The name of the BackendAuthenticationConfig.
  release_track: The release track of the BackendAuthenticationConfig.

Returns:
  The URL for the BackendAuthenticationConfig resource.
backendAuthenticationConfigsr   r   r   GetApiBaseUrl)r   r   r    r!   s       r   #BuildBackendAuthenticationConfigUrlr'   5   s+     
5--m<4
 r   c                 B    [        [        R                  " 5       U USUS9$ )NserverTlsPoliciesr   r%   )r   r   policy_names      r   BuildServerTlsPolicyUrlr+   L   s'    	4--/)
! !r   c                 D    [        [        R                  " U5      U USUS9$ )NserviceLbPoliciesr   )r   r   r&   )r   r   r*   r!   s       r   BuildServiceLbPolicyUrlr.   U   s)    	4--m<)
! !r   c                     [        [        R                  " [        R                  R                  R
                  5      U USUS9$ )NserviceBindingsr   )r   r   r&   baseReleaseTrackGA)r   r   binding_names      r   BuildServiceBindingUrlr5   ^   s>    	4--



,
,
/
/1' 
" "r   c                 d    [         R                  " SS5      =(       d    [        n[        UU USUS9$ )Ncertificatemanagerv1certificatesr   )r   r&   CERTIFICATE_MANAGER_BASE_APIr   )r   r   certificate_namer   s       r   BuildCcmCertificateUrlr<   h   s>    2D9 &	%  
5$$
 r   c                 T    U R                  S5      S   UR                  S5      S   :H  $ )z8Compares relative resource references (skips namespace).r      )split)url1url2s     r   CompareUrlRelativeReferencesrB   v   s)    	J		"djj&<Q&?	??r   c                 H   ^  [        [        [        U 4S jU5      5      5      $ )Nc                    > [        TU 5      $ N)rB   )refurls    r   <lambda>!UrlInReferences.<locals>.<lambda>~   s    9#sCr   )boollistfilter)rG   
referencess   ` r   UrlInReferencesrN   {   s&    	

C
 r   c                 6   ^ [        [        U4S jU 5      5      $ )Nc                 &   > [        U T5      (       + $ rE   )rN   )rF   references_to_removes    r   rH   "FilterReferences.<locals>.<lambda>   s    oc3GHIr   )rK   rL   )rM   rQ   s    `r   FilterReferencesrS      s    	I
 r   N)__doc__
__future__r   r   r   googlecloudsdk.api_libr   r   googlecloudsdk.corer   r:   r   r   r   strr'   r+   r.   r5   r<   rB   rN   rS    r   r   <module>rZ      s    5 &  ' 3 3 )  O M>>!$03DG.!!"@
r   