vsphere/internal/vmworkflow/virtual_machine_customize_subresource.go
func expandCustomizationGuiUnattended(d *schema.ResourceData) types.CustomizationGuiUnattended {
	obj := types.CustomizationGuiUnattended{
		TimeZone:       int32(d.Get(cWindowsKeyPrefix + "." + "time_zone").(int)),
		AutoLogon:      d.Get(cWindowsKeyPrefix + "." + "auto_logon").(bool),
		AutoLogonCount: int32(d.Get(cWindowsKeyPrefix + "." + "auto_logon_count").(int)),
	}
	if v, ok := d.GetOk(cWindowsKeyPrefix + "." + "admin_password"); ok {
		obj.Password = &types.CustomizationPassword{
			Value:     v.(string),
			PlainText: true,
		}
	}

	return obj
}
func expandCustomizationGuiUnattended(d *schema.ResourceData) types.CustomizationGuiUnattended {
	obj := types.CustomizationGuiUnattended{
		TimeZone:       int32(d.Get(cWindowsKeyPrefix + "." + "time_zone").(int)),
		AutoLogon:      d.Get(cWindowsKeyPrefix + "." + "auto_logon").(bool),
		AutoLogonCount: int32(d.Get(cWindowsKeyPrefix + "." + "auto_logon_count").(int)),
	}
	if v, ok := d.GetOk(cWindowsKeyPrefix + "." + "admin_password"); ok {
		obj.Password = &types.CustomizationPassword{
			Value:     v.(string),
			PlainText: true,
		}
	}

	return obj
}
// expandCustomizationGuiUnattended reads certain ResourceData keys and
// returns a CustomizationGuiUnattended.