// loadOptions adds additional flags that should only be used for updating the root.json
546871
func (rb *repoBuilder) loadOptions(roleName data.RoleName, content []byte, minVersion int, allowExpired, skipChecksum, allowLoaded bool) error {
	if !data.ValidRole(roleName) {
		return ErrInvalidBuilderInput{msg: fmt.Sprintf("%s is an invalid role", roleName)}
	}

	if !allowLoaded && rb.IsLoaded(roleName) {
		return ErrInvalidBuilderInput{msg: fmt.Sprintf("%s has already been loaded", roleName)}
	}

	var err error
	switch roleName {
	case data.CanonicalRootRole:
		break
	case data.CanonicalTimestampRole, data.CanonicalSnapshotRole, data.CanonicalTargetsRole:
		err = rb.checkPrereqsLoaded([]data.RoleName{data.CanonicalRootRole})
	default: // delegations
		err = rb.checkPrereqsLoaded([]data.RoleName{data.CanonicalRootRole, data.CanonicalTargetsRole})
	}
	if err != nil {
		return err
	}

	switch roleName {
	case data.CanonicalRootRole:
		return rb.loadRoot(content, minVersion, allowExpired, skipChecksum)
	case data.CanonicalSnapshotRole:
		return rb.loadSnapshot(content, minVersion, allowExpired)
	case data.CanonicalTimestampRole:
		return rb.loadTimestamp(content, minVersion, allowExpired)
	case data.CanonicalTargetsRole:
		return rb.loadTargets(content, minVersion, allowExpired)
	default:
		return rb.loadDelegation(roleName, content, minVersion, allowExpired)
	}
}
535275
func (mod *CleverbotBee) ReloadOptions(options bees.BeeOptions) {
	mod.SetOptions(options)

	options.Bind("api_user", &mod.api_user)
	options.Bind("api_key", &mod.api_key)
	options.Bind("session_nick", &mod.session_nick)
}
820124
func (mod *PastebinBee) ReloadOptions(options bees.BeeOptions) {
	mod.SetOptions(options)

	options.Bind("api_dev_key", &mod.apiDevKey)
}
1134195
func (s *RequestCertificateInput) SetOptions(v *CertificateOptions) *RequestCertificateInput {
	s.Options = v
	return s
}
1271167
func (s *DescribeConfigurationOptionsOutput) SetOptions(v []*ConfigurationOptionDescription) *DescribeConfigurationOptionsOutput {
	s.Options = v
	return s
}
607080
func (a *StartArgs) SetOptions(options string) *StartArgs {
	a.Options = &options
	return a
}
529486
func (mod *PrometheusBee) ReloadOptions(options bees.BeeOptions) {
	mod.SetOptions(options)

	options.Bind("address", &mod.addr)
	options.Bind("counter_vec_name", &mod.counterVecName)
	options.Bind("gauge_vec_name", &mod.gaugeVecName)
	options.Bind("histogram_vec_name", &mod.histogramVecName)
	options.Bind("summary_vec_name", &mod.summaryVecName)
}
1077334
func (mod *TimeBee) ReloadOptions(options bees.BeeOptions) {
	mod.SetOptions(options)

	options.Bind("second", &mod.second)
	options.Bind("minute", &mod.minute)
	options.Bind("hour", &mod.hour)
	options.Bind("day_of_week", &mod.dayofweek)
	options.Bind("day_of_month", &mod.dayofmonth)
	options.Bind("month", &mod.month)
	options.Bind("year", &mod.year)
}
1180686
func (s *Server) Options(w http.ResponseWriter, req *http.Request) {
	w.Header().Set("Access-Control-Allow-Headers", "Content-Type")
	w.WriteHeader(http.StatusOK)
}
972064
func (s *VPCDerivedInfoStatus) SetOptions(v *VPCDerivedInfo) *VPCDerivedInfoStatus {
	s.Options = v
	return s
}
931682
func (l *OptionsLoader) HandleOptions(i *TreeWalkItem) error {
	contents, err := i.ReadString()
	if err != nil {
		return err
	}

	t := template.New(i.RelativePath)
	t.Funcs(l.TemplateFunctions)

	_, err = t.Parse(contents)
	if err != nil {
		return fmt.Errorf("error parsing options template %q: %v", i.Path, err)
	}

	t.Option("missingkey=zero")

	l.AddTemplate(&OptionsTemplate{
		Name:     i.RelativePath,
		Tags:     i.Tags,
		Template: t,
	})
	return nil
}
880978
func (mod *PushoverBee) ReloadOptions(options bees.BeeOptions) {
	mod.SetOptions(options)
	options.Bind("token", &mod.token)
	options.Bind("user_token", &mod.userToken)
}
540661
func (mod *AnelPowerCtrlBee) ReloadOptions(options bees.BeeOptions) {
	mod.SetOptions(options)

	options.Bind("address", &mod.addr)
	options.Bind("user", &mod.user)
	options.Bind("password", &mod.password)
}
324540
func (mod *HueBee) ReloadOptions(options bees.BeeOptions) {
	mod.SetOptions(options)

	options.Bind("address", &mod.bridge)
	options.Bind("key", &mod.key)

	mod.client = hue.NewBridge(mod.bridge, mod.key)
}
278313
func DefaultOpts() Options {
	return Options{
		CacheSize:           1024,
		GCPurgeInterval:     2 * time.Hour,
		GCLookaheadInterval: 0,
		GCInitialDelay:      60 * time.Second,
	}
}
1175486
func (s *SuggesterStatus) SetOptions(v *Suggester) *SuggesterStatus {
	s.Options = v
	return s
}
1194341
func (s *ElasticsearchVersionStatus) SetOptions(v string) *ElasticsearchVersionStatus {
	s.Options = &v
	return s
}