HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/boto/route53/__pycache__/record.cpython-310.pyc
o

ckF[a9�@s8gd�ZddlmZGdd�de�ZGdd�de�ZdS))�A�AAAA�TXT�CNAME�MX�PTR�SRV�SPF�)�	ResultSetcsteZdZdZdZdZd�fdd�	Zdd�Z					dd
d�Zdd
�Z	dd�Z
dd�Z�fdd�Z�fdd�Z
�ZS)�ResourceRecordSetsz�
    A list of resource records.

    :ivar hosted_zone_id: The ID of the hosted zone.
    :ivar comment: A comment that will be stored with the change.
    :ivar changes: A list of changes.
    a@<?xml version="1.0" encoding="UTF-8"?>
    <ChangeResourceRecordSetsRequest xmlns="https://route53.amazonaws.com/doc/2013-04-01/">
            <ChangeBatch>
                <Comment>%(comment)s</Comment>
                <Changes>%(changes)s</Changes>
            </ChangeBatch>
        </ChangeResourceRecordSetsRequest>zM<Change>
        <Action>%(action)s</Action>
        %(record)s
    </Change>NcsD||_||_||_g|_d|_d|_d|_tt|��	dt
fg�dS)N�ResourceRecordSet)�
connection�hosted_zone_id�comment�changes�next_record_name�next_record_type�next_record_identifier�superr�__init__�Record)�selfr
rr��	__class__��5/usr/lib/python3/dist-packages/boto/route53/record.pyr4szResourceRecordSets.__init__cCs@|jrd�dd�|jD��}n
d�dd�|D��}d|j|fS)N�,cS�g|]}|���qSr��__repr__)�.0�crrr�
<listcomp>@�z/ResourceRecordSets.__repr__.<locals>.<listcomp>cSrrr)r �recordrrrr"Br#z<ResourceRecordSets:%s [%s])r�joinr)r�record_listrrrr>s�zResourceRecordSets.__repr__�Xc

Cs2t||||||||	|
||d�}
|j�||
g�|
S)a�	
        Add a change request to the set.

        :type action: str
        :param action: The action to perform ('CREATE'|'DELETE'|'UPSERT')

        :type name: str
        :param name: The name of the domain you want to perform the action on.

        :type type: str
        :param type: The DNS record type.  Valid values are:

            * A
            * AAAA
            * CNAME
            * MX
            * NS
            * PTR
            * SOA
            * SPF
            * SRV
            * TXT

        :type ttl: int
        :param ttl: The resource record cache time to live (TTL), in seconds.

        :type alias_hosted_zone_id: str
        :param alias_dns_name: *Alias resource record sets only* The value
            of the hosted zone ID, CanonicalHostedZoneNameId, for
            the LoadBalancer.

        :type alias_dns_name: str
        :param alias_hosted_zone_id: *Alias resource record sets only*
            Information about the domain to which you are redirecting traffic.

        :type identifier: str
        :param identifier: *Weighted and latency-based resource record sets
            only* An identifier that differentiates among multiple resource
            record sets that have the same combination of DNS name and type.

        :type weight: int
        :param weight: *Weighted resource record sets only* Among resource
            record sets that have the same combination of DNS name and type,
            a value that determines what portion of traffic for the current
            resource record set is routed to the associated location

        :type region: str
        :param region: *Latency-based resource record sets only* Among resource
            record sets that have the same combination of DNS name and type,
            a value that determines which region this should be associated with
            for the latency-based routing

        :type alias_evaluate_target_health: bool
        :param alias_evaluate_target_health: *Required for alias resource record
            sets* Indicates whether this Resource Record Set should respect the
            health status of any health checks associated with the ALIAS target
            record which it is linked to.

        :type health_check: str
        :param health_check: Health check to associate with this record

        :type failover: str
        :param failover: *Failover resource record sets only* Whether this is the
            primary or secondary resource record set.
        )�alias_hosted_zone_id�alias_dns_name�
identifier�weight�region�alias_evaluate_target_health�health_check�failover)rr�append)r�action�name�type�ttlr(r)r*r+r,r-r.r/�changerrr�
add_changeFsE�zResourceRecordSets.add_changecCs|j�||g�dS)z@Add an existing record to a change set with the specified actionN)rr0)rr1r5rrr�add_change_record�sz$ResourceRecordSets.add_change_recordcCsJd}|jD]}|d|d��d�}||j|7}q|j|d�}|j|S)zcConvert this ResourceRecordSet into XML
        to be saved via the ChangeResourceRecordSetsRequest�r	�)r1r$)rr)r�to_xml�	ChangeXMLr�ChangeResourceRecordSetsBody)r�
changesXMLr5�changeParams�paramsrrrr:�s

zResourceRecordSets.to_xmlcCs,|jsddl}|��|_|j�|j|���S)zCommit this changer	N)r
�boto�connect_route53�
change_rrsetsrr:)rr@rrr�commit�s
zResourceRecordSets.commitcsJ|dkr	||_dS|dkr||_dS|dkr||_dStt|��|||�S)znOverwritten to also add the NextRecordName,
        NextRecordType and NextRecordIdentifier to the base object�NextRecordName�NextRecordType�NextRecordIdentifierN)rrrrr�
endElement�rr2�valuer
rrrrG�s


zResourceRecordSets.endElementc#sj�tt|���}|j}|r3|D]}|Vq|jr*d|_|jj|j|j|j|j	d�}nd}||_|s
dSdS)z,Override the next function to support pagingF)r2r3r*N)
rr�__iter__�is_truncatedr
�get_all_rrsetsrrrr)r�results�	truncated�objrrrrJ�s���zResourceRecordSets.__iter__)NNN)	r'NNNNNNNN)�__name__�
__module__�__qualname__�__doc__r<r;rrr6r7r:rCrGrJ�
__classcell__rrrrrs 

�N
rc@s�eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
Z				dd
d�Z
dd�Zdd�Z	ddd�Zdd�Zdd�Zdd�Zdd�ZdS) rzAn individual ResourceRecordSetz!<HealthCheckId>%s</HealthCheckId>z�<ResourceRecordSet>
        <Name>%(name)s</Name>
        <Type>%(type)s</Type>
        %(weight)s
        %(body)s
        %(health_check)s
    </ResourceRecordSet>z_
        <SetIdentifier>%(identifier)s</SetIdentifier>
        <Weight>%(weight)s</Weight>
    z_
        <SetIdentifier>%(identifier)s</SetIdentifier>
        <Region>%(region)s</Region>
    ze
        <SetIdentifier>%(identifier)s</SetIdentifier>
        <Failover>%(failover)s</Failover>
    zh
        <TTL>%(ttl)s</TTL>
        <ResourceRecords>
            %(records)s
        </ResourceRecords>z@<ResourceRecord>
        <Value>%s</Value>
    </ResourceRecord>z�<AliasTarget>
        <HostedZoneId>%(hosted_zone_id)s</HostedZoneId>
        <DNSName>%(dns_name)s</DNSName>
        %(eval_target_health)s
    </AliasTarget>z/<EvaluateTargetHealth>%s</EvaluateTargetHealth>Nr'c

CsX||_||_||_|durg}||_||_||_||_||_|	|_|
|_	||_
||_dS�N)r2r3r4�resource_recordsr(r)r*r+r,r-r.r/)
rr2r3r4rVr(r)r*r+r,r-r.r/rrrr�s
zRecord.__init__cCsd|j|j|��fS)Nz<Record:%s:%s:%s>)r2r3�to_print)rrrrrszRecord.__repr__cCs|j�|�dS)zAdd a resource record valueN)rVr0)rrIrrr�	add_valueszRecord.add_valueFcCs||_||_||_dS)z&Make this an alias resource record setN)r(r)r-)rr(r)r-rrr�	set_aliass
zRecord.set_aliascCs8|jdur(|jdur(|jdur|j|jrdnd}nd}|j|j|j|d�}nd}|jD]	}||j|7}q-|j|j|d�}d}|j	durW|j
durW|j|j	|j
d�}n)|j	durl|jdurl|j
|j	|jd�}n|j	dur�|jdur�|j|j	|jd	�}d}|jdur�|j|j}|j|j|||d
�}|j|S)z(Spit this resource record set out as XMLN�true�falser8)r�dns_name�eval_target_health)r4�records)r*r+)r*r,)r*r/)r2r3r+�bodyr.)r(r)r-�EvaluateTargetHealth�	AliasBodyrV�ResourceRecordBody�ResourceRecordsBodyr4r*r+�WRRBodyr,�RRRBodyr/�FailoverBodyr.�HealthCheckBodyr2r3�XMLBody)rr]r_r^�rr+r.r?rrrr:sL

�
�
�
��
�
z
Record.to_xmlcCs�d}|jdur#|jdur#d|jd|j}|jdur"|d|j7}nd�|j�}|jdur?|jdur?|d|j|jf7}|S|jdurU|jdurU|d|j|jf7}|S|jduri|jduri|d|j|jf7}|S)	Nr8zALIAS � z (EvalTarget %s)rz (WRR id=%s, w=%s)z (LBR id=%s, region=%s)z (FAILOVER id=%s, failover=%s))	r(r)r-r%rVr*r+r,r/)r�rrrrrrWGs 
���zRecord.to_printcCs�|dkr	||_dS|dkr||_dS|dkr||_dS|dkr'|j�|�dS|dkr0||_dS|dkr9||_dS|dkrB||_dS|dkrO|��d	k|_	dS|d
krX||_
dS|dkra||_dS|dkrj||_dS|d
krs||_
dSdS)N�Name�Type�TTL�Value�HostedZoneId�DNSName�
SetIdentifierr`rZ�Weight�Region�Failover�
HealthCheckId)r2r3r4rVr0r(r)r*�lowerr-r+r,r/r.rHrrrrG[s2









�zRecord.endElementcCsdSrUr)rr2�attrsr
rrr�startElementuszRecord.startElement)NNr'NNNNNNNNN)F)rPrQrRrSrgrhrdrerfrcrbrar`rrrXrYr:rWrGryrrrrr�s0
�
�1rN)�RECORD_TYPES�boto.resultsetr
r�objectrrrrr�<module>s
*