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 include: ‘Microsoft-Windows-Shell-Setup’

Returns:



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

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



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

def content
  @content
end

#pass_namePassNames

allowable value is oobeSystem. Possible values include: ‘oobeSystem’

Returns:

  • (PassNames)

    Gets or sets the pass name. Currently, the only



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

def pass_name
  @pass_name
end

#setting_nameSettingNames

FirstLogonCommands, AutoLogon ). Possible values include: ‘AutoLogon’, ‘FirstLogonCommands’

Returns:



30
31
32
# File 'lib/azure_mgmt_compute/models/additional_unattend_content.rb', line 30

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:



73
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
# File 'lib/azure_mgmt_compute/models/additional_unattend_content.rb', line 73

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 }
    warn 'Enum PassNames does not contain ' + deserialized_property.downcase + ', but was received from the server.' 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 }
    warn 'Enum ComponentNames does not contain ' + deserialized_property.downcase + ', but was received from the server.' 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 }
    warn 'Enum SettingNames does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
  end
  output_object.setting_name = deserialized_property

  deserialized_property = object['content']
  output_object.content = deserialized_property

  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.



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/azure_mgmt_compute/models/additional_unattend_content.rb', line 49

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.



41
42
# File 'lib/azure_mgmt_compute/models/additional_unattend_content.rb', line 41

def validate
end