Class: OCI::Jms::Models::JreUsage
- Inherits:
-
Object
- Object
- OCI::Jms::Models::JreUsage
- Defined in:
- lib/oci/jms/models/jre_usage.rb
Overview
Java Runtime usage during a specified time period. A Java Runtime is identified by its vendor and version.
Constant Summary collapse
- SECURITY_STATUS_ENUM =
[ SECURITY_STATUS_EARLY_ACCESS = 'EARLY_ACCESS'.freeze, SECURITY_STATUS_UNKNOWN = 'UNKNOWN'.freeze, SECURITY_STATUS_UP_TO_DATE = 'UP_TO_DATE'.freeze, SECURITY_STATUS_UPDATE_REQUIRED = 'UPDATE_REQUIRED'.freeze, SECURITY_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'.freeze, SECURITY_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#approximate_application_count ⇒ Integer
The approximate count of the applications running on this Java Runtime.
-
#approximate_installation_count ⇒ Integer
The approximate count of installations that are installations of this Java Runtime.
-
#approximate_managed_instance_count ⇒ Integer
The approximate count of the managed instances that report this Java Runtime.
-
#approximate_pending_work_request_count ⇒ Integer
The approximate count of work requests working on this Java Runtime.
-
#days_under_security_baseline ⇒ Integer
The number of days since this release has been under the security baseline.
-
#distribution ⇒ String
[Required] 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.
-
#end_of_support_life_date ⇒ DateTime
The End of Support Life (EOSL) date of the Java Runtime (formatted according to RFC3339).
-
#fleet_id ⇒ String
The OCID of the related fleet.
-
#id ⇒ String
The internal identifier of the Java Runtime.
-
#managed_instance_id ⇒ String
The OCID of the related managed instance.
-
#operating_systems ⇒ Array<OCI::Jms::Models::OperatingSystem>
The operating systems that have this Java Runtime installed.
-
#release_date ⇒ DateTime
The release date of the Java Runtime (formatted according to RFC3339).
-
#security_status ⇒ String
The security status of the Java Runtime.
-
#time_end ⇒ DateTime
Upper bound of the specified time period filter.
-
#time_first_seen ⇒ DateTime
The date and time the resource was first reported to JMS.
-
#time_last_seen ⇒ DateTime
The date and time the resource was last reported to JMS.
-
#time_start ⇒ DateTime
Lower bound of the specified time period filter.
-
#vendor ⇒ String
[Required] The vendor of the Java Runtime.
-
#version ⇒ String
[Required] The version of the Java Runtime.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ JreUsage
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ JreUsage
Initializes the object
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/oci/jms/models/jre_usage.rb', line 184 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.id = attributes[:'id'] if attributes[:'id'] self.fleet_id = attributes[:'fleetId'] if attributes[:'fleetId'] raise 'You cannot provide both :fleetId and :fleet_id' if attributes.key?(:'fleetId') && attributes.key?(:'fleet_id') self.fleet_id = attributes[:'fleet_id'] if attributes[:'fleet_id'] self.managed_instance_id = attributes[:'managedInstanceId'] if attributes[:'managedInstanceId'] raise 'You cannot provide both :managedInstanceId and :managed_instance_id' if attributes.key?(:'managedInstanceId') && attributes.key?(:'managed_instance_id') self.managed_instance_id = attributes[:'managed_instance_id'] if attributes[:'managed_instance_id'] self.security_status = attributes[:'securityStatus'] if attributes[:'securityStatus'] raise 'You cannot provide both :securityStatus and :security_status' if attributes.key?(:'securityStatus') && attributes.key?(:'security_status') self.security_status = attributes[:'security_status'] if attributes[:'security_status'] self.release_date = attributes[:'releaseDate'] if attributes[:'releaseDate'] raise 'You cannot provide both :releaseDate and :release_date' if attributes.key?(:'releaseDate') && attributes.key?(:'release_date') self.release_date = attributes[:'release_date'] if attributes[:'release_date'] self.end_of_support_life_date = attributes[:'endOfSupportLifeDate'] if attributes[:'endOfSupportLifeDate'] raise 'You cannot provide both :endOfSupportLifeDate and :end_of_support_life_date' if attributes.key?(:'endOfSupportLifeDate') && attributes.key?(:'end_of_support_life_date') self.end_of_support_life_date = attributes[:'end_of_support_life_date'] if attributes[:'end_of_support_life_date'] self.vendor = attributes[:'vendor'] if attributes[:'vendor'] self.distribution = attributes[:'distribution'] if attributes[:'distribution'] self.version = attributes[:'version'] if attributes[:'version'] self.days_under_security_baseline = attributes[:'daysUnderSecurityBaseline'] if attributes[:'daysUnderSecurityBaseline'] raise 'You cannot provide both :daysUnderSecurityBaseline and :days_under_security_baseline' if attributes.key?(:'daysUnderSecurityBaseline') && attributes.key?(:'days_under_security_baseline') self.days_under_security_baseline = attributes[:'days_under_security_baseline'] if attributes[:'days_under_security_baseline'] self. = attributes[:'operatingSystems'] if attributes[:'operatingSystems'] raise 'You cannot provide both :operatingSystems and :operating_systems' if attributes.key?(:'operatingSystems') && attributes.key?(:'operating_systems') self. = attributes[:'operating_systems'] if attributes[:'operating_systems'] self.approximate_installation_count = attributes[:'approximateInstallationCount'] if attributes[:'approximateInstallationCount'] raise 'You cannot provide both :approximateInstallationCount and :approximate_installation_count' if attributes.key?(:'approximateInstallationCount') && attributes.key?(:'approximate_installation_count') self.approximate_installation_count = attributes[:'approximate_installation_count'] if attributes[:'approximate_installation_count'] self.approximate_application_count = attributes[:'approximateApplicationCount'] if attributes[:'approximateApplicationCount'] raise 'You cannot provide both :approximateApplicationCount and :approximate_application_count' if attributes.key?(:'approximateApplicationCount') && attributes.key?(:'approximate_application_count') self.approximate_application_count = attributes[:'approximate_application_count'] if attributes[:'approximate_application_count'] self.approximate_managed_instance_count = attributes[:'approximateManagedInstanceCount'] if attributes[:'approximateManagedInstanceCount'] raise 'You cannot provide both :approximateManagedInstanceCount and :approximate_managed_instance_count' if attributes.key?(:'approximateManagedInstanceCount') && attributes.key?(:'approximate_managed_instance_count') self.approximate_managed_instance_count = attributes[:'approximate_managed_instance_count'] if attributes[:'approximate_managed_instance_count'] self.approximate_pending_work_request_count = attributes[:'approximatePendingWorkRequestCount'] if attributes[:'approximatePendingWorkRequestCount'] raise 'You cannot provide both :approximatePendingWorkRequestCount and :approximate_pending_work_request_count' if attributes.key?(:'approximatePendingWorkRequestCount') && attributes.key?(:'approximate_pending_work_request_count') self.approximate_pending_work_request_count = attributes[:'approximate_pending_work_request_count'] if attributes[:'approximate_pending_work_request_count'] self.time_start = attributes[:'timeStart'] if attributes[:'timeStart'] raise 'You cannot provide both :timeStart and :time_start' if attributes.key?(:'timeStart') && attributes.key?(:'time_start') self.time_start = attributes[:'time_start'] if attributes[:'time_start'] self.time_end = attributes[:'timeEnd'] if attributes[:'timeEnd'] raise 'You cannot provide both :timeEnd and :time_end' if attributes.key?(:'timeEnd') && attributes.key?(:'time_end') self.time_end = attributes[:'time_end'] if attributes[:'time_end'] self.time_first_seen = attributes[:'timeFirstSeen'] if attributes[:'timeFirstSeen'] raise 'You cannot provide both :timeFirstSeen and :time_first_seen' if attributes.key?(:'timeFirstSeen') && attributes.key?(:'time_first_seen') self.time_first_seen = attributes[:'time_first_seen'] if attributes[:'time_first_seen'] self.time_last_seen = attributes[:'timeLastSeen'] if attributes[:'timeLastSeen'] raise 'You cannot provide both :timeLastSeen and :time_last_seen' if attributes.key?(:'timeLastSeen') && attributes.key?(:'time_last_seen') self.time_last_seen = attributes[:'time_last_seen'] if attributes[:'time_last_seen'] end |
Instance Attribute Details
#approximate_application_count ⇒ Integer
The approximate count of the applications running on this Java Runtime.
71 72 73 |
# File 'lib/oci/jms/models/jre_usage.rb', line 71 def approximate_application_count @approximate_application_count end |
#approximate_installation_count ⇒ Integer
The approximate count of installations that are installations of this Java Runtime.
67 68 69 |
# File 'lib/oci/jms/models/jre_usage.rb', line 67 def approximate_installation_count @approximate_installation_count end |
#approximate_managed_instance_count ⇒ Integer
The approximate count of the managed instances that report this Java Runtime.
75 76 77 |
# File 'lib/oci/jms/models/jre_usage.rb', line 75 def approximate_managed_instance_count @approximate_managed_instance_count end |
#approximate_pending_work_request_count ⇒ Integer
The approximate count of work requests working on this Java Runtime.
79 80 81 |
# File 'lib/oci/jms/models/jre_usage.rb', line 79 def approximate_pending_work_request_count @approximate_pending_work_request_count end |
#days_under_security_baseline ⇒ Integer
The number of days since this release has been under the security baseline.
59 60 61 |
# File 'lib/oci/jms/models/jre_usage.rb', line 59 def days_under_security_baseline @days_under_security_baseline end |
#distribution ⇒ String
[Required] 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.
51 52 53 |
# File 'lib/oci/jms/models/jre_usage.rb', line 51 def distribution @distribution end |
#end_of_support_life_date ⇒ DateTime
The End of Support Life (EOSL) date of the Java Runtime (formatted according to RFC3339).
43 44 45 |
# File 'lib/oci/jms/models/jre_usage.rb', line 43 def end_of_support_life_date @end_of_support_life_date end |
#fleet_id ⇒ String
The OCID of the related fleet.
27 28 29 |
# File 'lib/oci/jms/models/jre_usage.rb', line 27 def fleet_id @fleet_id end |
#id ⇒ String
The internal identifier of the Java Runtime.
23 24 25 |
# File 'lib/oci/jms/models/jre_usage.rb', line 23 def id @id end |
#managed_instance_id ⇒ String
The OCID of the related managed instance. This property value is present only for /listJreUsage.
31 32 33 |
# File 'lib/oci/jms/models/jre_usage.rb', line 31 def managed_instance_id @managed_instance_id end |
#operating_systems ⇒ Array<OCI::Jms::Models::OperatingSystem>
The operating systems that have this Java Runtime installed.
63 64 65 |
# File 'lib/oci/jms/models/jre_usage.rb', line 63 def @operating_systems end |
#release_date ⇒ DateTime
The release date of the Java Runtime (formatted according to RFC3339).
39 40 41 |
# File 'lib/oci/jms/models/jre_usage.rb', line 39 def release_date @release_date end |
#security_status ⇒ String
The security status of the Java Runtime.
35 36 37 |
# File 'lib/oci/jms/models/jre_usage.rb', line 35 def security_status @security_status end |
#time_end ⇒ DateTime
Upper bound of the specified time period filter. JMS provides a view of the data that is per day. The query uses only the date element of the parameter.
87 88 89 |
# File 'lib/oci/jms/models/jre_usage.rb', line 87 def time_end @time_end end |
#time_first_seen ⇒ DateTime
The date and time the resource was first reported to JMS. This is potentially before the specified time period provided by the filters. For example, a resource can be first reported to JMS before the start of a specified time period, if it is also reported during the time period.
95 96 97 |
# File 'lib/oci/jms/models/jre_usage.rb', line 95 def time_first_seen @time_first_seen end |
#time_last_seen ⇒ DateTime
The date and time the resource was last reported to JMS. This is potentially after the specified time period provided by the filters. For example, a resource can be last reported to JMS before the start of a specified time period, if it is also reported during the time period.
103 104 105 |
# File 'lib/oci/jms/models/jre_usage.rb', line 103 def time_last_seen @time_last_seen end |
#time_start ⇒ DateTime
Lower bound of the specified time period filter. JMS provides a view of the data that is per day. The query uses only the date element of the parameter.
83 84 85 |
# File 'lib/oci/jms/models/jre_usage.rb', line 83 def time_start @time_start end |
#vendor ⇒ String
[Required] The vendor of the Java Runtime.
47 48 49 |
# File 'lib/oci/jms/models/jre_usage.rb', line 47 def vendor @vendor end |
#version ⇒ String
[Required] The version of the Java Runtime.
55 56 57 |
# File 'lib/oci/jms/models/jre_usage.rb', line 55 def version @version end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/oci/jms/models/jre_usage.rb', line 106 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'fleet_id': :'fleetId', 'managed_instance_id': :'managedInstanceId', 'security_status': :'securityStatus', 'release_date': :'releaseDate', 'end_of_support_life_date': :'endOfSupportLifeDate', 'vendor': :'vendor', 'distribution': :'distribution', 'version': :'version', 'days_under_security_baseline': :'daysUnderSecurityBaseline', 'operating_systems': :'operatingSystems', 'approximate_installation_count': :'approximateInstallationCount', 'approximate_application_count': :'approximateApplicationCount', 'approximate_managed_instance_count': :'approximateManagedInstanceCount', 'approximate_pending_work_request_count': :'approximatePendingWorkRequestCount', 'time_start': :'timeStart', 'time_end': :'timeEnd', 'time_first_seen': :'timeFirstSeen', 'time_last_seen': :'timeLastSeen' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/oci/jms/models/jre_usage.rb', line 133 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'fleet_id': :'String', 'managed_instance_id': :'String', 'security_status': :'String', 'release_date': :'DateTime', 'end_of_support_life_date': :'DateTime', 'vendor': :'String', 'distribution': :'String', 'version': :'String', 'days_under_security_baseline': :'Integer', 'operating_systems': :'Array<OCI::Jms::Models::OperatingSystem>', 'approximate_installation_count': :'Integer', 'approximate_application_count': :'Integer', 'approximate_managed_instance_count': :'Integer', 'approximate_pending_work_request_count': :'Integer', 'time_start': :'DateTime', 'time_end': :'DateTime', 'time_first_seen': :'DateTime', 'time_last_seen': :'DateTime' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 |
# File 'lib/oci/jms/models/jre_usage.rb', line 309 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && fleet_id == other.fleet_id && managed_instance_id == other.managed_instance_id && security_status == other.security_status && release_date == other.release_date && end_of_support_life_date == other.end_of_support_life_date && vendor == other.vendor && distribution == other.distribution && version == other.version && days_under_security_baseline == other.days_under_security_baseline && == other. && approximate_installation_count == other.approximate_installation_count && approximate_application_count == other.approximate_application_count && approximate_managed_instance_count == other.approximate_managed_instance_count && approximate_pending_work_request_count == other.approximate_pending_work_request_count && time_start == other.time_start && time_end == other.time_end && time_first_seen == other.time_first_seen && time_last_seen == other.time_last_seen end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 |
# File 'lib/oci/jms/models/jre_usage.rb', line 357 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
337 338 339 |
# File 'lib/oci/jms/models/jre_usage.rb', line 337 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
346 347 348 |
# File 'lib/oci/jms/models/jre_usage.rb', line 346 def hash [id, fleet_id, managed_instance_id, security_status, release_date, end_of_support_life_date, vendor, distribution, version, days_under_security_baseline, , approximate_installation_count, approximate_application_count, approximate_managed_instance_count, approximate_pending_work_request_count, time_start, time_end, time_first_seen, time_last_seen].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
390 391 392 393 394 395 396 397 398 399 |
# File 'lib/oci/jms/models/jre_usage.rb', line 390 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
384 385 386 |
# File 'lib/oci/jms/models/jre_usage.rb', line 384 def to_s to_hash.to_s end |