// Name sets the name of a resource to access (<resource>/[ns/<namespace>/]<name>)
196953
func (r *Request) Name(resourceName string) *Request {
	if r.err != nil {
		return r
	}
	if len(resourceName) == 0 {
		r.err = fmt.Errorf("resource name may not be empty")
		return r
	}
	if len(r.resourceName) != 0 {
		r.err = fmt.Errorf("resource name already set to %q, cannot change to %q", r.resourceName, resourceName)
		return r
	}
	if msgs := IsValidPathSegmentName(resourceName); len(msgs) != 0 {
		r.err = fmt.Errorf("invalid resource name %q: %v", resourceName, msgs)
		return r
	}
	r.resourceName = resourceName
	return r
}
622825
func (r *relations) Name(id int) (string, error) {
	relationer, found := r.relationers[id]
	if !found {
		return "", errors.Errorf("unknown relation: %d", id)
	}
	return relationer.ru.Endpoint().Name, nil
}
883692
func (j *AuroraJob) Name(name string) Job {
	j.jobConfig.Key.Name = name
	return j
}
1096258
func (fi FileInfo) Name() string {
	if fi.CustomName != "" {
		return fi.CustomName
	}
	return fi.FileInfo.Name()
}
659104
func (s *Service) Name(name string) (*ResultName, error) {
	entry, err := s.nameReg.GetName(name)
	if err != nil {
		return nil, err
	}
	if entry == nil {
		return nil, fmt.Errorf("name %s not found", name)
	}
	return &ResultName{Entry: entry}, nil
}
649982
func (z *vmwareAvailZone) Name() string {
	// The name for this zone is the compute resource name and the
	// path of the pool without the prefix, so for
	// /QA/host/aron.internal/Resources/High/Child, the name should be
	// aron.internal/High/Child.
	path := strings.TrimRight(z.pool.InventoryPath, "/")
	parts := strings.Split(path, "/")
	poolPath := ""
	if len(parts) > poolPathPrefixParts {
		// This isn't the root pool for this compute resource, include
		// the pool's path.
		poolPath = "/" + strings.Join(parts[poolPathPrefixParts:], "/")
	}

	return z.r.Name + poolPath
}
1195833
func (s *XPackSecurityDeleteRoleService) Name(name string) *XPackSecurityDeleteRoleService {
	s.name = name
	return s
}
1323527
func (r *Application) Name(id string) *Application {
	r.ID = validateID(id)
	return r
}
747991
func (r *regulator) Name() string {
	r.enter()
	defer r.exit()

	return r.StorageDriver.Name()
}
65246
func (s *XPackSecurityPutRoleService) Name(name string) *XPackSecurityPutRoleService {
	s.name = name
	return s
}
42740
func (p *Prefixed) Name(id string) string {
	return p.Prefix + id + p.Suffix
}
792186
func (ix *Index) Name(fileid uint32) string {
	return string(ix.NameBytes(fileid))
}
1024670
func (s *IndicesPutTemplateService) Name(name string) *IndicesPutTemplateService {
	s.name = name
	return s
}
1107229
func (t *Trie) Name(name string) *Trie {
	t.name = name
	return t
}
756060
func (s *storeMemoizer) Name(ctx context.Context) string {
	return s.s.Name(ctx)
}
692375
func (f *File) Name() string {
	name := strings.Split(f.fileID, ";")[0]
	return strings.ToLower(name)
}
801550
func (r *Route) Name(name string) *Route {
	if r.name != "" {
		r.err = fmt.Errorf("mux: route already has name %q, can't set %q",
			r.name, name)
	}
	if r.err == nil {
		r.name = name
		r.namedRoutes[name] = r
	}
	return r
}