
    	                     J   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  ej                  ej                  j                  ej                  j                  ej                  j                         ej"                   G d	 d
ej$                                      Zy)z'Command to create an Essential Contact.    )absolute_import)division)unicode_literals)contacts)base)flags)utilc                   &    e Zd ZdZed        Zd Zy)Createa  Create an essential contact.

  ## EXAMPLES

  To create a contact in the current project, run:

        $ {command} --email=contact-email@example.com
        --notification-categories=technical,product-updates --language=en-US

  To create a contact in the folder with id ``456'', run:

        $ {command} --email=contact-email@example.com
        --notification-categories=technical,product-updates --language=en-US
        --folder=456

  To create a contact in the organization with id ``456'', run:

        $ {command} --email=contact-email@example.com
        --notification-categories=technical,product-updates --language=en-US
        --organization=456
  c                     t        j                  | d       t        j                  | t        j                         d       t        j
                  | d       t        j                  |        y)zAdds command-specific args.T)requiredN)r   AddEmailArgAddNotificationCategoriesArgr   "GetContactNotificationCategoryEnumAddLanugageArgAddParentArgs)parsers    (lib/surface/essential_contacts/create.pyArgszCreate.Args5   sQ     
ft,	&&;;=N	$/	    c                     t        j                  |      }t        j                  |t        j                               }t        j
                         }|j                  ||j                  ||j                        S )zRuns the create command.)	r	   	GetParentGetNotificationCategoriesr   r   ContactsClientr   emaillanguage)selfargsparent_name
categoriesclients        r   Runz
Create.Run>   sY    ..&K//h99;=J$$&F==djj*dmmLLr   N)__name__
__module____qualname____doc__staticmethodr   r"    r   r   r   r      s!    ,    Mr   r   N)r&   
__future__r   r   r   )googlecloudsdk.api_lib.essential_contactsr   googlecloudsdk.callioper   -googlecloudsdk.command_lib.essential_contactsr   r	   ReleaseTracksReleaseTrackALPHABETAGAUniverseCompatibleCreateCommandr   r(   r   r   <module>r4      s    . &  ' > ( ? > D%%++T->->-C-C%%((*&MT &M *&Mr   