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 5from .resolver_rule import ResolverRule 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 ResolverForwardRule(ResolverRule): 12 """ 13 ResolverForwardRule model. 14 """ 15 16 def __init__(self, **kwargs): 17 """ 18 Initializes a new ResolverForwardRule object with values from keyword arguments. The default value of the :py:attr:`~oci.dns.models.ResolverForwardRule.action` attribute 19 of this class is ``FORWARD`` and it should not be changed. 20 The following keyword arguments are supported (corresponding to the getters/setters of this class): 21 22 :param client_address_conditions: 23 The value to assign to the client_address_conditions property of this ResolverForwardRule. 24 :type client_address_conditions: list[str] 25 26 :param qname_cover_conditions: 27 The value to assign to the qname_cover_conditions property of this ResolverForwardRule. 28 :type qname_cover_conditions: list[str] 29 30 :param action: 31 The value to assign to the action property of this ResolverForwardRule. 32 Allowed values for this property are: "FORWARD" 33 :type action: str 34 35 :param destination_addresses: 36 The value to assign to the destination_addresses property of this ResolverForwardRule. 37 :type destination_addresses: list[str] 38 39 :param source_endpoint_name: 40 The value to assign to the source_endpoint_name property of this ResolverForwardRule. 41 :type source_endpoint_name: str 42 43 """ 44 self.swagger_types = { 45 'client_address_conditions': 'list[str]', 46 'qname_cover_conditions': 'list[str]', 47 'action': 'str', 48 'destination_addresses': 'list[str]', 49 'source_endpoint_name': 'str' 50 } 51 52 self.attribute_map = { 53 'client_address_conditions': 'clientAddressConditions', 54 'qname_cover_conditions': 'qnameCoverConditions', 55 'action': 'action', 56 'destination_addresses': 'destinationAddresses', 57 'source_endpoint_name': 'sourceEndpointName' 58 } 59 60 self._client_address_conditions = None 61 self._qname_cover_conditions = None 62 self._action = None 63 self._destination_addresses = None 64 self._source_endpoint_name = None 65 self._action = 'FORWARD' 66 67 @property 68 def destination_addresses(self): 69 """ 70 **[Required]** Gets the destination_addresses of this ResolverForwardRule. 71 IP addresses to which queries should be forwarded. Currently limited to a single address. 72 73 74 :return: The destination_addresses of this ResolverForwardRule. 75 :rtype: list[str] 76 """ 77 return self._destination_addresses 78 79 @destination_addresses.setter 80 def destination_addresses(self, destination_addresses): 81 """ 82 Sets the destination_addresses of this ResolverForwardRule. 83 IP addresses to which queries should be forwarded. Currently limited to a single address. 84 85 86 :param destination_addresses: The destination_addresses of this ResolverForwardRule. 87 :type: list[str] 88 """ 89 self._destination_addresses = destination_addresses 90 91 @property 92 def source_endpoint_name(self): 93 """ 94 Gets the source_endpoint_name of this ResolverForwardRule. 95 Case-insensitive name of an endpoint, that is a sub-resource of the resolver, to use as the forwarding 96 interface. The endpoint must have isForwarding set to true. 97 98 99 :return: The source_endpoint_name of this ResolverForwardRule. 100 :rtype: str 101 """ 102 return self._source_endpoint_name 103 104 @source_endpoint_name.setter 105 def source_endpoint_name(self, source_endpoint_name): 106 """ 107 Sets the source_endpoint_name of this ResolverForwardRule. 108 Case-insensitive name of an endpoint, that is a sub-resource of the resolver, to use as the forwarding 109 interface. The endpoint must have isForwarding set to true. 110 111 112 :param source_endpoint_name: The source_endpoint_name of this ResolverForwardRule. 113 :type: str 114 """ 115 self._source_endpoint_name = source_endpoint_name 116 117 def __repr__(self): 118 return formatted_flat_dict(self) 119 120 def __eq__(self, other): 121 if other is None: 122 return False 123 124 return self.__dict__ == other.__dict__ 125 126 def __ne__(self, other): 127 return not self == other 128