Class: IntersightClient::VmediaMappingAllOf
- Inherits:
-
Object
- Object
- IntersightClient::VmediaMappingAllOf
- Defined in:
- lib/intersight_client/models/vmedia_mapping_all_of.rb
Overview
Definition of the list of properties defined in ‘vmedia.Mapping’, excluding properties defined in parent classes.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#authentication_protocol ⇒ Object
Type of Authentication protocol when CIFS is used for communication with the remote server.
-
#class_id ⇒ Object
The fully-qualified name of the instantiated, concrete type.
-
#device_type ⇒ Object
Type of remote Virtual Media device.
-
#file_location ⇒ Object
Remote location of image.
-
#host_name ⇒ Object
IP address or hostname of the remote server.
-
#is_password_set ⇒ Object
Indicates whether the value of the ‘password’ property has been set.
-
#mount_options ⇒ Object
Mount options for the Virtual Media mapping.
-
#mount_protocol ⇒ Object
Protocol to use to communicate with the remote server.
-
#object_type ⇒ Object
The fully-qualified name of the instantiated, concrete type.
-
#password ⇒ Object
Password associated with the username.
-
#remote_file ⇒ Object
The remote file location path for the virtual media mapping.
-
#remote_path ⇒ Object
URL path to the location of the image on the remote server.
-
#sanitized_file_location ⇒ Object
File Location in standard format ‘hostname/filePath/fileName’.
-
#username ⇒ Object
Username to log in to the remote server.
-
#volume_name ⇒ Object
Identity of the image for Virtual Media mapping.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns the key-value map of all the JSON attributes 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.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ VmediaMappingAllOf
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ VmediaMappingAllOf
Initializes the object
146 147 148 149 150 151 152 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 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 146 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `IntersightClient::VmediaMappingAllOf` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `#{self.class.name}`. Please check the name to make sure it's valid. List of attributes: " + self.class.acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'class_id') self.class_id = attributes[:'class_id'] else self.class_id = 'vmedia.Mapping' end if attributes.key?(:'object_type') self.object_type = attributes[:'object_type'] else self.object_type = 'vmedia.Mapping' end if attributes.key?(:'authentication_protocol') self.authentication_protocol = attributes[:'authentication_protocol'] else self.authentication_protocol = 'none' end if attributes.key?(:'device_type') self.device_type = attributes[:'device_type'] else self.device_type = 'cdd' end if attributes.key?(:'file_location') self.file_location = attributes[:'file_location'] end if attributes.key?(:'host_name') self.host_name = attributes[:'host_name'] end if attributes.key?(:'is_password_set') self.is_password_set = attributes[:'is_password_set'] else self.is_password_set = false end if attributes.key?(:'mount_options') self. = attributes[:'mount_options'] end if attributes.key?(:'mount_protocol') self.mount_protocol = attributes[:'mount_protocol'] else self.mount_protocol = 'nfs' end if attributes.key?(:'password') self.password = attributes[:'password'] end if attributes.key?(:'remote_file') self.remote_file = attributes[:'remote_file'] end if attributes.key?(:'remote_path') self.remote_path = attributes[:'remote_path'] end if attributes.key?(:'sanitized_file_location') self.sanitized_file_location = attributes[:'sanitized_file_location'] end if attributes.key?(:'username') self.username = attributes[:'username'] end if attributes.key?(:'volume_name') self.volume_name = attributes[:'volume_name'] end end |
Instance Attribute Details
#authentication_protocol ⇒ Object
Type of Authentication protocol when CIFS is used for communication with the remote server. * none - No authentication is used. * ntlm - NT LAN Manager (NTLM) security protocol. Use this option only with Windows 2008 R2 and Windows 2012 R2. * ntlmi - NTLMi security protocol. Use this option only when you enable Digital Signing in the CIFS Windows server. * ntlmv2 - NTLMv2 security protocol. Use this option only with Samba Linux. * ntlmv2i - NTLMv2i security protocol. Use this option only with Samba Linux. * ntlmssp - NT LAN Manager Security Support Provider (NTLMSSP) protocol. Use this option only with Windows 2008 R2 and Windows 2012 R2. * ntlmsspi - NTLMSSPi protocol. Use this option only when you enable Digital Signing in the CIFS Windows server.
26 27 28 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 26 def authentication_protocol @authentication_protocol end |
#class_id ⇒ Object
The fully-qualified name of the instantiated, concrete type. This property is used as a discriminator to identify the type of the payload when marshaling and unmarshaling data.
20 21 22 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 20 def class_id @class_id end |
#device_type ⇒ Object
Type of remote Virtual Media device. * cdd - Uses compact disc drive as the virtual media mount device. * hdd - Uses hard disk drive as the virtual media mount device.
29 30 31 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 29 def device_type @device_type end |
#file_location ⇒ Object
Remote location of image. Preferred format is ‘hostname/filePath/fileName’.
32 33 34 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 32 def file_location @file_location end |
#host_name ⇒ Object
IP address or hostname of the remote server.
35 36 37 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 35 def host_name @host_name end |
#is_password_set ⇒ Object
Indicates whether the value of the ‘password’ property has been set.
38 39 40 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 38 def is_password_set @is_password_set end |
#mount_options ⇒ Object
Mount options for the Virtual Media mapping. The field can be left blank or filled in a comma separated list with the following options.\n For NFS, supported options are ro, rw, nolock, noexec, soft, port=VALUE, timeo=VALUE, retry=VALUE.\n For CIFS, supported options are soft, nounix, noserverino, guest.\n For CIFS version < 3.0, vers=VALUE is mandatory. e.g. vers=2.0\n For HTTP/HTTPS, the only supported option is noauto.
41 42 43 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 41 def end |
#mount_protocol ⇒ Object
Protocol to use to communicate with the remote server. * nfs - NFS protocol for vmedia mount. * cifs - CIFS protocol for vmedia mount. * http - HTTP protocol for vmedia mount. * https - HTTPS protocol for vmedia mount.
44 45 46 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 44 def mount_protocol @mount_protocol end |
#object_type ⇒ Object
The fully-qualified name of the instantiated, concrete type. The value should be the same as the ‘ClassId’ property.
23 24 25 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 23 def object_type @object_type end |
#password ⇒ Object
Password associated with the username.
47 48 49 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 47 def password @password end |
#remote_file ⇒ Object
The remote file location path for the virtual media mapping. Accepted formats are: HDD for CIFS/NFS: hostname-or-IP/filePath/fileName.img. CDD for CIFS/NFS: hostname-or-IP/filePath/fileName.iso. HDD for HTTP/S: http://hostname-or-IP/filePath/fileName.img. CDD for HTTP/S: http://hostname-or-IP/filePath/fileName.iso.
50 51 52 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 50 def remote_file @remote_file end |
#remote_path ⇒ Object
URL path to the location of the image on the remote server. The preferred format is ‘/path’.
53 54 55 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 53 def remote_path @remote_path end |
#sanitized_file_location ⇒ Object
File Location in standard format ‘hostname/filePath/fileName’. This field should be used to calculate config drift. User input format may vary while inventory will return data in format in compliance with mount option for the mount. Both will be converged to this standard format for comparison.
56 57 58 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 56 def sanitized_file_location @sanitized_file_location end |
#username ⇒ Object
Username to log in to the remote server.
59 60 61 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 59 def username @username end |
#volume_name ⇒ Object
Identity of the image for Virtual Media mapping.
62 63 64 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 62 def volume_name @volume_name end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns the key-value map of all the JSON attributes this model knows about
113 114 115 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 113 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
108 109 110 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 108 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 87 def self.attribute_map { :'class_id' => :'ClassId', :'object_type' => :'ObjectType', :'authentication_protocol' => :'AuthenticationProtocol', :'device_type' => :'DeviceType', :'file_location' => :'FileLocation', :'host_name' => :'HostName', :'is_password_set' => :'IsPasswordSet', :'mount_options' => :'MountOptions', :'mount_protocol' => :'MountProtocol', :'password' => :'Password', :'remote_file' => :'RemoteFile', :'remote_path' => :'RemotePath', :'sanitized_file_location' => :'SanitizedFileLocation', :'username' => :'Username', :'volume_name' => :'VolumeName' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
511 512 513 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 511 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
139 140 141 142 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 139 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 118 def self.openapi_types { :'class_id' => :'String', :'object_type' => :'String', :'authentication_protocol' => :'String', :'device_type' => :'String', :'file_location' => :'String', :'host_name' => :'String', :'is_password_set' => :'Boolean', :'mount_options' => :'String', :'mount_protocol' => :'String', :'password' => :'String', :'remote_file' => :'String', :'remote_path' => :'String', :'sanitized_file_location' => :'String', :'username' => :'String', :'volume_name' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 476 def ==(o) return true if self.equal?(o) self.class == o.class && class_id == o.class_id && object_type == o.object_type && authentication_protocol == o.authentication_protocol && device_type == o.device_type && file_location == o.file_location && host_name == o.host_name && is_password_set == o.is_password_set && == o. && mount_protocol == o.mount_protocol && password == o.password && remote_file == o.remote_file && remote_path == o.remote_path && sanitized_file_location == o.sanitized_file_location && username == o.username && volume_name == o.volume_name end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 541 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = IntersightClient.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
612 613 614 615 616 617 618 619 620 621 622 623 624 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 612 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 518 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) VmediaMappingAllOf.openapi_types.each_pair do |key, type| if attributes[VmediaMappingAllOf.attribute_map[key]].nil? && VmediaMappingAllOf.openapi_nullable.include?(key) self.send("#{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[VmediaMappingAllOf.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[VmediaMappingAllOf.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[VmediaMappingAllOf.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[VmediaMappingAllOf.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
498 499 500 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 498 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
504 505 506 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 504 def hash [class_id, object_type, authentication_protocol, device_type, file_location, host_name, is_password_set, , mount_protocol, password, remote_file, remote_path, sanitized_file_location, username, volume_name].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 234 def list_invalid_properties invalid_properties = Array.new if @class_id.nil? invalid_properties.push('invalid value for "class_id", class_id cannot be nil.') end if @object_type.nil? invalid_properties.push('invalid value for "object_type", object_type cannot be nil.') end if !.nil? && .to_s.length > 248 invalid_properties.push('invalid value for "mount_options", the character length must be smaller than or equal to 248.') end if !.nil? && .to_s.length < 0 invalid_properties.push('invalid value for "mount_options", the character length must be great than or equal to 0.') end if !@password.nil? && @password.to_s.length > 255 invalid_properties.push('invalid value for "password", the character length must be smaller than or equal to 255.') end if !@password.nil? && @password.to_s.length < 0 invalid_properties.push('invalid value for "password", the character length must be great than or equal to 0.') end if !@remote_file.nil? && @remote_file.to_s.length > 235 invalid_properties.push('invalid value for "remote_file", the character length must be smaller than or equal to 235.') end if !@remote_file.nil? && @remote_file.to_s.length < 0 invalid_properties.push('invalid value for "remote_file", the character length must be great than or equal to 0.') end pattern = Regexp.new(/^$|^[ !#$%\(\)\+,\-\.:\?@\[\]_\{\}=~a-zA-Z0-9]+$/) if !@remote_file.nil? && @remote_file !~ pattern invalid_properties.push("invalid value for \"remote_file\", must conform to the pattern #{pattern}.") end pattern = Regexp.new(/^$|^[ !#$%\(\)\+,\-\.\/:\?@\[\]_\{\}=~a-zA-Z0-9]+$/) if !@remote_path.nil? && @remote_path !~ pattern invalid_properties.push("invalid value for \"remote_path\", must conform to the pattern #{pattern}.") end if !@username.nil? && @username.to_s.length > 255 invalid_properties.push('invalid value for "username", the character length must be smaller than or equal to 255.') end if !@username.nil? && @username.to_s.length < 0 invalid_properties.push('invalid value for "username", the character length must be great than or equal to 0.') end if !@volume_name.nil? && @volume_name.to_s.length > 47 invalid_properties.push('invalid value for "volume_name", the character length must be smaller than or equal to 47.') end if !@volume_name.nil? && @volume_name.to_s.length < 1 invalid_properties.push('invalid value for "volume_name", the character length must be great than or equal to 1.') end pattern = Regexp.new(/^[\-\.:_a-zA-Z0-9]+$/) if !@volume_name.nil? && @volume_name !~ pattern invalid_properties.push("invalid value for \"volume_name\", must conform to the pattern #{pattern}.") end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
588 589 590 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 588 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
594 595 596 597 598 599 600 601 602 603 604 605 606 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 594 def to_hash hash = {} VmediaMappingAllOf.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = VmediaMappingAllOf.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
582 583 584 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 582 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
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 |
# File 'lib/intersight_client/models/vmedia_mapping_all_of.rb', line 304 def valid? return false if @class_id.nil? class_id_validator = EnumAttributeValidator.new('String', ["vmedia.Mapping"]) return false unless class_id_validator.valid?(@class_id) return false if @object_type.nil? object_type_validator = EnumAttributeValidator.new('String', ["vmedia.Mapping"]) return false unless object_type_validator.valid?(@object_type) authentication_protocol_validator = EnumAttributeValidator.new('String', ["none", "ntlm", "ntlmi", "ntlmv2", "ntlmv2i", "ntlmssp", "ntlmsspi"]) return false unless authentication_protocol_validator.valid?(@authentication_protocol) device_type_validator = EnumAttributeValidator.new('String', ["cdd", "hdd"]) return false unless device_type_validator.valid?(@device_type) return false if !.nil? && .to_s.length > 248 return false if !.nil? && .to_s.length < 0 mount_protocol_validator = EnumAttributeValidator.new('String', ["nfs", "cifs", "http", "https"]) return false unless mount_protocol_validator.valid?(@mount_protocol) return false if !@password.nil? && @password.to_s.length > 255 return false if !@password.nil? && @password.to_s.length < 0 return false if !@remote_file.nil? && @remote_file.to_s.length > 235 return false if !@remote_file.nil? && @remote_file.to_s.length < 0 return false if !@remote_file.nil? && @remote_file !~ Regexp.new(/^$|^[ !#$%\(\)\+,\-\.:\?@\[\]_\{\}=~a-zA-Z0-9]+$/) return false if !@remote_path.nil? && @remote_path !~ Regexp.new(/^$|^[ !#$%\(\)\+,\-\.\/:\?@\[\]_\{\}=~a-zA-Z0-9]+$/) return false if !@username.nil? && @username.to_s.length > 255 return false if !@username.nil? && @username.to_s.length < 0 return false if !@volume_name.nil? && @volume_name.to_s.length > 47 return false if !@volume_name.nil? && @volume_name.to_s.length < 1 return false if !@volume_name.nil? && @volume_name !~ Regexp.new(/^[\-\.:_a-zA-Z0-9]+$/) true end |