Class: NutanixClustermgmt::ClustermgmtV40ConfigClusterConfigReference
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- NutanixClustermgmt::ClustermgmtV40ConfigClusterConfigReference
- Defined in:
- lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb
Overview
Cluster configuration details.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#authorized_public_key_list ⇒ Object
Public ssh key details.
-
#build_info ⇒ Object
Returns the value of attribute build_info.
-
#cluster_arch ⇒ Object
Returns the value of attribute cluster_arch.
-
#cluster_function ⇒ Object
Cluster function.
-
#cluster_software_map ⇒ Object
Cluster software version details.
-
#encryption_in_transit_status ⇒ Object
Returns the value of attribute encryption_in_transit_status.
-
#encryption_option ⇒ Object
Encryption option.
-
#encryption_scope ⇒ Object
Encryption scope.
-
#fault_tolerance_state ⇒ Object
Returns the value of attribute fault_tolerance_state.
-
#hypervisor_types ⇒ Object
Hypervisor type.
-
#incarnation_id ⇒ Object
Cluster incarnation Id.
-
#is_available ⇒ Object
Indicates if cluster is available to contact or not.
-
#is_lts ⇒ Object
Indicates whether the release is categorized as Long-term or not.
-
#is_password_remote_login_enabled ⇒ Object
Indicates whether the password ssh into the cluster is enabled or not.
-
#is_remote_support_enabled ⇒ Object
Remote support status.
-
#operation_mode ⇒ Object
Returns the value of attribute operation_mode.
-
#pulse_status ⇒ Object
Returns the value of attribute pulse_status.
-
#redundancy_factor ⇒ Object
Redundancy factor of a cluster.
-
#timezone ⇒ Object
Time zone on a cluster.
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_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 = {}) ⇒ ClustermgmtV40ConfigClusterConfigReference
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 = {}) ⇒ ClustermgmtV40ConfigClusterConfigReference
Initializes the object
160 161 162 163 164 165 166 167 168 169 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 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 160 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `NutanixClustermgmt::ClustermgmtV40ConfigClusterConfigReference` 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::ClustermgmtV40ConfigClusterConfigReference`. 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?(:'incarnation_id') self.incarnation_id = attributes[:'incarnation_id'] end if attributes.key?(:'build_info') self.build_info = attributes[:'build_info'] end if attributes.key?(:'hypervisor_types') if (value = attributes[:'hypervisor_types']).is_a?(Array) self.hypervisor_types = value end end if attributes.key?(:'cluster_function') if (value = attributes[:'cluster_function']).is_a?(Array) self.cluster_function = value end end if attributes.key?(:'timezone') self.timezone = attributes[:'timezone'] end if attributes.key?(:'authorized_public_key_list') if (value = attributes[:'authorized_public_key_list']).is_a?(Array) self. = value end end if attributes.key?(:'redundancy_factor') self.redundancy_factor = attributes[:'redundancy_factor'] end if attributes.key?(:'cluster_software_map') if (value = attributes[:'cluster_software_map']).is_a?(Array) self.cluster_software_map = value end end if attributes.key?(:'cluster_arch') self.cluster_arch = attributes[:'cluster_arch'] end if attributes.key?(:'fault_tolerance_state') self.fault_tolerance_state = attributes[:'fault_tolerance_state'] end if attributes.key?(:'is_remote_support_enabled') self.is_remote_support_enabled = attributes[:'is_remote_support_enabled'] end if attributes.key?(:'operation_mode') self.operation_mode = attributes[:'operation_mode'] end if attributes.key?(:'is_lts') self.is_lts = attributes[:'is_lts'] end if attributes.key?(:'is_password_remote_login_enabled') self.is_password_remote_login_enabled = attributes[:'is_password_remote_login_enabled'] end if attributes.key?(:'encryption_in_transit_status') self.encryption_in_transit_status = attributes[:'encryption_in_transit_status'] end if attributes.key?(:'encryption_option') if (value = attributes[:'encryption_option']).is_a?(Array) self.encryption_option = value end end if attributes.key?(:'encryption_scope') if (value = attributes[:'encryption_scope']).is_a?(Array) self.encryption_scope = value end end if attributes.key?(:'pulse_status') self.pulse_status = attributes[:'pulse_status'] end if attributes.key?(:'is_available') self.is_available = attributes[:'is_available'] end end |
Instance Attribute Details
#authorized_public_key_list ⇒ Object
Public ssh key details. This is part of payload for cluster update operation only.
34 35 36 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 34 def @authorized_public_key_list end |
#build_info ⇒ Object
Returns the value of attribute build_info.
22 23 24 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 22 def build_info @build_info end |
#cluster_arch ⇒ Object
Returns the value of attribute cluster_arch.
42 43 44 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 42 def cluster_arch @cluster_arch end |
#cluster_function ⇒ Object
Cluster function. This is part of payload for cluster create operation only (allowed enum values for creation are AOS, ONE_NODE & TWO_NODE only).
28 29 30 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 28 def cluster_function @cluster_function end |
#cluster_software_map ⇒ Object
Cluster software version details.
40 41 42 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 40 def cluster_software_map @cluster_software_map end |
#encryption_in_transit_status ⇒ Object
Returns the value of attribute encryption_in_transit_status.
57 58 59 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 57 def encryption_in_transit_status @encryption_in_transit_status end |
#encryption_option ⇒ Object
Encryption option.
60 61 62 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 60 def encryption_option @encryption_option end |
#encryption_scope ⇒ Object
Encryption scope.
63 64 65 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 63 def encryption_scope @encryption_scope end |
#fault_tolerance_state ⇒ Object
Returns the value of attribute fault_tolerance_state.
44 45 46 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 44 def fault_tolerance_state @fault_tolerance_state end |
#hypervisor_types ⇒ Object
Hypervisor type.
25 26 27 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 25 def hypervisor_types @hypervisor_types end |
#incarnation_id ⇒ Object
Cluster incarnation Id. This is part of payload for cluster update operation only.
20 21 22 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 20 def incarnation_id @incarnation_id end |
#is_available ⇒ Object
Indicates if cluster is available to contact or not.
68 69 70 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 68 def is_available @is_available end |
#is_lts ⇒ Object
Indicates whether the release is categorized as Long-term or not.
52 53 54 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 52 def is_lts @is_lts end |
#is_password_remote_login_enabled ⇒ Object
Indicates whether the password ssh into the cluster is enabled or not.
55 56 57 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 55 def is_password_remote_login_enabled @is_password_remote_login_enabled end |
#is_remote_support_enabled ⇒ Object
Remote support status.
47 48 49 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 47 def is_remote_support_enabled @is_remote_support_enabled end |
#operation_mode ⇒ Object
Returns the value of attribute operation_mode.
49 50 51 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 49 def operation_mode @operation_mode end |
#pulse_status ⇒ Object
Returns the value of attribute pulse_status.
65 66 67 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 65 def pulse_status @pulse_status end |
#redundancy_factor ⇒ Object
Redundancy factor of a cluster. This is part of payload for both cluster create & update operations.
37 38 39 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 37 def redundancy_factor @redundancy_factor end |
#timezone ⇒ Object
Time zone on a cluster.
31 32 33 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 31 def timezone @timezone end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
118 119 120 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 118 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
123 124 125 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 123 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 93 def self.attribute_map { :'incarnation_id' => :'incarnationId', :'build_info' => :'buildInfo', :'hypervisor_types' => :'hypervisorTypes', :'cluster_function' => :'clusterFunction', :'timezone' => :'timezone', :'authorized_public_key_list' => :'authorizedPublicKeyList', :'redundancy_factor' => :'redundancyFactor', :'cluster_software_map' => :'clusterSoftwareMap', :'cluster_arch' => :'clusterArch', :'fault_tolerance_state' => :'faultToleranceState', :'is_remote_support_enabled' => :'isRemoteSupportEnabled', :'operation_mode' => :'operationMode', :'is_lts' => :'isLts', :'is_password_remote_login_enabled' => :'isPasswordRemoteLoginEnabled', :'encryption_in_transit_status' => :'encryptionInTransitStatus', :'encryption_option' => :'encryptionOption', :'encryption_scope' => :'encryptionScope', :'pulse_status' => :'pulseStatus', :'is_available' => :'isAvailable' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 487 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_nullable ⇒ Object
List of attributes with nullable: true
153 154 155 156 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 153 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 128 def self.openapi_types { :'incarnation_id' => :'Integer', :'build_info' => :'ClustermgmtV40ConfigBuildReference', :'hypervisor_types' => :'Array<ClustermgmtV40ConfigHypervisorType>', :'cluster_function' => :'Array<ClustermgmtV40ConfigClusterFunctionRef>', :'timezone' => :'String', :'authorized_public_key_list' => :'Array<ClustermgmtV40ConfigPublicKey>', :'redundancy_factor' => :'Integer', :'cluster_software_map' => :'Array<ClustermgmtV40ConfigSoftwareMapReference>', :'cluster_arch' => :'ClustermgmtV40ConfigClusterArchReference', :'fault_tolerance_state' => :'ClustermgmtV40ConfigFaultToleranceState', :'is_remote_support_enabled' => :'Boolean', :'operation_mode' => :'ClustermgmtV40ConfigOperationMode', :'is_lts' => :'Boolean', :'is_password_remote_login_enabled' => :'Boolean', :'encryption_in_transit_status' => :'ClustermgmtV40ConfigEncryptionStatus', :'encryption_option' => :'Array<ClustermgmtV40ConfigEncryptionOptionInfo>', :'encryption_scope' => :'Array<ClustermgmtV40ConfigEncryptionScopeInfo>', :'pulse_status' => :'ClustermgmtV40ConfigPulseStatus', :'is_available' => :'Boolean' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 448 def ==(o) return true if self.equal?(o) self.class == o.class && incarnation_id == o.incarnation_id && build_info == o.build_info && hypervisor_types == o.hypervisor_types && cluster_function == o.cluster_function && timezone == o.timezone && == o. && redundancy_factor == o.redundancy_factor && cluster_software_map == o.cluster_software_map && cluster_arch == o.cluster_arch && fault_tolerance_state == o.fault_tolerance_state && is_remote_support_enabled == o.is_remote_support_enabled && operation_mode == o.operation_mode && is_lts == o.is_lts && is_password_remote_login_enabled == o.is_password_remote_login_enabled && encryption_in_transit_status == o.encryption_in_transit_status && encryption_option == o.encryption_option && encryption_scope == o.encryption_scope && pulse_status == o.pulse_status && is_available == o.is_available end |
#eql?(o) ⇒ Boolean
474 475 476 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 474 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
480 481 482 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 480 def hash [incarnation_id, build_info, hypervisor_types, cluster_function, timezone, , redundancy_factor, cluster_software_map, cluster_arch, fault_tolerance_state, is_remote_support_enabled, operation_mode, is_lts, is_password_remote_login_enabled, encryption_in_transit_status, encryption_option, encryption_scope, pulse_status, is_available].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 265 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if !@hypervisor_types.nil? && @hypervisor_types.length > 5 invalid_properties.push('invalid value for "hypervisor_types", number of items must be less than or equal to 5.') end if !@hypervisor_types.nil? && @hypervisor_types.length < 0 invalid_properties.push('invalid value for "hypervisor_types", number of items must be greater than or equal to 0.') end if !@cluster_function.nil? && @cluster_function.length > 7 invalid_properties.push('invalid value for "cluster_function", number of items must be less than or equal to 7.') end if !@cluster_function.nil? && @cluster_function.length < 0 invalid_properties.push('invalid value for "cluster_function", number of items must be greater than or equal to 0.') end if !@authorized_public_key_list.nil? && @authorized_public_key_list.length > 1024 invalid_properties.push('invalid value for "authorized_public_key_list", number of items must be less than or equal to 1024.') end if !@authorized_public_key_list.nil? && @authorized_public_key_list.length < 0 invalid_properties.push('invalid value for "authorized_public_key_list", number of items must be greater than or equal to 0.') end if !@cluster_software_map.nil? && @cluster_software_map.length > 3 invalid_properties.push('invalid value for "cluster_software_map", number of items must be less than or equal to 3.') end if !@cluster_software_map.nil? && @cluster_software_map.length < 0 invalid_properties.push('invalid value for "cluster_software_map", number of items must be greater than or equal to 0.') end if !@encryption_option.nil? && @encryption_option.length > 3 invalid_properties.push('invalid value for "encryption_option", number of items must be less than or equal to 3.') end if !@encryption_option.nil? && @encryption_option.length < 0 invalid_properties.push('invalid value for "encryption_option", number of items must be greater than or equal to 0.') end if !@encryption_scope.nil? && @encryption_scope.length > 2 invalid_properties.push('invalid value for "encryption_scope", number of items must be less than or equal to 2.') end if !@encryption_scope.nil? && @encryption_scope.length < 0 invalid_properties.push('invalid value for "encryption_scope", number of items must be greater than or equal to 0.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
509 510 511 512 513 514 515 516 517 518 519 520 521 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 509 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
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_config_reference.rb', line 321 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@hypervisor_types.nil? && @hypervisor_types.length > 5 return false if !@hypervisor_types.nil? && @hypervisor_types.length < 0 return false if !@cluster_function.nil? && @cluster_function.length > 7 return false if !@cluster_function.nil? && @cluster_function.length < 0 return false if !@authorized_public_key_list.nil? && @authorized_public_key_list.length > 1024 return false if !@authorized_public_key_list.nil? && @authorized_public_key_list.length < 0 return false if !@cluster_software_map.nil? && @cluster_software_map.length > 3 return false if !@cluster_software_map.nil? && @cluster_software_map.length < 0 return false if !@encryption_option.nil? && @encryption_option.length > 3 return false if !@encryption_option.nil? && @encryption_option.length < 0 return false if !@encryption_scope.nil? && @encryption_scope.length > 2 return false if !@encryption_scope.nil? && @encryption_scope.length < 0 true end |