// NewForcePseudoStateArgs initializes ForcePseudoStateArgs with the required arguments.
353725
func NewForcePseudoStateArgs(nodeID dom.NodeID, forcedPseudoClasses []string) *ForcePseudoStateArgs {
	args := new(ForcePseudoStateArgs)
	args.NodeID = nodeID
	args.ForcedPseudoClasses = forcedPseudoClasses
	return args
}
1019468
func NewProtobufEvent(e *com_signalfx_metrics_protobuf.Event) (*event.Event, error) {
	dims := make(map[string]string, len(e.GetDimensions())+1)
	edims := e.GetDimensions()
	for _, dpdim := range edims {
		dims[dpdim.GetKey()] = dpdim.GetValue()
	}

	// sure wish protobuf has something eqiv of interface{} instead of only union structs...
	// <sigh>
	props := make(map[string]interface{}, len(e.GetDimensions())+1)
	for _, dpdim := range e.GetProperties() {
		pval := dpdim.GetValue()
		pkey := dpdim.GetKey()
		if pval.StrValue != nil {
			props[pkey] = pval.GetStrValue()
		} else if pval.BoolValue != nil {
			props[pkey] = pval.GetBoolValue()
		} else if pval.DoubleValue != nil {
			props[pkey] = pval.GetDoubleValue()
		} else if pval.IntValue != nil {
			props[pkey] = pval.GetIntValue()
		} else {
			return nil, errPropertyValueNotSet
		}
	}

	cat := event.ToProtoEC(e.GetCategory())
	return event.NewWithProperties(e.GetEventType(), cat, dims, props, fromTs(e.GetTimestamp())), nil
}
583782
func NewGetBootstrapConfigParamsFunc(
	ctx *cmd.Context,
	store jujuclient.ClientStore,
	providerRegistry environs.ProviderRegistry,
) func(string) (*jujuclient.BootstrapConfig, *environs.PrepareConfigParams, error) {
	return bootstrapConfigGetter{ctx, store, providerRegistry}.getBootstrapConfigParams
}
264780
func NewDispatchTouchEventArgs(typ string, touchPoints []TouchPoint) *DispatchTouchEventArgs {
	args := new(DispatchTouchEventArgs)
	args.Type = typ
	args.TouchPoints = touchPoints
	return args
}
347607
func (e *Enforcer) AddNamedPolicySafe(ptype string, params ...interface{}) (result bool, err error) {
	defer func() {
		if r := recover(); r != nil {
			err = fmt.Errorf("%v", r)
			result = false
		}
	}()

	result = e.AddNamedPolicy(ptype, params...)
	err = nil
	return
}
26334
func NewBuilderFromRepo(gun data.GUN, repo *Repo, trustpin trustpinning.TrustPinConfig) RepoBuilder {
	return &repoBuilderWrapper{
		RepoBuilder: &repoBuilder{
			repo:                 repo,
			invalidRoles:         NewRepo(nil),
			gun:                  gun,
			trustpin:             trustpin,
			loadedNotChecksummed: make(map[data.RoleName][]byte),
		},
	}
}
996499
func NewPocketBeagleAdaptor() *PocketBeagleAdaptor {
	a := NewAdaptor()
	a.SetName(gobot.DefaultName("PocketBeagle"))
	a.pinMap = pocketBeaglePinMap
	a.pwmPinMap = pocketBeaglePwmPinMap
	a.analogPinMap = pocketBeagleAnalogPinMap

	return &PocketBeagleAdaptor{
		Adaptor: a,
	}
}
650142
func NewKBFSOpsStandard(appStateUpdater env.AppStateUpdater, config Config) *KBFSOpsStandard {
	log := config.MakeLogger("")
	quLog := config.MakeLogger(QuotaUsageLogModule("KBFSOps"))
	kops := &KBFSOpsStandard{
		appStateUpdater:       appStateUpdater,
		config:                config,
		log:                   log,
		deferLog:              log.CloneWithAddedDepth(1),
		ops:                   make(map[data.FolderBranch]*folderBranchOps),
		opsByFav:              make(map[favorites.Folder]*folderBranchOps),
		reIdentifyControlChan: make(chan chan<- struct{}),
		favs:                  NewFavorites(config),
		quotaUsage: NewEventuallyConsistentQuotaUsage(
			config, quLog, config.MakeVLogger(quLog)),
		longOperationDebugDumper: NewImpatientDebugDumper(
			config, longOperationDebugDumpDuration),
		currentStatus: &kbfsCurrentStatus{},
	}
	kops.currentStatus.Init()
	go kops.markForReIdentifyIfNeededLoop()
	return kops
}
413872
func (s *LoadBalancerService) NewUpdateLBStickinessPolicyParams(id string) *UpdateLBStickinessPolicyParams {
	p := &UpdateLBStickinessPolicyParams{}
	p.p = make(map[string]interface{})
	p.p["id"] = id
	return p
}
1019775
func NewAddPet(ctx *middleware.Context, handler AddPetHandler) *AddPet {
	return &AddPet{Context: ctx, Handler: handler}
}
809438
func NewPaperExternalViewDefaultTeamDetails(EventUuid string) *PaperExternalViewDefaultTeamDetails {
	s := new(PaperExternalViewDefaultTeamDetails)
	s.EventUuid = EventUuid
	return s
}
66961
func (tmp *TieredMergePolicy) SetForceMergeDeletesPctAllowed(v float64) *TieredMergePolicy {
	assert2(v >= 0 && v <= 100, fmt.Sprintf("forceMergeDeletesPctAllowed must be between 0 and 100 inclusive (got %v)", v))
	tmp.forceMergeDeletesPctAllowed = v
	return tmp
}
1308211
func (p *Plugin) NewAsyncPublisherToPartition(connectionName string, topic string, partition int32, successClb func(messaging.ProtoMessage), errorClb func(messaging.ProtoMessageErr)) (messaging.ProtoPublisher, error) {
	return p.NewProtoManualConnection(connectionName).NewAsyncPublisherToPartition(topic, partition, successClb, errorClb)
}
196190
func NewPubControl(config []map[string]interface{}) *PubControl {
	pc := new(PubControl)
	pc.clients = make([]*PubControlClient, 0)
	if config != nil && len(config) > 0 {
		pc.ApplyConfig(config)
	}
	return pc
}
1119857
func NewCachedEnforcer(params ...interface{}) *CachedEnforcer {
	e := &CachedEnforcer{}
	e.Enforcer = NewEnforcer(params...)
	e.enableCache = true
	e.m = make(map[string]bool)
	e.locker = new(sync.Mutex)
	return e
}
1271135
func NewAppUnlinkTeamDetails(AppInfo IsAppLogInfo) *AppUnlinkTeamDetails {
	s := new(AppUnlinkTeamDetails)
	s.AppInfo = AppInfo
	return s
}
441150
func (c *ModelCommandBase) NewAPIRoot() (api.Connection, error) {
	// We need to call ModelDetails() here and not just ModelName() to force
	// a refresh of the internal model details if those are not yet stored locally.
	modelName, _, err := c.ModelDetails()
	if err != nil {
		return nil, errors.Trace(err)
	}
	return c.newAPIRoot(modelName)
}