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 ].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
82 83 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 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 82 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.
28 29 30 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 28 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.
40 41 42 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 40 def force_install @force_install end |
#headless_mode ⇒ BOOLEAN
Flag to install headless or headful Java installation. Only valid for Oracle Linux in OCI.
36 37 38 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 36 def headless_mode @headless_mode end |
#installation_path ⇒ String
Custom path to install new Java installation site.
32 33 34 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 32 def installation_path @installation_path end |
#managed_instance_id ⇒ String
[Required] The OCID of the related managed instance.
20 21 22 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 20 def managed_instance_id @managed_instance_id end |
#release_version ⇒ String
[Required] The release version of the Java Runtime.
24 25 26 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 24 def release_version @release_version end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 43 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.
57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 57 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.
144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 144 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
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 179 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
159 160 161 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 159 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
168 169 170 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 168 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
212 213 214 215 216 217 218 219 220 221 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 212 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
206 207 208 |
# File 'lib/oci/jms/models/new_installation_site.rb', line 206 def to_s to_hash.to_s end |