// setadd adds members to a set. Returns nr of new keys.
342507
func (db *RedisDB) setAdd(k string, elems ...string) int {
	s, ok := db.setKeys[k]
	if !ok {
		s = setKey{}
		db.keys[k] = "set"
	}
	added := 0
	for _, e := range elems {
		if _, ok := s[e]; !ok {
			added++
		}
		s[e] = struct{}{}
	}
	db.setKeys[k] = s
	db.keyVersion[k]++
	return added
}
95975
func (s *EndpointRequest) SetAddress(v string) *EndpointRequest {
	s.Address = &v
	return s
}
830503
func (db *RedisDB) setSet(k string, set setKey) {
	db.keys[k] = "set"
	db.setKeys[k] = set
	db.keyVersion[k]++
}
1233950
func (v *OrderedValues) StringAdd(key, val string) {
	if len(key) == 0 {
		return
	}
	if len(val) == 0 {
		v.Add([]byte(key), chrs[0:0])
	} else {
		v.Add([]byte(key), []byte(val))
	}
}
1190748
func (s *UpdateProfileInput) SetAddress(v string) *UpdateProfileInput {
	s.Address = &v
	return s
}
286755
func (s *UpdateStackInput) SetStackId(v string) *UpdateStackInput {
	s.StackId = &v
	return s
}
1089229
func (s *CreateProfileInput) SetAddress(v string) *CreateProfileInput {
	s.Address = &v
	return s
}
245356
func (db *RedisDB) SetAdd(k string, elems ...string) (int, error) {
	db.master.Lock()
	defer db.master.Unlock()
	if db.exists(k) && db.t(k) != "set" {
		return 0, ErrWrongType
	}
	return db.setAdd(k, elems...), nil
}
1356125
func (s *Set) Add(value string) error {
	originalValue := value
	if !s.host.rawUTF8 {
		Encode(&value)
	}
	// Check that the value is not already there before adding
	has, err := s.Has(originalValue)
	if !has && (err == nil) {
		_, err = s.host.db.Exec(fmt.Sprintf("INSERT INTO %s (%s) VALUES ($1)", s.table, setCol), value)
	}
	return err
}
22194
func (s *UpdatePortfolioInput) SetAddTags(v []*Tag) *UpdatePortfolioInput {
	s.AddTags = v
	return s
}
1020948
func (s *IpRouteInfo) SetAddedDateTime(v time.Time) *IpRouteInfo {
	s.AddedDateTime = &v
	return s
}
795118
func (s *DescribeAddressOutput) SetAddress(v *Address) *DescribeAddressOutput {
	s.Address = v
	return s
}
206784
func (s *StartStackInput) SetStackId(v string) *StartStackInput {
	s.StackId = &v
	return s
}
416062
func (s *StepExecution) SetIsEnd(v bool) *StepExecution {
	s.IsEnd = &v
	return s
}
410534
func (s *SyntaxToken) SetTokenId(v int64) *SyntaxToken {
	s.TokenId = &v
	return s
}
639238
func (s *DescribeAddressInput) SetAddressId(v string) *DescribeAddressInput {
	s.AddressId = &v
	return s
}
704388
func (c *Client) SetAddress(addr string) error {
	c.modifyLock.Lock()
	defer c.modifyLock.Unlock()

	parsedAddr, err := url.Parse(addr)
	if err != nil {
		return errwrap.Wrapf("failed to set address: {{err}}", err)
	}

	c.addr = parsedAddr
	return nil
}