Class: OCI::Jms::Models::JmsPlugin

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

Overview

Information about a JmsPlugin that has been registered.

Constant Summary collapse

AGENT_TYPE_ENUM =
[
  AGENT_TYPE_OMA = 'OMA'.freeze,
  AGENT_TYPE_OCA = 'OCA'.freeze,
  AGENT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
  LIFECYCLE_STATE_INACTIVE = 'INACTIVE'.freeze,
  LIFECYCLE_STATE_NEEDS_ATTENTION = 'NEEDS_ATTENTION'.freeze,
  LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
AVAILABILITY_STATUS_ENUM =
[
  AVAILABILITY_STATUS_ACTIVE = 'ACTIVE'.freeze,
  AVAILABILITY_STATUS_SILENT = 'SILENT'.freeze,
  AVAILABILITY_STATUS_NOT_AVAILABLE = 'NOT_AVAILABLE'.freeze,
  AVAILABILITY_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
OS_FAMILY_ENUM =
[
  OS_FAMILY_LINUX = 'LINUX'.freeze,
  OS_FAMILY_WINDOWS = 'WINDOWS'.freeze,
  OS_FAMILY_MACOS = 'MACOS'.freeze,
  OS_FAMILY_UNKNOWN = 'UNKNOWN'.freeze,
  OS_FAMILY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ JmsPlugin

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :id (String)

    The value to assign to the #id property

  • :agent_id (String)

    The value to assign to the #agent_id property

  • :agent_type (String)

    The value to assign to the #agent_type property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :availability_status (String)

    The value to assign to the #availability_status property

  • :fleet_id (String)

    The value to assign to the #fleet_id property

  • :compartment_id (String)

    The value to assign to the #compartment_id property

  • :hostname (String)

    The value to assign to the #hostname property

  • :os_family (String)

    The value to assign to the #os_family property

  • :os_architecture (String)

    The value to assign to the #os_architecture property

  • :os_distribution (String)

    The value to assign to the #os_distribution property

  • :plugin_version (String)

    The value to assign to the #plugin_version property

  • :time_registered (DateTime)

    The value to assign to the #time_registered property

  • :time_last_seen (DateTime)

    The value to assign to the #time_last_seen property

  • :defined_tags (Hash<String, Hash<String, Object>>)

    The value to assign to the #defined_tags property

  • :freeform_tags (Hash<String, String>)

    The value to assign to the #freeform_tags property

  • :system_tags (Hash<String, Hash<String, Object>>)

    The value to assign to the #system_tags property



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

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

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

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

  self.agent_type = attributes[:'agentType'] if attributes[:'agentType']

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

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

  self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']

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

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

  self.availability_status = attributes[:'availabilityStatus'] if attributes[:'availabilityStatus']

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

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

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

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

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

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

  self.os_family = attributes[:'osFamily'] if attributes[:'osFamily']

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

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

  self.os_architecture = attributes[:'osArchitecture'] if attributes[:'osArchitecture']

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

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

  self.os_distribution = attributes[:'osDistribution'] if attributes[:'osDistribution']

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

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

  self.plugin_version = attributes[:'pluginVersion'] if attributes[:'pluginVersion']

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

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

  self.time_registered = attributes[:'timeRegistered'] if attributes[:'timeRegistered']

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

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

  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']

  self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']

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

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

  self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']

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

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

  self.system_tags = attributes[:'systemTags'] if attributes[:'systemTags']

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

  self.system_tags = attributes[:'system_tags'] if attributes[:'system_tags']
end

Instance Attribute Details

#agent_idString

[Required] The OCID of the Management Agent (OMA) or the Oracle Cloud Agent (OCA) instance where the JMS plugin is deployed.

Returns:

  • (String)


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

def agent_id
  @agent_id
end

#agent_typeString

[Required] The agent type.

Returns:

  • (String)


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

def agent_type
  @agent_type
end

#availability_statusString

[Required] The availability status.

Returns:

  • (String)


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

def availability_status
  @availability_status
end

#compartment_idString

The OMA/OCA agent's compartment OCID.

Returns:

  • (String)


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

def compartment_id
  @compartment_id
end

#defined_tagsHash<String, Hash<String, Object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}. (See {Understanding Free-form Tags}[https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm]).

Returns:

  • (Hash<String, Hash<String, Object>>)


110
111
112
# File 'lib/oci/jms/models/jms_plugin.rb', line 110

def defined_tags
  @defined_tags
end

#fleet_idString

The OCID of the fleet.

Returns:

  • (String)


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

def fleet_id
  @fleet_id
end

#freeform_tagsHash<String, String>

Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}. (See {Managing Tags and Tag Namespaces}[https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm].)

Returns:

  • (Hash<String, String>)


116
117
118
# File 'lib/oci/jms/models/jms_plugin.rb', line 116

def freeform_tags
  @freeform_tags
end

#hostnameString

The hostname of the agent.

Returns:

  • (String)


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

def hostname
  @hostname
end

#idString

[Required] The OCID to identify this JmsPlugin.

Returns:

  • (String)


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

def id
  @id
end

#lifecycle_stateString

[Required] The lifecycle state.

Returns:

  • (String)


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

def lifecycle_state
  @lifecycle_state
end

#os_architectureString

The architecture of the operating system of the plugin.

Returns:

  • (String)


83
84
85
# File 'lib/oci/jms/models/jms_plugin.rb', line 83

def os_architecture
  @os_architecture
end

#os_distributionString

The distribution of the operating system of the plugin.

Returns:

  • (String)


87
88
89
# File 'lib/oci/jms/models/jms_plugin.rb', line 87

def os_distribution
  @os_distribution
end

#os_familyString

The operating system family for the plugin.

Returns:

  • (String)


79
80
81
# File 'lib/oci/jms/models/jms_plugin.rb', line 79

def os_family
  @os_family
end

#plugin_versionString

The version of the plugin.

Returns:

  • (String)


91
92
93
# File 'lib/oci/jms/models/jms_plugin.rb', line 91

def plugin_version
  @plugin_version
end

#system_tagsHash<String, Hash<String, Object>>

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system.

Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


125
126
127
# File 'lib/oci/jms/models/jms_plugin.rb', line 125

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


104
105
106
# File 'lib/oci/jms/models/jms_plugin.rb', line 104

def time_last_seen
  @time_last_seen
end

#time_registeredDateTime

[Required] The date and time the plugin was registered.

Returns:

  • (DateTime)


96
97
98
# File 'lib/oci/jms/models/jms_plugin.rb', line 96

def time_registered
  @time_registered
end

Class Method Details

.attribute_mapObject

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



128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/oci/jms/models/jms_plugin.rb', line 128

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'agent_id': :'agentId',
    'agent_type': :'agentType',
    'lifecycle_state': :'lifecycleState',
    'availability_status': :'availabilityStatus',
    'fleet_id': :'fleetId',
    'compartment_id': :'compartmentId',
    'hostname': :'hostname',
    'os_family': :'osFamily',
    'os_architecture': :'osArchitecture',
    'os_distribution': :'osDistribution',
    'plugin_version': :'pluginVersion',
    'time_registered': :'timeRegistered',
    'time_last_seen': :'timeLastSeen',
    'defined_tags': :'definedTags',
    'freeform_tags': :'freeformTags',
    'system_tags': :'systemTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# File 'lib/oci/jms/models/jms_plugin.rb', line 153

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'agent_id': :'String',
    'agent_type': :'String',
    'lifecycle_state': :'String',
    'availability_status': :'String',
    'fleet_id': :'String',
    'compartment_id': :'String',
    'hostname': :'String',
    'os_family': :'String',
    'os_architecture': :'String',
    'os_distribution': :'String',
    'plugin_version': :'String',
    'time_registered': :'DateTime',
    'time_last_seen': :'DateTime',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'freeform_tags': :'Hash<String, String>',
    'system_tags': :'Hash<String, Hash<String, Object>>'
    # 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



360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
# File 'lib/oci/jms/models/jms_plugin.rb', line 360

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

  self.class == other.class &&
    id == other.id &&
    agent_id == other.agent_id &&
    agent_type == other.agent_type &&
    lifecycle_state == other.lifecycle_state &&
    availability_status == other.availability_status &&
    fleet_id == other.fleet_id &&
    compartment_id == other.compartment_id &&
    hostname == other.hostname &&
    os_family == other.os_family &&
    os_architecture == other.os_architecture &&
    os_distribution == other.os_distribution &&
    plugin_version == other.plugin_version &&
    time_registered == other.time_registered &&
    time_last_seen == other.time_last_seen &&
    defined_tags == other.defined_tags &&
    freeform_tags == other.freeform_tags &&
    system_tags == other.system_tags
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



406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
# File 'lib/oci/jms/models/jms_plugin.rb', line 406

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


386
387
388
# File 'lib/oci/jms/models/jms_plugin.rb', line 386

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



395
396
397
# File 'lib/oci/jms/models/jms_plugin.rb', line 395

def hash
  [id, agent_id, agent_type, lifecycle_state, availability_status, fleet_id, compartment_id, hostname, os_family, os_architecture, os_distribution, plugin_version, time_registered, time_last_seen, defined_tags, freeform_tags, system_tags].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



439
440
441
442
443
444
445
446
447
448
# File 'lib/oci/jms/models/jms_plugin.rb', line 439

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



433
434
435
# File 'lib/oci/jms/models/jms_plugin.rb', line 433

def to_s
  to_hash.to_s
end