// Settings sets all settings of the snapshot repository.
548196
func (s *SnapshotCreateRepositoryService) Settings(settings map[string]interface{}) *SnapshotCreateRepositoryService {
	s.settings = settings
	return s
}
964499
func (m MemSettings) CreateSettings(key string, settings map[string]interface{}) error {
	if _, ok := m.Settings[key]; ok {
		return errors.AlreadyExistsf("settings with key %q", key)
	}
	m.Settings[key] = settings
	return nil
}
478956
func (s *StartTranscriptionJobInput) SetSettings(v *Settings) *StartTranscriptionJobInput {
	s.Settings = v
	return s
}
953941
func (c *Config) AptProxySettings() proxy.Settings {
	return proxy.Settings{
		Http:    c.AptHTTPProxy(),
		Https:   c.AptHTTPSProxy(),
		Ftp:     c.AptFTPProxy(),
		NoProxy: c.AptNoProxy(),
	}
}
1307664
func (u *UniterAPI) UpdateSettings(args params.RelationUnitsSettings) (params.ErrorResults, error) {
	result := params.ErrorResults{
		Results: make([]params.ErrorResult, len(args.RelationUnits)),
	}
	canAccess, err := u.accessUnit()
	if err != nil {
		return params.ErrorResults{}, err
	}
	for i, arg := range args.RelationUnits {
		unit, err := names.ParseUnitTag(arg.Unit)
		if err != nil {
			result.Results[i].Error = common.ServerError(common.ErrPerm)
			continue
		}
		relUnit, err := u.getRelationUnit(canAccess, arg.Relation, unit)
		if err == nil {
			var settings *state.Settings
			settings, err = relUnit.Settings()
			if err == nil {
				for k, v := range arg.Settings {
					if v == "" {
						settings.Delete(k)
					} else {
						settings.Set(k, v)
					}
				}
				_, err = settings.Write()
			}
		}
		result.Results[i].Error = common.ServerError(err)
	}
	return result, nil
}
674936
func (s *UpdateElasticsearchDomainConfigInput) SetSnapshotOptions(v *SnapshotOptions) *UpdateElasticsearchDomainConfigInput {
	s.SnapshotOptions = v
	return s
}
187959
func (s *TranscriptionJob) SetSettings(v *Settings) *TranscriptionJob {
	s.Settings = v
	return s
}
683896
func (s *Settings) Set(c context.Context, key string, value interface{}, who, why string) error {
	blob, err := json.Marshal(value)
	if err != nil {
		return err
	}
	return s.storage.UpdateSetting(c, key, json.RawMessage(blob), who, why)
}
1264525
func (chat *Chat) Settings(out interface{}) error {

	data, err := chat.getData()

	if err != nil {
		return err
	}
	serviceID := chat.ctx.getServiceID()

	if _, ok := data.Settings[serviceID]; ok {
		// TODO: workaround that creepy bindInterfaceToInterface
		err = bindInterfaceToInterface(data.Settings[serviceID], out)
		return err
	}

	// Not a error – just empty settings
	return nil
}
484015
func (mgr *SettingsManager) GetSettings() (*ArgoCDSettings, error) {
	err := mgr.ensureSynced(false)
	if err != nil {
		return nil, err
	}
	argoCDCM, err := mgr.configmaps.ConfigMaps(mgr.namespace).Get(common.ArgoCDConfigMapName)
	if err != nil {
		return nil, err
	}
	argoCDSecret, err := mgr.secrets.Secrets(mgr.namespace).Get(common.ArgoCDSecretName)
	if err != nil {
		return nil, err
	}
	var settings ArgoCDSettings
	var errs []error
	if err := updateSettingsFromConfigMap(&settings, argoCDCM); err != nil {
		errs = append(errs, err)
	}
	if err := updateSettingsFromSecret(&settings, argoCDSecret); err != nil {
		errs = append(errs, err)
	}
	if len(errs) > 0 {
		return &settings, errs[0]
	}
	return &settings, nil
}
1173331
func (chat *Chat) Setting(key string) (result interface{}, exists bool) {
	var settings map[string]interface{}

	err := chat.Settings(&settings)
	if err != nil {
		log.WithError(err).Error("Can't get UserSettings")
		return nil, false
	}

	if _, ok := settings[key]; ok {
		return settings[key], true
	}
	return nil, false
}
1054935
func (s *DescribeSnapshotsOutput) SetSnapshots(v []*Snapshot) *DescribeSnapshotsOutput {
	s.Snapshots = v
	return s
}
642071
func (s *StateSettings) ReadSettings(key string) (map[string]interface{}, error) {
	if s, err := readSettings(s.backend.db(), s.collection, key); err != nil {
		return nil, err
	} else {
		return s.Map(), nil
	}
}
113046
func (t *StandardResettingTimer) Snapshot() ResettingTimer {
	t.mutex.Lock()
	defer t.mutex.Unlock()
	currentValues := t.values
	t.values = make([]int64, 0, InitialResettingTimerSliceCap)

	return &ResettingTimerSnapshot{
		values: currentValues,
	}
}
745546
func (s *DescribeClusterSnapshotsOutput) SetSnapshots(v []*Snapshot) *DescribeClusterSnapshotsOutput {
	s.Snapshots = v
	return s
}
674419
func (s *Job) SetSettings(v *JobSettings) *Job {
	s.Settings = v
	return s
}
532503
func (s *Endpoint) SetS3Settings(v *S3Settings) *Endpoint {
	s.S3Settings = v
	return s
}