vsphere/distributed_virtual_port_setting_structure.go
func flattenDVSSecurityPolicy(d *schema.ResourceData, obj *types.DVSSecurityPolicy) error {
	if obj == nil {
		return nil
	}

	structure.SetBoolPolicy(d, "allow_promiscuous", obj.AllowPromiscuous)
	structure.SetBoolPolicy(d, "allow_mac_changes", obj.MacChanges)
	structure.SetBoolPolicy(d, "allow_forged_transmits", obj.ForgedTransmits)
	return nil
}
func flattenDVSSecurityPolicy(d *schema.ResourceData, obj *types.DVSSecurityPolicy) error {
	if obj == nil {
		return nil
	}

	structure.SetBoolPolicy(d, "allow_promiscuous", obj.AllowPromiscuous)
	structure.SetBoolPolicy(d, "allow_mac_changes", obj.MacChanges)
	structure.SetBoolPolicy(d, "allow_forged_transmits", obj.ForgedTransmits)
	return nil
}
func flattenDVSSecurityPolicy ( d * schema . ResourceData , obj * types . DVSSecurityPolicy ) error { if obj == nil { return nil } structure . SetBoolPolicy ( d , " " , obj . AllowPromiscuous ) structure . SetBoolPolicy ( d , " " , obj . MacChanges ) structure . SetBoolPolicy ( d , " " , obj . ForgedTransmits ) return nil }
// flattenDVSSecurityPolicy reads various fields from a
// DVSSecurityPolicy into the passed in ResourceData.
flattenDVSSecurityPolicy reads various fields from a DVSSecurityPolicy into the passed in ResourceData .