Class: OCI::ManagementAgent::Models::ManagementAgent

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

Overview

The details of the Management Agent inventory including the associated plugins.

Constant Summary collapse

PLATFORM_TYPE_ENUM =
[
  PLATFORM_TYPE_LINUX = 'LINUX'.freeze,
  PLATFORM_TYPE_WINDOWS = 'WINDOWS'.freeze,
  PLATFORM_TYPE_SOLARIS = 'SOLARIS'.freeze,
  PLATFORM_TYPE_MACOSX = 'MACOSX'.freeze,
  PLATFORM_TYPE_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
LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
  LIFECYCLE_STATE_INACTIVE = 'INACTIVE'.freeze,
  LIFECYCLE_STATE_TERMINATED = 'TERMINATED'.freeze,
  LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
  LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
INSTALL_TYPE_ENUM =
[
  INSTALL_TYPE_AGENT = 'AGENT'.freeze,
  INSTALL_TYPE_GATEWAY = 'GATEWAY'.freeze,
  INSTALL_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ManagementAgent

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
# File 'lib/oci/management_agent/models/management_agent.rb', line 251

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

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

  self.install_key_id = attributes[:'install_key_id'] if attributes[:'install_key_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.platform_type = attributes[:'platformType'] if attributes[:'platformType']

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

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

  self.platform_name = attributes[:'platformName'] if attributes[:'platformName']

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

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

  self.platform_version = attributes[:'platformVersion'] if attributes[:'platformVersion']

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

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

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

  self.resource_artifact_version = attributes[:'resourceArtifactVersion'] if attributes[:'resourceArtifactVersion']

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

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

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

  self.host_id = attributes[:'hostId'] if attributes[:'hostId']

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

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

  self.install_path = attributes[:'installPath'] if attributes[:'installPath']

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

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

  self.plugin_list = attributes[:'pluginList'] if attributes[:'pluginList']

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

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

  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.is_agent_auto_upgradable = attributes[:'isAgentAutoUpgradable'] unless attributes[:'isAgentAutoUpgradable'].nil?

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

  self.is_agent_auto_upgradable = attributes[:'is_agent_auto_upgradable'] unless attributes[:'is_agent_auto_upgradable'].nil?

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

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

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

  self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated']

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

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

  self.time_last_heartbeat = attributes[:'timeLastHeartbeat'] if attributes[:'timeLastHeartbeat']

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

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

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

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

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

  self.is_customer_deployed = attributes[:'isCustomerDeployed'] unless attributes[:'isCustomerDeployed'].nil?

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

  self.is_customer_deployed = attributes[:'is_customer_deployed'] unless attributes[:'is_customer_deployed'].nil?

  self.install_type = attributes[:'installType'] if attributes[:'installType']

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

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

  self.management_agent_properties = attributes[:'managementAgentProperties'] if attributes[:'managementAgentProperties']

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

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

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

Instance Attribute Details

#availability_statusString

The current availability status of managementAgent

Returns:

  • (String)


120
121
122
# File 'lib/oci/management_agent/models/management_agent.rb', line 120

def availability_status
  @availability_status
end

#compartment_idString

[Required] Compartment Identifier

Returns:

  • (String)


100
101
102
# File 'lib/oci/management_agent/models/management_agent.rb', line 100

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\"}}

Returns:

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


152
153
154
# File 'lib/oci/management_agent/models/management_agent.rb', line 152

def defined_tags
  @defined_tags
end

#display_nameString

Management Agent Name

Returns:

  • (String)


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

def display_name
  @display_name
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\"}

Returns:

  • (Hash<String, String>)


146
147
148
# File 'lib/oci/management_agent/models/management_agent.rb', line 146

def freeform_tags
  @freeform_tags
end

#hostString

Management Agent host machine name

Returns:

  • (String)


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

def host
  @host
end

#host_idString

Host resource ocid

Returns:

  • (String)


88
89
90
# File 'lib/oci/management_agent/models/management_agent.rb', line 88

def host_id
  @host_id
end

#idString

[Required] agent identifier

Returns:

  • (String)


47
48
49
# File 'lib/oci/management_agent/models/management_agent.rb', line 47

def id
  @id
end

#install_key_idString

agent install key identifier

Returns:

  • (String)


51
52
53
# File 'lib/oci/management_agent/models/management_agent.rb', line 51

def install_key_id
  @install_key_id
end

#install_pathString

Path where Management Agent is installed

Returns:

  • (String)


92
93
94
# File 'lib/oci/management_agent/models/management_agent.rb', line 92

def install_path
  @install_path
end

#install_typeString

The install type, either AGENT or GATEWAY

Returns:

  • (String)


136
137
138
# File 'lib/oci/management_agent/models/management_agent.rb', line 136

def install_type
  @install_type
end

#is_agent_auto_upgradableBOOLEAN

true if the agent can be upgraded automatically; false if it must be upgraded manually. This flag is derived from the tenancy level auto upgrade preference.

Returns:

  • (BOOLEAN)


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

def is_agent_auto_upgradable
  @is_agent_auto_upgradable
end

#is_customer_deployedBOOLEAN

true, if the agent image is manually downloaded and installed. false, if the agent is deployed as a plugin in Oracle Cloud Agent.

Returns:

  • (BOOLEAN)


132
133
134
# File 'lib/oci/management_agent/models/management_agent.rb', line 132

def is_customer_deployed
  @is_customer_deployed
end

#lifecycle_detailsString

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

Returns:

  • (String)


128
129
130
# File 'lib/oci/management_agent/models/management_agent.rb', line 128

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

The current state of managementAgent

Returns:

  • (String)


124
125
126
# File 'lib/oci/management_agent/models/management_agent.rb', line 124

def lifecycle_state
  @lifecycle_state
end

#management_agent_propertiesArray<OCI::ManagementAgent::Models::ManagementAgentProperty>

Additional properties for this Management Agent



140
141
142
# File 'lib/oci/management_agent/models/management_agent.rb', line 140

def management_agent_properties
  @management_agent_properties
end

#platform_nameString

Platform Name

Returns:

  • (String)


63
64
65
# File 'lib/oci/management_agent/models/management_agent.rb', line 63

def platform_name
  @platform_name
end

#platform_typeString

Platform Type

Returns:

  • (String)


59
60
61
# File 'lib/oci/management_agent/models/management_agent.rb', line 59

def platform_type
  @platform_type
end

#platform_versionString

Platform Version

Returns:

  • (String)


67
68
69
# File 'lib/oci/management_agent/models/management_agent.rb', line 67

def platform_version
  @platform_version
end

#plugin_listArray<OCI::ManagementAgent::Models::ManagementAgentPluginDetails>

list of managementAgentPlugins associated with the agent



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

def plugin_list
  @plugin_list
end

#resource_artifact_versionString

Version of the deployment artifact instantiated by this Management Agent. The format for Standalone resourceMode is YYMMDD.HHMM, and the format for other modes (whose artifacts are based upon Standalone but can advance independently) is YYMMDD.HHMM.VVVVVVVVVVVV. VVVVVVVVVVVV is always a numeric value between 000000000000 and 999999999999

Returns:

  • (String)


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

def resource_artifact_version
  @resource_artifact_version
end

#time_createdDateTime

The time the Management Agent was created. An RFC3339 formatted datetime string

Returns:

  • (DateTime)


108
109
110
# File 'lib/oci/management_agent/models/management_agent.rb', line 108

def time_created
  @time_created
end

#time_last_heartbeatDateTime

The time the Management Agent has last recorded its health status in telemetry. This value will be null if the agent has not recorded its health status in last 7 days. An RFC3339 formatted datetime string

Returns:

  • (DateTime)


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

def time_last_heartbeat
  @time_last_heartbeat
end

#time_updatedDateTime

The time the Management Agent was updated. An RFC3339 formatted datetime string

Returns:

  • (DateTime)


112
113
114
# File 'lib/oci/management_agent/models/management_agent.rb', line 112

def time_updated
  @time_updated
end

#versionString

[Required] Management Agent Version

Returns:

  • (String)


71
72
73
# File 'lib/oci/management_agent/models/management_agent.rb', line 71

def version
  @version
end

Class Method Details

.attribute_mapObject

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



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
# File 'lib/oci/management_agent/models/management_agent.rb', line 155

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'install_key_id': :'installKeyId',
    'display_name': :'displayName',
    'platform_type': :'platformType',
    'platform_name': :'platformName',
    'platform_version': :'platformVersion',
    'version': :'version',
    'resource_artifact_version': :'resourceArtifactVersion',
    'host': :'host',
    'host_id': :'hostId',
    'install_path': :'installPath',
    'plugin_list': :'pluginList',
    'compartment_id': :'compartmentId',
    'is_agent_auto_upgradable': :'isAgentAutoUpgradable',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'time_last_heartbeat': :'timeLastHeartbeat',
    'availability_status': :'availabilityStatus',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_details': :'lifecycleDetails',
    'is_customer_deployed': :'isCustomerDeployed',
    'install_type': :'installType',
    'management_agent_properties': :'managementAgentProperties',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/oci/management_agent/models/management_agent.rb', line 188

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'install_key_id': :'String',
    'display_name': :'String',
    'platform_type': :'String',
    'platform_name': :'String',
    'platform_version': :'String',
    'version': :'String',
    'resource_artifact_version': :'String',
    'host': :'String',
    'host_id': :'String',
    'install_path': :'String',
    'plugin_list': :'Array<OCI::ManagementAgent::Models::ManagementAgentPluginDetails>',
    'compartment_id': :'String',
    'is_agent_auto_upgradable': :'BOOLEAN',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'time_last_heartbeat': :'DateTime',
    'availability_status': :'String',
    'lifecycle_state': :'String',
    'lifecycle_details': :'String',
    'is_customer_deployed': :'BOOLEAN',
    'install_type': :'String',
    'management_agent_properties': :'Array<OCI::ManagementAgent::Models::ManagementAgentProperty>',
    'freeform_tags': :'Hash<String, String>',
    'defined_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



455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
# File 'lib/oci/management_agent/models/management_agent.rb', line 455

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

  self.class == other.class &&
    id == other.id &&
    install_key_id == other.install_key_id &&
    display_name == other.display_name &&
    platform_type == other.platform_type &&
    platform_name == other.platform_name &&
    platform_version == other.platform_version &&
    version == other.version &&
    resource_artifact_version == other.resource_artifact_version &&
    host == other.host &&
    host_id == other.host_id &&
    install_path == other.install_path &&
    plugin_list == other.plugin_list &&
    compartment_id == other.compartment_id &&
    is_agent_auto_upgradable == other.is_agent_auto_upgradable &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    time_last_heartbeat == other.time_last_heartbeat &&
    availability_status == other.availability_status &&
    lifecycle_state == other.lifecycle_state &&
    lifecycle_details == other.lifecycle_details &&
    is_customer_deployed == other.is_customer_deployed &&
    install_type == other.install_type &&
    management_agent_properties == other.management_agent_properties &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_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



509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
# File 'lib/oci/management_agent/models/management_agent.rb', line 509

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


489
490
491
# File 'lib/oci/management_agent/models/management_agent.rb', line 489

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



498
499
500
# File 'lib/oci/management_agent/models/management_agent.rb', line 498

def hash
  [id, install_key_id, display_name, platform_type, platform_name, platform_version, version, resource_artifact_version, host, host_id, install_path, plugin_list, compartment_id, is_agent_auto_upgradable, time_created, time_updated, time_last_heartbeat, availability_status, lifecycle_state, lifecycle_details, is_customer_deployed, install_type, management_agent_properties, freeform_tags, defined_tags].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



542
543
544
545
546
547
548
549
550
551
# File 'lib/oci/management_agent/models/management_agent.rb', line 542

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



536
537
538
# File 'lib/oci/management_agent/models/management_agent.rb', line 536

def to_s
  to_hash.to_s
end