Class: OCI::Jms::Models::ApplicationUsage
- Inherits:
-
Object
- Object
- OCI::Jms::Models::ApplicationUsage
- Defined in:
- lib/oci/jms/models/application_usage.rb
Overview
Application usage during a specified time period. An application is a Java application that can be executed by a Java Runtime installation. An application is independent of the Java Runtime or its installation.
Instance Attribute Summary collapse
-
#application_id ⇒ String
[Required] An internal identifier for the application that is unique to a Fleet.
-
#application_type ⇒ String
[Required] The type of the application, denoted by how the application was started.
-
#approximate_installation_count ⇒ Integer
The approximate count of installations running this application.
-
#approximate_jre_count ⇒ Integer
The approximate count of Java Runtimes running this application.
-
#approximate_managed_instance_count ⇒ Integer
The approximate count of managed instances reporting this application.
-
#display_name ⇒ String
[Required] The name of the application.
-
#operating_systems ⇒ Array<OCI::Jms::Models::OperatingSystem>
The operating systems running this application.
-
#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 = {}) ⇒ ApplicationUsage
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 = {}) ⇒ ApplicationUsage
Initializes the object
122 123 124 125 126 127 128 129 130 131 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 |
# File 'lib/oci/jms/models/application_usage.rb', line 122 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.application_id = attributes[:'applicationId'] if attributes[:'applicationId'] raise 'You cannot provide both :applicationId and :application_id' if attributes.key?(:'applicationId') && attributes.key?(:'application_id') self.application_id = attributes[:'application_id'] if attributes[:'application_id'] self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.application_type = attributes[:'applicationType'] if attributes[:'applicationType'] raise 'You cannot provide both :applicationType and :application_type' if attributes.key?(:'applicationType') && attributes.key?(:'application_type') self.application_type = attributes[:'application_type'] if attributes[:'application_type'] 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_jre_count = attributes[:'approximateJreCount'] if attributes[:'approximateJreCount'] raise 'You cannot provide both :approximateJreCount and :approximate_jre_count' if attributes.key?(:'approximateJreCount') && attributes.key?(:'approximate_jre_count') self.approximate_jre_count = attributes[:'approximate_jre_count'] if attributes[:'approximate_jre_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
#application_id ⇒ String
[Required] An internal identifier for the application that is unique to a Fleet.
17 18 19 |
# File 'lib/oci/jms/models/application_usage.rb', line 17 def application_id @application_id end |
#application_type ⇒ String
[Required] The type of the application, denoted by how the application was started.
25 26 27 |
# File 'lib/oci/jms/models/application_usage.rb', line 25 def application_type @application_type end |
#approximate_installation_count ⇒ Integer
The approximate count of installations running this application.
33 34 35 |
# File 'lib/oci/jms/models/application_usage.rb', line 33 def approximate_installation_count @approximate_installation_count end |
#approximate_jre_count ⇒ Integer
The approximate count of Java Runtimes running this application.
37 38 39 |
# File 'lib/oci/jms/models/application_usage.rb', line 37 def approximate_jre_count @approximate_jre_count end |
#approximate_managed_instance_count ⇒ Integer
The approximate count of managed instances reporting this application.
41 42 43 |
# File 'lib/oci/jms/models/application_usage.rb', line 41 def approximate_managed_instance_count @approximate_managed_instance_count end |
#display_name ⇒ String
[Required] The name of the application.
21 22 23 |
# File 'lib/oci/jms/models/application_usage.rb', line 21 def display_name @display_name end |
#operating_systems ⇒ Array<OCI::Jms::Models::OperatingSystem>
The operating systems running this application.
29 30 31 |
# File 'lib/oci/jms/models/application_usage.rb', line 29 def @operating_systems 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.
49 50 51 |
# File 'lib/oci/jms/models/application_usage.rb', line 49 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.
57 58 59 |
# File 'lib/oci/jms/models/application_usage.rb', line 57 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.
65 66 67 |
# File 'lib/oci/jms/models/application_usage.rb', line 65 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.
45 46 47 |
# File 'lib/oci/jms/models/application_usage.rb', line 45 def time_start @time_start end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/oci/jms/models/application_usage.rb', line 68 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'application_id': :'applicationId', 'display_name': :'displayName', 'application_type': :'applicationType', 'operating_systems': :'operatingSystems', 'approximate_installation_count': :'approximateInstallationCount', 'approximate_jre_count': :'approximateJreCount', '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.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/oci/jms/models/application_usage.rb', line 87 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'application_id': :'String', 'display_name': :'String', 'application_type': :'String', 'operating_systems': :'Array<OCI::Jms::Models::OperatingSystem>', 'approximate_installation_count': :'Integer', 'approximate_jre_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.
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/oci/jms/models/application_usage.rb', line 202 def ==(other) return true if equal?(other) self.class == other.class && application_id == other.application_id && display_name == other.display_name && application_type == other.application_type && == other. && approximate_installation_count == other.approximate_installation_count && approximate_jre_count == other.approximate_jre_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
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/oci/jms/models/application_usage.rb', line 242 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
222 223 224 |
# File 'lib/oci/jms/models/application_usage.rb', line 222 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
231 232 233 |
# File 'lib/oci/jms/models/application_usage.rb', line 231 def hash [application_id, display_name, application_type, , approximate_installation_count, approximate_jre_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
275 276 277 278 279 280 281 282 283 284 |
# File 'lib/oci/jms/models/application_usage.rb', line 275 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
269 270 271 |
# File 'lib/oci/jms/models/application_usage.rb', line 269 def to_s to_hash.to_s end |