Ë
    €Ï¤  ã                   óV  — 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 ej                    ej"                  ej$                  j&                  ej$                  j(                  ej$                  j*                  «       G d
„ dej,                  «      «       «       Zy)z5Create command for Dataplex Catalog Entries Resource.é    )Úabsolute_import)Údivision)Úunicode_literals)Úentry)Ú
exceptions)Úbase)Úflags)Úresource_argsc                   óX   — e Zd ZdZddiZed„ «       Z ej                  d«      d„ «       Z	y)ÚCreatez!Create a Dataplex Entry resource.ÚEXAMPLESa9	            To create a Dataplex entry with name `my-dataplex-entry` in location
          `us-central1` in entry group `my-entry-group` and with entry type projects/my-project/locations/us-central1/entryTypes/my-type, run:

            $ {command} my-dataplex-entry --location=us-central1 --entry_group=my-entry-group --entry-type projects/my-project/locations/us-central1/entryTypes/my-type

          To create a Dataplex Entry with name `my-child-entry` and set its parent to an existing entry `my-parent-entry`, run:

            $ {command} my-child-entry --location=us-central1 --entry_group=my-entry-group --entry-type projects/my-project/locations/us-central1/entryTypes/my-type --parent-entry projects/my-project/locations/us-central1/entryGroups/my-entry-group/entries/my-parent-entry

          To create a Dataplex Entry with its description, display name, ancestors, labels and timestamps populated in its EntrySource, run:

            $ {command} my-entry --location=us-central1 --entry_group=my-entry-group --entry-type projects/my-project/locations/us-central1/entryTypes/my-type --entry-source-description 'This is a description of the Entry.' --entry-source-display-name 'display name' --entry-source-ancestors '{"type":"projects/my-project/locations/us-central1/entryTypes/some-type", "name":"projects/my-project/locations/us-central1/entryGroups/my-entry-group/entries/ancestor-entry"}, {"type":"projects/my-project/locations/us-central1/entryTypes/another-type", "name":"projects/my-project/locations/us-central1/entryGroups/my-entry-group/entries/another-ancestor-entry"}' --entry-source-labels key1=value1,key2=value2 --entry-source-create-time 2024-01-01T09:39:25.160173Z --entry-source-update-time 2024-01-01T09:39:25.160173Z

          To create a Dataplex Entry reading its aspects from a YAML file, run:

            $ {command} my-entry --location=us-central1 --entry_group=my-entry-group --entry-type projects/my-project/locations/us-central1/entryTypes/my-type --aspects aspects.yaml

          The file containing the aspects has the following format:

            my-project.us-central1.my-aspect-type:
              aspectType: my-project.us-central1.my-aspect-type
              createTime: "2024-01-01T09:39:25.160173Z"
              updateTime: "2024-01-01T09:39:25.160173Z"
              data:
                {}
          c                 ó2  — t        j                  | d«       t        j                  | «       t        j                  | «       t        j                  | «       | j                  dd¬«       t        j                  | d¬«       t        j                  | dd ¬«       y )	Nzto create the Entry.z--fully-qualified-namezsA name for the entry that can reference it in an external system. The maximum size of the field is 4000 characters.)ÚhelpF)Ú
for_updateÚaspects)Úupdate_aspects_nameÚremove_aspects_name)	r
   ÚAddProjectArgÚAddEntryResourceArgÚAddEntryTypeResourceArgÚAddParentEntryResourceArgÚadd_argumentr	   ÚAddEntrySourceArgsÚAddAspectFlags)Úparsers    ú&lib/surface/dataplex/entries/create.pyÚArgszCreate.ArgsB   s€   € ä×Ñ Ð(>Ô?Ü×%Ñ% fÔ-Ü×)Ñ)¨&Ô1Ü×+Ñ+¨FÔ3à
×ÑØ ðAð ô ô 
×Ñ˜V°Õ6Ü	×ÑØ IÀ4öó    z-Status code: {status_code}. {status_message}.c                 ó,   — t        j                  |«      S )N)Ú	entry_apir   )ÚselfÚargss     r   ÚRunz
Create.RunU   s   € ô ×Ñ˜DÓ!Ð!r   N)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__Údetailed_helpÚstaticmethodr   Úgcloud_exceptionÚ CatchHTTPErrorRaiseHTTPExceptionr#   © r   r   r   r      sQ   „ ñ
 *ð ð ð€-ð< ñó ðð$ 5Ð×4Ñ4Ø5óñ"óñ"r   r   N)r'   Ú
__future__r   r   r   Úgooglecloudsdk.api_lib.dataplexr   r    Úgooglecloudsdk.api_lib.utilr   r*   Úgooglecloudsdk.callioper   Ú#googlecloudsdk.command_lib.dataplexr	   r
   ÚDefaultUniverseOnlyÚReleaseTracksÚReleaseTrackÚALPHAÚBETAÚGAÚCreateCommandr   r,   r   r   Ú<module>r9      s‹   ðñ <õ 'Ý Ý 'å >Ý FÝ (Ý 5Ý =ð ×ÑØ€×ÑØ×Ñ×Ñ˜T×.Ñ.×3Ñ3°T×5FÑ5F×5IÑ5Ióô8"ˆT×Ñó 8"óó ñ8"r   