// DuplicateItems error for when an array contains duplicates
436842
func DuplicateItems(name, in string) *Validation {
	msg := fmt.Sprintf(uniqueFail, name, in)
	if in == "" {
		msg = fmt.Sprintf(uniqueFailNoIn, name)
	}
	return &Validation{
		code:    UniqueFailCode,
		Name:    name,
		In:      in,
		message: msg,
	}
}
716696
func (s *ListPlaybackConfigurationsOutput) SetItems(v []*PlaybackConfiguration) *ListPlaybackConfigurationsOutput {
	s.Items = v
	return s
}
594044
func Duplicate(field *Path, value interface{}) *Error {
	return &Error{ErrorTypeDuplicate, field.String(), value, ""}
}
758805
func (s *CachedMethods) SetItems(v []*string) *CachedMethods {
	s.Items = v
	return s
}
16062
func (c *Client) CreateDictionaryItems(i []CreateDictionaryItemInput) ([]DictionaryItem, error) {

	var b []DictionaryItem
	for _, cdii := range i {
		di, err := c.CreateDictionaryItem(&cdii)
		if err != nil {
			return nil, err
		}
		b = append(b, *di)
	}
	return b, nil
}
242260
func (s *StreamingDistributionList) SetItems(v []*StreamingDistributionSummary) *StreamingDistributionList {
	s.Items = v
	return s
}
710086
func (n *Name) Duplicate() (duplicate *Name, err error) {
	duplicate = &Name{
		Lib: n.Lib,
	}

	var min C.OM_uint32
	maj := C.wrap_gss_duplicate_name(n.Fp_gss_duplicate_name, &min,
		n.C_gss_name_t, &duplicate.C_gss_name_t)
	err = n.stashLastStatus(maj, min)
	if err != nil {
		return nil, err
	}

	return duplicate, nil
}
139185
func (s *OriginAccessIdentityList) SetItems(v []*OriginAccessIdentitySummary) *OriginAccessIdentityList {
	s.Items = v
	return s
}
252570
func ArrayRemoveDuplicates(s *[]string) {
	found := make(map[string]bool)
	j := 0
	for i, x := range *s {
		if !found[x] {
			found[x] = true
			(*s)[j] = (*s)[i]
			j++
		}
	}
	*s = (*s)[:j]
}
330655
func (bk *Bucket) Items() (items []Item, err error) {
	return items, bk.db.View(func(tx *bolt.Tx) error {
		c := tx.Bucket(bk.Name).Cursor()
		var key, value []byte
		for k, v := c.First(); k != nil; k, v = c.Next() {
			if v != nil {
				key = make([]byte, len(k))
				copy(key, k)
				value = make([]byte, len(v))
				copy(value, v)
				items = append(items, Item{key, value})
			}
		}
		return nil
	})
}
1076042
func (s *CustomErrorResponses) SetItems(v []*CustomErrorResponse) *CustomErrorResponses {
	s.Items = v
	return s
}
332586
func isDuplicate(m map[item]struct{}, name, addr string, port uint16) bool {
	if addr != "" {
		_, ok := m[item{name, 0, addr}]
		if !ok {
			m[item{name, 0, addr}] = struct{}{}
		}
		return ok
	}
	_, ok := m[item{name, port, ""}]
	if !ok {
		m[item{name, port, ""}] = struct{}{}
	}
	return ok
}
683442
func (s *GetRequestValidatorsOutput) SetItems(v []*UpdateRequestValidatorOutput) *GetRequestValidatorsOutput {
	s.Items = v
	return s
}
819745
func (s *PutInventoryInput) SetItems(v []*InventoryItem) *PutInventoryInput {
	s.Items = v
	return s
}
1364595
func (hm *SyncedHashMap) Items() (ci chan Item) {
	go func() {
		hm.RLock()
		defer hm.RUnlock()
		defer close(ci)
		for k := range hm.keys {
			i := Item{(*hm).keys[k], (*hm).values[k]}
			ci <- i
		}
	}()
	return
}
1222149
func deduplicate(s []string) []string {
	encountered := map[string]bool{}
	ret := make([]string, 0)
	for i := range s {
		if encountered[s[i]] {
			continue
		}
		encountered[s[i]] = true
		ret = append(ret, s[i])
	}
	return ret
}
766512
func (s *CustomHeaders) SetItems(v []*OriginCustomHeader) *CustomHeaders {
	s.Items = v
	return s
}