func flattenDatastoreSummary(d *schema.ResourceData, obj *types.DatastoreSummary) error {
	d.Set("accessible", obj.Accessible)
	d.Set("capacity", structure.ByteToMB(obj.Capacity))
	d.Set("free_space", structure.ByteToMB(obj.FreeSpace))
	d.Set("maintenance_mode", obj.MaintenanceMode)
	d.Set("multiple_host_access", obj.MultipleHostAccess)
	d.Set("uncommitted_space", structure.ByteToMB(obj.Uncommitted))
	d.Set("url", obj.Url)

	// Set the name attribute off of the name here - since we do not track this
	// here we check for errors
	if err := d.Set("name", obj.Name); err != nil {
		return err
	}
	return nil
}
func flattenDatastoreSummary(d *schema.ResourceData, obj *types.DatastoreSummary) error {
	d.Set("accessible", obj.Accessible)
	d.Set("capacity", structure.ByteToMB(obj.Capacity))
	d.Set("free_space", structure.ByteToMB(obj.FreeSpace))
	d.Set("maintenance_mode", obj.MaintenanceMode)
	d.Set("multiple_host_access", obj.MultipleHostAccess)
	d.Set("uncommitted_space", structure.ByteToMB(obj.Uncommitted))
	d.Set("url", obj.Url)

	
	
	if err := d.Set("name", obj.Name); err != nil {
		return err
	}
	return nil
}
func flattenDatastoreSummary ( d * schema . ResourceData , obj * types . DatastoreSummary ) error { d . Set ( " " , obj . Accessible ) d . Set ( " " , structure . ByteToMB ( obj . Capacity ) ) d . Set ( " " , structure . ByteToMB ( obj . FreeSpace ) ) d . Set ( " " , obj . MaintenanceMode ) d . Set ( " " , obj . MultipleHostAccess ) d . Set ( " " , structure . ByteToMB ( obj . Uncommitted ) ) d . Set ( " " , obj . Url ) // Set the name attribute off of the name here - since we do not track this // here we check for errors if err := d . Set ( " " , obj . Name ) ; err != nil { return err } return nil }
// flattenDatastoreSummary reads various fields from a DatastoreSummary into
// the passed in ResourceData.
flattenDatastoreSummary reads various fields from a DatastoreSummary into the passed in ResourceData .