1# coding: utf-8 2# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. 3# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. 4 5 6from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 7from oci.decorators import init_model_state_from_kwargs 8 9 10@init_model_state_from_kwargs 11class SteeringPolicyFilterRuleCase(object): 12 """ 13 SteeringPolicyFilterRuleCase model. 14 """ 15 16 def __init__(self, **kwargs): 17 """ 18 Initializes a new SteeringPolicyFilterRuleCase object with values from keyword arguments. 19 The following keyword arguments are supported (corresponding to the getters/setters of this class): 20 21 :param case_condition: 22 The value to assign to the case_condition property of this SteeringPolicyFilterRuleCase. 23 :type case_condition: str 24 25 :param answer_data: 26 The value to assign to the answer_data property of this SteeringPolicyFilterRuleCase. 27 :type answer_data: list[oci.dns.models.SteeringPolicyFilterAnswerData] 28 29 """ 30 self.swagger_types = { 31 'case_condition': 'str', 32 'answer_data': 'list[SteeringPolicyFilterAnswerData]' 33 } 34 35 self.attribute_map = { 36 'case_condition': 'caseCondition', 37 'answer_data': 'answerData' 38 } 39 40 self._case_condition = None 41 self._answer_data = None 42 43 @property 44 def case_condition(self): 45 """ 46 Gets the case_condition of this SteeringPolicyFilterRuleCase. 47 An expression that uses conditions at the time of a DNS query to indicate 48 whether a case matches. Conditions may include the geographical location, IP 49 subnet, or ASN the DNS query originated. **Example:** If you have an 50 office that uses the subnet `192.0.2.0/24` you could use a `caseCondition` 51 expression `query.client.subnet in ('192.0.2.0/24')` to define a case that 52 matches queries from that office. 53 54 55 :return: The case_condition of this SteeringPolicyFilterRuleCase. 56 :rtype: str 57 """ 58 return self._case_condition 59 60 @case_condition.setter 61 def case_condition(self, case_condition): 62 """ 63 Sets the case_condition of this SteeringPolicyFilterRuleCase. 64 An expression that uses conditions at the time of a DNS query to indicate 65 whether a case matches. Conditions may include the geographical location, IP 66 subnet, or ASN the DNS query originated. **Example:** If you have an 67 office that uses the subnet `192.0.2.0/24` you could use a `caseCondition` 68 expression `query.client.subnet in ('192.0.2.0/24')` to define a case that 69 matches queries from that office. 70 71 72 :param case_condition: The case_condition of this SteeringPolicyFilterRuleCase. 73 :type: str 74 """ 75 self._case_condition = case_condition 76 77 @property 78 def answer_data(self): 79 """ 80 Gets the answer_data of this SteeringPolicyFilterRuleCase. 81 An array of `SteeringPolicyFilterAnswerData` objects. 82 83 84 :return: The answer_data of this SteeringPolicyFilterRuleCase. 85 :rtype: list[oci.dns.models.SteeringPolicyFilterAnswerData] 86 """ 87 return self._answer_data 88 89 @answer_data.setter 90 def answer_data(self, answer_data): 91 """ 92 Sets the answer_data of this SteeringPolicyFilterRuleCase. 93 An array of `SteeringPolicyFilterAnswerData` objects. 94 95 96 :param answer_data: The answer_data of this SteeringPolicyFilterRuleCase. 97 :type: list[oci.dns.models.SteeringPolicyFilterAnswerData] 98 """ 99 self._answer_data = answer_data 100 101 def __repr__(self): 102 return formatted_flat_dict(self) 103 104 def __eq__(self, other): 105 if other is None: 106 return False 107 108 return self.__dict__ == other.__dict__ 109 110 def __ne__(self, other): 111 return not self == other 112