Class: OCI::Jms::Models::JavaFamilySummary

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

Overview

A summary of the Java release family information. A Java release family is typically a major version in the Java version identifier.

Constant Summary collapse

SUPPORT_TYPE_ENUM =
[
  SUPPORT_TYPE_LTS = 'LTS'.freeze,
  SUPPORT_TYPE_NON_LTS = 'NON_LTS'.freeze,
  SUPPORT_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 = {}) ⇒ JavaFamilySummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :family_version (String)

    The value to assign to the #family_version property

  • :display_name (String)

    The value to assign to the #display_name property

  • :support_type (String)

    The value to assign to the #support_type property

  • :end_of_support_life_date (DateTime)

    The value to assign to the #end_of_support_life_date property

  • :doc_url (String)

    The value to assign to the #doc_url property

  • :latest_release_version (String)

    The value to assign to the #latest_release_version property

  • :is_supported_version (BOOLEAN)

    The value to assign to the #is_supported_version property



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
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
139
140
141
# File 'lib/oci/jms/models/java_family_summary.rb', line 94

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

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

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

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

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

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

  self.end_of_support_life_date = attributes[:'endOfSupportLifeDate'] if attributes[:'endOfSupportLifeDate']

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

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

  self.doc_url = attributes[:'docUrl'] if attributes[:'docUrl']

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

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

  self.latest_release_version = attributes[:'latestReleaseVersion'] if attributes[:'latestReleaseVersion']

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

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

  self.is_supported_version = attributes[:'isSupportedVersion'] unless attributes[:'isSupportedVersion'].nil?

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

  self.is_supported_version = attributes[:'is_supported_version'] unless attributes[:'is_supported_version'].nil?
end

Instance Attribute Details

#display_nameString

[Required] The display name of the release family.

Returns:

  • (String)


26
27
28
# File 'lib/oci/jms/models/java_family_summary.rb', line 26

def display_name
  @display_name
end

#doc_urlString

[Required] Link to access the documentation for the release.

Returns:

  • (String)


39
40
41
# File 'lib/oci/jms/models/java_family_summary.rb', line 39

def doc_url
  @doc_url
end

#end_of_support_life_dateDateTime

[Required] The End of Support Life (EOSL) date of the Java release family (formatted according to RFC3339).

Returns:

  • (DateTime)


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

def end_of_support_life_date
  @end_of_support_life_date
end

#family_versionString

[Required] The Java release family identifier.

Returns:

  • (String)


22
23
24
# File 'lib/oci/jms/models/java_family_summary.rb', line 22

def family_version
  @family_version
end

#is_supported_versionBOOLEAN

[Required] Whether or not this Java release family is under active support. Refer Java Support Roadmap for more details.

Returns:

  • (BOOLEAN)


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

def is_supported_version
  @is_supported_version
end

#latest_release_versionString

[Required] Latest Java release version in the family.

Returns:

  • (String)


43
44
45
# File 'lib/oci/jms/models/java_family_summary.rb', line 43

def latest_release_version
  @latest_release_version
end

#support_typeString

[Required] This indicates the support category for the Java release family.

Returns:

  • (String)


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

def support_type
  @support_type
end

Class Method Details

.attribute_mapObject

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



52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/oci/jms/models/java_family_summary.rb', line 52

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'family_version': :'familyVersion',
    'display_name': :'displayName',
    'support_type': :'supportType',
    'end_of_support_life_date': :'endOfSupportLifeDate',
    'doc_url': :'docUrl',
    'latest_release_version': :'latestReleaseVersion',
    'is_supported_version': :'isSupportedVersion'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/oci/jms/models/java_family_summary.rb', line 67

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'family_version': :'String',
    'display_name': :'String',
    'support_type': :'String',
    'end_of_support_life_date': :'DateTime',
    'doc_url': :'String',
    'latest_release_version': :'String',
    'is_supported_version': :'BOOLEAN'
    # 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



163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/oci/jms/models/java_family_summary.rb', line 163

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

  self.class == other.class &&
    family_version == other.family_version &&
    display_name == other.display_name &&
    support_type == other.support_type &&
    end_of_support_life_date == other.end_of_support_life_date &&
    doc_url == other.doc_url &&
    latest_release_version == other.latest_release_version &&
    is_supported_version == other.is_supported_version
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



199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
# File 'lib/oci/jms/models/java_family_summary.rb', line 199

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


179
180
181
# File 'lib/oci/jms/models/java_family_summary.rb', line 179

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



188
189
190
# File 'lib/oci/jms/models/java_family_summary.rb', line 188

def hash
  [family_version, display_name, support_type, end_of_support_life_date, doc_url, latest_release_version, is_supported_version].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



232
233
234
235
236
237
238
239
240
241
# File 'lib/oci/jms/models/java_family_summary.rb', line 232

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



226
227
228
# File 'lib/oci/jms/models/java_family_summary.rb', line 226

def to_s
  to_hash.to_s
end