o
    wÔ+fÝ	  ã                   @   s,   d dl mZ d dlmZ G dd„ deƒZdS )é   )ÚGroupId)ÚGroupsToDisplayc                   @   sV   e Zd ZdZddd„Zedd„ ƒZejdd„ ƒZedd	„ ƒZejd
d	„ ƒZdd„ Z	dS )ÚAsmz*An object specifying unsubscribe behavior.Nc                 C   s0   d| _ d| _|dur|| _|dur|| _dS dS )a/  Create an ASM with the given group_id and groups_to_display.

        :param group_id: ID of an unsubscribe group
        :type group_id: GroupId, int, required
        :param groups_to_display: Unsubscribe groups to display
        :type groups_to_display: GroupsToDisplay, list(int), optional
        N)Ú	_group_idÚ_groups_to_displayÚgroup_idÚgroups_to_display)Úselfr   r   © r
   úL/var/www/html/venv/lib/python3.10/site-packages/sendgrid/helpers/mail/asm.pyÚ__init__   s   
ÿzAsm.__init__c                 C   ó   | j S )zUThe unsubscribe group to associate with this email.

        :rtype: GroupId
        )r   ©r	   r
   r
   r   r      s   zAsm.group_idc                 C   ó"   t |tƒr
|| _dS t|ƒ| _dS )zšThe unsubscribe group to associate with this email.

        :param value: ID of an unsubscribe group
        :type value: GroupId, int, required
        N)Ú
isinstancer   r   ©r	   Úvaluer
   r
   r   r   !   s   

c                 C   r   )z£The unsubscribe groups that you would like to be displayed on the
        unsubscribe preferences page. Max of 25 groups.

        :rtype: GroupsToDisplay
        )r   r   r
   r
   r   r   -   s   zAsm.groups_to_displayc                 C   r   )a  An array containing the unsubscribe groups that you would like to
        be displayed on the unsubscribe preferences page. Max of 25 groups.

        :param groups_to_display: Unsubscribe groups to display
        :type groups_to_display: GroupsToDisplay, list(int), optional
        N)r   r   r   r   r
   r
   r   r   6   s   

c                 C   s8   i }| j dur| j  ¡ |d< | jdur| j ¡ |d< |S )zŸ
        Get a JSON-ready representation of this ASM object.

        :returns: This ASM object, ready for use in a request body.
        :rtype: dict
        Nr   r   )r   Úgetr   )r	   Úasmr
   r
   r   r   C   s   

zAsm.get)N)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úpropertyr   Úsetterr   r   r
   r
   r
   r   r      s    




r   N)r   r   r   r   Úobjectr   r
   r
   r
   r   Ú<module>   s    