Class: OCI::Jms::Models::ApplicationInstallationUsageSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/jms/models/application_installation_usage_summary.rb

Overview

Summarizes application installation usage information during a specified time period. The main difference between ApplicationUsage and ApplicationInstallationUsageSummary is the presence of installation information. ApplicationUsage provides only aggregated information for an application regardless of the installation paths. Therefore, two different applications with the same application name installed in two different paths will be aggregated to a single application. This aggregation makes it difficult to focus actions to single application installed on a known path. An application installation is independent of the Java Runtime on which it's running or the Managed Instance where it's installed.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ApplicationInstallationUsageSummary

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



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
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
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 146

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_installation_key = attributes[:'applicationInstallationKey'] if attributes[:'applicationInstallationKey']

  raise 'You cannot provide both :applicationInstallationKey and :application_installation_key' if attributes.key?(:'applicationInstallationKey') && attributes.key?(:'application_installation_key')

  self.application_installation_key = attributes[:'application_installation_key'] if attributes[:'application_installation_key']

  self.application_key = attributes[:'applicationKey'] if attributes[:'applicationKey']

  raise 'You cannot provide both :applicationKey and :application_key' if attributes.key?(:'applicationKey') && attributes.key?(:'application_key')

  self.application_key = attributes[:'application_key'] if attributes[:'application_key']

  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.installation_path = attributes[:'installationPath'] if attributes[:'installationPath']

  raise 'You cannot provide both :installationPath and :installation_path' if attributes.key?(:'installationPath') && attributes.key?(:'installation_path')

  self.installation_path = attributes[:'installation_path'] if attributes[:'installation_path']

  self.full_class_path = attributes[:'fullClassPath'] if attributes[:'fullClassPath']

  raise 'You cannot provide both :fullClassPath and :full_class_path' if attributes.key?(:'fullClassPath') && attributes.key?(:'full_class_path')

  self.full_class_path = attributes[:'full_class_path'] if attributes[:'full_class_path']

  self.operating_systems = attributes[:'operatingSystems'] if attributes[:'operatingSystems']

  raise 'You cannot provide both :operatingSystems and :operating_systems' if attributes.key?(:'operatingSystems') && attributes.key?(:'operating_systems')

  self.operating_systems = 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_installation_keyString

[Required] An internal identifier for the application installation that is unique to a Fleet.

Returns:

  • (String)


16
17
18
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 16

def application_installation_key
  @application_installation_key
end

#application_keyString

[Required] An internal identifier for the application that is unique to a Fleet. ApplicationKey will be identical for applications with different installation information.

Returns:

  • (String)


22
23
24
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 22

def application_key
  @application_key
end

#application_typeString

[Required] The type of the application, denoted by how the application was started.

Returns:

  • (String)


30
31
32
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 30

def application_type
  @application_type
end

#approximate_installation_countInteger

The approximate count of installations running this application.

Returns:

  • (Integer)


48
49
50
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 48

def approximate_installation_count
  @approximate_installation_count
end

#approximate_jre_countInteger

The approximate count of Java Runtimes running this application.

Returns:

  • (Integer)


52
53
54
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 52

def approximate_jre_count
  @approximate_jre_count
end

#approximate_managed_instance_countInteger

The approximate count of managed instances reporting this application.

Returns:

  • (Integer)


56
57
58
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 56

def approximate_managed_instance_count
  @approximate_managed_instance_count
end

#display_nameString

[Required] The name of the application.

Returns:

  • (String)


26
27
28
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 26

def display_name
  @display_name
end

#full_class_pathArray<String>

List of full paths where the application last searched for classes. Contains full paths to all items from module-list and class path list.

Returns:

  • (Array<String>)


40
41
42
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 40

def full_class_path
  @full_class_path
end

#installation_pathString

The full path on which the application installation was detected.

Returns:

  • (String)


34
35
36
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 34

def installation_path
  @installation_path
end

#operating_systemsArray<OCI::Jms::Models::OperatingSystem>

The operating systems running this application.



44
45
46
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 44

def operating_systems
  @operating_systems
end

#time_endDateTime

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.

Returns:

  • (DateTime)


64
65
66
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 64

def time_end
  @time_end
end

#time_first_seenDateTime

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.

Returns:

  • (DateTime)


72
73
74
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 72

def time_first_seen
  @time_first_seen
end

#time_last_seenDateTime

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.

Returns:

  • (DateTime)


80
81
82
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 80

def time_last_seen
  @time_last_seen
end

#time_startDateTime

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.

Returns:

  • (DateTime)


60
61
62
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 60

def time_start
  @time_start
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 83

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'application_installation_key': :'applicationInstallationKey',
    'application_key': :'applicationKey',
    'display_name': :'displayName',
    'application_type': :'applicationType',
    'installation_path': :'installationPath',
    'full_class_path': :'fullClassPath',
    '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_typesObject

Attribute type mapping.



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 105

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'application_installation_key': :'String',
    'application_key': :'String',
    'display_name': :'String',
    'application_type': :'String',
    'installation_path': :'String',
    'full_class_path': :'Array<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.

Parameters:

  • other (Object)

    the other object to be compared



244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 244

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    application_installation_key == other.application_installation_key &&
    application_key == other.application_key &&
    display_name == other.display_name &&
    application_type == other.application_type &&
    installation_path == other.installation_path &&
    full_class_path == other.full_class_path &&
    operating_systems == other.operating_systems &&
    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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 287

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


267
268
269
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 267

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



276
277
278
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 276

def hash
  [application_installation_key, application_key, display_name, application_type, installation_path, full_class_path, operating_systems, approximate_installation_count, approximate_jre_count, approximate_managed_instance_count, time_start, time_end, time_first_seen, time_last_seen].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



320
321
322
323
324
325
326
327
328
329
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 320

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



314
315
316
# File 'lib/oci/jms/models/application_installation_usage_summary.rb', line 314

def to_s
  to_hash.to_s
end