Class: OCI::CloudMigrations::Models::OlvmMigrationOptions
- Inherits:
-
Object
- Object
- OCI::CloudMigrations::Models::OlvmMigrationOptions
- Defined in:
- lib/oci/cloud_migrations/models/olvm_migration_options.rb
Overview
Reference to cluster-wide configuration of migration of a running virtual machine to another host.
Constant Summary collapse
- AUTO_CONVERGE_ENUM =
[ AUTO_CONVERGE_FALSE = 'FALSE'.freeze, AUTO_CONVERGE_INHERIT = 'INHERIT'.freeze, AUTO_CONVERGE_TRUE = 'TRUE'.freeze ].freeze
- COMPRESSED_ENUM =
[ COMPRESSED_FALSE = 'FALSE'.freeze, COMPRESSED_INHERIT = 'INHERIT'.freeze, COMPRESSED_TRUE = 'TRUE'.freeze ].freeze
- ENCRYPTED_ENUM =
[ ENCRYPTED_FALSE = 'FALSE'.freeze, ENCRYPTED_INHERIT = 'INHERIT'.freeze, ENCRYPTED_TRUE = 'TRUE'.freeze ].freeze
- PARALLEL_MIGRATIONS_POLICY_ENUM =
[ PARALLEL_MIGRATIONS_POLICY_AUTO = 'AUTO'.freeze, PARALLEL_MIGRATIONS_POLICY_AUTO_PARALLEL = 'AUTO_PARALLEL'.freeze, PARALLEL_MIGRATIONS_POLICY_CUSTOM = 'CUSTOM'.freeze, PARALLEL_MIGRATIONS_POLICY_DISABLED = 'DISABLED'.freeze, PARALLEL_MIGRATIONS_POLICY_INHERIT = 'INHERIT'.freeze ].freeze
Instance Attribute Summary collapse
-
#auto_converge ⇒ String
Enum representing the boolean value that can be either set, or inherited from a higher level.
- #bandwidth ⇒ OCI::CloudMigrations::Models::MigrationBandwidth
-
#compressed ⇒ String
Enum representing the boolean value that can be either set, or inherited from a higher level.
-
#custom_parallel_migrations ⇒ Integer
Specifies how many parallel migration connections to use.
-
#encrypted ⇒ String
Enum representing the boolean value that can be either set, or inherited from a higher level.
-
#parallel_migrations_policy ⇒ String
Type representing parallel migration connections policy.
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 = {}) ⇒ OlvmMigrationOptions
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 = {}) ⇒ OlvmMigrationOptions
Initializes the object
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/cloud_migrations/models/olvm_migration_options.rb', line 100 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.auto_converge = attributes[:'autoConverge'] if attributes[:'autoConverge'] raise 'You cannot provide both :autoConverge and :auto_converge' if attributes.key?(:'autoConverge') && attributes.key?(:'auto_converge') self.auto_converge = attributes[:'auto_converge'] if attributes[:'auto_converge'] self.bandwidth = attributes[:'bandwidth'] if attributes[:'bandwidth'] self.compressed = attributes[:'compressed'] if attributes[:'compressed'] self.custom_parallel_migrations = attributes[:'customParallelMigrations'] if attributes[:'customParallelMigrations'] raise 'You cannot provide both :customParallelMigrations and :custom_parallel_migrations' if attributes.key?(:'customParallelMigrations') && attributes.key?(:'custom_parallel_migrations') self.custom_parallel_migrations = attributes[:'custom_parallel_migrations'] if attributes[:'custom_parallel_migrations'] self.encrypted = attributes[:'encrypted'] if attributes[:'encrypted'] self.parallel_migrations_policy = attributes[:'parallelMigrationsPolicy'] if attributes[:'parallelMigrationsPolicy'] raise 'You cannot provide both :parallelMigrationsPolicy and :parallel_migrations_policy' if attributes.key?(:'parallelMigrationsPolicy') && attributes.key?(:'parallel_migrations_policy') self.parallel_migrations_policy = attributes[:'parallel_migrations_policy'] if attributes[:'parallel_migrations_policy'] end |
Instance Attribute Details
#auto_converge ⇒ String
Enum representing the boolean value that can be either set, or inherited from a higher level. The inheritance order is virtual machine ??? cluster ??? engine-config.
39 40 41 |
# File 'lib/oci/cloud_migrations/models/olvm_migration_options.rb', line 39 def auto_converge @auto_converge end |
#bandwidth ⇒ OCI::CloudMigrations::Models::MigrationBandwidth
42 43 44 |
# File 'lib/oci/cloud_migrations/models/olvm_migration_options.rb', line 42 def bandwidth @bandwidth end |
#compressed ⇒ String
Enum representing the boolean value that can be either set, or inherited from a higher level. The inheritance order is virtual machine ??? cluster ??? engine-config.
46 47 48 |
# File 'lib/oci/cloud_migrations/models/olvm_migration_options.rb', line 46 def compressed @compressed end |
#custom_parallel_migrations ⇒ Integer
Specifies how many parallel migration connections to use.
50 51 52 |
# File 'lib/oci/cloud_migrations/models/olvm_migration_options.rb', line 50 def custom_parallel_migrations @custom_parallel_migrations end |
#encrypted ⇒ String
Enum representing the boolean value that can be either set, or inherited from a higher level. The inheritance order is virtual machine ??? cluster ??? engine-config.
54 55 56 |
# File 'lib/oci/cloud_migrations/models/olvm_migration_options.rb', line 54 def encrypted @encrypted end |
#parallel_migrations_policy ⇒ String
Type representing parallel migration connections policy.
58 59 60 |
# File 'lib/oci/cloud_migrations/models/olvm_migration_options.rb', line 58 def parallel_migrations_policy @parallel_migrations_policy end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/oci/cloud_migrations/models/olvm_migration_options.rb', line 61 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'auto_converge': :'autoConverge', 'bandwidth': :'bandwidth', 'compressed': :'compressed', 'custom_parallel_migrations': :'customParallelMigrations', 'encrypted': :'encrypted', 'parallel_migrations_policy': :'parallelMigrationsPolicy' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/oci/cloud_migrations/models/olvm_migration_options.rb', line 75 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'auto_converge': :'String', 'bandwidth': :'OCI::CloudMigrations::Models::MigrationBandwidth', 'compressed': :'String', 'custom_parallel_migrations': :'Integer', 'encrypted': :'String', 'parallel_migrations_policy': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
170 171 172 173 174 175 176 177 178 179 180 |
# File 'lib/oci/cloud_migrations/models/olvm_migration_options.rb', line 170 def ==(other) return true if equal?(other) self.class == other.class && auto_converge == other.auto_converge && bandwidth == other.bandwidth && compressed == other.compressed && custom_parallel_migrations == other.custom_parallel_migrations && encrypted == other.encrypted && parallel_migrations_policy == other.parallel_migrations_policy end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/oci/cloud_migrations/models/olvm_migration_options.rb', line 205 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
185 186 187 |
# File 'lib/oci/cloud_migrations/models/olvm_migration_options.rb', line 185 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
194 195 196 |
# File 'lib/oci/cloud_migrations/models/olvm_migration_options.rb', line 194 def hash [auto_converge, bandwidth, compressed, custom_parallel_migrations, encrypted, parallel_migrations_policy].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
238 239 240 241 242 243 244 245 246 247 |
# File 'lib/oci/cloud_migrations/models/olvm_migration_options.rb', line 238 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
232 233 234 |
# File 'lib/oci/cloud_migrations/models/olvm_migration_options.rb', line 232 def to_s to_hash.to_s end |