// WithMaxActive returns a new copy of the options with the MaxActive property
// set to the given value. It does not mutate the original options.
438465
func (options PoolOptions) WithMaxActive(maxActive int) PoolOptions {
	options.MaxActive = maxActive
	return options
}
175176
func (r *Random) WithMax(max float64) *Random {
	r.max = &max
	return r
}
1033530
func (t *Collection) MaxItem(withValue bool) (*Item, error) {
	return t.store.walk(t, withValue,
		func(n *node) (*nodeLoc, bool) { return &n.right, true })
}
140789
func (this *HttpClient) WithOptions(m Map) *HttpClient {
	options, _ := parseMap(m)
	for k, v := range options {
		this.WithOption(k, v)
	}

	return this
}
405476
func WithOption(key, value string) func(*types.NetworkCreate) {
	return func(n *types.NetworkCreate) {
		if n.Options == nil {
			n.Options = map[string]string{}
		}
		n.Options[key] = value
	}
}
50268
func WithMaxSegmentBytes(max int64) OptionFunc {
	return func(c *CommitLog) error {
		if max > 0 {
			c.maxSegmentBytes = max
		}
		return nil
	}
}
1363050
func (ta *TrackAttributes) MaxMode(mode int) *TrackAttributes {
	ta.intAttributes["max_mode"] = mode
	return ta
}
76961
func (mc MongoClient) IntervalActionsWithLimit(limit int) ([]contract.IntervalAction, error) {
	return mapIntervalActions(mc.getIntervalActionsLimit(bson.M{}, limit))
}
809903
func (a *SetTouchEmulationEnabledArgs) SetMaxTouchPoints(maxTouchPoints int) *SetTouchEmulationEnabledArgs {
	a.MaxTouchPoints = &maxTouchPoints
	return a
}
475542
func (s *IntegerParameterRange) SetMaxValue(v string) *IntegerParameterRange {
	s.MaxValue = &v
	return s
}
1345276
func MaxWaitTime(value time.Duration) Option {
	return func(o *Options) {
		o.maxWaitTime = value
	}
}
913275
func (client *WANCommonInterfaceConfig1) GetMaximumActiveConnections() (NewMaximumActiveConnections uint16, err error) {
	// Request structure.
	request := interface{}(nil)
	// BEGIN Marshal arguments into request.

	// END Marshal arguments into request.

	// Response structure.
	response := &struct {
		NewMaximumActiveConnections string
	}{}

	// Perform the SOAP call.
	if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetMaximumActiveConnections", request, response); err != nil {
		return
	}

	// BEGIN Unmarshal arguments from response.

	if NewMaximumActiveConnections, err = soap.UnmarshalUi2(response.NewMaximumActiveConnections); err != nil {
		return
	}
	// END Unmarshal arguments from response.
	return
}
616827
func WithAction(ctx context.Context, action string) context.Context {
	return context.WithValue(ctx, actionKey, action)
}
1158249
func (s *UpdateProvisioningArtifactInput) SetActive(v bool) *UpdateProvisioningArtifactInput {
	s.Active = &v
	return s
}
471982
func (s *ResourceQuota) SetMaximum(v int64) *ResourceQuota {
	s.Maximum = &v
	return s
}
935353
func SetMaxInt(max int64) integerRuleOpt {
	return func(i *rpc.IntegerRule) {
		i.Maximum = max
		i.HasMax = true
	}
}
1113144
func (v *vaultClient) SetActive(active bool) {
	if active {
		atomic.StoreInt32(&v.active, 1)
	} else {
		atomic.StoreInt32(&v.active, 0)
	}

	// Clear out the revoking tokens
	v.revLock.Lock()
	v.revoking = make(map[*structs.VaultAccessor]time.Time)
	v.revLock.Unlock()

	return
}