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 JreUsage(object):
12    """
13    Java Runtime usage during a specified time period. A Java Runtime is identified by its vendor and version.
14    """
15
16    #: A constant which can be used with the security_status property of a JreUsage.
17    #: This constant has a value of "UNKNOWN"
18    SECURITY_STATUS_UNKNOWN = "UNKNOWN"
19
20    #: A constant which can be used with the security_status property of a JreUsage.
21    #: This constant has a value of "UP_TO_DATE"
22    SECURITY_STATUS_UP_TO_DATE = "UP_TO_DATE"
23
24    #: A constant which can be used with the security_status property of a JreUsage.
25    #: This constant has a value of "UPDATE_REQUIRED"
26    SECURITY_STATUS_UPDATE_REQUIRED = "UPDATE_REQUIRED"
27
28    #: A constant which can be used with the security_status property of a JreUsage.
29    #: This constant has a value of "UPGRADE_REQUIRED"
30    SECURITY_STATUS_UPGRADE_REQUIRED = "UPGRADE_REQUIRED"
31
32    def __init__(self, **kwargs):
33        """
34        Initializes a new JreUsage object with values from keyword arguments.
35        The following keyword arguments are supported (corresponding to the getters/setters of this class):
36
37        :param id:
38            The value to assign to the id property of this JreUsage.
39        :type id: str
40
41        :param fleet_id:
42            The value to assign to the fleet_id property of this JreUsage.
43        :type fleet_id: str
44
45        :param managed_instance_id:
46            The value to assign to the managed_instance_id property of this JreUsage.
47        :type managed_instance_id: str
48
49        :param security_status:
50            The value to assign to the security_status property of this JreUsage.
51            Allowed values for this property are: "UNKNOWN", "UP_TO_DATE", "UPDATE_REQUIRED", "UPGRADE_REQUIRED", 'UNKNOWN_ENUM_VALUE'.
52            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
53        :type security_status: str
54
55        :param release_date:
56            The value to assign to the release_date property of this JreUsage.
57        :type release_date: datetime
58
59        :param end_of_support_life_date:
60            The value to assign to the end_of_support_life_date property of this JreUsage.
61        :type end_of_support_life_date: datetime
62
63        :param vendor:
64            The value to assign to the vendor property of this JreUsage.
65        :type vendor: str
66
67        :param distribution:
68            The value to assign to the distribution property of this JreUsage.
69        :type distribution: str
70
71        :param version:
72            The value to assign to the version property of this JreUsage.
73        :type version: str
74
75        :param operating_systems:
76            The value to assign to the operating_systems property of this JreUsage.
77        :type operating_systems: list[oci.jms.models.OperatingSystem]
78
79        :param approximate_installation_count:
80            The value to assign to the approximate_installation_count property of this JreUsage.
81        :type approximate_installation_count: int
82
83        :param approximate_application_count:
84            The value to assign to the approximate_application_count property of this JreUsage.
85        :type approximate_application_count: int
86
87        :param approximate_managed_instance_count:
88            The value to assign to the approximate_managed_instance_count property of this JreUsage.
89        :type approximate_managed_instance_count: int
90
91        :param time_start:
92            The value to assign to the time_start property of this JreUsage.
93        :type time_start: datetime
94
95        :param time_end:
96            The value to assign to the time_end property of this JreUsage.
97        :type time_end: datetime
98
99        :param time_first_seen:
100            The value to assign to the time_first_seen property of this JreUsage.
101        :type time_first_seen: datetime
102
103        :param time_last_seen:
104            The value to assign to the time_last_seen property of this JreUsage.
105        :type time_last_seen: datetime
106
107        """
108        self.swagger_types = {
109            'id': 'str',
110            'fleet_id': 'str',
111            'managed_instance_id': 'str',
112            'security_status': 'str',
113            'release_date': 'datetime',
114            'end_of_support_life_date': 'datetime',
115            'vendor': 'str',
116            'distribution': 'str',
117            'version': 'str',
118            'operating_systems': 'list[OperatingSystem]',
119            'approximate_installation_count': 'int',
120            'approximate_application_count': 'int',
121            'approximate_managed_instance_count': 'int',
122            'time_start': 'datetime',
123            'time_end': 'datetime',
124            'time_first_seen': 'datetime',
125            'time_last_seen': 'datetime'
126        }
127
128        self.attribute_map = {
129            'id': 'id',
130            'fleet_id': 'fleetId',
131            'managed_instance_id': 'managedInstanceId',
132            'security_status': 'securityStatus',
133            'release_date': 'releaseDate',
134            'end_of_support_life_date': 'endOfSupportLifeDate',
135            'vendor': 'vendor',
136            'distribution': 'distribution',
137            'version': 'version',
138            'operating_systems': 'operatingSystems',
139            'approximate_installation_count': 'approximateInstallationCount',
140            'approximate_application_count': 'approximateApplicationCount',
141            'approximate_managed_instance_count': 'approximateManagedInstanceCount',
142            'time_start': 'timeStart',
143            'time_end': 'timeEnd',
144            'time_first_seen': 'timeFirstSeen',
145            'time_last_seen': 'timeLastSeen'
146        }
147
148        self._id = None
149        self._fleet_id = None
150        self._managed_instance_id = None
151        self._security_status = None
152        self._release_date = None
153        self._end_of_support_life_date = None
154        self._vendor = None
155        self._distribution = None
156        self._version = None
157        self._operating_systems = None
158        self._approximate_installation_count = None
159        self._approximate_application_count = None
160        self._approximate_managed_instance_count = None
161        self._time_start = None
162        self._time_end = None
163        self._time_first_seen = None
164        self._time_last_seen = None
165
166    @property
167    def id(self):
168        """
169        Gets the id of this JreUsage.
170        The internal identifier of the Java Runtime.
171
172
173        :return: The id of this JreUsage.
174        :rtype: str
175        """
176        return self._id
177
178    @id.setter
179    def id(self, id):
180        """
181        Sets the id of this JreUsage.
182        The internal identifier of the Java Runtime.
183
184
185        :param id: The id of this JreUsage.
186        :type: str
187        """
188        self._id = id
189
190    @property
191    def fleet_id(self):
192        """
193        Gets the fleet_id of this JreUsage.
194        The `OCID`__ of the related fleet.  This property value is present only for /actions/listJreUsage.
195
196        __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
197
198
199        :return: The fleet_id of this JreUsage.
200        :rtype: str
201        """
202        return self._fleet_id
203
204    @fleet_id.setter
205    def fleet_id(self, fleet_id):
206        """
207        Sets the fleet_id of this JreUsage.
208        The `OCID`__ of the related fleet.  This property value is present only for /actions/listJreUsage.
209
210        __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
211
212
213        :param fleet_id: The fleet_id of this JreUsage.
214        :type: str
215        """
216        self._fleet_id = fleet_id
217
218    @property
219    def managed_instance_id(self):
220        """
221        Gets the managed_instance_id of this JreUsage.
222        The `OCID`__ of the related managed instance. This property value is present only for /actions/listJreUsage.
223
224        __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
225
226
227        :return: The managed_instance_id of this JreUsage.
228        :rtype: str
229        """
230        return self._managed_instance_id
231
232    @managed_instance_id.setter
233    def managed_instance_id(self, managed_instance_id):
234        """
235        Sets the managed_instance_id of this JreUsage.
236        The `OCID`__ of the related managed instance. This property value is present only for /actions/listJreUsage.
237
238        __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
239
240
241        :param managed_instance_id: The managed_instance_id of this JreUsage.
242        :type: str
243        """
244        self._managed_instance_id = managed_instance_id
245
246    @property
247    def security_status(self):
248        """
249        Gets the security_status of this JreUsage.
250        The security status of the Java Runtime.
251
252        Allowed values for this property are: "UNKNOWN", "UP_TO_DATE", "UPDATE_REQUIRED", "UPGRADE_REQUIRED", 'UNKNOWN_ENUM_VALUE'.
253        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
254
255
256        :return: The security_status of this JreUsage.
257        :rtype: str
258        """
259        return self._security_status
260
261    @security_status.setter
262    def security_status(self, security_status):
263        """
264        Sets the security_status of this JreUsage.
265        The security status of the Java Runtime.
266
267
268        :param security_status: The security_status of this JreUsage.
269        :type: str
270        """
271        allowed_values = ["UNKNOWN", "UP_TO_DATE", "UPDATE_REQUIRED", "UPGRADE_REQUIRED"]
272        if not value_allowed_none_or_none_sentinel(security_status, allowed_values):
273            security_status = 'UNKNOWN_ENUM_VALUE'
274        self._security_status = security_status
275
276    @property
277    def release_date(self):
278        """
279        Gets the release_date of this JreUsage.
280        The release date of the Java Runtime (formatted according to `RFC3339`__).
281
282        __ https://datatracker.ietf.org/doc/html/rfc3339
283
284
285        :return: The release_date of this JreUsage.
286        :rtype: datetime
287        """
288        return self._release_date
289
290    @release_date.setter
291    def release_date(self, release_date):
292        """
293        Sets the release_date of this JreUsage.
294        The release date of the Java Runtime (formatted according to `RFC3339`__).
295
296        __ https://datatracker.ietf.org/doc/html/rfc3339
297
298
299        :param release_date: The release_date of this JreUsage.
300        :type: datetime
301        """
302        self._release_date = release_date
303
304    @property
305    def end_of_support_life_date(self):
306        """
307        Gets the end_of_support_life_date of this JreUsage.
308        The End of Support Life (EOSL) date of the Java Runtime (formatted according to `RFC3339`__).
309
310        __ https://datatracker.ietf.org/doc/html/rfc3339
311
312
313        :return: The end_of_support_life_date of this JreUsage.
314        :rtype: datetime
315        """
316        return self._end_of_support_life_date
317
318    @end_of_support_life_date.setter
319    def end_of_support_life_date(self, end_of_support_life_date):
320        """
321        Sets the end_of_support_life_date of this JreUsage.
322        The End of Support Life (EOSL) date of the Java Runtime (formatted according to `RFC3339`__).
323
324        __ https://datatracker.ietf.org/doc/html/rfc3339
325
326
327        :param end_of_support_life_date: The end_of_support_life_date of this JreUsage.
328        :type: datetime
329        """
330        self._end_of_support_life_date = end_of_support_life_date
331
332    @property
333    def vendor(self):
334        """
335        **[Required]** Gets the vendor of this JreUsage.
336        The vendor of the Java Runtime.
337
338
339        :return: The vendor of this JreUsage.
340        :rtype: str
341        """
342        return self._vendor
343
344    @vendor.setter
345    def vendor(self, vendor):
346        """
347        Sets the vendor of this JreUsage.
348        The vendor of the Java Runtime.
349
350
351        :param vendor: The vendor of this JreUsage.
352        :type: str
353        """
354        self._vendor = vendor
355
356    @property
357    def distribution(self):
358        """
359        **[Required]** Gets the distribution of this JreUsage.
360        The distribution of a Java Runtime is the name of the lineage of product to which it belongs, for example _Java(TM) SE Runtime Environment_.
361
362
363        :return: The distribution of this JreUsage.
364        :rtype: str
365        """
366        return self._distribution
367
368    @distribution.setter
369    def distribution(self, distribution):
370        """
371        Sets the distribution of this JreUsage.
372        The distribution of a Java Runtime is the name of the lineage of product to which it belongs, for example _Java(TM) SE Runtime Environment_.
373
374
375        :param distribution: The distribution of this JreUsage.
376        :type: str
377        """
378        self._distribution = distribution
379
380    @property
381    def version(self):
382        """
383        **[Required]** Gets the version of this JreUsage.
384        The version of the Java Runtime.
385
386
387        :return: The version of this JreUsage.
388        :rtype: str
389        """
390        return self._version
391
392    @version.setter
393    def version(self, version):
394        """
395        Sets the version of this JreUsage.
396        The version of the Java Runtime.
397
398
399        :param version: The version of this JreUsage.
400        :type: str
401        """
402        self._version = version
403
404    @property
405    def operating_systems(self):
406        """
407        Gets the operating_systems of this JreUsage.
408        The operating systems that have this Java Runtime installed.
409
410
411        :return: The operating_systems of this JreUsage.
412        :rtype: list[oci.jms.models.OperatingSystem]
413        """
414        return self._operating_systems
415
416    @operating_systems.setter
417    def operating_systems(self, operating_systems):
418        """
419        Sets the operating_systems of this JreUsage.
420        The operating systems that have this Java Runtime installed.
421
422
423        :param operating_systems: The operating_systems of this JreUsage.
424        :type: list[oci.jms.models.OperatingSystem]
425        """
426        self._operating_systems = operating_systems
427
428    @property
429    def approximate_installation_count(self):
430        """
431        Gets the approximate_installation_count of this JreUsage.
432        The approximate count of installations that are installations of this Java Runtime.
433
434
435        :return: The approximate_installation_count of this JreUsage.
436        :rtype: int
437        """
438        return self._approximate_installation_count
439
440    @approximate_installation_count.setter
441    def approximate_installation_count(self, approximate_installation_count):
442        """
443        Sets the approximate_installation_count of this JreUsage.
444        The approximate count of installations that are installations of this Java Runtime.
445
446
447        :param approximate_installation_count: The approximate_installation_count of this JreUsage.
448        :type: int
449        """
450        self._approximate_installation_count = approximate_installation_count
451
452    @property
453    def approximate_application_count(self):
454        """
455        Gets the approximate_application_count of this JreUsage.
456        The approximate count of the applications running on this Java Runtime.
457
458
459        :return: The approximate_application_count of this JreUsage.
460        :rtype: int
461        """
462        return self._approximate_application_count
463
464    @approximate_application_count.setter
465    def approximate_application_count(self, approximate_application_count):
466        """
467        Sets the approximate_application_count of this JreUsage.
468        The approximate count of the applications running on this Java Runtime.
469
470
471        :param approximate_application_count: The approximate_application_count of this JreUsage.
472        :type: int
473        """
474        self._approximate_application_count = approximate_application_count
475
476    @property
477    def approximate_managed_instance_count(self):
478        """
479        Gets the approximate_managed_instance_count of this JreUsage.
480        The approximate count of the managed instances that report this Java Runtime.
481
482
483        :return: The approximate_managed_instance_count of this JreUsage.
484        :rtype: int
485        """
486        return self._approximate_managed_instance_count
487
488    @approximate_managed_instance_count.setter
489    def approximate_managed_instance_count(self, approximate_managed_instance_count):
490        """
491        Sets the approximate_managed_instance_count of this JreUsage.
492        The approximate count of the managed instances that report this Java Runtime.
493
494
495        :param approximate_managed_instance_count: The approximate_managed_instance_count of this JreUsage.
496        :type: int
497        """
498        self._approximate_managed_instance_count = approximate_managed_instance_count
499
500    @property
501    def time_start(self):
502        """
503        Gets the time_start of this JreUsage.
504        Lower bound of the specified time period filter.
505
506
507        :return: The time_start of this JreUsage.
508        :rtype: datetime
509        """
510        return self._time_start
511
512    @time_start.setter
513    def time_start(self, time_start):
514        """
515        Sets the time_start of this JreUsage.
516        Lower bound of the specified time period filter.
517
518
519        :param time_start: The time_start of this JreUsage.
520        :type: datetime
521        """
522        self._time_start = time_start
523
524    @property
525    def time_end(self):
526        """
527        Gets the time_end of this JreUsage.
528        Upper bound of the specified time period filter.
529
530
531        :return: The time_end of this JreUsage.
532        :rtype: datetime
533        """
534        return self._time_end
535
536    @time_end.setter
537    def time_end(self, time_end):
538        """
539        Sets the time_end of this JreUsage.
540        Upper bound of the specified time period filter.
541
542
543        :param time_end: The time_end of this JreUsage.
544        :type: datetime
545        """
546        self._time_end = time_end
547
548    @property
549    def time_first_seen(self):
550        """
551        Gets the time_first_seen of this JreUsage.
552        The date and time the resource was _first_ reported to JMS.
553        This is potentially _before_ the specified time period provided by the filters.
554        For example, a resource can be first reported to JMS before the start of a specified time period,
555        if it is also reported during the time period.
556
557
558        :return: The time_first_seen of this JreUsage.
559        :rtype: datetime
560        """
561        return self._time_first_seen
562
563    @time_first_seen.setter
564    def time_first_seen(self, time_first_seen):
565        """
566        Sets the time_first_seen of this JreUsage.
567        The date and time the resource was _first_ reported to JMS.
568        This is potentially _before_ the specified time period provided by the filters.
569        For example, a resource can be first reported to JMS before the start of a specified time period,
570        if it is also reported during the time period.
571
572
573        :param time_first_seen: The time_first_seen of this JreUsage.
574        :type: datetime
575        """
576        self._time_first_seen = time_first_seen
577
578    @property
579    def time_last_seen(self):
580        """
581        Gets the time_last_seen of this JreUsage.
582        The date and time the resource was _last_ reported to JMS.
583        This is potentially _after_ the specified time period provided by the filters.
584        For example, a resource can be last reported to JMS before the start of a specified time period,
585        if it is also reported during the time period.
586
587
588        :return: The time_last_seen of this JreUsage.
589        :rtype: datetime
590        """
591        return self._time_last_seen
592
593    @time_last_seen.setter
594    def time_last_seen(self, time_last_seen):
595        """
596        Sets the time_last_seen of this JreUsage.
597        The date and time the resource was _last_ reported to JMS.
598        This is potentially _after_ the specified time period provided by the filters.
599        For example, a resource can be last reported to JMS before the start of a specified time period,
600        if it is also reported during the time period.
601
602
603        :param time_last_seen: The time_last_seen of this JreUsage.
604        :type: datetime
605        """
606        self._time_last_seen = time_last_seen
607
608    def __repr__(self):
609        return formatted_flat_dict(self)
610
611    def __eq__(self, other):
612        if other is None:
613            return False
614
615        return self.__dict__ == other.__dict__
616
617    def __ne__(self, other):
618        return not self == other
619