Class: OCI::Jms::Models::NewInstallationSite
- Inherits:
-
Object
- Object
- OCI::Jms::Models::NewInstallationSite
- Defined in:
- lib/oci/jms/models/new_installation_site.rb
Overview
The properties of a new Java installation site.
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
-
#artifact_content_type ⇒ String
Artifact content type for the Java version.
-
#force_install ⇒ BOOLEAN
Forces the installation request even if a more recent release is already present in the host.
-
#headless_mode ⇒ BOOLEAN
Flag to install headless or headful Java installation.
-
#installation_path ⇒ String
Custom path to install new Java installation site.
-
#managed_instance_id ⇒ String
[Required] The OCID of the related managed instance.
-
#release_version ⇒ String
[Required] The release version of the Java Runtime.
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 = {}) ⇒ NewInstallationSite
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 = {}) ⇒ NewInstallationSite
Initializes the object
84 85 86 87 88 89 90 91 92 93 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 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 84 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.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.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.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.installation_path = attributes[:'installationPath'] if attributes[:'installationPath'] raise 'You cannot provide both :installationPath and :installation_path' if attributes.key?(:'installationPath') && attributes.key?(:'installation_path') self.installation_path = attributes[:'installation_path'] if attributes[:'installation_path'] self.headless_mode = attributes[:'headlessMode'] unless attributes[:'headlessMode'].nil? self.headless_mode = false if headless_mode.nil? && !attributes.key?(:'headlessMode') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :headlessMode and :headless_mode' if attributes.key?(:'headlessMode') && attributes.key?(:'headless_mode') self.headless_mode = attributes[:'headless_mode'] unless attributes[:'headless_mode'].nil? self.headless_mode = false if headless_mode.nil? && !attributes.key?(:'headlessMode') && !attributes.key?(:'headless_mode') # rubocop:disable Style/StringLiterals self.force_install = attributes[:'forceInstall'] unless attributes[:'forceInstall'].nil? self.force_install = false if force_install.nil? && !attributes.key?(:'forceInstall') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :forceInstall and :force_install' if attributes.key?(:'forceInstall') && attributes.key?(:'force_install') self.force_install = attributes[:'force_install'] unless attributes[:'force_install'].nil? self.force_install = false if force_install.nil? && !attributes.key?(:'forceInstall') && !attributes.key?(:'force_install') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#artifact_content_type ⇒ String
Artifact content type for the Java version.
30 31 32 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 30 def artifact_content_type @artifact_content_type end |
#force_install ⇒ BOOLEAN
Forces the installation request even if a more recent release is already present in the host.
42 43 44 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 42 def force_install @force_install end |
#headless_mode ⇒ BOOLEAN
Flag to install headless or headful Java installation. Only valid for Oracle Linux in OCI.
38 39 40 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 38 def headless_mode @headless_mode end |
#installation_path ⇒ String
Custom path to install new Java installation site.
34 35 36 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 34 def installation_path @installation_path end |
#managed_instance_id ⇒ String
[Required] The OCID of the related managed instance.
22 23 24 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 22 def managed_instance_id @managed_instance_id end |
#release_version ⇒ String
[Required] The release version of the Java Runtime.
26 27 28 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 26 def release_version @release_version end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 45 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'managed_instance_id': :'managedInstanceId', 'release_version': :'releaseVersion', 'artifact_content_type': :'artifactContentType', 'installation_path': :'installationPath', 'headless_mode': :'headlessMode', 'force_install': :'forceInstall' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 59 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'managed_instance_id': :'String', 'release_version': :'String', 'artifact_content_type': :'String', 'installation_path': :'String', 'headless_mode': :'BOOLEAN', 'force_install': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 151 def ==(other) return true if equal?(other) self.class == other.class && managed_instance_id == other.managed_instance_id && release_version == other.release_version && artifact_content_type == other.artifact_content_type && installation_path == other.installation_path && headless_mode == other.headless_mode && force_install == other.force_install end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 186 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
166 167 168 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 166 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
175 176 177 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 175 def hash [managed_instance_id, release_version, artifact_content_type, installation_path, headless_mode, force_install].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
219 220 221 222 223 224 225 226 227 228 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 219 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
213 214 215 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 213 def to_s to_hash.to_s end |