Class: OCI::Jms::Models::InstallationSite

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

Overview

Installation site of a Java Runtime. An installation site is a Java Runtime installed at a specific path on a managed instance.

Constant Summary collapse

LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
  LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
  LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
  LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_NEEDS_ATTENTION = 'NEEDS_ATTENTION'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
MANAGED_INSTANCE_TYPE_ENUM =
[
  MANAGED_INSTANCE_TYPE_ORACLE_MANAGEMENT_AGENT = 'ORACLE_MANAGEMENT_AGENT'.freeze,
  MANAGED_INSTANCE_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 = {}) ⇒ InstallationSite

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



134
135
136
137
138
139
140
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# File 'lib/oci/jms/models/installation_site.rb', line 134

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

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

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

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

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

  self.operating_system = attributes[:'operatingSystem'] if attributes[:'operatingSystem']

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

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

  self.approximate_application_count = attributes[:'approximateApplicationCount'] if attributes[:'approximateApplicationCount']

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

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

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

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

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

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

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

Instance Attribute Details

#approximate_application_countInteger

The approximate count of applications running on this installation

Returns:

  • (Integer)


53
54
55
# File 'lib/oci/jms/models/installation_site.rb', line 53

def approximate_application_count
  @approximate_application_count
end

#blocklistArray<OCI::Jms::Models::BlocklistEntry>

The list of operations that are blocklisted.



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

def blocklist
  @blocklist
end

#hostnameString

The hostname of the managed instance (if applicable).

Returns:

  • (String)


77
78
79
# File 'lib/oci/jms/models/installation_site.rb', line 77

def hostname
  @hostname
end

#installation_keyString

[Required] The unique identifier for the installation of a Java Runtime at a specific path on a specific operating system.

Returns:

  • (String)


32
33
34
# File 'lib/oci/jms/models/installation_site.rb', line 32

def installation_key
  @installation_key
end

#jreOCI::Jms::Models::JavaRuntimeId

This attribute is required.



41
42
43
# File 'lib/oci/jms/models/installation_site.rb', line 41

def jre
  @jre
end

#lifecycle_stateString

The lifecycle state of the installation site.

Returns:

  • (String)


69
70
71
# File 'lib/oci/jms/models/installation_site.rb', line 69

def lifecycle_state
  @lifecycle_state
end

#managed_instance_idString

[Required] The OCID of the related managed instance.

Returns:

  • (String)


37
38
39
# File 'lib/oci/jms/models/installation_site.rb', line 37

def managed_instance_id
  @managed_instance_id
end

#managed_instance_typeString

The type of the source of events.

Returns:

  • (String)


73
74
75
# File 'lib/oci/jms/models/installation_site.rb', line 73

def managed_instance_type
  @managed_instance_type
end

#operating_systemOCI::Jms::Models::OperatingSystem

This attribute is required.



49
50
51
# File 'lib/oci/jms/models/installation_site.rb', line 49

def operating_system
  @operating_system
end

#pathString

[Required] The file system path of the installation.

Returns:

  • (String)


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

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


61
62
63
# File 'lib/oci/jms/models/installation_site.rb', line 61

def time_last_seen
  @time_last_seen
end

Class Method Details

.attribute_mapObject

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



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/oci/jms/models/installation_site.rb', line 80

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'installation_key': :'installationKey',
    'managed_instance_id': :'managedInstanceId',
    'jre': :'jre',
    'path': :'path',
    'operating_system': :'operatingSystem',
    'approximate_application_count': :'approximateApplicationCount',
    'time_last_seen': :'timeLastSeen',
    'blocklist': :'blocklist',
    'lifecycle_state': :'lifecycleState',
    'managed_instance_type': :'managedInstanceType',
    'hostname': :'hostname'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/oci/jms/models/installation_site.rb', line 99

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'installation_key': :'String',
    'managed_instance_id': :'String',
    'jre': :'OCI::Jms::Models::JavaRuntimeId',
    'path': :'String',
    'operating_system': :'OCI::Jms::Models::OperatingSystem',
    'approximate_application_count': :'Integer',
    'time_last_seen': :'DateTime',
    'blocklist': :'Array<OCI::Jms::Models::BlocklistEntry>',
    'lifecycle_state': :'String',
    'managed_instance_type': :'String',
    'hostname': :'String'
    # 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



224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
# File 'lib/oci/jms/models/installation_site.rb', line 224

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

  self.class == other.class &&
    installation_key == other.installation_key &&
    managed_instance_id == other.managed_instance_id &&
    jre == other.jre &&
    path == other.path &&
    operating_system == other.operating_system &&
    approximate_application_count == other.approximate_application_count &&
    time_last_seen == other.time_last_seen &&
    blocklist == other.blocklist &&
    lifecycle_state == other.lifecycle_state &&
    managed_instance_type == other.managed_instance_type &&
    hostname == other.hostname
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



264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
# File 'lib/oci/jms/models/installation_site.rb', line 264

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


244
245
246
# File 'lib/oci/jms/models/installation_site.rb', line 244

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



253
254
255
# File 'lib/oci/jms/models/installation_site.rb', line 253

def hash
  [installation_key, managed_instance_id, jre, path, operating_system, approximate_application_count, time_last_seen, blocklist, lifecycle_state, managed_instance_type, hostname].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



297
298
299
300
301
302
303
304
305
306
# File 'lib/oci/jms/models/installation_site.rb', line 297

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



291
292
293
# File 'lib/oci/jms/models/installation_site.rb', line 291

def to_s
  to_hash.to_s
end