func (as AgentSettings) AttachPersistentDisk(diskID string, updateSetting []byte) (AgentSettings, error) {
	persistenDiskSettings := make(map[string]PersistentSettings)

	var persistentSetting PersistentSettings
	err := json.Unmarshal(updateSetting, &persistentSetting)
	if err != nil {
		return as, err
	}

	persistenDiskSettings[diskID] = persistentSetting
	as.Disks.Persistent = persistenDiskSettings

	return as, nil
}
func (as AgentSettings) AttachPersistentDisk(diskID string, updateSetting []byte) (AgentSettings, error) {
	persistenDiskSettings := make(map[string]PersistentSettings)

	var persistentSetting PersistentSettings
	err := json.Unmarshal(updateSetting, &persistentSetting)
	if err != nil {
		return as, err
	}

	persistenDiskSettings[diskID] = persistentSetting
	as.Disks.Persistent = persistenDiskSettings

	return as, nil
}
func ( as AgentSettings ) AttachPersistentDisk ( diskID string , updateSetting [ ] byte ) ( AgentSettings , error ) { persistenDiskSettings := make ( map [ string ] PersistentSettings ) var persistentSetting PersistentSettings err := json . Unmarshal ( updateSetting , & persistentSetting ) if err != nil { return as , err } persistenDiskSettings [ diskID ] = persistentSetting as . Disks . Persistent = persistenDiskSettings return as , nil }
// AttachPersistentDisk updates the agent settings in order to add an attached persistent disk.
AttachPersistentDisk updates the agent settings in order to add an attached persistent disk .