code: func expandDVSSecurityPolicy(d *schema.ResourceData) *types.DVSSecurityPolicy {
  	obj := &types.DVSSecurityPolicy{
  		AllowPromiscuous: structure.GetBoolPolicy(d, "allow_promiscuous"),
  		MacChanges:       structure.GetBoolPolicy(d, "allow_mac_changes"),
  		ForgedTransmits:  structure.GetBoolPolicy(d, "allow_forged_transmits"),
  	}
  
  	if structure.AllFieldsEmpty(obj) {
  		return nil
  	}
  	return obj
  }
docs: // expandDVSSecurityPolicy reads certain ResourceData keys and
  // returns a DVSSecurityPolicy.