o
    ëÉ¶d ]  ã                   @   s8   d dl mZmZmZ d dlmZ eG dd„ deƒƒZdS )é    )Úformatted_flat_dictÚNONE_SENTINELÚ#value_allowed_none_or_none_sentinel)Úinit_model_state_from_kwargsc                   @   sª  e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdd„ Zedd„ ƒZejdd„ ƒZedd„ ƒZejdd„ ƒZedd„ ƒZejdd„ ƒZedd„ ƒZejdd„ ƒZedd„ ƒZejdd„ ƒZedd„ ƒZejdd„ ƒZed d!„ ƒZejd"d!„ ƒZed#d$„ ƒZejd%d$„ ƒZed&d'„ ƒZejd(d'„ ƒZed)d*„ ƒZejd+d*„ ƒZed,d-„ ƒZejd.d-„ ƒZed/d0„ ƒZejd1d0„ ƒZed2d3„ ƒZejd4d3„ ƒZd5d6„ Zd7d8„ Zd9d:„ Z d;S )<ÚSteeringPolicyz£
    A DNS steering policy.

    **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
    ÚFAILOVERÚLOAD_BALANCEÚROUTE_BY_GEOÚROUTE_BY_ASNÚROUTE_BY_IPÚCUSTOMÚACTIVEÚCREATINGÚDELETEDÚDELETINGc                 K   s–   ddddddddddddddœ| _ d	d
ddddddddddddœ| _d| _d| _d| _d| _d| _d| _d| _d| _	d| _
d| _d| _d| _d| _dS )a?
  
        Initializes a new SteeringPolicy object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param compartment_id:
            The value to assign to the compartment_id property of this SteeringPolicy.
        :type compartment_id: str

        :param display_name:
            The value to assign to the display_name property of this SteeringPolicy.
        :type display_name: str

        :param ttl:
            The value to assign to the ttl property of this SteeringPolicy.
        :type ttl: int

        :param health_check_monitor_id:
            The value to assign to the health_check_monitor_id property of this SteeringPolicy.
        :type health_check_monitor_id: str

        :param template:
            The value to assign to the template property of this SteeringPolicy.
            Allowed values for this property are: "FAILOVER", "LOAD_BALANCE", "ROUTE_BY_GEO", "ROUTE_BY_ASN", "ROUTE_BY_IP", "CUSTOM", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type template: str

        :param freeform_tags:
            The value to assign to the freeform_tags property of this SteeringPolicy.
        :type freeform_tags: dict(str, str)

        :param defined_tags:
            The value to assign to the defined_tags property of this SteeringPolicy.
        :type defined_tags: dict(str, dict(str, object))

        :param answers:
            The value to assign to the answers property of this SteeringPolicy.
        :type answers: list[oci.dns.models.SteeringPolicyAnswer]

        :param rules:
            The value to assign to the rules property of this SteeringPolicy.
        :type rules: list[oci.dns.models.SteeringPolicyRule]

        :param _self:
            The value to assign to the _self property of this SteeringPolicy.
        :type _self: str

        :param id:
            The value to assign to the id property of this SteeringPolicy.
        :type id: str

        :param time_created:
            The value to assign to the time_created property of this SteeringPolicy.
        :type time_created: datetime

        :param lifecycle_state:
            The value to assign to the lifecycle_state property of this SteeringPolicy.
            Allowed values for this property are: "ACTIVE", "CREATING", "DELETED", "DELETING", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type lifecycle_state: str

        ÚstrÚintzdict(str, str)zdict(str, dict(str, object))zlist[SteeringPolicyAnswer]zlist[SteeringPolicyRule]Údatetime)Úcompartment_idÚdisplay_nameÚttlÚhealth_check_monitor_idÚtemplateÚfreeform_tagsÚdefined_tagsÚanswersÚrulesÚ_selfÚidÚtime_createdÚlifecycle_stateZcompartmentIdZdisplayNamer   ZhealthCheckMonitorIdr   ZfreeformTagsZdefinedTagsr   r   Úselfr   ZtimeCreatedZlifecycleStateN)Zswagger_typesZattribute_mapÚ_compartment_idÚ_display_nameÚ_ttlÚ_health_check_monitor_idÚ	_templateÚ_freeform_tagsÚ_defined_tagsÚ_answersÚ_rulesÚ_SteeringPolicy__selfÚ_idÚ_time_createdÚ_lifecycle_state)r!   Úkwargs© r0   úBusr/lib/python3.10/site-packages/oci/dns/models/steering_policy.pyÚ__init__<   sR   ?óó
zSteeringPolicy.__init__c                 C   ó   | j S )zæ
        **[Required]** Gets the compartment_id of this SteeringPolicy.
        The OCID of the compartment containing the steering policy.


        :return: The compartment_id of this SteeringPolicy.
        :rtype: str
        ©r"   ©r!   r0   r0   r1   r   ¨   ó   
zSteeringPolicy.compartment_idc                 C   ó
   || _ dS )zä
        Sets the compartment_id of this SteeringPolicy.
        The OCID of the compartment containing the steering policy.


        :param compartment_id: The compartment_id of this SteeringPolicy.
        :type: str
        Nr4   )r!   r   r0   r0   r1   r   ´   ó   

c                 C   r3   )a4  
        **[Required]** Gets the display_name of this SteeringPolicy.
        A user-friendly name for the steering policy. Does not have to be unique and can be changed.
        Avoid entering confidential information.


        :return: The display_name of this SteeringPolicy.
        :rtype: str
        ©r#   r5   r0   r0   r1   r   À   ó   zSteeringPolicy.display_namec                 C   r7   )a0  
        Sets the display_name of this SteeringPolicy.
        A user-friendly name for the steering policy. Does not have to be unique and can be changed.
        Avoid entering confidential information.


        :param display_name: The display_name of this SteeringPolicy.
        :type: str
        Nr9   )r!   r   r0   r0   r1   r   Í   ó   
c                 C   r3   )a-  
        **[Required]** Gets the ttl of this SteeringPolicy.
        The Time To Live (TTL) for responses from the steering policy, in seconds.
        If not specified during creation, a value of 30 seconds will be used.


        :return: The ttl of this SteeringPolicy.
        :rtype: int
        ©r$   r5   r0   r0   r1   r   Ú   r:   zSteeringPolicy.ttlc                 C   r7   )a   
        Sets the ttl of this SteeringPolicy.
        The Time To Live (TTL) for responses from the steering policy, in seconds.
        If not specified during creation, a value of 30 seconds will be used.


        :param ttl: The ttl of this SteeringPolicy.
        :type: int
        Nr<   )r!   r   r0   r0   r1   r   ç   r;   c                 C   r3   )a]  
        Gets the health_check_monitor_id of this SteeringPolicy.
        The OCID of the health check monitor providing health data about the answers of the
        steering policy. A steering policy answer with `rdata` matching a monitored endpoint
        will use the health data of that endpoint. A steering policy answer with `rdata` not
        matching any monitored endpoint will be assumed healthy.


        **Note:** To use the Health Check monitoring feature in a steering policy, a monitor
        must be created using the Health Checks service first. For more information on how to
        create a monitor, please see `Managing Health Checks`__.

        __ https://docs.cloud.oracle.com/iaas/Content/HealthChecks/Tasks/managinghealthchecks.htm


        :return: The health_check_monitor_id of this SteeringPolicy.
        :rtype: str
        ©r%   r5   r0   r0   r1   r   ô   s   z&SteeringPolicy.health_check_monitor_idc                 C   r7   )as  
        Sets the health_check_monitor_id of this SteeringPolicy.
        The OCID of the health check monitor providing health data about the answers of the
        steering policy. A steering policy answer with `rdata` matching a monitored endpoint
        will use the health data of that endpoint. A steering policy answer with `rdata` not
        matching any monitored endpoint will be assumed healthy.


        **Note:** To use the Health Check monitoring feature in a steering policy, a monitor
        must be created using the Health Checks service first. For more information on how to
        create a monitor, please see `Managing Health Checks`__.

        __ https://docs.cloud.oracle.com/iaas/Content/HealthChecks/Tasks/managinghealthchecks.htm


        :param health_check_monitor_id: The health_check_monitor_id of this SteeringPolicy.
        :type: str
        Nr=   )r!   r   r0   r0   r1   r   
  s   
c                 C   r3   )aù	  
        **[Required]** Gets the template of this SteeringPolicy.
        A set of predefined rules based on the desired purpose of the steering policy. Each
        template utilizes Traffic Management's rules in a different order to produce the desired
        results when answering DNS queries.


        **Example:** The `FAILOVER` template determines answers by filtering the policy's answers
        using the `FILTER` rule first, then the following rules in succession: `HEALTH`, `PRIORITY`,
        and `LIMIT`. This gives the domain dynamic failover capability.


        It is **strongly recommended** to use a template other than `CUSTOM` when creating
        a steering policy.


        All templates require the rule order to begin with an unconditional `FILTER` rule that keeps
        answers contingent upon `answer.isDisabled != true`, except for `CUSTOM`. A defined
        `HEALTH` rule must follow the `FILTER` rule if the policy references a `healthCheckMonitorId`.
        The last rule of a template must must be a `LIMIT` rule. For more information about templates
        and code examples, see `Traffic Management API Guide`__.

        **Template Types**

        * `FAILOVER` - Uses health check information on your endpoints to determine which DNS answers
        to serve. If an endpoint fails a health check, the answer for that endpoint will be removed
        from the list of available answers until the endpoint is detected as healthy.


        * `LOAD_BALANCE` - Distributes web traffic to specified endpoints based on defined weights.


        * `ROUTE_BY_GEO` - Answers DNS queries based on the query's geographic location. For a list of geographic
        locations to route by, see `Traffic Management Geographic Locations`__.


        * `ROUTE_BY_ASN` - Answers DNS queries based on the query's originating ASN.


        * `ROUTE_BY_IP` - Answers DNS queries based on the query's IP address.


        * `CUSTOM` - Allows a customized configuration of rules.

        __ https://docs.cloud.oracle.com/iaas/Content/TrafficManagement/Concepts/trafficmanagementapi.htm
        __ https://docs.cloud.oracle.com/iaas/Content/TrafficManagement/Reference/trafficmanagementgeo.htm

        Allowed values for this property are: "FAILOVER", "LOAD_BALANCE", "ROUTE_BY_GEO", "ROUTE_BY_ASN", "ROUTE_BY_IP", "CUSTOM", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The template of this SteeringPolicy.
        :rtype: str
        )r&   r5   r0   r0   r1   r      s   8zSteeringPolicy.templatec                 C   ó    g d¢}t ||ƒsd}|| _dS )aù  
        Sets the template of this SteeringPolicy.
        A set of predefined rules based on the desired purpose of the steering policy. Each
        template utilizes Traffic Management's rules in a different order to produce the desired
        results when answering DNS queries.


        **Example:** The `FAILOVER` template determines answers by filtering the policy's answers
        using the `FILTER` rule first, then the following rules in succession: `HEALTH`, `PRIORITY`,
        and `LIMIT`. This gives the domain dynamic failover capability.


        It is **strongly recommended** to use a template other than `CUSTOM` when creating
        a steering policy.


        All templates require the rule order to begin with an unconditional `FILTER` rule that keeps
        answers contingent upon `answer.isDisabled != true`, except for `CUSTOM`. A defined
        `HEALTH` rule must follow the `FILTER` rule if the policy references a `healthCheckMonitorId`.
        The last rule of a template must must be a `LIMIT` rule. For more information about templates
        and code examples, see `Traffic Management API Guide`__.

        **Template Types**

        * `FAILOVER` - Uses health check information on your endpoints to determine which DNS answers
        to serve. If an endpoint fails a health check, the answer for that endpoint will be removed
        from the list of available answers until the endpoint is detected as healthy.


        * `LOAD_BALANCE` - Distributes web traffic to specified endpoints based on defined weights.


        * `ROUTE_BY_GEO` - Answers DNS queries based on the query's geographic location. For a list of geographic
        locations to route by, see `Traffic Management Geographic Locations`__.


        * `ROUTE_BY_ASN` - Answers DNS queries based on the query's originating ASN.


        * `ROUTE_BY_IP` - Answers DNS queries based on the query's IP address.


        * `CUSTOM` - Allows a customized configuration of rules.

        __ https://docs.cloud.oracle.com/iaas/Content/TrafficManagement/Concepts/trafficmanagementapi.htm
        __ https://docs.cloud.oracle.com/iaas/Content/TrafficManagement/Reference/trafficmanagementgeo.htm


        :param template: The template of this SteeringPolicy.
        :type: str
        )r   r   r	   r
   r   r   ÚUNKNOWN_ENUM_VALUEN)r   r&   )r!   r   Úallowed_valuesr0   r0   r1   r   Z  s   5

c                 C   r3   )aâ  
        **[Required]** Gets the freeform_tags of this SteeringPolicy.
        Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
        For more information, see `Resource Tags`__.


        **Example:** `{"Department": "Finance"}`

        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm


        :return: The freeform_tags of this SteeringPolicy.
        :rtype: dict(str, str)
        ©r'   r5   r0   r0   r1   r   ”  ó   zSteeringPolicy.freeform_tagsc                 C   r7   )aß  
        Sets the freeform_tags of this SteeringPolicy.
        Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
        For more information, see `Resource Tags`__.


        **Example:** `{"Department": "Finance"}`

        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm


        :param freeform_tags: The freeform_tags of this SteeringPolicy.
        :type: dict(str, str)
        NrA   )r!   r   r0   r0   r1   r   ¦  ó   
c                 C   r3   )aØ  
        **[Required]** Gets the defined_tags of this SteeringPolicy.
        Defined tags for this resource. Each key is predefined and scoped to a namespace.
        For more information, see `Resource Tags`__.


        **Example:** `{"Operations": {"CostCenter": "42"}}`

        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm


        :return: The defined_tags of this SteeringPolicy.
        :rtype: dict(str, dict(str, object))
        ©r(   r5   r0   r0   r1   r   ¸  rB   zSteeringPolicy.defined_tagsc                 C   r7   )aÔ  
        Sets the defined_tags of this SteeringPolicy.
        Defined tags for this resource. Each key is predefined and scoped to a namespace.
        For more information, see `Resource Tags`__.


        **Example:** `{"Operations": {"CostCenter": "42"}}`

        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm


        :param defined_tags: The defined_tags of this SteeringPolicy.
        :type: dict(str, dict(str, object))
        NrD   )r!   r   r0   r0   r1   r   Ê  rC   c                 C   r3   )a  
        **[Required]** Gets the answers of this SteeringPolicy.
        The set of all answers that can potentially issue from the steering policy.


        :return: The answers of this SteeringPolicy.
        :rtype: list[oci.dns.models.SteeringPolicyAnswer]
        ©r)   r5   r0   r0   r1   r   Ü  r6   zSteeringPolicy.answersc                 C   r7   )a  
        Sets the answers of this SteeringPolicy.
        The set of all answers that can potentially issue from the steering policy.


        :param answers: The answers of this SteeringPolicy.
        :type: list[oci.dns.models.SteeringPolicyAnswer]
        NrE   )r!   r   r0   r0   r1   r   è  r8   c                 C   r3   )a	  
        **[Required]** Gets the rules of this SteeringPolicy.
        The series of rules that will be processed in sequence to reduce the pool of answers
        to a response for any given request.


        The first rule receives a shuffled list of all answers, and every other rule receives
        the list of answers emitted by the one preceding it. The last rule populates the
        response.


        :return: The rules of this SteeringPolicy.
        :rtype: list[oci.dns.models.SteeringPolicyRule]
        ©r*   r5   r0   r0   r1   r   ô  rB   zSteeringPolicy.rulesc                 C   r7   )aþ  
        Sets the rules of this SteeringPolicy.
        The series of rules that will be processed in sequence to reduce the pool of answers
        to a response for any given request.


        The first rule receives a shuffled list of all answers, and every other rule receives
        the list of answers emitted by the one preceding it. The last rule populates the
        response.


        :param rules: The rules of this SteeringPolicy.
        :type: list[oci.dns.models.SteeringPolicyRule]
        NrF   )r!   r   r0   r0   r1   r     rC   c                 C   r3   )zÄ
        **[Required]** Gets the _self of this SteeringPolicy.
        The canonical absolute URL of the resource.


        :return: The _self of this SteeringPolicy.
        :rtype: str
        ©r+   r5   r0   r0   r1   r     r6   zSteeringPolicy._selfc                 C   r7   )z¹
        Sets the _self of this SteeringPolicy.
        The canonical absolute URL of the resource.


        :param _self: The _self of this SteeringPolicy.
        :type: str
        NrG   )r!   r   r0   r0   r1   r   $  r8   c                 C   r3   )z¬
        **[Required]** Gets the id of this SteeringPolicy.
        The OCID of the resource.


        :return: The id of this SteeringPolicy.
        :rtype: str
        ©r,   r5   r0   r0   r1   r   0  r6   zSteeringPolicy.idc                 C   r7   )zž
        Sets the id of this SteeringPolicy.
        The OCID of the resource.


        :param id: The id of this SteeringPolicy.
        :type: str
        NrH   )r!   r   r0   r0   r1   r   <  r8   c                 C   r3   )a/  
        **[Required]** Gets the time_created of this SteeringPolicy.
        The date and time the resource was created, expressed in RFC 3339 timestamp format.

        **Example:** `2016-07-22T17:23:59:60Z`


        :return: The time_created of this SteeringPolicy.
        :rtype: datetime
        ©r-   r5   r0   r0   r1   r   H  s   zSteeringPolicy.time_createdc                 C   r7   )a+  
        Sets the time_created of this SteeringPolicy.
        The date and time the resource was created, expressed in RFC 3339 timestamp format.

        **Example:** `2016-07-22T17:23:59:60Z`


        :param time_created: The time_created of this SteeringPolicy.
        :type: datetime
        NrI   )r!   r   r0   r0   r1   r   V  s   
c                 C   r3   )aŸ  
        **[Required]** Gets the lifecycle_state of this SteeringPolicy.
        The current state of the resource.

        Allowed values for this property are: "ACTIVE", "CREATING", "DELETED", "DELETING", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The lifecycle_state of this SteeringPolicy.
        :rtype: str
        )r.   r5   r0   r0   r1   r    d  s   zSteeringPolicy.lifecycle_statec                 C   r>   )zÎ
        Sets the lifecycle_state of this SteeringPolicy.
        The current state of the resource.


        :param lifecycle_state: The lifecycle_state of this SteeringPolicy.
        :type: str
        )r   r   r   r   r?   N)r   r.   )r!   r    r@   r0   r0   r1   r    s  s   


c                 C   s   t | ƒS ©N)r   r5   r0   r0   r1   Ú__repr__‚  s   zSteeringPolicy.__repr__c                 C   s   |d u rdS | j |j kS )NF)Ú__dict__©r!   Úotherr0   r0   r1   Ú__eq__…  s   zSteeringPolicy.__eq__c                 C   s
   | |k S rJ   r0   rM   r0   r0   r1   Ú__ne__‹  s   
zSteeringPolicy.__ne__N)!Ú__name__Ú
__module__Ú__qualname__Ú__doc__ZTEMPLATE_FAILOVERZTEMPLATE_LOAD_BALANCEZTEMPLATE_ROUTE_BY_GEOZTEMPLATE_ROUTE_BY_ASNZTEMPLATE_ROUTE_BY_IPZTEMPLATE_CUSTOMZLIFECYCLE_STATE_ACTIVEZLIFECYCLE_STATE_CREATINGZLIFECYCLE_STATE_DELETEDZLIFECYCLE_STATE_DELETINGr2   Úpropertyr   Úsetterr   r   r   r   r   r   r   r   r   r   r   r    rK   rO   rP   r0   r0   r0   r1   r      sˆ    l








9
9















r   N)Zoci.utilr   r   r   Zoci.decoratorsr   Úobjectr   r0   r0   r0   r1   Ú<module>   s   