// ApplyRouteTable applies the given Router middleware to the given Router.
10523
func ApplyRouteTable(r transport.RouteTable, m Router) transport.RouteTable {
	if m == nil {
		return r
	}
	return routeTableWithMiddleware{r: r, m: m}
}
744284
func (o *GenericControllerManagerConfigurationOptions) ApplyTo(cfg *kubectrlmgrconfig.GenericControllerManagerConfiguration) error {
	if o == nil {
		return nil
	}

	if err := o.Debugging.ApplyTo(&cfg.Debugging); err != nil {
		return err
	}

	cfg.Port = o.Port
	cfg.Address = o.Address
	cfg.MinResyncPeriod = o.MinResyncPeriod
	cfg.ClientConnection = o.ClientConnection
	cfg.ControllerStartInterval = o.ControllerStartInterval
	cfg.LeaderElection = o.LeaderElection
	cfg.Controllers = o.Controllers

	return nil
}
880914
func applyTrinary(q *ds.Query, v logdog.QueryRequest_Trinary, f func(*ds.Query, bool) *ds.Query) *ds.Query {
	switch v {
	case logdog.QueryRequest_YES:
		return f(q, true)

	case logdog.QueryRequest_NO:
		return f(q, false)

	default:
		// Default is "both".
		return q
	}
}
311996
func (r *SubRouter) PUT(route string, handler interface{}) *SubRouter {
	route = r.prefixedRoute(route)
	if r.parent != nil {
		r.parent.handleReg(MethodPUT, route, handler, r.prefixes)
	}

	return r
}
430264
func (r *Router) ANY(pattern string, handler func(Context)) Route {
	rt := r.Handle(allowedHTTPMethods[0], pattern, wrap(handler)).(*route)
	rt.withMethods(r.middlewares.BuildHandler(wrap(handler)), allowedHTTPMethods[1:]...)
	return rt
}
527545
func (client *Client) GetRouteApplications(routeGUID string, filters ...Filter) ([]Application, Warnings, error) {
	request, err := client.newHTTPRequest(requestOptions{
		RequestName: internal.GetRouteAppsRequest,
		URIParams:   map[string]string{"route_guid": routeGUID},
		Query:       ConvertFilterParameters(filters),
	})
	if err != nil {
		return nil, nil, err
	}

	var fullAppsList []Application
	warnings, err := client.paginate(request, Application{}, func(item interface{}) error {
		if app, ok := item.(Application); ok {
			fullAppsList = append(fullAppsList, app)
		} else {
			return ccerror.UnknownObjectInListError{
				Expected:   Application{},
				Unexpected: item,
			}
		}
		return nil
	})

	return fullAppsList, warnings, err
}
438340
func (o *ReplicaSetControllerOptions) ApplyTo(cfg *replicasetconfig.ReplicaSetControllerConfiguration) error {
	if o == nil {
		return nil
	}

	cfg.ConcurrentRSSyncs = o.ConcurrentRSSyncs

	return nil
}
1111846
func (c *Context) RoutesHandler(builder Builder) http.Handler {
	b := builder
	if b == nil {
		b = PassthroughBuilder
	}
	return NewRouter(c, b(NewOperationExecutor(c)))
}
918218
func (o *PersistentVolumeBinderControllerOptions) ApplyTo(cfg *persistentvolumeconfig.PersistentVolumeBinderControllerConfiguration) error {
	if o == nil {
		return nil
	}

	cfg.PVClaimBinderSyncPeriod = o.PVClaimBinderSyncPeriod
	cfg.VolumeConfiguration = o.VolumeConfiguration

	return nil
}
1319565
func (az *Cloud) createOrUpdateRouteTableWithRetry(routeTable network.RouteTable) error {
	return wait.ExponentialBackoff(az.requestBackoff(), func() (bool, error) {
		ctx, cancel := getContextWithCancel()
		defer cancel()

		resp, err := az.RouteTablesClient.CreateOrUpdate(ctx, az.RouteTableResourceGroup, az.RouteTableName, routeTable)
		return az.processHTTPRetryResponse(nil, "", resp, err)
	})
}
1351967
func (s *SpamCheckSetting) SetEnable(enable bool) *SpamCheckSetting {
	setEnable := enable
	s.Enable = &setEnable
	return s
}
334909
func (s *GetMappingService) IgnoreUnavailable(ignoreUnavailable bool) *GetMappingService {
	s.ignoreUnavailable = &ignoreUnavailable
	return s
}
1092197
func (pb *primitiveBuilder) processDMLTable(tableExprs sqlparser.TableExprs) (*routeOption, error) {
	if err := pb.processTableExprs(tableExprs); err != nil {
		return nil, err
	}
	rb, ok := pb.bldr.(*route)
	if !ok {
		return nil, errors.New("unsupported: multi-shard or vindex write statement")
	}
	ro := rb.routeOptions[0]
	for _, sub := range ro.substitutions {
		*sub.oldExpr = *sub.newExpr
	}
	return ro, nil
}
793897
func (s *IndicesFlushService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesFlushService {
	s.ignoreUnavailable = &ignoreUnavailable
	return s
}
1095095
func (format *StreamRoute) ApplyFormatter(msg *core.Message) error {
	content := format.GetAppliedContent(msg)
	delimiterIdx := bytes.Index(content, format.delimiter)

	switch delimiterIdx {
	case 0:
		content = content[len(format.delimiter):]
		format.SetAppliedContent(msg, content)
	case -1:
		// no prefix

	default:
		streamName := content[:delimiterIdx]
		streamMsg := core.NewMessage(nil, streamName, nil, msg.GetStreamID())

		content = content[(delimiterIdx + len(format.delimiter)):]
		format.SetAppliedContent(msg, content)

		switch result := format.streamModulators.Modulate(streamMsg); result {
		case core.ModulateResultDiscard, core.ModulateResultFallback:
			return nil // ### return, rule based early out ###
		}

		targetStreamID := core.GetStreamID(streamMsg.String())
		if msg.GetStreamID() != targetStreamID {
			msg.SetStreamID(targetStreamID)
		}
	}

	return nil
}
988823
func (o *ServiceControllerOptions) ApplyTo(cfg *serviceconfig.ServiceControllerConfiguration) error {
	if o == nil {
		return nil
	}

	cfg.ConcurrentServiceSyncs = o.ConcurrentServiceSyncs

	return nil
}
971980
func (az *Cloud) CreateOrUpdateRouteTable(routeTable network.RouteTable) error {
	if az.Config.shouldOmitCloudProviderBackoff() {
		ctx, cancel := getContextWithCancel()
		defer cancel()

		resp, err := az.RouteTablesClient.CreateOrUpdate(ctx, az.RouteTableResourceGroup, az.RouteTableName, routeTable)
		return az.processHTTPResponse(nil, "", resp, err)
	}

	return az.createOrUpdateRouteTableWithRetry(routeTable)
}