Class: OCI::Jms::Models::JavaRelease

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

Overview

Metadata associated with a specific release of Java. Includes the artifact details.

Constant Summary collapse

SECURITY_STATUS_ENUM =
[
  SECURITY_STATUS_EARLY_ACCESS = 'EARLY_ACCESS'.freeze,
  SECURITY_STATUS_UNKNOWN = 'UNKNOWN'.freeze,
  SECURITY_STATUS_UP_TO_DATE = 'UP_TO_DATE'.freeze,
  SECURITY_STATUS_UPDATE_REQUIRED = 'UPDATE_REQUIRED'.freeze,
  SECURITY_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'.freeze,
  SECURITY_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
RELEASE_TYPE_ENUM =
[
  RELEASE_TYPE_CPU = 'CPU'.freeze,
  RELEASE_TYPE_FEATURE = 'FEATURE'.freeze,
  RELEASE_TYPE_BPR = 'BPR'.freeze,
  RELEASE_TYPE_PATCH_RELEASE = 'PATCH_RELEASE'.freeze,
  RELEASE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LICENSE_TYPE_ENUM =
[
  LICENSE_TYPE_OTN = 'OTN'.freeze,
  LICENSE_TYPE_NFTC = 'NFTC'.freeze,
  LICENSE_TYPE_RESTRICTED = 'RESTRICTED'.freeze,
  LICENSE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
ARTIFACT_CONTENT_TYPES_ENUM =
[
  ARTIFACT_CONTENT_TYPES_JDK = 'JDK'.freeze,
  ARTIFACT_CONTENT_TYPES_JRE = 'JRE'.freeze,
  ARTIFACT_CONTENT_TYPES_SERVER_JRE = 'SERVER_JRE'.freeze,
  ARTIFACT_CONTENT_TYPES_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ JavaRelease

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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

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

  self.release_version = attributes[:'releaseVersion'] if attributes[:'releaseVersion']

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

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

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

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

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

  self.security_status = attributes[:'securityStatus'] if attributes[:'securityStatus']

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

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

  self.release_type = attributes[:'releaseType'] if attributes[:'releaseType']

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

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

  self.license_type = attributes[:'licenseType'] if attributes[:'licenseType']

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

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

  self.family_details = attributes[:'familyDetails'] if attributes[:'familyDetails']

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

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

  self.license_details = attributes[:'licenseDetails'] if attributes[:'licenseDetails']

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

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

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

  self.release_notes_url = attributes[:'releaseNotesUrl'] if attributes[:'releaseNotesUrl']

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

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

  self.artifact_content_types = attributes[:'artifactContentTypes'] if attributes[:'artifactContentTypes']

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

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

  self.mos_patches = attributes[:'mosPatches'] if attributes[:'mosPatches']

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

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

  self.days_under_security_baseline = attributes[:'daysUnderSecurityBaseline'] if attributes[:'daysUnderSecurityBaseline']

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

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

Instance Attribute Details

#artifact_content_typesArray<String>

[Required] Artifact content types for the Java version.

Returns:

  • (Array<String>)


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

def artifact_content_types
  @artifact_content_types
end

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

List of Java artifacts.

Returns:



46
47
48
# File 'lib/oci/jms/models/java_release.rb', line 46

def artifacts
  @artifacts
end

#days_under_security_baselineInteger

The number of days since this release has been under the security baseline.

Returns:

  • (Integer)


98
99
100
# File 'lib/oci/jms/models/java_release.rb', line 98

def days_under_security_baseline
  @days_under_security_baseline
end

#family_detailsOCI::Jms::Models::JavaFamily



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

def family_details
  @family_details
end

#family_versionString

[Required] Java release family identifier.

Returns:

  • (String)


54
55
56
# File 'lib/oci/jms/models/java_release.rb', line 54

def family_version
  @family_version
end

#license_detailsOCI::Jms::Models::JavaLicense



76
77
78
# File 'lib/oci/jms/models/java_release.rb', line 76

def license_details
  @license_details
end

#license_typeString

[Required] License type for the Java version.

Returns:

  • (String)


70
71
72
# File 'lib/oci/jms/models/java_release.rb', line 70

def license_type
  @license_type
end

#mos_patchesArray<OCI::Jms::Models::PatchDetail>

List of My Oracle Support(MoS) patches available for this release. This information is only available for BPR release type.

Returns:



94
95
96
# File 'lib/oci/jms/models/java_release.rb', line 94

def mos_patches
  @mos_patches
end

#parent_release_versionString

Parent Java release version identifier. This is applicable for BPR releases.

Returns:

  • (String)


58
59
60
# File 'lib/oci/jms/models/java_release.rb', line 58

def parent_release_version
  @parent_release_version
end

#release_dateDateTime

[Required] The release date of the Java version (formatted according to RFC3339).

Returns:

  • (DateTime)


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

def release_date
  @release_date
end

#release_notes_urlString

[Required] Release notes associated with the Java version.

Returns:

  • (String)


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

def release_notes_url
  @release_notes_url
end

#release_typeString

[Required] Release category of the Java version.

Returns:

  • (String)


66
67
68
# File 'lib/oci/jms/models/java_release.rb', line 66

def release_type
  @release_type
end

#release_versionString

[Required] Java release version identifier.

Returns:

  • (String)


50
51
52
# File 'lib/oci/jms/models/java_release.rb', line 50

def release_version
  @release_version
end

#security_statusString

[Required] The security status of the Java version.

Returns:

  • (String)


62
63
64
# File 'lib/oci/jms/models/java_release.rb', line 62

def security_status
  @security_status
end

Class Method Details

.attribute_mapObject

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



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/oci/jms/models/java_release.rb', line 101

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'artifacts': :'artifacts',
    'release_version': :'releaseVersion',
    'family_version': :'familyVersion',
    'parent_release_version': :'parentReleaseVersion',
    'security_status': :'securityStatus',
    'release_type': :'releaseType',
    'license_type': :'licenseType',
    'family_details': :'familyDetails',
    'license_details': :'licenseDetails',
    'release_date': :'releaseDate',
    'release_notes_url': :'releaseNotesUrl',
    'artifact_content_types': :'artifactContentTypes',
    'mos_patches': :'mosPatches',
    'days_under_security_baseline': :'daysUnderSecurityBaseline'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/oci/jms/models/java_release.rb', line 123

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'artifacts': :'Array<OCI::Jms::Models::JavaArtifact>',
    'release_version': :'String',
    'family_version': :'String',
    'parent_release_version': :'String',
    'security_status': :'String',
    'release_type': :'String',
    'license_type': :'String',
    'family_details': :'OCI::Jms::Models::JavaFamily',
    'license_details': :'OCI::Jms::Models::JavaLicense',
    'release_date': :'DateTime',
    'release_notes_url': :'String',
    'artifact_content_types': :'Array<String>',
    'mos_patches': :'Array<OCI::Jms::Models::PatchDetail>',
    'days_under_security_baseline': :'Integer'
    # 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



317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
# File 'lib/oci/jms/models/java_release.rb', line 317

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

  self.class == other.class &&
    artifacts == other.artifacts &&
    release_version == other.release_version &&
    family_version == other.family_version &&
    parent_release_version == other.parent_release_version &&
    security_status == other.security_status &&
    release_type == other.release_type &&
    license_type == other.license_type &&
    family_details == other.family_details &&
    license_details == other.license_details &&
    release_date == other.release_date &&
    release_notes_url == other.release_notes_url &&
    artifact_content_types == other.artifact_content_types &&
    mos_patches == other.mos_patches &&
    days_under_security_baseline == other.days_under_security_baseline
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



360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
# File 'lib/oci/jms/models/java_release.rb', line 360

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


340
341
342
# File 'lib/oci/jms/models/java_release.rb', line 340

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



349
350
351
# File 'lib/oci/jms/models/java_release.rb', line 349

def hash
  [artifacts, release_version, family_version, parent_release_version, security_status, release_type, license_type, family_details, license_details, release_date, release_notes_url, artifact_content_types, mos_patches, days_under_security_baseline].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



393
394
395
396
397
398
399
400
401
402
# File 'lib/oci/jms/models/java_release.rb', line 393

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



387
388
389
# File 'lib/oci/jms/models/java_release.rb', line 387

def to_s
  to_hash.to_s
end