// ConfigSet sets the optional parameter "config_set":
165795
func (c *GetMappingCall) ConfigSet(configSet string) *GetMappingCall {
	c.urlParams_.Set("config_set", configSet)
	return c
}
1309107
func (s *Service) GetConfigSets() *GetConfigSetsCall {
	c := &GetConfigSetsCall{s: s, urlParams_: make(gensupport.URLParams)}
	return c
}
636956
func (g *Git) ConfigGet(ctx context.Context, key string) (string, error) {
	if !g.IsInitialized() {
		return "", store.ErrGitNotInit
	}

	buf := &strings.Builder{}

	cmd := exec.CommandContext(ctx, "git", "config", "--get", key)
	cmd.Dir = g.path
	cmd.Stdout = buf
	cmd.Stderr = os.Stderr

	out.Debug(ctx, "store.gitConfigGet: %s %+v", cmd.Path, cmd.Args)
	if err := cmd.Run(); err != nil {
		return "", err
	}

	return strings.TrimSpace(buf.String()), nil
}
1142798
func (s *EmailChannelRequest) SetConfigurationSet(v string) *EmailChannelRequest {
	s.ConfigurationSet = &v
	return s
}
342490
func ReadConfigSet(dir, name string) (ConfigSet, error) {
	configs := map[string][]byte{}
	err := filepath.Walk(dir, func(p string, info os.FileInfo, err error) error {
		if err != nil || !info.Mode().IsRegular() {
			return err
		}
		content, err := ioutil.ReadFile(p)
		if err != nil {
			return err
		}
		relPath, err := filepath.Rel(dir, p)
		if err != nil {
			return err
		}
		configs[filepath.ToSlash(relPath)] = content
		return nil
	})
	if err != nil {
		return ConfigSet{}, errors.Annotate(err, "failed to read config files").Err()
	}
	return ConfigSet{
		Name: name,
		Data: configs,
	}, nil
}
477883
func (c *Config) Set(key, value string) error {
	data, err := load(c.filename, c.passphrase)
	if err != nil {
		return errors.Wrapf(err, "failed to read secrects config %s: %s", c.filename, err)
	}

	old := data[key]
	if value == old {
		return nil
	}

	data[key] = value
	return save(c.filename, c.passphrase, data)
}
134651
func (c *ConfigFlag) Set(opt string) (err error) {
	parts := strings.SplitN(opt, ",", 2)
	key := parts[0]

	switch len(parts) {
	case 1:
		// default options specified without a value to boolean true
		err = c.Config.Set(key, true)
	case 2:
		err = c.Config.Set(key, parts[1])
	}
	return
}
1040626
func (c standardConfigManager) Set(key string, value []byte) error {
	err := c.store.Set(key, value)
	return err
}
816545
func (c *Config) Set(key string, value string) error {
	c.Lock()
	defer c.Unlock()
	if len(key) == 0 {
		return errors.New("key is empty")
	}

	var (
		section string
		option  string
	)

	keys := strings.Split(strings.ToLower(key), "::")
	if len(keys) >= 2 {
		section = keys[0]
		option = keys[1]
	} else {
		option = keys[0]
	}

	c.AddConfig(section, option, value)
	return nil
}
37502
func (c *ConfigFile) MustValueSet(section, key string, defaultVal ...string) (string, bool) {
	val, err := c.GetValue(section, key)
	if len(defaultVal) > 0 && (err != nil || len(val) == 0) {
		c.SetValue(section, key, defaultVal[0])
		return defaultVal[0], true
	}
	return val, false
}
16829
func (c *Client) ConfigGet() (*models.DaemonConfiguration, error) {
	resp, err := c.Daemon.GetConfig(nil)
	if err != nil {
		return nil, Hint(err)
	}
	return resp.Payload, nil
}
1038094
func NewParamSet(PARAM_VALUE float32, TARGET_SYSTEM uint8, TARGET_COMPONENT uint8, PARAM_ID [16]uint8, PARAM_TYPE uint8) *ParamSet {
	m := ParamSet{}
	m.PARAM_VALUE = PARAM_VALUE
	m.TARGET_SYSTEM = TARGET_SYSTEM
	m.TARGET_COMPONENT = TARGET_COMPONENT
	m.PARAM_ID = PARAM_ID
	m.PARAM_TYPE = PARAM_TYPE
	return &m
}
1348251
func (c *Client) ConfigGet(name string) (map[string]string, error) {
	v, err := c.execOnFirst(false, "CONFIG GET", name)
	if err != nil {
		return nil, err
	}
	return iface2strmap(v), nil
}
665166
func Set(c *client.Client, app string, config api.Config) (api.Config, error) {
	body, err := json.Marshal(config)

	if err != nil {
		return api.Config{}, err
	}

	u := fmt.Sprintf("/v1/apps/%s/config/", app)

	resBody, err := c.BasicRequest("POST", u, body)

	if err != nil {
		return api.Config{}, err
	}

	newConfig := api.Config{}
	if err = json.Unmarshal([]byte(resBody), &newConfig); err != nil {
		return api.Config{}, err
	}

	return newConfig, nil
}
13425
func (s *LoadBalancer) SetConfigurationOptions(v map[string]*string) *LoadBalancer {
	s.ConfigurationOptions = v
	return s
}
843371
func (o *ConfigOpt) Set(value string) error {
	csvReader := csv.NewReader(strings.NewReader(value))
	fields, err := csvReader.Read()
	if err != nil {
		return err
	}

	options := &swarmtypes.ConfigReference{
		File: &swarmtypes.ConfigReferenceFileTarget{
			UID:  "0",
			GID:  "0",
			Mode: 0444,
		},
	}

	// support a simple syntax of --config foo
	if len(fields) == 1 {
		options.File.Name = fields[0]
		options.ConfigName = fields[0]
		o.values = append(o.values, options)
		return nil
	}

	for _, field := range fields {
		parts := strings.SplitN(field, "=", 2)
		key := strings.ToLower(parts[0])

		if len(parts) != 2 {
			return fmt.Errorf("invalid field '%s' must be a key=value pair", field)
		}

		value := parts[1]
		switch key {
		case "source", "src":
			options.ConfigName = value
		case "target":
			options.File.Name = value
		case "uid":
			options.File.UID = value
		case "gid":
			options.File.GID = value
		case "mode":
			m, err := strconv.ParseUint(value, 0, 32)
			if err != nil {
				return fmt.Errorf("invalid mode specified: %v", err)
			}

			options.File.Mode = os.FileMode(m)
		default:
			return fmt.Errorf("invalid field in config request: %s", key)
		}
	}

	if options.ConfigName == "" {
		return fmt.Errorf("source is required")
	}

	o.values = append(o.values, options)
	return nil
}
620056
func (s *CreateLocationS3Input) SetS3Config(v *S3Config) *CreateLocationS3Input {
	s.S3Config = v
	return s
}