Class: NutanixClustermgmt::ClustermgmtV40ConfigClusterProfile
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- NutanixClustermgmt::ClustermgmtV40ConfigClusterProfile
- Defined in:
- lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb
Instance Attribute Summary collapse
-
#allowed_overrides ⇒ Object
Indicates if a configuration of attached clusters can be skipped from monitoring.
-
#cluster_count ⇒ Object
Count of clusters associated to a cluster profile.
-
#clusters ⇒ Object
Managed cluster information.
-
#create_time ⇒ Object
Creation time of cluster profile.
-
#created_by ⇒ Object
Details of the user who created this cluster profile.
-
#description ⇒ Object
Detailed description of a cluster profile.
-
#drifted_cluster_count ⇒ Object
The count indicates the number of clusters associated with a cluster profile that have experienced drift.
-
#ext_id ⇒ Object
A globally unique identifier of an instance that is suitable for external consumption.
-
#last_update_time ⇒ Object
Last updated time of a cluster profile.
-
#last_updated_by ⇒ Object
Details of the user who has recently updated this cluster profile.
-
#links ⇒ Object
A HATEOAS style link for the response.
-
#name ⇒ Object
Name of the cluster profile.
-
#name_server_ip_list ⇒ Object
List of name servers on a cluster.
-
#nfs_subnet_whitelist ⇒ Object
NFS subnet whitelist addresses.
-
#ntp_server_ip_list ⇒ Object
List of NTP servers on a cluster.
-
#pulse_status ⇒ Object
Returns the value of attribute pulse_status.
-
#rsyslog_server_list ⇒ Object
RSYSLOG Server.
-
#smtp_server ⇒ Object
Returns the value of attribute smtp_server.
-
#snmp_config ⇒ Object
Returns the value of attribute snmp_config.
-
#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 = {}) ⇒ ClustermgmtV40ConfigClusterProfile
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 = {}) ⇒ ClustermgmtV40ConfigClusterProfile
Initializes the object
153 154 155 156 157 158 159 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 262 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 153 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `NutanixClustermgmt::ClustermgmtV40ConfigClusterProfile` 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::ClustermgmtV40ConfigClusterProfile`. 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?(:'name') self.name = attributes[:'name'] else self.name = nil end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'create_time') self.create_time = attributes[:'create_time'] end if attributes.key?(:'last_update_time') self.last_update_time = attributes[:'last_update_time'] end if attributes.key?(:'created_by') self.created_by = attributes[:'created_by'] end if attributes.key?(:'last_updated_by') self.last_updated_by = attributes[:'last_updated_by'] end if attributes.key?(:'cluster_count') self.cluster_count = attributes[:'cluster_count'] end if attributes.key?(:'drifted_cluster_count') self.drifted_cluster_count = attributes[:'drifted_cluster_count'] end if attributes.key?(:'clusters') if (value = attributes[:'clusters']).is_a?(Array) self.clusters = value end end if attributes.key?(:'allowed_overrides') if (value = attributes[:'allowed_overrides']).is_a?(Array) self.allowed_overrides = value end end if attributes.key?(:'name_server_ip_list') if (value = attributes[:'name_server_ip_list']).is_a?(Array) self.name_server_ip_list = value end end if attributes.key?(:'ntp_server_ip_list') if (value = attributes[:'ntp_server_ip_list']).is_a?(Array) self.ntp_server_ip_list = value end end if attributes.key?(:'smtp_server') self.smtp_server = attributes[:'smtp_server'] end if attributes.key?(:'nfs_subnet_whitelist') if (value = attributes[:'nfs_subnet_whitelist']).is_a?(Array) self.nfs_subnet_whitelist = value end end if attributes.key?(:'snmp_config') self.snmp_config = attributes[:'snmp_config'] end if attributes.key?(:'rsyslog_server_list') if (value = attributes[:'rsyslog_server_list']).is_a?(Array) self.rsyslog_server_list = value end end if attributes.key?(:'pulse_status') self.pulse_status = attributes[:'pulse_status'] end end |
Instance Attribute Details
#allowed_overrides ⇒ Object
Indicates if a configuration of attached clusters can be skipped from monitoring.
55 56 57 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 55 def allowed_overrides @allowed_overrides end |
#cluster_count ⇒ Object
Count of clusters associated to a cluster profile
46 47 48 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 46 def cluster_count @cluster_count end |
#clusters ⇒ Object
Managed cluster information
52 53 54 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 52 def clusters @clusters end |
#create_time ⇒ Object
Creation time of cluster profile
34 35 36 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 34 def create_time @create_time end |
#created_by ⇒ Object
Details of the user who created this cluster profile
40 41 42 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 40 def created_by @created_by end |
#description ⇒ Object
Detailed description of a cluster profile
31 32 33 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 31 def description @description end |
#drifted_cluster_count ⇒ Object
The count indicates the number of clusters associated with a cluster profile that have experienced drift. Drifted clusters are those in which the configuration differs from the defined profile. For example, the NTP server has different values on a cluster as compared to the profile it is attached.
49 50 51 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 49 def drifted_cluster_count @drifted_cluster_count 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_cluster_profile.rb', line 22 def ext_id @ext_id end |
#last_update_time ⇒ Object
Last updated time of a cluster profile
37 38 39 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 37 def last_update_time @last_update_time end |
#last_updated_by ⇒ Object
Details of the user who has recently updated this cluster profile
43 44 45 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 43 def last_updated_by @last_updated_by 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_cluster_profile.rb', line 25 def links @links end |
#name ⇒ Object
Name of the cluster profile
28 29 30 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 28 def name @name end |
#name_server_ip_list ⇒ Object
List of name servers on a cluster. This is part of payload for both cluster create & update operations. For create operation, only ipv4 address / fqdn values are supported currently.
58 59 60 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 58 def name_server_ip_list @name_server_ip_list end |
#nfs_subnet_whitelist ⇒ Object
NFS subnet whitelist addresses. This is part of payload for cluster update operation only.
66 67 68 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 66 def nfs_subnet_whitelist @nfs_subnet_whitelist end |
#ntp_server_ip_list ⇒ Object
List of NTP servers on a cluster. This is part of payload for both cluster create & update operations. For create operation, only ipv4 address / fqdn values are supported currently.
61 62 63 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 61 def ntp_server_ip_list @ntp_server_ip_list end |
#pulse_status ⇒ Object
Returns the value of attribute pulse_status.
73 74 75 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 73 def pulse_status @pulse_status end |
#rsyslog_server_list ⇒ Object
RSYSLOG Server.
71 72 73 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 71 def rsyslog_server_list @rsyslog_server_list end |
#smtp_server ⇒ Object
Returns the value of attribute smtp_server.
63 64 65 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 63 def smtp_server @smtp_server end |
#snmp_config ⇒ Object
Returns the value of attribute snmp_config.
68 69 70 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 68 def snmp_config @snmp_config 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_cluster_profile.rb', line 19 def tenant_id @tenant_id end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
102 103 104 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 102 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
107 108 109 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 107 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 76 def self.attribute_map { :'tenant_id' => :'tenantId', :'ext_id' => :'extId', :'links' => :'links', :'name' => :'name', :'description' => :'description', :'create_time' => :'createTime', :'last_update_time' => :'lastUpdateTime', :'created_by' => :'createdBy', :'last_updated_by' => :'lastUpdatedBy', :'cluster_count' => :'clusterCount', :'drifted_cluster_count' => :'driftedClusterCount', :'clusters' => :'clusters', :'allowed_overrides' => :'allowedOverrides', :'name_server_ip_list' => :'nameServerIpList', :'ntp_server_ip_list' => :'ntpServerIpList', :'smtp_server' => :'smtpServer', :'nfs_subnet_whitelist' => :'nfsSubnetWhitelist', :'snmp_config' => :'snmpConfig', :'rsyslog_server_list' => :'rsyslogServerList', :'pulse_status' => :'pulseStatus' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 651 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)
145 146 147 148 149 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 145 def self.openapi_all_of [ :'CommonV10ResponseExternalizableAbstractModel' ] end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
138 139 140 141 142 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 138 def self.openapi_nullable Set.new([ :'ext_id', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 112 def self.openapi_types { :'tenant_id' => :'String', :'ext_id' => :'String', :'links' => :'Array<CommonV10ResponseApiLink>', :'name' => :'String', :'description' => :'String', :'create_time' => :'Time', :'last_update_time' => :'Time', :'created_by' => :'String', :'last_updated_by' => :'String', :'cluster_count' => :'Integer', :'drifted_cluster_count' => :'Integer', :'clusters' => :'Array<ClustermgmtV40ConfigManagedCluster>', :'allowed_overrides' => :'Array<ClustermgmtV40ConfigConfigType>', :'name_server_ip_list' => :'Array<CommonV10ConfigIPAddress>', :'ntp_server_ip_list' => :'Array<CommonV10ConfigIPAddressOrFQDN>', :'smtp_server' => :'ClustermgmtV40ConfigSmtpServerRef', :'nfs_subnet_whitelist' => :'Array<String>', :'snmp_config' => :'ClustermgmtV40ConfigSnmpConfig', :'rsyslog_server_list' => :'Array<ClustermgmtV40ConfigRsyslogServer>', :'pulse_status' => :'ClustermgmtV40ConfigPulseStatus' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 611 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 && name == o.name && description == o.description && create_time == o.create_time && last_update_time == o.last_update_time && created_by == o.created_by && last_updated_by == o.last_updated_by && cluster_count == o.cluster_count && drifted_cluster_count == o.drifted_cluster_count && clusters == o.clusters && allowed_overrides == o.allowed_overrides && name_server_ip_list == o.name_server_ip_list && ntp_server_ip_list == o.ntp_server_ip_list && smtp_server == o.smtp_server && nfs_subnet_whitelist == o.nfs_subnet_whitelist && snmp_config == o.snmp_config && rsyslog_server_list == o.rsyslog_server_list && pulse_status == o.pulse_status end |
#eql?(o) ⇒ Boolean
638 639 640 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 638 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
644 645 646 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 644 def hash [tenant_id, ext_id, links, name, description, create_time, last_update_time, created_by, last_updated_by, cluster_count, drifted_cluster_count, clusters, allowed_overrides, name_server_ip_list, ntp_server_ip_list, smtp_server, nfs_subnet_whitelist, snmp_config, rsyslog_server_list, pulse_status].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 266 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 if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end if @name.to_s.length > 64 invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 64.') end pattern = Regexp.new(/^[A-Za-z0-9._-]+$/) if @name !~ pattern invalid_properties.push("invalid value for \"name\", must conform to the pattern #{pattern}.") end if !@description.nil? && @description.to_s.length > 1000 invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 1000.') 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 !@created_by.nil? && @created_by !~ pattern invalid_properties.push("invalid value for \"created_by\", 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 !@last_updated_by.nil? && @last_updated_by !~ pattern invalid_properties.push("invalid value for \"last_updated_by\", must conform to the pattern #{pattern}.") end if !@clusters.nil? && @clusters.length > 400 invalid_properties.push('invalid value for "clusters", number of items must be less than or equal to 400.') end if !@clusters.nil? && @clusters.length < 1 invalid_properties.push('invalid value for "clusters", number of items must be greater than or equal to 1.') end if !@allowed_overrides.nil? && @allowed_overrides.length > 50 invalid_properties.push('invalid value for "allowed_overrides", number of items must be less than or equal to 50.') end if !@allowed_overrides.nil? && @allowed_overrides.length < 0 invalid_properties.push('invalid value for "allowed_overrides", number of items must be greater than or equal to 0.') end if !@name_server_ip_list.nil? && @name_server_ip_list.length > 1024 invalid_properties.push('invalid value for "name_server_ip_list", number of items must be less than or equal to 1024.') end if !@name_server_ip_list.nil? && @name_server_ip_list.length < 0 invalid_properties.push('invalid value for "name_server_ip_list", number of items must be greater than or equal to 0.') end if !@ntp_server_ip_list.nil? && @ntp_server_ip_list.length > 1024 invalid_properties.push('invalid value for "ntp_server_ip_list", number of items must be less than or equal to 1024.') end if !@ntp_server_ip_list.nil? && @ntp_server_ip_list.length < 0 invalid_properties.push('invalid value for "ntp_server_ip_list", number of items must be greater than or equal to 0.') end if !@nfs_subnet_whitelist.nil? && @nfs_subnet_whitelist.length > 1024 invalid_properties.push('invalid value for "nfs_subnet_whitelist", number of items must be less than or equal to 1024.') end if !@nfs_subnet_whitelist.nil? && @nfs_subnet_whitelist.length < 0 invalid_properties.push('invalid value for "nfs_subnet_whitelist", number of items must be greater than or equal to 0.') end if !@rsyslog_server_list.nil? && @rsyslog_server_list.length > 100 invalid_properties.push('invalid value for "rsyslog_server_list", number of items must be less than or equal to 100.') end if !@rsyslog_server_list.nil? && @rsyslog_server_list.length < 0 invalid_properties.push('invalid value for "rsyslog_server_list", 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
673 674 675 676 677 678 679 680 681 682 683 684 685 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 673 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
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_profile.rb', line 367 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 @name.nil? return false if @name.to_s.length > 64 return false if @name !~ Regexp.new(/^[A-Za-z0-9._-]+$/) return false if !@description.nil? && @description.to_s.length > 1000 return false if !@created_by.nil? && @created_by !~ 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 !@last_updated_by.nil? && @last_updated_by !~ 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 !@clusters.nil? && @clusters.length > 400 return false if !@clusters.nil? && @clusters.length < 1 return false if !@allowed_overrides.nil? && @allowed_overrides.length > 50 return false if !@allowed_overrides.nil? && @allowed_overrides.length < 0 return false if !@name_server_ip_list.nil? && @name_server_ip_list.length > 1024 return false if !@name_server_ip_list.nil? && @name_server_ip_list.length < 0 return false if !@ntp_server_ip_list.nil? && @ntp_server_ip_list.length > 1024 return false if !@ntp_server_ip_list.nil? && @ntp_server_ip_list.length < 0 return false if !@nfs_subnet_whitelist.nil? && @nfs_subnet_whitelist.length > 1024 return false if !@nfs_subnet_whitelist.nil? && @nfs_subnet_whitelist.length < 0 return false if !@rsyslog_server_list.nil? && @rsyslog_server_list.length > 100 return false if !@rsyslog_server_list.nil? && @rsyslog_server_list.length < 0 true end |