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 SteeringPolicyHealthRuleCase(object):
12    """
13    SteeringPolicyHealthRuleCase model.
14    """
15
16    def __init__(self, **kwargs):
17        """
18        Initializes a new SteeringPolicyHealthRuleCase 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 SteeringPolicyHealthRuleCase.
23        :type case_condition: str
24
25        """
26        self.swagger_types = {
27            'case_condition': 'str'
28        }
29
30        self.attribute_map = {
31            'case_condition': 'caseCondition'
32        }
33
34        self._case_condition = None
35
36    @property
37    def case_condition(self):
38        """
39        Gets the case_condition of this SteeringPolicyHealthRuleCase.
40        An expression that uses conditions at the time of a DNS query to indicate
41        whether a case matches. Conditions may include the geographical location, IP
42        subnet, or ASN the DNS query originated. **Example:** If you have an
43        office that uses the subnet `192.0.2.0/24` you could use a `caseCondition`
44        expression `query.client.subnet in ('192.0.2.0/24')` to define a case that
45        matches queries from that office.
46
47
48        :return: The case_condition of this SteeringPolicyHealthRuleCase.
49        :rtype: str
50        """
51        return self._case_condition
52
53    @case_condition.setter
54    def case_condition(self, case_condition):
55        """
56        Sets the case_condition of this SteeringPolicyHealthRuleCase.
57        An expression that uses conditions at the time of a DNS query to indicate
58        whether a case matches. Conditions may include the geographical location, IP
59        subnet, or ASN the DNS query originated. **Example:** If you have an
60        office that uses the subnet `192.0.2.0/24` you could use a `caseCondition`
61        expression `query.client.subnet in ('192.0.2.0/24')` to define a case that
62        matches queries from that office.
63
64
65        :param case_condition: The case_condition of this SteeringPolicyHealthRuleCase.
66        :type: str
67        """
68        self._case_condition = case_condition
69
70    def __repr__(self):
71        return formatted_flat_dict(self)
72
73    def __eq__(self, other):
74        if other is None:
75            return False
76
77        return self.__dict__ == other.__dict__
78
79    def __ne__(self, other):
80        return not self == other
81