// ConfigureRules mocks base method
// nolint
962501
func (m *MockImplementor) ConfigureRules(version int, contextID string, containerInfo *policy.PUInfo) error {
	ret := m.ctrl.Call(m, "ConfigureRules", version, contextID, containerInfo)
	ret0, _ := ret[0].(error)
	return ret0
}
392456
func (s *DescribeLoadBasedAutoScalingOutput) SetLoadBasedAutoScalingConfigurations(v []*LoadBasedAutoScalingConfiguration) *DescribeLoadBasedAutoScalingOutput {
	s.LoadBasedAutoScalingConfigurations = v
	return s
}
530990
func (conf *Config) ToRulesMap() RulesMap {
	rulesMap := make(RulesMap)

	for _, queue := range conf.QueueList {
		rulesMap.Add(queue.ToRulesMap())
	}

	return rulesMap
}
1177384
func (p *PostProcessor) Configure(raws ...interface{}) error {
	err := config.Decode(&p.config, &config.DecodeOpts{
		Interpolate:        true,
		InterpolateContext: &p.config.ctx,
		InterpolateFilter: &interpolate.RenderFilter{
			Exclude: []string{
				"oss_key_name",
			},
		},
	}, raws...)
	if err != nil {
		return err
	}

	errs := new(packer.MultiError)

	// Check and render oss_key_name
	if err = interpolate.Validate(p.config.OSSKey, &p.config.ctx); err != nil {
		errs = packer.MultiErrorAppend(
			errs, fmt.Errorf("Error parsing oss_key_name template: %s", err))
	}

	// Check we have alicloud access variables defined somewhere
	errs = packer.MultiErrorAppend(errs, p.config.AlicloudAccessConfig.Prepare(&p.config.ctx)...)

	// define all our required parameters
	templates := map[string]*string{
		"oss_bucket_name": &p.config.OSSBucket,
	}
	// Check out required params are defined
	for key, ptr := range templates {
		if *ptr == "" {
			errs = packer.MultiErrorAppend(
				errs, fmt.Errorf("%s must be set", key))
		}
	}

	// Anything which flagged return back up the stack
	if len(errs.Errors) > 0 {
		return errs
	}

	packer.LogSecretFilter.Set(p.config.AlicloudAccessKey, p.config.AlicloudSecretKey)
	log.Println(p.config)
	return nil
}
802102
func (p *Proxy) Configure(ctx context.Context, port string) {
	p.addToEndpointList(ctx, "localhost")
	p.addToEndpointList(ctx, "127.0.0.1")
}
372126
func (app *App) configureEvents(configuration *configuration.Configuration) {
	// Configure all of the endpoint sinks.
	var sinks []notifications.Sink
	for _, endpoint := range configuration.Notifications.Endpoints {
		if endpoint.Disabled {
			dcontext.GetLogger(app).Infof("endpoint %s disabled, skipping", endpoint.Name)
			continue
		}

		dcontext.GetLogger(app).Infof("configuring endpoint %v (%v), timeout=%s, headers=%v", endpoint.Name, endpoint.URL, endpoint.Timeout, endpoint.Headers)
		endpoint := notifications.NewEndpoint(endpoint.Name, endpoint.URL, notifications.EndpointConfig{
			Timeout:           endpoint.Timeout,
			Threshold:         endpoint.Threshold,
			Backoff:           endpoint.Backoff,
			Headers:           endpoint.Headers,
			IgnoredMediaTypes: endpoint.IgnoredMediaTypes,
			Ignore:            endpoint.Ignore,
		})

		sinks = append(sinks, endpoint)
	}

	// NOTE(stevvooe): Moving to a new queuing implementation is as easy as
	// replacing broadcaster with a rabbitmq implementation. It's recommended
	// that the registry instances also act as the workers to keep deployment
	// simple.
	app.events.sink = notifications.NewBroadcaster(sinks...)

	// Populate registry event source
	hostname, err := os.Hostname()
	if err != nil {
		hostname = configuration.HTTP.Addr
	} else {
		// try to pick the port off the config
		_, port, err := net.SplitHostPort(configuration.HTTP.Addr)
		if err == nil {
			hostname = net.JoinHostPort(hostname, port)
		}
	}

	app.events.source = notifications.SourceRecord{
		Addr:       hostname,
		InstanceID: dcontext.GetStringValue(app, "instance.id"),
	}
}
337953
func (s *ConfigurationService) ListConfigurations(p *ListConfigurationsParams) (*ListConfigurationsResponse, error) {
	resp, err := s.cs.newRequest("listConfigurations", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r ListConfigurationsResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}
501789
func (self *Commands) Configure(args *ConfigureArgs) error {
	if args == nil {
		args = &ConfigureArgs{}
	}

	defaults.SetDefaults(args)

	// Geolocation
	// ---------------------------------------------------------------------------------------------
	lat := args.Latitude
	lon := args.Longitude

	if lat != 0 && lon != 0 {
		if _, err := self.browser.Tab().RPC(`Emulation`, `setGeolocationOverride`, map[string]interface{}{
			`latitude`:  lat,
			`longitude`: lon,
			`accuracy`:  args.Accuracy,
		}); err != nil {
			return err
		}
	} else {
		self.browser.Tab().RPC(`Emulation`, `clearGeolocationOverride`, nil)
	}

	// User Agent
	// ---------------------------------------------------------------------------------------------
	if ua := args.UserAgent; ua != `` {
		if _, err := self.browser.Tab().RPC(`Emulation`, `setUserAgentOverride`, map[string]interface{}{
			`userAgent`: ua,
		}); err != nil {
			return err
		}
	}

	// Emulation Flags & Features
	// ---------------------------------------------------------------------------------------------
	self.browser.Tab().AsyncRPC(`Emulation`, `setScriptExecutionDisabled`, map[string]interface{}{
		`value`: args.DisableScripts,
	})

	self.browser.Tab().AsyncRPC(`Emulation`, `setTouchEmulationEnabled`, map[string]interface{}{
		`value`: args.EmulateTouch,
	})

	self.browser.Tab().AsyncRPC(`Emulation`, `setScrollbarsHidden`, map[string]interface{}{
		`hidden`: args.HideScrollbars,
	})

	if bgcolor := args.BackgroundColor; bgcolor != `` {
		if col, err := colorutil.Parse(bgcolor); err == nil {
			r, g, b, a := col.RGBA255()

			self.browser.Tab().AsyncRPC(`Emulation`, `setDefaultBackgroundColorOverride`, map[string]interface{}{
				`r`: r,
				`g`: g,
				`b`: b,
				`a`: a,
			})
		} else {
			return fmt.Errorf("invalid background color: %v", err)
		}
	} else {
		self.browser.Tab().AsyncRPC(`Emulation`, `setDefaultBackgroundColorOverride`, nil)
	}

	return nil
}
710743
func (format *CollectdToInflux10) Configure(conf core.PluginConfigReader) {
	format.tagString = strings.NewReplacer(",", "\\,", " ", "\\ ")
}
770995
func (s *DescribeConfigurationSettingsOutput) SetConfigurationSettings(v []*ConfigurationSettingsDescription) *DescribeConfigurationSettingsOutput {
	s.ConfigurationSettings = v
	return s
}
502021
func (s *InstanceGroupModifyConfig) SetConfigurations(v []*Configuration) *InstanceGroupModifyConfig {
	s.Configurations = v
	return s
}
249072
func (parser *Parser) ParseRules() ([]*css.Rule, error) {
	result := []*css.Rule{}

	inBlock := false
	if parser.tokenChar("{") {
		// parsing a block of rules
		inBlock = true
		parser.embedLevel++

		parser.shiftToken()
	}

	for parser.tokenParsable() {
		if parser.tokenIgnorable() {
			parser.shiftToken()
		} else if parser.tokenChar("}") {
			if !inBlock {
				errMsg := fmt.Sprintf("Unexpected } character: %s", parser.nextToken().String())
				return result, errors.New(errMsg)
			}

			parser.shiftToken()
			parser.embedLevel--

			// finished
			break
		} else {
			rule, err := parser.ParseRule()
			if err != nil {
				return result, err
			}

			rule.EmbedLevel = parser.embedLevel
			result = append(result, rule)
		}
	}

	return result, parser.err()
}
235153
func (rule *Rule) EmbedsRules() bool {
	if rule.Kind == AtRule {
		for _, atRuleName := range atRulesWithRulesBlock {
			if rule.Name == atRuleName {
				return true
			}
		}
	}

	return false
}
685764
func (w *unixConfigure) Configure() error {
	if err := w.ConfigureBasic(); err != nil {
		return err
	}
	if err := w.ConfigureJuju(); err != nil {
		return err
	}
	return w.ConfigureCustomOverrides()
}
1209347
func (fw *Framework) ConfigureProvisioning() {
	fw.Config.Choria.FederationCollectives = []string{}
	fw.Config.Collectives = []string{"provisioning"}
	fw.Config.MainCollective = "provisioning"
	fw.Config.Registration = []string{}
	fw.Config.FactSourceFile = build.ProvisionFacts

	if build.ProvisionStatusFile != "" {
		fw.Config.Choria.StatusFilePath = build.ProvisionStatusFile
		fw.Config.Choria.StatusUpdateSeconds = 10
	}

	if build.ProvisionRegistrationData != "" {
		fw.Config.RegistrationCollective = "provisioning"
		fw.Config.Registration = []string{"file_content"}
		fw.Config.RegisterInterval = 120
		fw.Config.RegistrationSplay = false
		fw.Config.Choria.FileContentRegistrationTarget = "choria.provisioning_data"
		fw.Config.Choria.FileContentRegistrationData = build.ProvisionRegistrationData
	}

	if !build.ProvisionSecurity() {
		protocol.Secure = "false"
		fw.Config.Choria.SecurityProvider = "file"
		fw.Config.DisableTLS = true
	}
}
315593
func (mr *MockMonitorMockRecorder) UpdateConfiguration(ctx, config interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateConfiguration", reflect.TypeOf((*MockMonitor)(nil).UpdateConfiguration), ctx, config)
}
1222263
func (s *DescribeConfigRulesOutput) SetConfigRules(v []*ConfigRule) *DescribeConfigRulesOutput {
	s.ConfigRules = v
	return s
}