Class: OCI::CloudBridge::Models::OlvmInitialization
- Inherits:
-
Object
- Object
- OCI::CloudBridge::Models::OlvmInitialization
- Defined in:
- lib/oci/cloud_bridge/models/olvm_initialization.rb
Overview
Type representing initialization configuration of a virtual machine.
Constant Summary collapse
- CLOUD_INIT_NETWORK_PROTOCOL_ENUM =
[ CLOUD_INIT_NETWORK_PROTOCOL_ENI = 'ENI'.freeze, CLOUD_INIT_NETWORK_PROTOCOL_OPENSTACK_METADATA = 'OPENSTACK_METADATA'.freeze ].freeze
Instance Attribute Summary collapse
-
#active_directory_ou ⇒ String
Active Directory Organizational Unit.
-
#cloud_init_network_protocol ⇒ String
Defines the values for the cloud-init protocol.
- #configuration ⇒ OCI::CloudBridge::Models::OlvmConfiguration
-
#custom_script ⇒ String
Custom script that will be run when the VM starts.
-
#dns_search ⇒ String
DNS Search of the virtual machine.
-
#dns_servers ⇒ String
DNS Servers of the virtual machine.
-
#domain ⇒ String
Domain of the virtual machine.
-
#host_name ⇒ String
Host name of the virtual machine.
-
#input_locale ⇒ String
Input locale of the virtual machine.
-
#is_regenerate_ids ⇒ BOOLEAN
Indicates if new IDs should be regenerated.
-
#is_regenerate_ssh_keys ⇒ BOOLEAN
Indicates if new SSH Keys should be regenerated.
-
#nic_configurations ⇒ Array<OCI::CloudBridge::Models::OlvmNicConfiguration>
The configuration of a virtual network interface.
-
#org_name ⇒ String
Organization name.
-
#system_locale ⇒ String
System locale of the virtual machine.
-
#timezone ⇒ String
Timezone of the virtual machine.
-
#ui_language ⇒ String
UI Language of the virtual machine.
-
#user_locale ⇒ String
User Locale of the virtual machine.
-
#username ⇒ String
User name of the virtual machine.
-
#windows_license_key ⇒ String
Windows License Key of the virtual machine.
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 = {}) ⇒ OlvmInitialization
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 = {}) ⇒ OlvmInitialization
Initializes the object
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 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 170 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.active_directory_ou = attributes[:'activeDirectoryOu'] if attributes[:'activeDirectoryOu'] raise 'You cannot provide both :activeDirectoryOu and :active_directory_ou' if attributes.key?(:'activeDirectoryOu') && attributes.key?(:'active_directory_ou') self.active_directory_ou = attributes[:'active_directory_ou'] if attributes[:'active_directory_ou'] self.cloud_init_network_protocol = attributes[:'cloudInitNetworkProtocol'] if attributes[:'cloudInitNetworkProtocol'] raise 'You cannot provide both :cloudInitNetworkProtocol and :cloud_init_network_protocol' if attributes.key?(:'cloudInitNetworkProtocol') && attributes.key?(:'cloud_init_network_protocol') self.cloud_init_network_protocol = attributes[:'cloud_init_network_protocol'] if attributes[:'cloud_init_network_protocol'] self.configuration = attributes[:'configuration'] if attributes[:'configuration'] self.custom_script = attributes[:'customScript'] if attributes[:'customScript'] raise 'You cannot provide both :customScript and :custom_script' if attributes.key?(:'customScript') && attributes.key?(:'custom_script') self.custom_script = attributes[:'custom_script'] if attributes[:'custom_script'] self.dns_search = attributes[:'dnsSearch'] if attributes[:'dnsSearch'] raise 'You cannot provide both :dnsSearch and :dns_search' if attributes.key?(:'dnsSearch') && attributes.key?(:'dns_search') self.dns_search = attributes[:'dns_search'] if attributes[:'dns_search'] self.dns_servers = attributes[:'dnsServers'] if attributes[:'dnsServers'] raise 'You cannot provide both :dnsServers and :dns_servers' if attributes.key?(:'dnsServers') && attributes.key?(:'dns_servers') self.dns_servers = attributes[:'dns_servers'] if attributes[:'dns_servers'] self.domain = attributes[:'domain'] if attributes[:'domain'] self.host_name = attributes[:'hostName'] if attributes[:'hostName'] raise 'You cannot provide both :hostName and :host_name' if attributes.key?(:'hostName') && attributes.key?(:'host_name') self.host_name = attributes[:'host_name'] if attributes[:'host_name'] self.input_locale = attributes[:'inputLocale'] if attributes[:'inputLocale'] raise 'You cannot provide both :inputLocale and :input_locale' if attributes.key?(:'inputLocale') && attributes.key?(:'input_locale') self.input_locale = attributes[:'input_locale'] if attributes[:'input_locale'] self.nic_configurations = attributes[:'nicConfigurations'] if attributes[:'nicConfigurations'] raise 'You cannot provide both :nicConfigurations and :nic_configurations' if attributes.key?(:'nicConfigurations') && attributes.key?(:'nic_configurations') self.nic_configurations = attributes[:'nic_configurations'] if attributes[:'nic_configurations'] self.org_name = attributes[:'orgName'] if attributes[:'orgName'] raise 'You cannot provide both :orgName and :org_name' if attributes.key?(:'orgName') && attributes.key?(:'org_name') self.org_name = attributes[:'org_name'] if attributes[:'org_name'] self.is_regenerate_ids = attributes[:'isRegenerateIds'] unless attributes[:'isRegenerateIds'].nil? raise 'You cannot provide both :isRegenerateIds and :is_regenerate_ids' if attributes.key?(:'isRegenerateIds') && attributes.key?(:'is_regenerate_ids') self.is_regenerate_ids = attributes[:'is_regenerate_ids'] unless attributes[:'is_regenerate_ids'].nil? self.is_regenerate_ssh_keys = attributes[:'isRegenerateSshKeys'] unless attributes[:'isRegenerateSshKeys'].nil? raise 'You cannot provide both :isRegenerateSshKeys and :is_regenerate_ssh_keys' if attributes.key?(:'isRegenerateSshKeys') && attributes.key?(:'is_regenerate_ssh_keys') self.is_regenerate_ssh_keys = attributes[:'is_regenerate_ssh_keys'] unless attributes[:'is_regenerate_ssh_keys'].nil? self.system_locale = attributes[:'systemLocale'] if attributes[:'systemLocale'] raise 'You cannot provide both :systemLocale and :system_locale' if attributes.key?(:'systemLocale') && attributes.key?(:'system_locale') self.system_locale = attributes[:'system_locale'] if attributes[:'system_locale'] self.timezone = attributes[:'timezone'] if attributes[:'timezone'] self.ui_language = attributes[:'uiLanguage'] if attributes[:'uiLanguage'] raise 'You cannot provide both :uiLanguage and :ui_language' if attributes.key?(:'uiLanguage') && attributes.key?(:'ui_language') self.ui_language = attributes[:'ui_language'] if attributes[:'ui_language'] self.user_locale = attributes[:'userLocale'] if attributes[:'userLocale'] raise 'You cannot provide both :userLocale and :user_locale' if attributes.key?(:'userLocale') && attributes.key?(:'user_locale') self.user_locale = attributes[:'user_locale'] if attributes[:'user_locale'] self.username = attributes[:'username'] if attributes[:'username'] self.windows_license_key = attributes[:'windowsLicenseKey'] if attributes[:'windowsLicenseKey'] raise 'You cannot provide both :windowsLicenseKey and :windows_license_key' if attributes.key?(:'windowsLicenseKey') && attributes.key?(:'windows_license_key') self.windows_license_key = attributes[:'windows_license_key'] if attributes[:'windows_license_key'] end |
Instance Attribute Details
#active_directory_ou ⇒ String
Active Directory Organizational Unit.
18 19 20 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 18 def active_directory_ou @active_directory_ou end |
#cloud_init_network_protocol ⇒ String
Defines the values for the cloud-init protocol. This protocol decides how the cloud-init network parameters are formatted before being passed to the virtual machine in order to be processed by cloud-init.
22 23 24 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 22 def cloud_init_network_protocol @cloud_init_network_protocol end |
#configuration ⇒ OCI::CloudBridge::Models::OlvmConfiguration
25 26 27 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 25 def configuration @configuration end |
#custom_script ⇒ String
Custom script that will be run when the VM starts.
29 30 31 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 29 def custom_script @custom_script end |
#dns_search ⇒ String
DNS Search of the virtual machine.
33 34 35 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 33 def dns_search @dns_search end |
#dns_servers ⇒ String
DNS Servers of the virtual machine.
37 38 39 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 37 def dns_servers @dns_servers end |
#domain ⇒ String
Domain of the virtual machine.
41 42 43 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 41 def domain @domain end |
#host_name ⇒ String
Host name of the virtual machine.
45 46 47 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 45 def host_name @host_name end |
#input_locale ⇒ String
Input locale of the virtual machine.
49 50 51 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 49 def input_locale @input_locale end |
#is_regenerate_ids ⇒ BOOLEAN
Indicates if new IDs should be regenerated.
61 62 63 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 61 def is_regenerate_ids @is_regenerate_ids end |
#is_regenerate_ssh_keys ⇒ BOOLEAN
Indicates if new SSH Keys should be regenerated.
65 66 67 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 65 def is_regenerate_ssh_keys @is_regenerate_ssh_keys end |
#nic_configurations ⇒ Array<OCI::CloudBridge::Models::OlvmNicConfiguration>
The configuration of a virtual network interface.
53 54 55 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 53 def nic_configurations @nic_configurations end |
#org_name ⇒ String
Organization name.
57 58 59 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 57 def org_name @org_name end |
#system_locale ⇒ String
System locale of the virtual machine.
69 70 71 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 69 def system_locale @system_locale end |
#timezone ⇒ String
Timezone of the virtual machine.
73 74 75 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 73 def timezone @timezone end |
#ui_language ⇒ String
UI Language of the virtual machine.
77 78 79 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 77 def ui_language @ui_language end |
#user_locale ⇒ String
User Locale of the virtual machine.
81 82 83 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 81 def user_locale @user_locale end |
#username ⇒ String
User name of the virtual machine.
85 86 87 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 85 def username @username end |
#windows_license_key ⇒ String
Windows License Key of the virtual machine.
89 90 91 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 89 def windows_license_key @windows_license_key end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 92 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'active_directory_ou': :'activeDirectoryOu', 'cloud_init_network_protocol': :'cloudInitNetworkProtocol', 'configuration': :'configuration', 'custom_script': :'customScript', 'dns_search': :'dnsSearch', 'dns_servers': :'dnsServers', 'domain': :'domain', 'host_name': :'hostName', 'input_locale': :'inputLocale', 'nic_configurations': :'nicConfigurations', 'org_name': :'orgName', 'is_regenerate_ids': :'isRegenerateIds', 'is_regenerate_ssh_keys': :'isRegenerateSshKeys', 'system_locale': :'systemLocale', 'timezone': :'timezone', 'ui_language': :'uiLanguage', 'user_locale': :'userLocale', 'username': :'username', 'windows_license_key': :'windowsLicenseKey' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 119 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'active_directory_ou': :'String', 'cloud_init_network_protocol': :'String', 'configuration': :'OCI::CloudBridge::Models::OlvmConfiguration', 'custom_script': :'String', 'dns_search': :'String', 'dns_servers': :'String', 'domain': :'String', 'host_name': :'String', 'input_locale': :'String', 'nic_configurations': :'Array<OCI::CloudBridge::Models::OlvmNicConfiguration>', 'org_name': :'String', 'is_regenerate_ids': :'BOOLEAN', 'is_regenerate_ssh_keys': :'BOOLEAN', 'system_locale': :'String', 'timezone': :'String', 'ui_language': :'String', 'user_locale': :'String', 'username': :'String', 'windows_license_key': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 290 def ==(other) return true if equal?(other) self.class == other.class && active_directory_ou == other.active_directory_ou && cloud_init_network_protocol == other.cloud_init_network_protocol && configuration == other.configuration && custom_script == other.custom_script && dns_search == other.dns_search && dns_servers == other.dns_servers && domain == other.domain && host_name == other.host_name && input_locale == other.input_locale && nic_configurations == other.nic_configurations && org_name == other.org_name && is_regenerate_ids == other.is_regenerate_ids && is_regenerate_ssh_keys == other.is_regenerate_ssh_keys && system_locale == other.system_locale && timezone == other.timezone && ui_language == other.ui_language && user_locale == other.user_locale && username == other.username && windows_license_key == other.windows_license_key end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 338 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
318 319 320 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 318 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
327 328 329 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 327 def hash [active_directory_ou, cloud_init_network_protocol, configuration, custom_script, dns_search, dns_servers, domain, host_name, input_locale, nic_configurations, org_name, is_regenerate_ids, is_regenerate_ssh_keys, system_locale, timezone, ui_language, user_locale, username, windows_license_key].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
371 372 373 374 375 376 377 378 379 380 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 371 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
365 366 367 |
# File 'lib/oci/cloud_bridge/models/olvm_initialization.rb', line 365 def to_s to_hash.to_s end |