Class: OCI::Jms::Models::JavaFamily

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

Overview

Metadata associated with a specific Java release family. 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 = {}) ⇒ JavaFamily

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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

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

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

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

  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?

  self.release_date = attributes[:'releaseDate'] if attributes[:'releaseDate']

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

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

Instance Attribute Details

#display_nameString

[Required] The display name of the release family.

Returns:

  • (String)


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

def display_name
  @display_name
end

#doc_urlString

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

Returns:

  • (String)


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

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)


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

def end_of_support_life_date
  @end_of_support_life_date
end

#family_versionString

[Required] The Java release family identifier.

Returns:

  • (String)


28
29
30
# File 'lib/oci/jms/models/java_family.rb', line 28

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)


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

def is_supported_version
  @is_supported_version
end

#latest_release_artifactsArray<OCI::Jms::Models::JavaArtifact>

List of artifacts for the latest Java release version in this family. The script URLs in the response can be used from a command line, or in scripts and dockerfiles to always get the artifacts corresponding to the latest update release version.

Returns:



24
25
26
# File 'lib/oci/jms/models/java_family.rb', line 24

def latest_release_artifacts
  @latest_release_artifacts
end

#latest_release_versionString

[Required] Latest Java release version in the family.

Returns:

  • (String)


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

def latest_release_version
  @latest_release_version
end

#release_dateDateTime

The date on which the Java release family was first made available (formatted according to RFC3339).

Returns:

  • (DateTime)


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

def release_date
  @release_date
end

#support_typeString

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

Returns:

  • (String)


36
37
38
# File 'lib/oci/jms/models/java_family.rb', line 36

def support_type
  @support_type
end

Class Method Details

.attribute_mapObject

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



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/oci/jms/models/java_family.rb', line 63

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'latest_release_artifacts': :'latestReleaseArtifacts',
    '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',
    'release_date': :'releaseDate'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'latest_release_artifacts': :'Array<OCI::Jms::Models::JavaArtifact>',
    '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',
    'release_date': :'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



192
193
194
195
196
197
198
199
200
201
202
203
204
205
# File 'lib/oci/jms/models/java_family.rb', line 192

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

  self.class == other.class &&
    latest_release_artifacts == other.latest_release_artifacts &&
    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 &&
    release_date == other.release_date
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



230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
# File 'lib/oci/jms/models/java_family.rb', line 230

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


210
211
212
# File 'lib/oci/jms/models/java_family.rb', line 210

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



219
220
221
# File 'lib/oci/jms/models/java_family.rb', line 219

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

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



263
264
265
266
267
268
269
270
271
272
# File 'lib/oci/jms/models/java_family.rb', line 263

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



257
258
259
# File 'lib/oci/jms/models/java_family.rb', line 257

def to_s
  to_hash.to_s
end