code: func flattenBaseVmwareDistributedVirtualSwitchVlanSpec(d *schema.ResourceData, obj types.BaseVmwareDistributedVirtualSwitchVlanSpec) error {
  	if obj == nil {
  		return nil
  	}
  
  	var err error
  
  	switch t := obj.(type) {
  	case *types.VmwareDistributedVirtualSwitchVlanIdSpec:
  		err = flattenVmwareDistributedVirtualSwitchVlanIDSpec(d, t)
  	case *types.VmwareDistributedVirtualSwitchTrunkVlanSpec:
  		err = flattenVmwareDistributedVirtualSwitchTrunkVlanSpec(d, t)
  	case *types.VmwareDistributedVirtualSwitchPvlanSpec:
  		err = flattenVmwareDistributedVirtualSwitchPvlanSpec(d, t)
  	}
  
  	return err
  }
docs: // flattenBaseVmwareDistributedVirtualSwitchVlanSpec reads various fields from a
  // BaseVmwareDistributedVirtualSwitchVlanSpec into the passed in ResourceData.