// AddAll adds all property to PersonJSONBuilder.
549615
func (b *PersonJSONBuilder) AddAll() *PersonJSONBuilder {
	b._properties["Name"] = b.Name
	b._properties["Age"] = b.Age
	b._properties["Password"] = b.Password
	return b
}
443544
func (entries Entries) LoadAll() error {
	for i, n := 0, len(entries); i < n; i++ {
		if err := entries[i].LoadEngine(); err != nil {
			return err
		}
	}
	return nil
}
789657
func (s *UsersStore) All(ctx context.Context) ([]chronograf.User, error) {
	err := validOrganization(ctx)
	if err != nil {
		return nil, err
	}

	// retrieve all users from the underlying UsersStore
	usrs, err := s.store.All(ctx)
	if err != nil {
		return nil, err
	}

	// Filter users to only contain users that have at least one role
	// in the provided organization.
	us := usrs[:0]
	for _, usr := range usrs {
		roles := usr.Roles[:0]
		// This filters a users roles so that the resulting struct only contains roles
		// from the organization on the UsersStore.
		for _, r := range usr.Roles {
			if r.Organization == s.organization {
				roles = append(roles, r)
			}
		}
		if len(roles) != 0 {
			// Only add users if they have a role in the associated organization
			usr.Roles = roles
			us = append(us, usr)
		}
	}

	return us, nil
}
101548
func (b *HogeJSONBuilder) AddByJSONNames(names ...string) *HogeJSONBuilder {
	for _, name := range names {
		info := b._jsonPropertyMap[name]
		if info == nil {
			continue
		}
		b._properties[info.fieldName] = info
	}
	return b
}
1159566
func (b *GCSBuilder) AddEntries(data [][]byte) *GCSBuilder {
	// Do nothing if the builder's already errored out.
	if b.err != nil {
		return b
	}

	for _, entry := range data {
		b.AddEntry(entry)
	}
	return b
}
497315
func (s *UsersService) ListAll(ctx context.Context, opt *UserListOptions) ([]*User, *Response, error) {
	u, err := addOptions("users", opt)
	if err != nil {
		return nil, nil, err
	}

	req, err := s.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}

	var users []*User
	resp, err := s.client.Do(ctx, req, &users)
	if err != nil {
		return nil, resp, err
	}

	return users, resp, nil
}
482496
func NewPeopleJSONBuilder() *PeopleJSONBuilder {
	jb := &PeopleJSONBuilder{
		_properties:        map[string]*PeoplePropertyInfo{},
		_jsonPropertyMap:   map[string]*PeoplePropertyInfo{},
		_structPropertyMap: map[string]*PeoplePropertyInfo{},
		ShowPrivateInfo: &PeoplePropertyInfo{
			fieldName: "ShowPrivateInfo",
			jsonName:  "showPrivateInfo",
			Encoder: func(src *People, dest *PeopleJSON) error {
				if src == nil {
					return nil
				}
				dest.ShowPrivateInfo = src.ShowPrivateInfo
				return nil
			},
			Decoder: func(src *PeopleJSON, dest *People) error {
				if src == nil {
					return nil
				}
				dest.ShowPrivateInfo = src.ShowPrivateInfo
				return nil
			},
		},
		List: &PeoplePropertyInfo{
			fieldName: "List",
			jsonName:  "list",
			Encoder: func(src *People, dest *PeopleJSON) error {
				if src == nil {
					return nil
				}
				list, err := NewPersonJSONBuilder().AddAll().ConvertList(src.List)
				if err != nil {
					return err
				}
				dest.List = ([]*PersonJSON)(list)
				return nil
			},
			Decoder: func(src *PeopleJSON, dest *People) error {
				if src == nil {
					return nil
				}
				list := make([]*Person, len(src.List))
				for idx, obj := range src.List {
					if obj == nil {
						continue
					}
					d, err := obj.Convert()
					if err != nil {
						return err
					}
					list[idx] = d
				}
				dest.List = list
				return nil
			},
		},
	}
	jb._structPropertyMap["ShowPrivateInfo"] = jb.ShowPrivateInfo
	jb._jsonPropertyMap["showPrivateInfo"] = jb.ShowPrivateInfo
	jb._structPropertyMap["List"] = jb.List
	jb._jsonPropertyMap["list"] = jb.List
	return jb
}
591294
func (g *Generator) Add(obj interface{}) {
	t := reflect.TypeOf(obj)
	if t.Kind() == reflect.Ptr {
		t = t.Elem()
	}
	g.addType(t)
	g.marshalers[t] = true
}
609530
func (c *Console) AllBuilderIDs() []string {
	builders := make([]string, 0, len(c.Builders))
	for _, b := range c.Builders {
		builders = append(builders, b.Name...)
	}
	return builders
}
407993
func (z *ZipFile) AddAll(dir string, includeCurrentFolder bool) error {
	dir = path.Clean(dir)
	return addAll(dir, dir, includeCurrentFolder, func(info os.FileInfo, file io.Reader, entryName string) (err error) {
		// Create a header based off of the fileinfo
		header, err := zip.FileInfoHeader(info)
		if err != nil {
			return err
		}

		// If it's a file, set the compression method to deflate (leave directories uncompressed)
		if !info.IsDir() {
			header.Method = zip.Deflate
		}

		// Set the header's name to what we want--it may not include the top folder
		header.Name = entryName

		// Add a trailing slash if the entry is a directory
		if info.IsDir() {
			header.Name += "/"
		}

		// Get a writer in the archive based on our header
		writer, err := z.Writer.CreateHeader(header)
		if err != nil {
			return err
		}

		// If we have a file to write (i.e., not a directory) then pipe the file into the archive writer
		if file != nil {
			if _, err := io.Copy(writer, file); err != nil {
				return err
			}
		}

		return nil
	})
}
1028916
func (f *Facade) AddUser(ctx datastore.Context, newUser userdomain.User) error {
	defer ctx.Metrics().Stop(ctx.Metrics().Start("Facade.AddUser"))
	var err error
	logger := plog.WithFields(log.Fields{
		"newUserName": newUser.Name,
	})
	logger.Debug("Started Facade.AddUser")
	defer logger.WithError(err).Debug("Finished Facade.AddUser")

	name := strings.TrimSpace(newUser.Name)
	newUser.Password = hashPassword(newUser.Password)

	_, err = f.GetUser(ctx, name)
	if err != nil && !datastore.IsErrNoSuchEntity(err) {
		return err
	}
	err = f.userStore.Put(ctx, userdomain.Key(name), &newUser)
	return err
}
780080
func (r *ReferenceBuilder) AddGroups(inputs []string) {
	for _, s := range inputs {
		groups := strings.Split(s, "+")
		if len(groups) == 1 {
			r.errs = append(r.errs, fmt.Errorf("group %q only contains a single name", s))
			continue
		}
		to := -1
		for _, group := range groups {
			var match ComponentReference
			for _, ref := range r.refs {
				if group == ref.Input().Value {
					match = ref
					break
				}
			}
			if match == nil {
				r.errs = append(r.errs, fmt.Errorf("the name %q from the group definition is not in use, and can't be used", group))
				break
			}
			if to == -1 {
				to = match.Input().GroupID
			} else {
				match.Input().GroupID = to
			}
		}
	}
}
1242209
func (t *stringTree) DoAll(f func(v string) error) error {
	return t.container.root.doAll(func(dn *node) error {
		return f(dn.content.value().(string))
	})
}
585880
func (b *Builder) Add(name string, ra io.ReaderAt, size int64, flags Flag) *Builder {
	b.init()

	child := &Entry{
		Name:   name,
		Size:   size,
		Flags:  flags,
		Parent: b.current,

		r: ra,
	}
	b.current.Children = append(b.current.Children, child)

	return b
}
1076805
func (b *SampleJSONBuilder) AddAll() *SampleJSONBuilder {
	b._properties["A"] = b.A
	b._properties["B"] = b.B
	return b
}
247068
func (g *PCPGaugeVector) SetAll(val float64) {
	for ins := range g.indom.instances {
		g.MustSet(val, ins)
	}
}
595389
func (v *VoiceTarget) AddUser(user *User) {
	v.users = append(v.users, user)
}