Class: OCI::Wlms::Models::ServerSummary

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

Overview

The summary of servers.

Constant Summary collapse

LATEST_PATCHES_STATUS_ENUM =
[
  LATEST_PATCHES_STATUS_ON_LATEST_PATCHES = 'ON_LATEST_PATCHES'.freeze,
  LATEST_PATCHES_STATUS_PATCHING_REQUIRED = 'PATCHING_REQUIRED'.freeze,
  LATEST_PATCHES_STATUS_UNKNOWN = 'UNKNOWN'.freeze,
  LATEST_PATCHES_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
PATCH_READINESS_STATUS_ENUM =
[
  PATCH_READINESS_STATUS_OK = 'OK'.freeze,
  PATCH_READINESS_STATUS_WARNING = 'WARNING'.freeze,
  PATCH_READINESS_STATUS_ERROR = 'ERROR'.freeze,
  PATCH_READINESS_STATUS_UNKNOWN = 'UNKNOWN'.freeze,
  PATCH_READINESS_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 = {}) ⇒ ServerSummary

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

  • :name (String)

    The value to assign to the #name property

  • :is_admin (BOOLEAN)

    The value to assign to the #is_admin property

  • :status (String)

    The value to assign to the #status property

  • :restart_order (Integer)

    The value to assign to the #restart_order property

  • :middleware_path (String)

    The value to assign to the #middleware_path property

  • :middleware_type (String)

    The value to assign to the #middleware_type property

  • :weblogic_version (String)

    The value to assign to the #weblogic_version property

  • :jdk_path (String)

    The value to assign to the #jdk_path property

  • :jdk_version (String)

    The value to assign to the #jdk_version property

  • :wls_domain_name (String)

    The value to assign to the #wls_domain_name property

  • :wls_domain_id (String)

    The value to assign to the #wls_domain_id property

  • :wls_domain_path (String)

    The value to assign to the #wls_domain_path property

  • :latest_patches_status (String)

    The value to assign to the #latest_patches_status property

  • :patch_readiness_status (String)

    The value to assign to the #patch_readiness_status property

  • :host_name (String)

    The value to assign to the #host_name property

  • :managed_instance_id (String)

    The value to assign to the #managed_instance_id property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :time_updated (DateTime)

    The value to assign to the #time_updated property



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
# File 'lib/oci/wlms/models/server_summary.rb', line 192

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

  self.is_admin = attributes[:'isAdmin'] unless attributes[:'isAdmin'].nil?

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

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

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

  self.restart_order = attributes[:'restartOrder'] if attributes[:'restartOrder']

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

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

  self.middleware_path = attributes[:'middlewarePath'] if attributes[:'middlewarePath']

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

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

  self.middleware_type = attributes[:'middlewareType'] if attributes[:'middlewareType']

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

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

  self.weblogic_version = attributes[:'weblogicVersion'] if attributes[:'weblogicVersion']

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

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

  self.jdk_path = attributes[:'jdkPath'] if attributes[:'jdkPath']

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

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

  self.jdk_version = attributes[:'jdkVersion'] if attributes[:'jdkVersion']

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

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

  self.wls_domain_name = attributes[:'wlsDomainName'] if attributes[:'wlsDomainName']

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

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

  self.wls_domain_id = attributes[:'wlsDomainId'] if attributes[:'wlsDomainId']

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

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

  self.wls_domain_path = attributes[:'wlsDomainPath'] if attributes[:'wlsDomainPath']

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

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

  self.latest_patches_status = attributes[:'latestPatchesStatus'] if attributes[:'latestPatchesStatus']

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

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

  self.patch_readiness_status = attributes[:'patchReadinessStatus'] if attributes[:'patchReadinessStatus']

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

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

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

Instance Attribute Details

#host_nameString

The name of the server.

Returns:

  • (String)


93
94
95
# File 'lib/oci/wlms/models/server_summary.rb', line 93

def host_name
  @host_name
end

#idString

The unique identifier of the server.

Note: Not an OCID.

Returns:

  • (String)


33
34
35
# File 'lib/oci/wlms/models/server_summary.rb', line 33

def id
  @id
end

#is_adminBOOLEAN

[Required] Whether or not the server is an admin node.

Returns:

  • (BOOLEAN)


41
42
43
# File 'lib/oci/wlms/models/server_summary.rb', line 41

def is_admin
  @is_admin
end

#jdk_pathString

The JDK path on the server.

Returns:

  • (String)


65
66
67
# File 'lib/oci/wlms/models/server_summary.rb', line 65

def jdk_path
  @jdk_path
end

#jdk_versionString

The JDK version on the server.

Returns:

  • (String)


69
70
71
# File 'lib/oci/wlms/models/server_summary.rb', line 69

def jdk_version
  @jdk_version
end

#latest_patches_statusString

Whether or not the server has installed the latest patches.

Returns:

  • (String)


85
86
87
# File 'lib/oci/wlms/models/server_summary.rb', line 85

def latest_patches_status
  @latest_patches_status
end

#managed_instance_idString

The managed instance ID of the server.

Returns:

  • (String)


97
98
99
# File 'lib/oci/wlms/models/server_summary.rb', line 97

def managed_instance_id
  @managed_instance_id
end

#middleware_pathString

The middleware path on the server.

Returns:

  • (String)


53
54
55
# File 'lib/oci/wlms/models/server_summary.rb', line 53

def middleware_path
  @middleware_path
end

#middleware_typeString

The middleware type on the server.

Returns:

  • (String)


57
58
59
# File 'lib/oci/wlms/models/server_summary.rb', line 57

def middleware_type
  @middleware_type
end

#nameString

[Required] The name of the server.

Returns:

  • (String)


37
38
39
# File 'lib/oci/wlms/models/server_summary.rb', line 37

def name
  @name
end

#patch_readiness_statusString

The patch readiness status of the server.

Returns:

  • (String)


89
90
91
# File 'lib/oci/wlms/models/server_summary.rb', line 89

def patch_readiness_status
  @patch_readiness_status
end

#restart_orderInteger

The restart order assigned to the server.

Returns:

  • (Integer)


49
50
51
# File 'lib/oci/wlms/models/server_summary.rb', line 49

def restart_order
  @restart_order
end

#statusString

[Required] The status of the server.

Returns:

  • (String)


45
46
47
# File 'lib/oci/wlms/models/server_summary.rb', line 45

def status
  @status
end

#time_createdDateTime

The date and time the server was first reported (in RFC 3339 format).

Example: 2016-08-25T21:10:29.600Z

Returns:

  • (DateTime)


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

def time_created
  @time_created
end

#time_updatedDateTime

The date and time the server was last reported (in RFC 3339 format).

Example: 2016-08-25T21:10:29.600Z

Returns:

  • (DateTime)


111
112
113
# File 'lib/oci/wlms/models/server_summary.rb', line 111

def time_updated
  @time_updated
end

#weblogic_versionString

The version of the WebLogic domain of the server

Returns:

  • (String)


61
62
63
# File 'lib/oci/wlms/models/server_summary.rb', line 61

def weblogic_version
  @weblogic_version
end

#wls_domain_idString

The ID of the WebLogic domain to which the server belongs.

Returns:

  • (String)


77
78
79
# File 'lib/oci/wlms/models/server_summary.rb', line 77

def wls_domain_id
  @wls_domain_id
end

#wls_domain_nameString

The name of the WebLogic domain to which the server belongs.

Returns:

  • (String)


73
74
75
# File 'lib/oci/wlms/models/server_summary.rb', line 73

def wls_domain_name
  @wls_domain_name
end

#wls_domain_pathString

The path of the WebLogic domain to which the server belongs.

Returns:

  • (String)


81
82
83
# File 'lib/oci/wlms/models/server_summary.rb', line 81

def wls_domain_path
  @wls_domain_path
end

Class Method Details

.attribute_mapObject

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



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

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'name': :'name',
    'is_admin': :'isAdmin',
    'status': :'status',
    'restart_order': :'restartOrder',
    'middleware_path': :'middlewarePath',
    'middleware_type': :'middlewareType',
    'weblogic_version': :'weblogicVersion',
    'jdk_path': :'jdkPath',
    'jdk_version': :'jdkVersion',
    'wls_domain_name': :'wlsDomainName',
    'wls_domain_id': :'wlsDomainId',
    'wls_domain_path': :'wlsDomainPath',
    'latest_patches_status': :'latestPatchesStatus',
    'patch_readiness_status': :'patchReadinessStatus',
    'host_name': :'hostName',
    'managed_instance_id': :'managedInstanceId',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/oci/wlms/models/server_summary.rb', line 141

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'name': :'String',
    'is_admin': :'BOOLEAN',
    'status': :'String',
    'restart_order': :'Integer',
    'middleware_path': :'String',
    'middleware_type': :'String',
    'weblogic_version': :'String',
    'jdk_path': :'String',
    'jdk_version': :'String',
    'wls_domain_name': :'String',
    'wls_domain_id': :'String',
    'wls_domain_path': :'String',
    'latest_patches_status': :'String',
    'patch_readiness_status': :'String',
    'host_name': :'String',
    'managed_instance_id': :'String',
    'time_created': :'DateTime',
    'time_updated': :'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



334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
# File 'lib/oci/wlms/models/server_summary.rb', line 334

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

  self.class == other.class &&
    id == other.id &&
    name == other.name &&
    is_admin == other.is_admin &&
    status == other.status &&
    restart_order == other.restart_order &&
    middleware_path == other.middleware_path &&
    middleware_type == other.middleware_type &&
    weblogic_version == other.weblogic_version &&
    jdk_path == other.jdk_path &&
    jdk_version == other.jdk_version &&
    wls_domain_name == other.wls_domain_name &&
    wls_domain_id == other.wls_domain_id &&
    wls_domain_path == other.wls_domain_path &&
    latest_patches_status == other.latest_patches_status &&
    patch_readiness_status == other.patch_readiness_status &&
    host_name == other.host_name &&
    managed_instance_id == other.managed_instance_id &&
    time_created == other.time_created &&
    time_updated == other.time_updated
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



382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
# File 'lib/oci/wlms/models/server_summary.rb', line 382

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


362
363
364
# File 'lib/oci/wlms/models/server_summary.rb', line 362

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



371
372
373
# File 'lib/oci/wlms/models/server_summary.rb', line 371

def hash
  [id, name, is_admin, status, restart_order, middleware_path, middleware_type, weblogic_version, jdk_path, jdk_version, wls_domain_name, wls_domain_id, wls_domain_path, latest_patches_status, patch_readiness_status, host_name, managed_instance_id, time_created, time_updated].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



415
416
417
418
419
420
421
422
423
424
# File 'lib/oci/wlms/models/server_summary.rb', line 415

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



409
410
411
# File 'lib/oci/wlms/models/server_summary.rb', line 409

def to_s
  to_hash.to_s
end