Class: OCI::Jms::Models::JavaServerInstanceUsage

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

Overview

Java Server instance usage during a specified time period.

Constant Summary collapse

JVM_SECURITY_STATUS_ENUM =
[
  JVM_SECURITY_STATUS_EARLY_ACCESS = 'EARLY_ACCESS'.freeze,
  JVM_SECURITY_STATUS_UNKNOWN = 'UNKNOWN'.freeze,
  JVM_SECURITY_STATUS_UP_TO_DATE = 'UP_TO_DATE'.freeze,
  JVM_SECURITY_STATUS_UPDATE_REQUIRED = 'UPDATE_REQUIRED'.freeze,
  JVM_SECURITY_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'.freeze,
  JVM_SECURITY_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ JavaServerInstanceUsage

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :server_instance_key (String)

    The value to assign to the #server_instance_key property

  • :fleet_id (String)

    The value to assign to the #fleet_id property

  • :server_instance_name (String)

    The value to assign to the #server_instance_name property

  • :server_key (String)

    The value to assign to the #server_key property

  • :server_name (String)

    The value to assign to the #server_name property

  • :server_version (String)

    The value to assign to the #server_version property

  • :managed_instance_id (String)

    The value to assign to the #managed_instance_id property

  • :host_name (String)

    The value to assign to the #host_name property

  • :jvm_key (String)

    The value to assign to the #jvm_key property

  • :jvm_vendor (String)

    The value to assign to the #jvm_vendor property

  • :jvm_distribution (String)

    The value to assign to the #jvm_distribution property

  • :jvm_version (String)

    The value to assign to the #jvm_version property

  • :jvm_security_status (String)

    The value to assign to the #jvm_security_status property

  • :approximate_deployed_application_count (Integer)

    The value to assign to the #approximate_deployed_application_count property

  • :time_start (DateTime)

    The value to assign to the #time_start property

  • :time_end (DateTime)

    The value to assign to the #time_end property

  • :time_first_seen (DateTime)

    The value to assign to the #time_first_seen property

  • :time_last_seen (DateTime)

    The value to assign to the #time_last_seen property



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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 191

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

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

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

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

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

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

  self.server_key = attributes[:'serverKey'] if attributes[:'serverKey']

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

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

  self.server_name = attributes[:'serverName'] if attributes[:'serverName']

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

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

  self.server_version = attributes[:'serverVersion'] if attributes[:'serverVersion']

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

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

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

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

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

  self.jvm_key = attributes[:'jvmKey'] if attributes[:'jvmKey']

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

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

  self.jvm_vendor = attributes[:'jvmVendor'] if attributes[:'jvmVendor']

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

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

  self.jvm_distribution = attributes[:'jvmDistribution'] if attributes[:'jvmDistribution']

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

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

  self.jvm_version = attributes[:'jvmVersion'] if attributes[:'jvmVersion']

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

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

  self.jvm_security_status = attributes[:'jvmSecurityStatus'] if attributes[:'jvmSecurityStatus']

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

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

  self.approximate_deployed_application_count = attributes[:'approximateDeployedApplicationCount'] if attributes[:'approximateDeployedApplicationCount']

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

  self.approximate_deployed_application_count = attributes[:'approximate_deployed_application_count'] if attributes[:'approximate_deployed_application_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_deployed_application_countInteger

The approximate count of deployed applications in the Java Server instance.

Returns:

  • (Integer)


89
90
91
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 89

def approximate_deployed_application_count
  @approximate_deployed_application_count
end

#fleet_idString

[Required] The OCID of the related Fleet.

Returns:

  • (String)


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

def fleet_id
  @fleet_id
end

#host_nameString

The host name of the related managed instance.

Returns:

  • (String)


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

def host_name
  @host_name
end

#jvm_distributionString

The distribution of the Java Runtime.

Returns:

  • (String)


75
76
77
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 75

def jvm_distribution
  @jvm_distribution
end

#jvm_keyString

The internal identifier of the related Java Runtime.

Returns:

  • (String)


65
66
67
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 65

def jvm_key
  @jvm_key
end

#jvm_security_statusString

The security status of the Java Runtime.

Returns:

  • (String)


84
85
86
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 84

def jvm_security_status
  @jvm_security_status
end

#jvm_vendorString

The vendor of the Java Runtime.

Returns:

  • (String)


70
71
72
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 70

def jvm_vendor
  @jvm_vendor
end

#jvm_versionString

The version of the Java Runtime.

Returns:

  • (String)


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

def jvm_version
  @jvm_version
end

#managed_instance_idString

[Required] The OCID of the related managed instance.

Returns:

  • (String)


55
56
57
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 55

def managed_instance_id
  @managed_instance_id
end

#server_instance_keyString

[Required] The internal identifier of the Java Server instance.

Returns:

  • (String)


25
26
27
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 25

def server_instance_key
  @server_instance_key
end

#server_instance_nameString

[Required] The name of the Java Server instance.

Returns:

  • (String)


35
36
37
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 35

def server_instance_name
  @server_instance_name
end

#server_keyString

[Required] The internal identifier of the related Java Server.

Returns:

  • (String)


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

def server_key
  @server_key
end

#server_nameString

The name of the Java Server.

Returns:

  • (String)


45
46
47
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 45

def server_name
  @server_name
end

#server_versionString

The version of the Java Server.

Returns:

  • (String)


50
51
52
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 50

def server_version
  @server_version
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)


97
98
99
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 97

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)


105
106
107
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 105

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)


113
114
115
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 113

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)


93
94
95
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 93

def time_start
  @time_start
end

Class Method Details

.attribute_mapObject

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



116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 116

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'server_instance_key': :'serverInstanceKey',
    'fleet_id': :'fleetId',
    'server_instance_name': :'serverInstanceName',
    'server_key': :'serverKey',
    'server_name': :'serverName',
    'server_version': :'serverVersion',
    'managed_instance_id': :'managedInstanceId',
    'host_name': :'hostName',
    'jvm_key': :'jvmKey',
    'jvm_vendor': :'jvmVendor',
    'jvm_distribution': :'jvmDistribution',
    'jvm_version': :'jvmVersion',
    'jvm_security_status': :'jvmSecurityStatus',
    'approximate_deployed_application_count': :'approximateDeployedApplicationCount',
    'time_start': :'timeStart',
    'time_end': :'timeEnd',
    'time_first_seen': :'timeFirstSeen',
    'time_last_seen': :'timeLastSeen'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 142

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'server_instance_key': :'String',
    'fleet_id': :'String',
    'server_instance_name': :'String',
    'server_key': :'String',
    'server_name': :'String',
    'server_version': :'String',
    'managed_instance_id': :'String',
    'host_name': :'String',
    'jvm_key': :'String',
    'jvm_vendor': :'String',
    'jvm_distribution': :'String',
    'jvm_version': :'String',
    'jvm_security_status': :'String',
    'approximate_deployed_application_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



326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 326

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

  self.class == other.class &&
    server_instance_key == other.server_instance_key &&
    fleet_id == other.fleet_id &&
    server_instance_name == other.server_instance_name &&
    server_key == other.server_key &&
    server_name == other.server_name &&
    server_version == other.server_version &&
    managed_instance_id == other.managed_instance_id &&
    host_name == other.host_name &&
    jvm_key == other.jvm_key &&
    jvm_vendor == other.jvm_vendor &&
    jvm_distribution == other.jvm_distribution &&
    jvm_version == other.jvm_version &&
    jvm_security_status == other.jvm_security_status &&
    approximate_deployed_application_count == other.approximate_deployed_application_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



373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 373

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


353
354
355
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 353

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



362
363
364
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 362

def hash
  [server_instance_key, fleet_id, server_instance_name, server_key, server_name, server_version, managed_instance_id, host_name, jvm_key, jvm_vendor, jvm_distribution, jvm_version, jvm_security_status, approximate_deployed_application_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



406
407
408
409
410
411
412
413
414
415
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 406

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



400
401
402
# File 'lib/oci/jms/models/java_server_instance_usage.rb', line 400

def to_s
  to_hash.to_s
end