Class: Azure::ARM::Compute::Models::AdditionalUnattendContent

Inherits:
Object
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#component_nameComponentNames

the only allowable value is Microsoft-Windows-Shell-Setup. Possible values for this property include: ‘Microsoft-Windows-Shell-Setup’.

Returns:



26
27
28
# File 'lib/azure_mgmt_compute/models/additional_unattend_content.rb', line 26

def component_name
  @component_name
end

#contentString

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.

Returns:

  • (String)

    Gets or sets XML formatted content that is added to



37
38
39
# File 'lib/azure_mgmt_compute/models/additional_unattend_content.rb', line 37

def content
  @content
end

#pass_namePassNames

allowable value is oobeSystem. Possible values for this property include: ‘oobeSystem’.

Returns:

  • (PassNames)

    Gets or sets the pass name. Currently, the only



21
22
23
# File 'lib/azure_mgmt_compute/models/additional_unattend_content.rb', line 21

def pass_name
  @pass_name
end

#setting_nameSettingNames

FirstLogonCommands, AutoLogon ). Possible values for this property include: ‘AutoLogon’, ‘FirstLogonCommands’.

Returns:



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.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



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.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of 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

#validateObject

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