Class: Azure::ARM::Compute::Models::AdditionalUnattendContent
- Inherits:
-
Object
- Object
- Azure::ARM::Compute::Models::AdditionalUnattendContent
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_compute/models/additional_unattend_content.rb
Overview
Gets or sets additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is a applied.
Instance Attribute Summary collapse
-
#component_name ⇒ ComponentNames
the only allowable value is Microsoft-Windows-Shell-Setup.
-
#content ⇒ String
the unattend.xml file in the specified pass and component.The XML must be less than 4 KB and must include the root element for the setting or feature that is being inserted.
-
#pass_name ⇒ PassNames
allowable value is oobeSystem.
-
#setting_name ⇒ SettingNames
FirstLogonCommands, AutoLogon ).
Class Method Summary collapse
-
.deserialize_object(object) ⇒ AdditionalUnattendContent
Deserializes given Ruby Hash into Model object.
-
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
Instance Method Summary collapse
-
#validate ⇒ Object
Validate the object.
Instance Attribute Details
#component_name ⇒ ComponentNames
the only allowable value is Microsoft-Windows-Shell-Setup. Possible values for this property include: ‘Microsoft-Windows-Shell-Setup’.
26 27 28 |
# File 'lib/azure_mgmt_compute/models/additional_unattend_content.rb', line 26 def component_name @component_name end |
#content ⇒ String
the unattend.xml file in the specified pass and component.The XML must be less than 4 KB and must include the root element for the setting or feature that is being inserted.
37 38 39 |
# File 'lib/azure_mgmt_compute/models/additional_unattend_content.rb', line 37 def content @content end |
#pass_name ⇒ PassNames
allowable value is oobeSystem. Possible values for this property include: ‘oobeSystem’.
21 22 23 |
# File 'lib/azure_mgmt_compute/models/additional_unattend_content.rb', line 21 def pass_name @pass_name end |
#setting_name ⇒ SettingNames
FirstLogonCommands, AutoLogon ). Possible values for this property include: ‘AutoLogon’, ‘FirstLogonCommands’.
31 32 33 |
# File 'lib/azure_mgmt_compute/models/additional_unattend_content.rb', line 31 def setting_name @setting_name end |
Class Method Details
.deserialize_object(object) ⇒ AdditionalUnattendContent
Deserializes given Ruby Hash into Model object.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/azure_mgmt_compute/models/additional_unattend_content.rb', line 74 def self.deserialize_object(object) return if object.nil? output_object = AdditionalUnattendContent.new deserialized_property = object['passName'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = PassNames.constants.any? { |e| PassNames.const_get(e).to_s.downcase == deserialized_property.downcase } fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) unless enum_is_valid end output_object.pass_name = deserialized_property deserialized_property = object['componentName'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = ComponentNames.constants.any? { |e| ComponentNames.const_get(e).to_s.downcase == deserialized_property.downcase } fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) unless enum_is_valid end output_object.component_name = deserialized_property deserialized_property = object['settingName'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = SettingNames.constants.any? { |e| SettingNames.const_get(e).to_s.downcase == deserialized_property.downcase } fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) unless enum_is_valid end output_object.setting_name = deserialized_property deserialized_property = object['content'] output_object.content = deserialized_property output_object.validate output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/azure_mgmt_compute/models/additional_unattend_content.rb', line 50 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.pass_name output_object['passName'] = serialized_property unless serialized_property.nil? serialized_property = object.component_name output_object['componentName'] = serialized_property unless serialized_property.nil? serialized_property = object.setting_name output_object['settingName'] = serialized_property unless serialized_property.nil? serialized_property = object.content output_object['content'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
42 43 |
# File 'lib/azure_mgmt_compute/models/additional_unattend_content.rb', line 42 def validate end |