Class: OCI::Jms::Models::InstallationUsage
- Inherits:
-
Object
- Object
- OCI::Jms::Models::InstallationUsage
- Defined in:
- lib/oci/jms/models/installation_usage.rb
Overview
Installation usage during a specified time period. An installation is a collection of deployed instances of a specific Java Runtime that share the same install path.
Instance Attribute Summary collapse
-
#approximate_application_count ⇒ Integer
The approximate count of applications running on this installation.
-
#approximate_managed_instance_count ⇒ Integer
The approximate count of managed instances reporting this installation.
-
#architecture ⇒ String
[Required] The architecture of the operating system for the installation.
-
#jre_distribution ⇒ String
[Required] The distribution of the Java Runtime that is deployed with the installation.
-
#jre_vendor ⇒ String
[Required] The vendor of the Java Runtime that is deployed with the installation.
-
#jre_version ⇒ String
[Required] The version of the Java Runtime that is deployed with the installation.
- #operating_system ⇒ OCI::Jms::Models::OperatingSystem
-
#os ⇒ String
[Required] The Operating System for the installation.
-
#path ⇒ String
[Required] The file system path of the Java installation.
-
#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.
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 = {}) ⇒ InstallationUsage
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 = {}) ⇒ InstallationUsage
Initializes the object
132 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 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/oci/jms/models/installation_usage.rb', line 132 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.jre_vendor = attributes[:'jreVendor'] if attributes[:'jreVendor'] raise 'You cannot provide both :jreVendor and :jre_vendor' if attributes.key?(:'jreVendor') && attributes.key?(:'jre_vendor') self.jre_vendor = attributes[:'jre_vendor'] if attributes[:'jre_vendor'] self.jre_distribution = attributes[:'jreDistribution'] if attributes[:'jreDistribution'] raise 'You cannot provide both :jreDistribution and :jre_distribution' if attributes.key?(:'jreDistribution') && attributes.key?(:'jre_distribution') self.jre_distribution = attributes[:'jre_distribution'] if attributes[:'jre_distribution'] self.jre_version = attributes[:'jreVersion'] if attributes[:'jreVersion'] raise 'You cannot provide both :jreVersion and :jre_version' if attributes.key?(:'jreVersion') && attributes.key?(:'jre_version') self.jre_version = attributes[:'jre_version'] if attributes[:'jre_version'] self.path = attributes[:'path'] if attributes[:'path'] self.os = attributes[:'os'] if attributes[:'os'] self.architecture = attributes[:'architecture'] if attributes[:'architecture'] self. = attributes[:'operatingSystem'] if attributes[:'operatingSystem'] raise 'You cannot provide both :operatingSystem and :operating_system' if attributes.key?(:'operatingSystem') && attributes.key?(:'operating_system') self. = attributes[:'operating_system'] if attributes[:'operating_system'] 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.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 applications running on this installation
41 42 43 |
# File 'lib/oci/jms/models/installation_usage.rb', line 41 def approximate_application_count @approximate_application_count end |
#approximate_managed_instance_count ⇒ Integer
The approximate count of managed instances reporting this installation
45 46 47 |
# File 'lib/oci/jms/models/installation_usage.rb', line 45 def approximate_managed_instance_count @approximate_managed_instance_count end |
#architecture ⇒ String
[Required] The architecture of the operating system for the installation. Deprecated, use operatingSystem instead.
34 35 36 |
# File 'lib/oci/jms/models/installation_usage.rb', line 34 def architecture @architecture end |
#jre_distribution ⇒ String
[Required] The distribution of the Java Runtime that is deployed with the installation.
18 19 20 |
# File 'lib/oci/jms/models/installation_usage.rb', line 18 def jre_distribution @jre_distribution end |
#jre_vendor ⇒ String
[Required] The vendor of the Java Runtime that is deployed with the installation.
14 15 16 |
# File 'lib/oci/jms/models/installation_usage.rb', line 14 def jre_vendor @jre_vendor end |
#jre_version ⇒ String
[Required] The version of the Java Runtime that is deployed with the installation.
22 23 24 |
# File 'lib/oci/jms/models/installation_usage.rb', line 22 def jre_version @jre_version end |
#operating_system ⇒ OCI::Jms::Models::OperatingSystem
37 38 39 |
# File 'lib/oci/jms/models/installation_usage.rb', line 37 def @operating_system end |
#os ⇒ String
[Required] The Operating System for the installation. Deprecated, use operatingSystem instead.
30 31 32 |
# File 'lib/oci/jms/models/installation_usage.rb', line 30 def os @os end |
#path ⇒ String
[Required] The file system path of the Java installation.
26 27 28 |
# File 'lib/oci/jms/models/installation_usage.rb', line 26 def path @path 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.
53 54 55 |
# File 'lib/oci/jms/models/installation_usage.rb', line 53 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.
61 62 63 |
# File 'lib/oci/jms/models/installation_usage.rb', line 61 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.
69 70 71 |
# File 'lib/oci/jms/models/installation_usage.rb', line 69 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.
49 50 51 |
# File 'lib/oci/jms/models/installation_usage.rb', line 49 def time_start @time_start end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/oci/jms/models/installation_usage.rb', line 72 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'jre_vendor': :'jreVendor', 'jre_distribution': :'jreDistribution', 'jre_version': :'jreVersion', 'path': :'path', 'os': :'os', 'architecture': :'architecture', 'operating_system': :'operatingSystem', 'approximate_application_count': :'approximateApplicationCount', 'approximate_managed_instance_count': :'approximateManagedInstanceCount', '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.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/oci/jms/models/installation_usage.rb', line 93 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'jre_vendor': :'String', 'jre_distribution': :'String', 'jre_version': :'String', 'path': :'String', 'os': :'String', 'architecture': :'String', 'operating_system': :'OCI::Jms::Models::OperatingSystem', 'approximate_application_count': :'Integer', 'approximate_managed_instance_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.
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/oci/jms/models/installation_usage.rb', line 212 def ==(other) return true if equal?(other) self.class == other.class && jre_vendor == other.jre_vendor && jre_distribution == other.jre_distribution && jre_version == other.jre_version && path == other.path && os == other.os && architecture == other.architecture && == other. && approximate_application_count == other.approximate_application_count && approximate_managed_instance_count == other.approximate_managed_instance_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
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/oci/jms/models/installation_usage.rb', line 254 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
234 235 236 |
# File 'lib/oci/jms/models/installation_usage.rb', line 234 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
243 244 245 |
# File 'lib/oci/jms/models/installation_usage.rb', line 243 def hash [jre_vendor, jre_distribution, jre_version, path, os, architecture, , approximate_application_count, approximate_managed_instance_count, time_start, time_end, time_first_seen, time_last_seen].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
287 288 289 290 291 292 293 294 295 296 |
# File 'lib/oci/jms/models/installation_usage.rb', line 287 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
281 282 283 |
# File 'lib/oci/jms/models/installation_usage.rb', line 281 def to_s to_hash.to_s end |