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 PublicIpPool(object):
12    """
13    A public IP pool is a set of public IP addresses represented as one or more IPv4 CIDR blocks. Resources like load balancers and compute instances can be allocated public IP addresses from a public IP pool.
14    """
15
16    #: A constant which can be used with the lifecycle_state property of a PublicIpPool.
17    #: This constant has a value of "INACTIVE"
18    LIFECYCLE_STATE_INACTIVE = "INACTIVE"
19
20    #: A constant which can be used with the lifecycle_state property of a PublicIpPool.
21    #: This constant has a value of "UPDATING"
22    LIFECYCLE_STATE_UPDATING = "UPDATING"
23
24    #: A constant which can be used with the lifecycle_state property of a PublicIpPool.
25    #: This constant has a value of "ACTIVE"
26    LIFECYCLE_STATE_ACTIVE = "ACTIVE"
27
28    #: A constant which can be used with the lifecycle_state property of a PublicIpPool.
29    #: This constant has a value of "DELETING"
30    LIFECYCLE_STATE_DELETING = "DELETING"
31
32    #: A constant which can be used with the lifecycle_state property of a PublicIpPool.
33    #: This constant has a value of "DELETED"
34    LIFECYCLE_STATE_DELETED = "DELETED"
35
36    def __init__(self, **kwargs):
37        """
38        Initializes a new PublicIpPool object with values from keyword arguments.
39        The following keyword arguments are supported (corresponding to the getters/setters of this class):
40
41        :param cidr_blocks:
42            The value to assign to the cidr_blocks property of this PublicIpPool.
43        :type cidr_blocks: list[str]
44
45        :param compartment_id:
46            The value to assign to the compartment_id property of this PublicIpPool.
47        :type compartment_id: str
48
49        :param defined_tags:
50            The value to assign to the defined_tags property of this PublicIpPool.
51        :type defined_tags: dict(str, dict(str, object))
52
53        :param display_name:
54            The value to assign to the display_name property of this PublicIpPool.
55        :type display_name: str
56
57        :param freeform_tags:
58            The value to assign to the freeform_tags property of this PublicIpPool.
59        :type freeform_tags: dict(str, str)
60
61        :param id:
62            The value to assign to the id property of this PublicIpPool.
63        :type id: str
64
65        :param lifecycle_state:
66            The value to assign to the lifecycle_state property of this PublicIpPool.
67            Allowed values for this property are: "INACTIVE", "UPDATING", "ACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'.
68            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
69        :type lifecycle_state: str
70
71        :param time_created:
72            The value to assign to the time_created property of this PublicIpPool.
73        :type time_created: datetime
74
75        """
76        self.swagger_types = {
77            'cidr_blocks': 'list[str]',
78            'compartment_id': 'str',
79            'defined_tags': 'dict(str, dict(str, object))',
80            'display_name': 'str',
81            'freeform_tags': 'dict(str, str)',
82            'id': 'str',
83            'lifecycle_state': 'str',
84            'time_created': 'datetime'
85        }
86
87        self.attribute_map = {
88            'cidr_blocks': 'cidrBlocks',
89            'compartment_id': 'compartmentId',
90            'defined_tags': 'definedTags',
91            'display_name': 'displayName',
92            'freeform_tags': 'freeformTags',
93            'id': 'id',
94            'lifecycle_state': 'lifecycleState',
95            'time_created': 'timeCreated'
96        }
97
98        self._cidr_blocks = None
99        self._compartment_id = None
100        self._defined_tags = None
101        self._display_name = None
102        self._freeform_tags = None
103        self._id = None
104        self._lifecycle_state = None
105        self._time_created = None
106
107    @property
108    def cidr_blocks(self):
109        """
110        Gets the cidr_blocks of this PublicIpPool.
111        The CIDR blocks added to this pool. This could be all or a portion of a BYOIP CIDR block.
112
113
114        :return: The cidr_blocks of this PublicIpPool.
115        :rtype: list[str]
116        """
117        return self._cidr_blocks
118
119    @cidr_blocks.setter
120    def cidr_blocks(self, cidr_blocks):
121        """
122        Sets the cidr_blocks of this PublicIpPool.
123        The CIDR blocks added to this pool. This could be all or a portion of a BYOIP CIDR block.
124
125
126        :param cidr_blocks: The cidr_blocks of this PublicIpPool.
127        :type: list[str]
128        """
129        self._cidr_blocks = cidr_blocks
130
131    @property
132    def compartment_id(self):
133        """
134        **[Required]** Gets the compartment_id of this PublicIpPool.
135        The `OCID`__ of the compartment containing this pool.
136
137        __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
138
139
140        :return: The compartment_id of this PublicIpPool.
141        :rtype: str
142        """
143        return self._compartment_id
144
145    @compartment_id.setter
146    def compartment_id(self, compartment_id):
147        """
148        Sets the compartment_id of this PublicIpPool.
149        The `OCID`__ of the compartment containing this pool.
150
151        __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
152
153
154        :param compartment_id: The compartment_id of this PublicIpPool.
155        :type: str
156        """
157        self._compartment_id = compartment_id
158
159    @property
160    def defined_tags(self):
161        """
162        Gets the defined_tags of this PublicIpPool.
163        Defined tags for this resource. Each key is predefined and scoped to a
164        namespace. For more information, see `Resource Tags`__.
165
166        Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
167
168        __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm
169
170
171        :return: The defined_tags of this PublicIpPool.
172        :rtype: dict(str, dict(str, object))
173        """
174        return self._defined_tags
175
176    @defined_tags.setter
177    def defined_tags(self, defined_tags):
178        """
179        Sets the defined_tags of this PublicIpPool.
180        Defined tags for this resource. Each key is predefined and scoped to a
181        namespace. For more information, see `Resource Tags`__.
182
183        Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
184
185        __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm
186
187
188        :param defined_tags: The defined_tags of this PublicIpPool.
189        :type: dict(str, dict(str, object))
190        """
191        self._defined_tags = defined_tags
192
193    @property
194    def display_name(self):
195        """
196        Gets the display_name of this PublicIpPool.
197        A user-friendly name. Does not have to be unique, and it's changeable.
198        Avoid entering confidential information.
199
200
201        :return: The display_name of this PublicIpPool.
202        :rtype: str
203        """
204        return self._display_name
205
206    @display_name.setter
207    def display_name(self, display_name):
208        """
209        Sets the display_name of this PublicIpPool.
210        A user-friendly name. Does not have to be unique, and it's changeable.
211        Avoid entering confidential information.
212
213
214        :param display_name: The display_name of this PublicIpPool.
215        :type: str
216        """
217        self._display_name = display_name
218
219    @property
220    def freeform_tags(self):
221        """
222        Gets the freeform_tags of this PublicIpPool.
223        Free-form tags for this resource. Each tag is a simple key-value pair with no
224        predefined name, type, or namespace. For more information, see `Resource Tags`__.
225
226        Example: `{\"Department\": \"Finance\"}`
227
228        __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm
229
230
231        :return: The freeform_tags of this PublicIpPool.
232        :rtype: dict(str, str)
233        """
234        return self._freeform_tags
235
236    @freeform_tags.setter
237    def freeform_tags(self, freeform_tags):
238        """
239        Sets the freeform_tags of this PublicIpPool.
240        Free-form tags for this resource. Each tag is a simple key-value pair with no
241        predefined name, type, or namespace. For more information, see `Resource Tags`__.
242
243        Example: `{\"Department\": \"Finance\"}`
244
245        __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm
246
247
248        :param freeform_tags: The freeform_tags of this PublicIpPool.
249        :type: dict(str, str)
250        """
251        self._freeform_tags = freeform_tags
252
253    @property
254    def id(self):
255        """
256        **[Required]** Gets the id of this PublicIpPool.
257        The `OCID`__ of the public IP pool.
258
259        __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
260
261
262        :return: The id of this PublicIpPool.
263        :rtype: str
264        """
265        return self._id
266
267    @id.setter
268    def id(self, id):
269        """
270        Sets the id of this PublicIpPool.
271        The `OCID`__ of the public IP pool.
272
273        __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
274
275
276        :param id: The id of this PublicIpPool.
277        :type: str
278        """
279        self._id = id
280
281    @property
282    def lifecycle_state(self):
283        """
284        Gets the lifecycle_state of this PublicIpPool.
285        The public IP pool's current state.
286
287        Allowed values for this property are: "INACTIVE", "UPDATING", "ACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'.
288        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
289
290
291        :return: The lifecycle_state of this PublicIpPool.
292        :rtype: str
293        """
294        return self._lifecycle_state
295
296    @lifecycle_state.setter
297    def lifecycle_state(self, lifecycle_state):
298        """
299        Sets the lifecycle_state of this PublicIpPool.
300        The public IP pool's current state.
301
302
303        :param lifecycle_state: The lifecycle_state of this PublicIpPool.
304        :type: str
305        """
306        allowed_values = ["INACTIVE", "UPDATING", "ACTIVE", "DELETING", "DELETED"]
307        if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values):
308            lifecycle_state = 'UNKNOWN_ENUM_VALUE'
309        self._lifecycle_state = lifecycle_state
310
311    @property
312    def time_created(self):
313        """
314        **[Required]** Gets the time_created of this PublicIpPool.
315        The date and time the public IP pool was created, in the format defined by `RFC3339`__.
316
317        Example: `2016-08-25T21:10:29.600Z`
318
319        __ https://tools.ietf.org/html/rfc3339
320
321
322        :return: The time_created of this PublicIpPool.
323        :rtype: datetime
324        """
325        return self._time_created
326
327    @time_created.setter
328    def time_created(self, time_created):
329        """
330        Sets the time_created of this PublicIpPool.
331        The date and time the public IP pool was created, in the format defined by `RFC3339`__.
332
333        Example: `2016-08-25T21:10:29.600Z`
334
335        __ https://tools.ietf.org/html/rfc3339
336
337
338        :param time_created: The time_created of this PublicIpPool.
339        :type: datetime
340        """
341        self._time_created = time_created
342
343    def __repr__(self):
344        return formatted_flat_dict(self)
345
346    def __eq__(self, other):
347        if other is None:
348            return False
349
350        return self.__dict__ == other.__dict__
351
352    def __ne__(self, other):
353        return not self == other
354