
    
                         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  G d
 de	j                        Zy)z2Surface for updating an App Engine domain mapping.    )absolute_import)division)unicode_literals)appengine_domains_api_client)base)domains_util)flags)logc                   0    e Zd ZdZdddZed        Zd Zy)UpdatezUpdates a domain mapping.z{description}z          To update an App Engine domain mapping, run:

              $ {command} '*.example.com' --certificate-id=1234

          To remove a certificate from a domain:

              $ {command} '*.example.com' --no-certificate-id
          )DESCRIPTIONEXAMPLESc                     t         j                  j                  |        t        j                  | d       t        j                  |        y )NT)include_no_cert)r	   DOMAIN_FLAGAddToParserAddCertificateIdFlagAddCertificateManagementFlag)parsers    )lib/surface/app/domain_mappings/update.pyArgszUpdate.Args.   s4    	!!&)	vt<	&&v.    c                    t        j                  | j                               }t        j                  |j
                  |j                  |j                         |j                  s|j
                  s|j                  rd|_        |j                  r<|j                  j                         dk(  r|j
                  s|j                  sd|_        t        j                  |j                  |j                        }|j                  |j                  |j
                  |j                  |      }t        j                  |j                         |S )NmanualT)
api_clientGetApiClientForTrackReleaseTrackr    ValidateCertificateArgsForUpdatecertificate_idno_certificate_idcertificate_managementlowerParseCertificateManagementmessagesUpdateDomainMappingdomainr
   UpdatedResource)selfargsclientmanagement_typemappings        r   Runz
Update.Run4   s   ,,T->->-@AF11$2E2E262H2H262M2MO ''			 6 6$,d!####))+x7(>(>#d"==446O((d6I6I)-)?)?)8:G $Nr   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r-    r   r   r   r      s/    ! 	- / /
r   r   N)r1   
__future__r   r   r   googlecloudsdk.api_lib.app.apir   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.appr   r	   googlecloudsdk.corer
   UpdateCommandr   r4   r   r   <module>r;      s4    9 &  ' U ( 7 0 #-T -r   