func()

in step.go [92:211]


func (s *Step) stepImpl() (stepImpl, DError) {
	var result stepImpl
	matchCount := 0
	if s.AttachDisks != nil {
		matchCount++
		result = s.AttachDisks
	}
	if s.DetachDisks != nil {
		matchCount++
		result = s.DetachDisks
	}
	if s.CreateDisks != nil {
		matchCount++
		result = s.CreateDisks
	}
	if s.CreateForwardingRules != nil {
		matchCount++
		result = s.CreateForwardingRules
	}
	if s.CreateFirewallRules != nil {
		matchCount++
		result = s.CreateFirewallRules
	}
	if s.CreateImages != nil {
		matchCount++
		result = s.CreateImages
	}
	if s.CreateMachineImages != nil {
		matchCount++
		result = s.CreateMachineImages
	}
	if s.CreateInstances != nil {
		matchCount++
		result = s.CreateInstances
	}
	if s.CreateNetworks != nil {
		matchCount++
		result = s.CreateNetworks
	}
	if s.CreateSnapshots != nil {
		matchCount++
		result = s.CreateSnapshots
	}
	if s.CreateSubnetworks != nil {
		matchCount++
		result = s.CreateSubnetworks
	}
	if s.CreateTargetInstances != nil {
		matchCount++
		result = s.CreateTargetInstances
	}
	if s.CopyGCSObjects != nil {
		matchCount++
		result = s.CopyGCSObjects
	}
	if s.ResizeDisks != nil {
		matchCount++
		result = s.ResizeDisks
	}
	if s.StartInstances != nil {
		matchCount++
		result = s.StartInstances
	}
	if s.StopInstances != nil {
		matchCount++
		result = s.StopInstances
	}
	if s.DeleteResources != nil {
		matchCount++
		result = s.DeleteResources
	}
	if s.DeprecateImages != nil {
		matchCount++
		result = s.DeprecateImages
	}
	if s.IncludeWorkflow != nil {
		matchCount++
		result = s.IncludeWorkflow
	}
	if s.SubWorkflow != nil {
		matchCount++
		result = s.SubWorkflow
	}
	if s.WaitForInstancesSignal != nil {
		matchCount++
		result = s.WaitForInstancesSignal
	}
	if s.WaitForAnyInstancesSignal != nil {
		matchCount++
		result = s.WaitForAnyInstancesSignal
	}
	if s.WaitForAvailableQuotas != nil {
		matchCount++
		result = s.WaitForAvailableQuotas
	}
	if s.UpdateInstancesMetadata != nil {
		matchCount++
		result = s.UpdateInstancesMetadata
	}
	if s.testType != nil {
		matchCount++
		result = s.testType
	}
	if s.Resume != nil {
		matchCount++
		result = s.Resume
	}
	if s.Suspend != nil {
		matchCount++
		result = s.Suspend
	}

	if matchCount == 0 {
		return nil, Errf("no step type defined")
	}
	if matchCount > 1 {
		return nil, Errf("multiple step types defined")
	}
	return result, nil
}