vsphere/distributed_virtual_port_setting_structure.go
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
}
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
}
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 }
// flattenBaseVmwareDistributedVirtualSwitchVlanSpec reads various fields from a
// BaseVmwareDistributedVirtualSwitchVlanSpec into the passed in ResourceData.
flattenBaseVmwareDistributedVirtualSwitchVlanSpec reads various fields from a BaseVmwareDistributedVirtualSwitchVlanSpec into the passed in ResourceData .