// TypeByName return the type by its name, just like Class.forName in java
543451
func TypeByName(typeName string) Type {
	initOnce.Do(discoverTypes)
	return Type2(types[typeName])
}
579078
func fieldByName(v reflect.Value, name string, strict bool) reflect.Value {
	typ := v.Type()

	for i := 0; i < v.NumField(); i++ {
		tag, ok := typ.Field(i).Tag.Lookup("db")
		if ok && tag == name {
			return v.Field(i)
		}
	}
	if strict {
		return reflect.ValueOf(nil)
	}
	return v.FieldByName(strings.Title(name))
}
1324781
func (s *Resolver) SetTypeName(v string) *Resolver {
	s.TypeName = &v
	return s
}
466922
func (formats Formats) GetByNames(names ...string) (Formats, error) {
	var types []Format

	for _, name := range names {
		tpe, ok := formats.GetByName(name)
		if !ok {
			return types, fmt.Errorf("OutputFormat with key %q not found", name)
		}
		types = append(types, tpe)
	}
	return types, nil
}
397566
func (p *ProfilesClient) ListByName(ctx context.Context, name string) (*apitypes.Profile, error) {
	result := &apitypes.Profile{}
	err := p.client.RoundTrip(ctx, "GET", "/profiles/"+name, nil, nil, &result)
	return result, err
}
266004
func (l VirtualDeviceList) TypeName(device types.BaseVirtualDevice) string {
	dtype := reflect.TypeOf(device)
	if dtype == nil {
		return ""
	}
	return dtype.Elem().Name()
}
74255
func (s *GetInventorySchemaInput) SetTypeName(v string) *GetInventorySchemaInput {
	s.TypeName = &v
	return s
}
623434
func (fg FieldGroup) FindByName(name string) (*FieldSpec, error) {
	for _, field := range fg {
		if field.Name == name {
			return field, nil
		}
	}
	return nil, fmt.Errorf("unknown field %v", name)
}
1255648
func (args *Arguments) GetParameterByName(name string) *Parameter {
	for _, param := range args.Parameters {
		if param.Name == name {
			return &param
		}
	}
	return nil
}
680453
func (s *InventoryItemSchema) SetTypeName(v string) *InventoryItemSchema {
	s.TypeName = &v
	return s
}
501900
func (s *ResultAttribute) SetTypeName(v string) *ResultAttribute {
	s.TypeName = &v
	return s
}
581876
func RoleByName(s string) (Role, bool) {
	for i, v := range roleNames {
		if v == strings.ToUpper(s) {
			return Role(i), true
		}
	}
	return NumRoles, false
}
160535
func (m *Mapper) TraversalsByName(t reflect.Type, names []string) [][]int {
	r := make([][]int, 0, len(names))
	m.TraversalsByNameFunc(t, names, func(_ int, i []int) error {
		if i == nil {
			r = append(r, []int{})
		} else {
			r = append(r, i)
		}

		return nil
	})
	return r
}
102846
func (c *Columns) FindByName(name string) *Column {
	for i, col := range c.columns {
		if col.Name == name {
			return c.columns[i]
		}
	}
	return nil
}
208771
func NewTypePropertyWithNameAndType(name string, typeName string) *TypeProperty {
	return &TypeProperty{Name: name, Type: typeName}
}
124747
func (s *GetTypeInput) SetTypeName(v string) *GetTypeInput {
	s.TypeName = &v
	return s
}
641354
func (api *IconAPI) SortByName(reverse bool) *IconAPI {
	api.sortByName(reverse)
	return api
}