
    Vh                         d dl mZmZmZ eZd dlZd dlmZ d dl	m
Z
mZmZmZmZmZ d Z ej"                  ej$                         G d de             Zy)    )absolute_importdivisionprint_functionN)six)check_type_boolcheck_type_dictcheck_type_floatcheck_type_intcheck_type_listcheck_type_strc                     |dk(  rt        |       S |dk(  rt        |       S |dk(  rt        |       S |dk(  rt        |       S |dk(  rt	        |       S |dk(  rt        |       S | S )Nstrlistdictboolintfloat)r   r   r   r   r
   r	   )value	type_names     o/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/community/dns/plugins/module_utils/provider.pyensure_typer      sy    Ee$$Fu%%Fu%%Fu%%Ee$$G&&L    c                       e Zd Zej                  d        Zej                  d        Zej                  d        Zej                  d        Zd Z	d Z
ej                  d        Zd Zy	)
ProviderInformationc                      y)zT
        Return the (short) type for zone IDs, like ``'int'`` or ``'str'``.
        N selfs    r   get_zone_id_typez$ProviderInformation.get_zone_id_type,       r   c                      y)zV
        Return the (short) type for record IDs, like ``'int'`` or ``'str'``.
        Nr   r   s    r   get_record_id_typez&ProviderInformation.get_record_id_type2   r    r   c                      y)z
        Return the default TTL for records, like 300, 3600 or None.
        None means that some other TTL (usually from the zone) will be used.
        Nr   r   s    r   get_record_default_ttlz*ProviderInformation.get_record_default_ttl8   r    r   c                      y)z:
        Return a list of supported record types.
        Nr   r   s    r   get_supported_record_typesz.ProviderInformation.get_supported_record_types?   r    r   c                     |xs dS )ae  
        Given a prefix (string or None), return its normalized form.

        The result should always be None for the trivial prefix, and a non-zero length DNS name
        for a non-trivial prefix.

        If a provider supports other identifiers for the trivial prefix, such as '@', this
        function needs to convert them to None as well.
        Nr   )r   prefixs     r   normalize_prefixz$ProviderInformation.normalize_prefixE   s     ~r   c                      y)zL
        Return whether the API supports some kind of bulk actions.
        Fr   r   s    r   supports_bulk_actionsz)ProviderInformation.supports_bulk_actionsQ   s     r   c                      y)aC  
        Return how the API handles TXT records.

        Returns one of the following strings:
        * 'decoded' - the API works with unencoded values
        * 'encoded' - the API works with encoded values
        * 'encoded-no-char-encoding' - the API works with encoded values, but without character encoding
        Nr   r   s    r   txt_record_handlingz'ProviderInformation.txt_record_handlingW   r    r   c                      y)a  
        Return how the API handles escape sequences in TXT records.

        Returns one of the following strings:
        * 'octal' - the API works with octal escape sequences
        * 'decimal' - the API works with decimal escape sequences

        This return value is only used if txt_record_handling returns 'encoded'.

        Note: the default return value changed from 'octal' to 'decimal' in community.dns 3.0.0.
        decimalr   r   s    r   txt_character_encodingz*ProviderInformation.txt_character_encodingb   s     r   N)__name__
__module____qualname__abcabstractmethodr   r"   r$   r&   r)   r+   r-   r0   r   r   r   r   r   *   s     
 	 
 	  	 

 	 r   r   )
__future__r   r   r   type__metaclass__r4   ansible.module_utilsr   &ansible.module_utils.common.validationr   r   r	   r
   r   r   r   add_metaclassABCMetaobjectr   r   r   r   <module>r>      s[    A @   $   3;;C& C  Cr   