Class: NutanixClustermgmt::ClustermgmtV40ConfigStorageContainer
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- NutanixClustermgmt::ClustermgmtV40ConfigStorageContainer
- Defined in:
- lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#affinity_host_ext_id ⇒ Object
Affinity host external identifier for RF-1 Storage Container.
-
#cache_deduplication ⇒ Object
Returns the value of attribute cache_deduplication.
-
#cluster_ext_id ⇒ Object
The external identifier of the cluster owning the Storage Container.
-
#cluster_name ⇒ Object
The corresponding name of the cluster owning the Storage Container instance.
-
#compression_delay_secs ⇒ Object
The compression delay in seconds.
-
#container_ext_id ⇒ Object
The external identifier of the Storage Container.
-
#erasure_code ⇒ Object
Returns the value of attribute erasure_code.
-
#erasure_code_delay_secs ⇒ Object
Delay in performing Erasure Code for the current Storage Container instance.
-
#ext_id ⇒ Object
A globally unique identifier of an instance that is suitable for external consumption.
-
#has_higher_ec_fault_domain_preference ⇒ Object
Indicates whether to prefer a higher Erasure Code fault domain.
-
#is_compression_enabled ⇒ Object
Indicates whether the compression is enabled for the Storage Container.
-
#is_encrypted ⇒ Object
Indicates whether the Storage Container is encrypted or not.
-
#is_inline_ec_enabled ⇒ Object
Indicates whether data written to this Storage Container should be inline erasure-coded or not.
-
#is_internal ⇒ Object
Indicates whether the Storage Container is internal and is managed by Nutanix.
-
#is_marked_for_removal ⇒ Object
Indicates whether the Storage Container is marked for removal.
-
#is_nfs_whitelist_inherited ⇒ Object
Indicates whether the NFS whitelist is inherited from the global configuration.
-
#is_software_encryption_enabled ⇒ Object
Indicates whether the Storage Container instance has software encryption enabled.
-
#links ⇒ Object
A HATEOAS style link for the response.
-
#logical_advertised_capacity_bytes ⇒ Object
Maximum capacity of the Storage Container as defined by the user.
-
#logical_explicit_reserved_capacity_bytes ⇒ Object
Total reserved size (in bytes) of the Storage Container (set by Admin).
-
#logical_implicit_reserved_capacity_bytes ⇒ Object
This is the sum of the of reservations provisioned on all vDisks in the Storage Container.
-
#marked_for_removal ⇒ Object
Indicates whether the Storage Container is marked for removal.
-
#max_capacity_bytes ⇒ Object
Maximum physical capacity of the Storage Container in bytes.
-
#name ⇒ Object
Name of the Storage Container.
-
#nfs_whitelist_address ⇒ Object
List of NFS addresses that need to be whitelisted.
-
#on_disk_dedup ⇒ Object
Returns the value of attribute on_disk_dedup.
-
#owner_ext_id ⇒ Object
The external identifier of the owner.
-
#replication_factor ⇒ Object
Replication factor of the Storage Container.
-
#storage_pool_ext_id ⇒ Object
The external identifier of the Storage Pool owning the Storage Container instance.
-
#tenant_id ⇒ Object
A globally unique identifier that represents the tenant that owns this entity.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3).
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ClustermgmtV40ConfigStorageContainer
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ ClustermgmtV40ConfigStorageContainer
Initializes the object
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 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 226 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `NutanixClustermgmt::ClustermgmtV40ConfigStorageContainer` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `NutanixClustermgmt::ClustermgmtV40ConfigStorageContainer`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'tenant_id') self.tenant_id = attributes[:'tenant_id'] end if attributes.key?(:'ext_id') self.ext_id = attributes[:'ext_id'] end if attributes.key?(:'links') if (value = attributes[:'links']).is_a?(Array) self.links = value end end if attributes.key?(:'container_ext_id') self.container_ext_id = attributes[:'container_ext_id'] end if attributes.key?(:'owner_ext_id') self.owner_ext_id = attributes[:'owner_ext_id'] end if attributes.key?(:'name') self.name = attributes[:'name'] else self.name = nil end if attributes.key?(:'cluster_ext_id') self.cluster_ext_id = attributes[:'cluster_ext_id'] end if attributes.key?(:'storage_pool_ext_id') self.storage_pool_ext_id = attributes[:'storage_pool_ext_id'] end if attributes.key?(:'is_marked_for_removal') self.is_marked_for_removal = attributes[:'is_marked_for_removal'] end if attributes.key?(:'marked_for_removal') self.marked_for_removal = attributes[:'marked_for_removal'] end if attributes.key?(:'max_capacity_bytes') self.max_capacity_bytes = attributes[:'max_capacity_bytes'] end if attributes.key?(:'logical_explicit_reserved_capacity_bytes') self.logical_explicit_reserved_capacity_bytes = attributes[:'logical_explicit_reserved_capacity_bytes'] end if attributes.key?(:'logical_implicit_reserved_capacity_bytes') self.logical_implicit_reserved_capacity_bytes = attributes[:'logical_implicit_reserved_capacity_bytes'] end if attributes.key?(:'logical_advertised_capacity_bytes') self.logical_advertised_capacity_bytes = attributes[:'logical_advertised_capacity_bytes'] end if attributes.key?(:'replication_factor') self.replication_factor = attributes[:'replication_factor'] end if attributes.key?(:'nfs_whitelist_address') if (value = attributes[:'nfs_whitelist_address']).is_a?(Array) self.nfs_whitelist_address = value end end if attributes.key?(:'is_nfs_whitelist_inherited') self.is_nfs_whitelist_inherited = attributes[:'is_nfs_whitelist_inherited'] end if attributes.key?(:'erasure_code') self.erasure_code = attributes[:'erasure_code'] end if attributes.key?(:'is_inline_ec_enabled') self.is_inline_ec_enabled = attributes[:'is_inline_ec_enabled'] end if attributes.key?(:'has_higher_ec_fault_domain_preference') self.has_higher_ec_fault_domain_preference = attributes[:'has_higher_ec_fault_domain_preference'] end if attributes.key?(:'erasure_code_delay_secs') self.erasure_code_delay_secs = attributes[:'erasure_code_delay_secs'] end if attributes.key?(:'cache_deduplication') self.cache_deduplication = attributes[:'cache_deduplication'] end if attributes.key?(:'on_disk_dedup') self.on_disk_dedup = attributes[:'on_disk_dedup'] end if attributes.key?(:'is_compression_enabled') self.is_compression_enabled = attributes[:'is_compression_enabled'] end if attributes.key?(:'compression_delay_secs') self.compression_delay_secs = attributes[:'compression_delay_secs'] end if attributes.key?(:'is_internal') self.is_internal = attributes[:'is_internal'] end if attributes.key?(:'is_software_encryption_enabled') self.is_software_encryption_enabled = attributes[:'is_software_encryption_enabled'] end if attributes.key?(:'is_encrypted') self.is_encrypted = attributes[:'is_encrypted'] end if attributes.key?(:'affinity_host_ext_id') self.affinity_host_ext_id = attributes[:'affinity_host_ext_id'] end if attributes.key?(:'cluster_name') self.cluster_name = attributes[:'cluster_name'] end end |
Instance Attribute Details
#affinity_host_ext_id ⇒ Object
Affinity host external identifier for RF-1 Storage Container.
100 101 102 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 100 def affinity_host_ext_id @affinity_host_ext_id end |
#cache_deduplication ⇒ Object
Returns the value of attribute cache_deduplication.
80 81 82 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 80 def cache_deduplication @cache_deduplication end |
#cluster_ext_id ⇒ Object
The external identifier of the cluster owning the Storage Container.
37 38 39 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 37 def cluster_ext_id @cluster_ext_id end |
#cluster_name ⇒ Object
The corresponding name of the cluster owning the Storage Container instance.
103 104 105 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 103 def cluster_name @cluster_name end |
#compression_delay_secs ⇒ Object
The compression delay in seconds.
88 89 90 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 88 def compression_delay_secs @compression_delay_secs end |
#container_ext_id ⇒ Object
The external identifier of the Storage Container.
28 29 30 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 28 def container_ext_id @container_ext_id end |
#erasure_code ⇒ Object
Returns the value of attribute erasure_code.
69 70 71 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 69 def erasure_code @erasure_code end |
#erasure_code_delay_secs ⇒ Object
Delay in performing Erasure Code for the current Storage Container instance.
78 79 80 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 78 def erasure_code_delay_secs @erasure_code_delay_secs end |
#ext_id ⇒ Object
A globally unique identifier of an instance that is suitable for external consumption.
22 23 24 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 22 def ext_id @ext_id end |
#has_higher_ec_fault_domain_preference ⇒ Object
Indicates whether to prefer a higher Erasure Code fault domain.
75 76 77 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 75 def has_higher_ec_fault_domain_preference @has_higher_ec_fault_domain_preference end |
#is_compression_enabled ⇒ Object
Indicates whether the compression is enabled for the Storage Container.
85 86 87 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 85 def is_compression_enabled @is_compression_enabled end |
#is_encrypted ⇒ Object
Indicates whether the Storage Container is encrypted or not.
97 98 99 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 97 def is_encrypted @is_encrypted end |
#is_inline_ec_enabled ⇒ Object
Indicates whether data written to this Storage Container should be inline erasure-coded or not. This field is only considered if ErasureCoding is enabled.
72 73 74 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 72 def is_inline_ec_enabled @is_inline_ec_enabled end |
#is_internal ⇒ Object
Indicates whether the Storage Container is internal and is managed by Nutanix.
91 92 93 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 91 def is_internal @is_internal end |
#is_marked_for_removal ⇒ Object
Indicates whether the Storage Container is marked for removal. This field is set when the Storage Container is about to be destroyed.
43 44 45 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 43 def is_marked_for_removal @is_marked_for_removal end |
#is_nfs_whitelist_inherited ⇒ Object
Indicates whether the NFS whitelist is inherited from the global configuration.
67 68 69 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 67 def is_nfs_whitelist_inherited @is_nfs_whitelist_inherited end |
#is_software_encryption_enabled ⇒ Object
Indicates whether the Storage Container instance has software encryption enabled.
94 95 96 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 94 def is_software_encryption_enabled @is_software_encryption_enabled end |
#links ⇒ Object
A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.
25 26 27 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 25 def links @links end |
#logical_advertised_capacity_bytes ⇒ Object
Maximum capacity of the Storage Container as defined by the user.
58 59 60 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 58 def logical_advertised_capacity_bytes @logical_advertised_capacity_bytes end |
#logical_explicit_reserved_capacity_bytes ⇒ Object
Total reserved size (in bytes) of the Storage Container (set by Admin). This also includes the replication factor of the Storage Container. The actual reserved capacity of the Storage Container will be the maximum of explicitReservedCapacity and implicitReservedCapacity.
52 53 54 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 52 def logical_explicit_reserved_capacity_bytes @logical_explicit_reserved_capacity_bytes end |
#logical_implicit_reserved_capacity_bytes ⇒ Object
This is the sum of the of reservations provisioned on all vDisks in the Storage Container. The actual reserved capacity of the Storage Container will be the maximum of explicitReservedCapacity and implicitReservedCapacity.
55 56 57 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 55 def logical_implicit_reserved_capacity_bytes @logical_implicit_reserved_capacity_bytes end |
#marked_for_removal ⇒ Object
Indicates whether the Storage Container is marked for removal. This field is set when the Storage Container is about to be destroyed.
46 47 48 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 46 def marked_for_removal @marked_for_removal end |
#max_capacity_bytes ⇒ Object
Maximum physical capacity of the Storage Container in bytes.
49 50 51 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 49 def max_capacity_bytes @max_capacity_bytes end |
#name ⇒ Object
Name of the Storage Container. Note that the name of Storage Container should be unique in every cluster.
34 35 36 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 34 def name @name end |
#nfs_whitelist_address ⇒ Object
List of NFS addresses that need to be whitelisted.
64 65 66 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 64 def nfs_whitelist_address @nfs_whitelist_address end |
#on_disk_dedup ⇒ Object
Returns the value of attribute on_disk_dedup.
82 83 84 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 82 def on_disk_dedup @on_disk_dedup end |
#owner_ext_id ⇒ Object
The external identifier of the owner.
31 32 33 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 31 def owner_ext_id @owner_ext_id end |
#replication_factor ⇒ Object
Replication factor of the Storage Container.
61 62 63 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 61 def replication_factor @replication_factor end |
#storage_pool_ext_id ⇒ Object
The external identifier of the Storage Pool owning the Storage Container instance.
40 41 42 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 40 def storage_pool_ext_id @storage_pool_ext_id end |
#tenant_id ⇒ Object
A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this Id to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server).
19 20 21 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 19 def tenant_id @tenant_id end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
164 165 166 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 164 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
169 170 171 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 169 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 128 def self.attribute_map { :'tenant_id' => :'tenantId', :'ext_id' => :'extId', :'links' => :'links', :'container_ext_id' => :'containerExtId', :'owner_ext_id' => :'ownerExtId', :'name' => :'name', :'cluster_ext_id' => :'clusterExtId', :'storage_pool_ext_id' => :'storagePoolExtId', :'is_marked_for_removal' => :'isMarkedForRemoval', :'marked_for_removal' => :'markedForRemoval', :'max_capacity_bytes' => :'maxCapacityBytes', :'logical_explicit_reserved_capacity_bytes' => :'logicalExplicitReservedCapacityBytes', :'logical_implicit_reserved_capacity_bytes' => :'logicalImplicitReservedCapacityBytes', :'logical_advertised_capacity_bytes' => :'logicalAdvertisedCapacityBytes', :'replication_factor' => :'replicationFactor', :'nfs_whitelist_address' => :'nfsWhitelistAddress', :'is_nfs_whitelist_inherited' => :'isNfsWhitelistInherited', :'erasure_code' => :'erasureCode', :'is_inline_ec_enabled' => :'isInlineEcEnabled', :'has_higher_ec_fault_domain_preference' => :'hasHigherEcFaultDomainPreference', :'erasure_code_delay_secs' => :'erasureCodeDelaySecs', :'cache_deduplication' => :'cacheDeduplication', :'on_disk_dedup' => :'onDiskDedup', :'is_compression_enabled' => :'isCompressionEnabled', :'compression_delay_secs' => :'compressionDelaySecs', :'is_internal' => :'isInternal', :'is_software_encryption_enabled' => :'isSoftwareEncryptionEnabled', :'is_encrypted' => :'isEncrypted', :'affinity_host_ext_id' => :'affinityHostExtId', :'cluster_name' => :'clusterName' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 676 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3)
218 219 220 221 222 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 218 def self.openapi_all_of [ :'CommonV10ResponseExternalizableAbstractModel' ] end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
210 211 212 213 214 215 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 210 def self.openapi_nullable Set.new([ :'ext_id', :'is_software_encryption_enabled', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 174 def self.openapi_types { :'tenant_id' => :'String', :'ext_id' => :'String', :'links' => :'Array<CommonV10ResponseApiLink>', :'container_ext_id' => :'String', :'owner_ext_id' => :'String', :'name' => :'String', :'cluster_ext_id' => :'String', :'storage_pool_ext_id' => :'String', :'is_marked_for_removal' => :'Boolean', :'marked_for_removal' => :'Boolean', :'max_capacity_bytes' => :'Integer', :'logical_explicit_reserved_capacity_bytes' => :'Integer', :'logical_implicit_reserved_capacity_bytes' => :'Integer', :'logical_advertised_capacity_bytes' => :'Integer', :'replication_factor' => :'Integer', :'nfs_whitelist_address' => :'Array<CommonV10ConfigIPAddressOrFQDN>', :'is_nfs_whitelist_inherited' => :'Boolean', :'erasure_code' => :'ClustermgmtV40ConfigErasureCodeStatus', :'is_inline_ec_enabled' => :'Boolean', :'has_higher_ec_fault_domain_preference' => :'Boolean', :'erasure_code_delay_secs' => :'Integer', :'cache_deduplication' => :'ClustermgmtV40ConfigCacheDeduplication', :'on_disk_dedup' => :'ClustermgmtV40ConfigOnDiskDedup', :'is_compression_enabled' => :'Boolean', :'compression_delay_secs' => :'Integer', :'is_internal' => :'Boolean', :'is_software_encryption_enabled' => :'Boolean', :'is_encrypted' => :'Boolean', :'affinity_host_ext_id' => :'String', :'cluster_name' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 626 def ==(o) return true if self.equal?(o) self.class == o.class && tenant_id == o.tenant_id && ext_id == o.ext_id && links == o.links && container_ext_id == o.container_ext_id && owner_ext_id == o.owner_ext_id && name == o.name && cluster_ext_id == o.cluster_ext_id && storage_pool_ext_id == o.storage_pool_ext_id && is_marked_for_removal == o.is_marked_for_removal && marked_for_removal == o.marked_for_removal && max_capacity_bytes == o.max_capacity_bytes && logical_explicit_reserved_capacity_bytes == o.logical_explicit_reserved_capacity_bytes && logical_implicit_reserved_capacity_bytes == o.logical_implicit_reserved_capacity_bytes && logical_advertised_capacity_bytes == o.logical_advertised_capacity_bytes && replication_factor == o.replication_factor && nfs_whitelist_address == o.nfs_whitelist_address && is_nfs_whitelist_inherited == o.is_nfs_whitelist_inherited && erasure_code == o.erasure_code && is_inline_ec_enabled == o.is_inline_ec_enabled && has_higher_ec_fault_domain_preference == o.has_higher_ec_fault_domain_preference && erasure_code_delay_secs == o.erasure_code_delay_secs && cache_deduplication == o.cache_deduplication && on_disk_dedup == o.on_disk_dedup && is_compression_enabled == o.is_compression_enabled && compression_delay_secs == o.compression_delay_secs && is_internal == o.is_internal && is_software_encryption_enabled == o.is_software_encryption_enabled && is_encrypted == o.is_encrypted && affinity_host_ext_id == o.affinity_host_ext_id && cluster_name == o.cluster_name end |
#eql?(o) ⇒ Boolean
663 664 665 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 663 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
669 670 671 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 669 def hash [tenant_id, ext_id, links, container_ext_id, owner_ext_id, name, cluster_ext_id, storage_pool_ext_id, is_marked_for_removal, marked_for_removal, max_capacity_bytes, logical_explicit_reserved_capacity_bytes, logical_implicit_reserved_capacity_bytes, logical_advertised_capacity_bytes, replication_factor, nfs_whitelist_address, is_nfs_whitelist_inherited, erasure_code, is_inline_ec_enabled, has_higher_ec_fault_domain_preference, erasure_code_delay_secs, cache_deduplication, on_disk_dedup, is_compression_enabled, compression_delay_secs, is_internal, is_software_encryption_enabled, is_encrypted, affinity_host_ext_id, cluster_name].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 369 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if !@tenant_id.nil? && @tenant_id !~ pattern invalid_properties.push("invalid value for \"tenant_id\", must conform to the pattern #{pattern}.") end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if !@ext_id.nil? && @ext_id !~ pattern invalid_properties.push("invalid value for \"ext_id\", must conform to the pattern #{pattern}.") end if !@links.nil? && @links.length > 20 invalid_properties.push('invalid value for "links", number of items must be less than or equal to 20.') end if !@links.nil? && @links.length < 0 invalid_properties.push('invalid value for "links", number of items must be greater than or equal to 0.') end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if !@container_ext_id.nil? && @container_ext_id !~ pattern invalid_properties.push("invalid value for \"container_ext_id\", must conform to the pattern #{pattern}.") end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if !@owner_ext_id.nil? && @owner_ext_id !~ pattern invalid_properties.push("invalid value for \"owner_ext_id\", must conform to the pattern #{pattern}.") end if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end if @name.to_s.length > 75 invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 75.') end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if !@cluster_ext_id.nil? && @cluster_ext_id !~ pattern invalid_properties.push("invalid value for \"cluster_ext_id\", must conform to the pattern #{pattern}.") end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if !@storage_pool_ext_id.nil? && @storage_pool_ext_id !~ pattern invalid_properties.push("invalid value for \"storage_pool_ext_id\", must conform to the pattern #{pattern}.") end if !@nfs_whitelist_address.nil? && @nfs_whitelist_address.length > 100 invalid_properties.push('invalid value for "nfs_whitelist_address", number of items must be less than or equal to 100.') end if !@nfs_whitelist_address.nil? && @nfs_whitelist_address.length < 0 invalid_properties.push('invalid value for "nfs_whitelist_address", number of items must be greater than or equal to 0.') end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if !@affinity_host_ext_id.nil? && @affinity_host_ext_id !~ pattern invalid_properties.push("invalid value for \"affinity_host_ext_id\", must conform to the pattern #{pattern}.") end if !@cluster_name.nil? && @cluster_name.to_s.length > 256 invalid_properties.push('invalid value for "cluster_name", the character length must be smaller than or equal to 256.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
698 699 700 701 702 703 704 705 706 707 708 709 710 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 698 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_storage_container.rb', line 440 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@tenant_id.nil? && @tenant_id !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) return false if !@ext_id.nil? && @ext_id !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) return false if !@links.nil? && @links.length > 20 return false if !@links.nil? && @links.length < 0 return false if !@container_ext_id.nil? && @container_ext_id !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) return false if !@owner_ext_id.nil? && @owner_ext_id !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) return false if @name.nil? return false if @name.to_s.length > 75 return false if !@cluster_ext_id.nil? && @cluster_ext_id !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) return false if !@storage_pool_ext_id.nil? && @storage_pool_ext_id !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) return false if !@nfs_whitelist_address.nil? && @nfs_whitelist_address.length > 100 return false if !@nfs_whitelist_address.nil? && @nfs_whitelist_address.length < 0 return false if !@affinity_host_ext_id.nil? && @affinity_host_ext_id !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) return false if !@cluster_name.nil? && @cluster_name.to_s.length > 256 true end |