Class: OCI::Jms::Models::JavaArtifact
- Inherits:
-
Object
- Object
- OCI::Jms::Models::JavaArtifact
- Defined in:
- lib/oci/jms/models/java_artifact.rb
Overview
Information about a binary artifact of Java.
Constant Summary collapse
- ARTIFACT_CONTENT_TYPE_ENUM =
[ ARTIFACT_CONTENT_TYPE_JDK = 'JDK'.freeze, ARTIFACT_CONTENT_TYPE_JRE = 'JRE'.freeze, ARTIFACT_CONTENT_TYPE_SERVER_JRE = 'SERVER_JRE'.freeze, ARTIFACT_CONTENT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#approximate_file_size_in_bytes ⇒ Integer
[Required] Approximate compressed file size in bytes.
-
#architecture ⇒ String
[Required] The target Operating System architecture for the artifact.
-
#artifact_content_type ⇒ String
[Required] Product content type of this artifact.
-
#artifact_description ⇒ String
[Required] Description of the binary artifact.
-
#artifact_file_name ⇒ String
The file name of the artifact.
-
#artifact_id ⇒ Integer
[Required] Unique identifier for the artifact.
-
#download_url ⇒ String
[Required] The endpoint that returns a short-lived artifact download URL in the response payload.
-
#os_family ⇒ String
[Required] The target Operating System family for the artifact.
-
#package_type ⇒ String
[Required] The package type(typically the file extension) of the artifact.
-
#package_type_detail ⇒ String
Additional information about the package type.
-
#script_checksum_url ⇒ String
[Required] The URL for retrieving the checksum for the artifact.
-
#script_download_url ⇒ String
[Required] The endpoint for downloading this artifact from command line, automatically in scripts and dockerfiles.
-
#sha256 ⇒ String
[Required] SHA256 checksum of the artifact.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ JavaArtifact
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ JavaArtifact
Initializes the object
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 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 |
# File 'lib/oci/jms/models/java_artifact.rb', line 139 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.artifact_id = attributes[:'artifactId'] if attributes[:'artifactId'] raise 'You cannot provide both :artifactId and :artifact_id' if attributes.key?(:'artifactId') && attributes.key?(:'artifact_id') self.artifact_id = attributes[:'artifact_id'] if attributes[:'artifact_id'] self.artifact_description = attributes[:'artifactDescription'] if attributes[:'artifactDescription'] raise 'You cannot provide both :artifactDescription and :artifact_description' if attributes.key?(:'artifactDescription') && attributes.key?(:'artifact_description') self.artifact_description = attributes[:'artifact_description'] if attributes[:'artifact_description'] self.artifact_content_type = attributes[:'artifactContentType'] if attributes[:'artifactContentType'] raise 'You cannot provide both :artifactContentType and :artifact_content_type' if attributes.key?(:'artifactContentType') && attributes.key?(:'artifact_content_type') self.artifact_content_type = attributes[:'artifact_content_type'] if attributes[:'artifact_content_type'] self.approximate_file_size_in_bytes = attributes[:'approximateFileSizeInBytes'] if attributes[:'approximateFileSizeInBytes'] raise 'You cannot provide both :approximateFileSizeInBytes and :approximate_file_size_in_bytes' if attributes.key?(:'approximateFileSizeInBytes') && attributes.key?(:'approximate_file_size_in_bytes') self.approximate_file_size_in_bytes = attributes[:'approximate_file_size_in_bytes'] if attributes[:'approximate_file_size_in_bytes'] self.sha256 = attributes[:'sha256'] if attributes[:'sha256'] self.artifact_file_name = attributes[:'artifactFileName'] if attributes[:'artifactFileName'] raise 'You cannot provide both :artifactFileName and :artifact_file_name' if attributes.key?(:'artifactFileName') && attributes.key?(:'artifact_file_name') self.artifact_file_name = attributes[:'artifact_file_name'] if attributes[:'artifact_file_name'] self.os_family = attributes[:'osFamily'] if attributes[:'osFamily'] raise 'You cannot provide both :osFamily and :os_family' if attributes.key?(:'osFamily') && attributes.key?(:'os_family') self.os_family = attributes[:'os_family'] if attributes[:'os_family'] self.architecture = attributes[:'architecture'] if attributes[:'architecture'] self.package_type = attributes[:'packageType'] if attributes[:'packageType'] raise 'You cannot provide both :packageType and :package_type' if attributes.key?(:'packageType') && attributes.key?(:'package_type') self.package_type = attributes[:'package_type'] if attributes[:'package_type'] self.package_type_detail = attributes[:'packageTypeDetail'] if attributes[:'packageTypeDetail'] raise 'You cannot provide both :packageTypeDetail and :package_type_detail' if attributes.key?(:'packageTypeDetail') && attributes.key?(:'package_type_detail') self.package_type_detail = attributes[:'package_type_detail'] if attributes[:'package_type_detail'] self.download_url = attributes[:'downloadUrl'] if attributes[:'downloadUrl'] raise 'You cannot provide both :downloadUrl and :download_url' if attributes.key?(:'downloadUrl') && attributes.key?(:'download_url') self.download_url = attributes[:'download_url'] if attributes[:'download_url'] self.script_download_url = attributes[:'scriptDownloadUrl'] if attributes[:'scriptDownloadUrl'] raise 'You cannot provide both :scriptDownloadUrl and :script_download_url' if attributes.key?(:'scriptDownloadUrl') && attributes.key?(:'script_download_url') self.script_download_url = attributes[:'script_download_url'] if attributes[:'script_download_url'] self.script_checksum_url = attributes[:'scriptChecksumUrl'] if attributes[:'scriptChecksumUrl'] raise 'You cannot provide both :scriptChecksumUrl and :script_checksum_url' if attributes.key?(:'scriptChecksumUrl') && attributes.key?(:'script_checksum_url') self.script_checksum_url = attributes[:'script_checksum_url'] if attributes[:'script_checksum_url'] end |
Instance Attribute Details
#approximate_file_size_in_bytes ⇒ Integer
[Required] Approximate compressed file size in bytes.
33 34 35 |
# File 'lib/oci/jms/models/java_artifact.rb', line 33 def approximate_file_size_in_bytes @approximate_file_size_in_bytes end |
#architecture ⇒ String
[Required] The target Operating System architecture for the artifact.
49 50 51 |
# File 'lib/oci/jms/models/java_artifact.rb', line 49 def architecture @architecture end |
#artifact_content_type ⇒ String
[Required] Product content type of this artifact.
29 30 31 |
# File 'lib/oci/jms/models/java_artifact.rb', line 29 def artifact_content_type @artifact_content_type end |
#artifact_description ⇒ String
[Required] Description of the binary artifact. Typically includes the OS, architecture, and installer type.
25 26 27 |
# File 'lib/oci/jms/models/java_artifact.rb', line 25 def artifact_description @artifact_description end |
#artifact_file_name ⇒ String
The file name of the artifact.
41 42 43 |
# File 'lib/oci/jms/models/java_artifact.rb', line 41 def artifact_file_name @artifact_file_name end |
#artifact_id ⇒ Integer
[Required] Unique identifier for the artifact.
21 22 23 |
# File 'lib/oci/jms/models/java_artifact.rb', line 21 def artifact_id @artifact_id end |
#download_url ⇒ String
[Required] The endpoint that returns a short-lived artifact download URL in the response payload. This download url can then be used for downloading the artifact. See this API for more details.
64 65 66 |
# File 'lib/oci/jms/models/java_artifact.rb', line 64 def download_url @download_url end |
#os_family ⇒ String
[Required] The target Operating System family for the artifact.
45 46 47 |
# File 'lib/oci/jms/models/java_artifact.rb', line 45 def os_family @os_family end |
#package_type ⇒ String
[Required] The package type(typically the file extension) of the artifact.
53 54 55 |
# File 'lib/oci/jms/models/java_artifact.rb', line 53 def package_type @package_type end |
#package_type_detail ⇒ String
Additional information about the package type.
57 58 59 |
# File 'lib/oci/jms/models/java_artifact.rb', line 57 def package_type_detail @package_type_detail end |
#script_checksum_url ⇒ String
[Required] The URL for retrieving the checksum for the artifact. Depending on the context, this can point to the checksum of the archive or latest update release version artifact.
76 77 78 |
# File 'lib/oci/jms/models/java_artifact.rb', line 76 def script_checksum_url @script_checksum_url end |
#script_download_url ⇒ String
[Required] The endpoint for downloading this artifact from command line, automatically in scripts and dockerfiles. Depending on the context, this can point to the archive or latest update release version artifact in the specified family.
70 71 72 |
# File 'lib/oci/jms/models/java_artifact.rb', line 70 def script_download_url @script_download_url end |
#sha256 ⇒ String
[Required] SHA256 checksum of the artifact.
37 38 39 |
# File 'lib/oci/jms/models/java_artifact.rb', line 37 def sha256 @sha256 end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/oci/jms/models/java_artifact.rb', line 79 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'artifact_id': :'artifactId', 'artifact_description': :'artifactDescription', 'artifact_content_type': :'artifactContentType', 'approximate_file_size_in_bytes': :'approximateFileSizeInBytes', 'sha256': :'sha256', 'artifact_file_name': :'artifactFileName', 'os_family': :'osFamily', 'architecture': :'architecture', 'package_type': :'packageType', 'package_type_detail': :'packageTypeDetail', 'download_url': :'downloadUrl', 'script_download_url': :'scriptDownloadUrl', 'script_checksum_url': :'scriptChecksumUrl' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/oci/jms/models/java_artifact.rb', line 100 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'artifact_id': :'Integer', 'artifact_description': :'String', 'artifact_content_type': :'String', 'approximate_file_size_in_bytes': :'Integer', 'sha256': :'String', 'artifact_file_name': :'String', 'os_family': :'String', 'architecture': :'String', 'package_type': :'String', 'package_type_detail': :'String', 'download_url': :'String', 'script_download_url': :'String', 'script_checksum_url': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/oci/jms/models/java_artifact.rb', line 236 def ==(other) return true if equal?(other) self.class == other.class && artifact_id == other.artifact_id && artifact_description == other.artifact_description && artifact_content_type == other.artifact_content_type && approximate_file_size_in_bytes == other.approximate_file_size_in_bytes && sha256 == other.sha256 && artifact_file_name == other.artifact_file_name && os_family == other.os_family && architecture == other.architecture && package_type == other.package_type && package_type_detail == other.package_type_detail && download_url == other.download_url && script_download_url == other.script_download_url && script_checksum_url == other.script_checksum_url end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/oci/jms/models/java_artifact.rb', line 278 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
258 259 260 |
# File 'lib/oci/jms/models/java_artifact.rb', line 258 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
267 268 269 |
# File 'lib/oci/jms/models/java_artifact.rb', line 267 def hash [artifact_id, artifact_description, artifact_content_type, approximate_file_size_in_bytes, sha256, artifact_file_name, os_family, architecture, package_type, package_type_detail, download_url, script_download_url, script_checksum_url].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
311 312 313 314 315 316 317 318 319 320 |
# File 'lib/oci/jms/models/java_artifact.rb', line 311 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_s ⇒ String
Returns the string representation of the object
305 306 307 |
# File 'lib/oci/jms/models/java_artifact.rb', line 305 def to_s to_hash.to_s end |