// ZonesSetToLabelValue converts zones set to label value
175749
func ZonesSetToLabelValue(strSet sets.String) string {
	return strings.Join(strSet.UnsortedList(), cloudvolume.LabelMultiZoneDelimiter)
}
1082560
func invalidValue(property string, value interface{}) error {
	return ErrInvalidValue{Property: property, Value: value}
}
1033233
func (s *GetRegionsInput) SetIncludeRelationalDatabaseAvailabilityZones(v bool) *GetRegionsInput {
	s.IncludeRelationalDatabaseAvailabilityZones = &v
	return s
}
590557
func (c *Client) ValueDescriptorsByUomLabel(uomLabel string) (values []contract.ValueDescriptor, err error) {
	conn := c.Pool.Get()
	defer conn.Close()

	objects, err := getObjectsByRange(conn, db.ValueDescriptorCollection+":uomlabel:"+uomLabel, 0, -1)
	if err != nil {
		if err != redis.ErrNil {
			return values, err
		}
	}

	values = make([]contract.ValueDescriptor, len(objects))
	for i, in := range objects {
		err = unmarshalObject(in, &values[i])
		if err != nil {
			return values, err
		}
	}

	return values, nil
}
1195706
func unmarshalTableOrValue(cfg *Config, rv reflect.Value, av interface{}) error {
	if (rv.Kind() != reflect.Ptr && rv.Kind() != reflect.Map) || rv.IsNil() {
		return &invalidUnmarshalError{rv.Type()}
	}
	rv = indirect(rv)

	switch av.(type) {
	case *ast.KeyValue, *ast.Table, []*ast.Table:
		if err := unmarshalField(cfg, rv, av); err != nil {
			return lineError(fieldLineNumber(av), err)
		}
		return nil
	case ast.Value:
		return setValue(cfg, rv, av.(ast.Value))
	default:
		panic(fmt.Sprintf("BUG: unhandled AST node type %T", av))
	}
}
521644
func SelectZoneForVolume(zoneParameterPresent, zonesParameterPresent bool, zoneParameter string, zonesParameter, zonesWithNodes sets.String, node *v1.Node, allowedTopologies []v1.TopologySelectorTerm, pvcName string) (string, error) {
	zones, err := SelectZonesForVolume(zoneParameterPresent, zonesParameterPresent, zoneParameter, zonesParameter, zonesWithNodes, node, allowedTopologies, pvcName, 1)
	if err != nil {
		return "", err
	}
	zone, ok := zones.PopAny()
	if !ok {
		return "", fmt.Errorf("could not determine a zone to provision volume in")
	}
	return zone, nil
}
551763
func (n *NullInt) IsValidValue(val string) error {
	_, err := strconv.Atoi(val)
	return err
}
1180735
func sanitizeExpectedValue(i interface{}) interface{} {
	if e, ok := i.(float64); ok {
		return int(e)
	}
	if e, ok := i.(map[interface{}]interface{}); ok {
		out := make(map[string]interface{})
		for k, v := range e {
			ks, ok := k.(string)
			if !ok {
				panic(fmt.Sprintf("Matcher key type not string: %T\n\n", k))
			}
			out[ks] = sanitizeExpectedValue(v)
		}
		return out
	}
	return i
}
749898
func (m *MonitorValues) FlattenDownlinkBPSValue() ([]FlatMonitorValue, error) {
	return m.flattenValue(func(v *MonitorValue) *float64 { return v.DownlinkBPS })
}
1123311
func (s SpaceTemplate) EqualValue(u convert.Equaler) bool {
	other, ok := u.(SpaceTemplate)
	if !ok {
		return false
	}
	s.Version = other.Version
	s.Lifecycle = other.Lifecycle
	return s.Equal(u)
}
1154216
func (collection Collection) GetSEOSetting(context *qor.Context, name string, objects ...interface{}) Setting {
	var (
		seoSetting Setting
		db         = context.GetDB()
		seo        = collection.GetSEO(name)
	)

	// If passed objects has customzied SEO Setting field
	for _, obj := range objects {
		if value := reflect.Indirect(reflect.ValueOf(obj)); value.IsValid() && value.Kind() == reflect.Struct {
			for i := 0; i < value.NumField(); i++ {
				if value.Field(i).Type() == reflect.TypeOf(Setting{}) {
					seoSetting = value.Field(i).Interface().(Setting)
					break
				}
			}
		}
	}

	if !seoSetting.EnabledCustomize {
		globalSeoSetting := collection.SettingResource.NewStruct().(QorSEOSettingInterface)
		if !db.Where("name = ?", name).First(globalSeoSetting).RecordNotFound() {
			seoSetting = globalSeoSetting.GetSEOSetting()
		}
	}

	siteWideSetting := collection.SettingResource.NewStruct()
	db.Where("is_global_seo = ? AND name = ?", true, collection.Name).First(siteWideSetting)
	tagValues := siteWideSetting.(QorSEOSettingInterface).GetGlobalSetting()

	if tagValues == nil {
		tagValues = map[string]string{}
	}

	if seo.Context != nil {
		for key, value := range seo.Context(objects...) {
			tagValues[key] = value
		}
	}

	return replaceTags(seoSetting, seo.Varibles, tagValues)
}
514781
func (n *NullBool) ParseBoolValue(val *bool) {
	if val == nil {
		n.IsSet = false
		n.Value = false
		return
	}

	n.Value = *val
	n.IsSet = true
}
894009
func (d *DNS) SetZone(zone string) {
	d.Name = zone
	d.Status.Zone = zone
}
730896
func (settings FileSettings) setKeyValue(key string, val interface{}) {
	if val != nil {
		settings.Values[key] = val.(string)
	}
}
1227847
func ValidateAvailabilityZone(env ZonedEnviron, ctx context.ProviderCallContext, zone string) error {
	zones, err := env.AvailabilityZones(ctx)
	if err != nil {
		return err
	}
	for _, z := range zones {
		if z.Name() == zone {
			if z.Available() {
				return nil
			}
			return errors.Errorf("availability zone %q is unavailable", zone)
		}
	}
	return errors.NotValidf("availability zone %q", zone)
}
31664
func (a *SetDockTileArgs) SetBadgeLabel(badgeLabel string) *SetDockTileArgs {
	a.BadgeLabel = &badgeLabel
	return a
}
1337537
func AnySettableValue(val reflect.Value) bool {
	switch val.Kind() {
	case reflect.Array:
		for i := 0; i < val.Type().Len(); i++ {
			if AnySettableValue(val.Index(i)) {
				return true
			}
		}
	case reflect.Interface:
		return AnySettableValue(val.Elem())
	case reflect.Map:
		for _, key := range val.MapKeys() {
			if AnySettableValue(val.MapIndex(key)) {
				return true
			}
		}
	case reflect.Ptr:
		return AnySettableValue(val.Elem())
	case reflect.Slice:
		for i := 0; i < val.Len(); i++ {
			if AnySettableValue(val.Index(i)) {
				return true
			}
		}
	case reflect.Struct:
		for i := 0; i < val.Type().NumField(); i++ {
			if AnySettableValue(val.Field(i)) {
				return true
			}
		}
	default:
		return val.CanSet()
	}
	return false
}