Ë
    €Ï[  ã                   ó’   — 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)zCreate a new import job.é    )Úabsolute_import)Údivision)Úunicode_literals)Úbase)Ú
exceptions)Úflags)Úmapsc                   ó,   — e Zd ZdZed„ «       Zd„ Zd„ Zy)ÚCreatea~  Create a new import job.

  Creates a new import job within the given keyring.

  ## EXAMPLES

  The following command creates a new import job named 'strider' within the
  'fellowship' keyring, and 'us-central1' location:

    $ {command} strider --location=us-central1 \
        --keyring=fellowship --import-method=rsa-oaep-3072-sha256-aes-256 \
        --protection-level=hsm
  c                 ó.  — t        j                  | d«       t        j                  | d«       t        j                  | «       t        j                  | «       t        j
                  | d«       | j                  j                  t         j                  «       y )Nz
import jobz	to create)	r   ÚAddKeyRingFlagÚAddLocationFlagÚAddRequiredProtectionLevelFlagÚAddRequiredImportMethodFlagÚAddPositionalImportJobArgumentÚdisplay_infoÚAddCacheUpdaterÚKeyRingCompleter)Úparsers    ú%lib/surface/kms/import_jobs/create.pyÚArgszCreate.Args+   sh   € ä	×Ñ˜ Ô.Ü	×Ñ˜& ,Ô/Ü	×(Ñ(¨Ô0Ü	×%Ñ% fÔ-Ü	×(Ñ(¨°Ô=à
×Ñ×'Ñ'¬×(>Ñ(>Õ?ó    c           
      ó   — t        j                  «       }|j                  st        j                  d«      ‚|j
                  st        j                  d«      ‚t        j                  |«      }t        j                  |«      }|j                  |j                  «       |j                  «       |j                  t        j                  j                  |j                  «      t        j                   j                  |j
                  «      ¬«      ¬«      S )NzD--protection-level needs to be specified when creating an import jobzA--import-method needs to be specified when creating an import job)ÚprotectionLevelÚimportMethod)ÚparentÚimportJobIdÚ	importJob)Úcloudkms_baseÚGetMessagesModuleÚprotection_levelr   ÚArgumentErrorÚimport_methodr   ÚParseImportJobNameÚParseParentFromResourceÚ8CloudkmsProjectsLocationsKeyRingsImportJobsCreateRequestÚRelativeNameÚNameÚ	ImportJobr	   ÚIMPORT_PROTECTION_LEVEL_MAPPERÚGetEnumForChoiceÚIMPORT_METHOD_MAPPER)ÚselfÚargsÚmessagesÚimport_job_refÚ
parent_refs        r   Ú_CreateRequestzCreate._CreateRequest5   sï   € Ü×.Ñ.Ó0€Hà× Ò Ü×$Ñ$Ø
Póð ð ×ÒÜ×$Ñ$Ø
MóOð Oô ×-Ñ-¨dÓ3€NÜ×.Ñ.¨~Ó>€Jà×LÑLØ×&Ñ&Ó(Ø"×'Ñ'Ó)Ø×$Ñ$Ü ×?Ñ?ßÑ˜d×3Ñ3Ó4Ü×2Ñ2×CÑCØ×"Ñ"ó$ð %ó %ð Mó &ð &r   c                 ó~   — t        j                  «       }|j                  j                  | j	                  |«      «      S )N)r   ÚGetClientInstanceÚ&projects_locations_keyRings_importJobsr   r2   )r-   r.   Úclients      r   ÚRunz
Create.RunM   s7   € Ü×,Ñ,Ó.€FØ×8Ñ8×?Ñ?Ø×Ñ˜DÓ!ó#ð #r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ústaticmethodr   r2   r7   © r   r   r   r      s'   „ ñð ñ@ó ð@ò&ó0#r   r   N)r;   Ú
__future__r   r   r   Úgooglecloudsdk.api_lib.cloudkmsr   r   Úgooglecloudsdk.callioper   Úgooglecloudsdk.command_lib.kmsr   r	   ÚCreateCommandr   r=   r   r   Ú<module>rC      s4   ðñ å &Ý Ý 'å AÝ (Ý .Ý 0Ý /ô4#ˆT×Ñõ 4#r   