// AllowNoIndices indicates whether to ignore if a wildcard indices
// expression resolves into no concrete indices.
// (This includes `_all` string or when no indices have been specified).
556585
func (s *OpenIndexService) AllowNoIndices(allowNoIndices bool) *OpenIndexService {
	s.allowNoIndices = &allowNoIndices
	return s
}
1232701
func (s *IndicesForcemergeService) AllowNoIndices(allowNoIndices bool) *IndicesForcemergeService {
	s.allowNoIndices = &allowNoIndices
	return s
}
367213
func (p *Policy) AllowNoAttrs() *attrPolicyBuilder {

	p.init()

	abp := attrPolicyBuilder{
		p:          p,
		allowEmpty: true,
	}
	return &abp
}
630742
func (s *PutMappingService) AllowNoIndices(allowNoIndices bool) *PutMappingService {
	s.allowNoIndices = &allowNoIndices
	return s
}
1150944
func (s *IndicesExistsService) AllowNoIndices(allowNoIndices bool) *IndicesExistsService {
	s.allowNoIndices = &allowNoIndices
	return s
}
290272
func RestrictIndicesEqual(o1, o2 *RestrictIndicesOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
1058439
func (s *IndicesExistsTypeService) AllowNoIndices(allowNoIndices bool) *IndicesExistsTypeService {
	s.allowNoIndices = &allowNoIndices
	return s
}
759863
func excludeEntries(e []IndexEntry, tr TimeRange) []IndexEntry {
	for i := range e {
		if e[i].OverlapsTimeRange(tr.Min, tr.Max) {
			e = e[i:]
			break
		}
	}

	for i := range e {
		if !e[i].OverlapsTimeRange(tr.Min, tr.Max) {
			e = e[:i]
			break
		}
	}

	return e
}
874899
func (s *SearchRequest) AllowNoIndices(allowNoIndices bool) *SearchRequest {
	s.allowNoIndices = &allowNoIndices
	return s
}
1169590
func (s *IndicesFlushService) AllowNoIndices(allowNoIndices bool) *IndicesFlushService {
	s.allowNoIndices = &allowNoIndices
	return s
}
236872
func excludeInternal(input, rules reflect.Value) {
	// restore original value by Elm()
	if input.Type().Kind() == reflect.Interface {
		input = input.Elem()
	}
	if rules.Type().Kind() == reflect.Interface {
		rules = rules.Elem()
	}
	if rules.MapIndex(reflect.ValueOf("*")).IsValid() {
		for _, key := range input.MapKeys() {
			excludeInternal(input.MapIndex(key), rules.MapIndex(reflect.ValueOf("*")))
		}
	} else {
		for _, key := range input.MapKeys() {
			value := input.MapIndex(key)
			rule := rules.MapIndex(key)

			if rule.IsValid() {
				// restore original value by Elm()
				if value.Type().Kind() == reflect.Interface {
					value = value.Elem()
				}
				if rule.Type().Kind() == reflect.Interface {
					rule = rule.Elem()
				}

				switch rule.Type().Kind() {
				case reflect.Slice:
					for i := 0; i < rule.Len(); i++ {
						input.SetMapIndex(key, remove(value, find(value, rule.Index(i))))
					}
				case reflect.String:
					if rule.Interface() == "*" {
						input.SetMapIndex(key, reflect.Value{})
					}
				case reflect.Map:
					excludeInternal(value, rule)
				}
			}
		}
	}
}
1161972
func (s *EncryptionAlgorithmOptions) SetAllowedValues(v []*string) *EncryptionAlgorithmOptions {
	s.AllowedValues = v
	return s
}
134166
func (s *SearchService) AllowNoIndices(allowNoIndices bool) *SearchService {
	s.allowNoIndices = &allowNoIndices
	return s
}
141465
func (c Config) AllowModelAccess() bool {
	value, _ := c[AllowModelAccessKey].(bool)
	return value
}
126172
func AllowNFSSSDPlanSizes() []int {
	return []int{
		int(NFSSize100G),
		int(NFSSize500G),
		int(NFSSize1T),
		int(NFSSize2T),
		int(NFSSize4T),
	}
}
792814
func (p *PhysicalApply) ResolveIndices() (err error) {
	err = p.physicalSchemaProducer.ResolveIndices()
	if err != nil {
		return err
	}
	err = p.PhysicalJoin.ResolveIndices()
	if err != nil {
		return err
	}
	for i, col := range p.schema.Columns {
		newCol, err := col.ResolveIndices(p.PhysicalJoin.schema)
		if err != nil {
			return err
		}
		p.schema.Columns[i] = newCol.(*expression.Column)
	}
	for _, col := range p.OuterSchema {
		newCol, err := col.Column.ResolveIndices(p.children[0].Schema())
		if err != nil {
			return err
		}
		col.Column = *newCol.(*expression.Column)
	}
	joinedSchema := expression.MergeSchema(p.children[0].Schema(), p.children[1].Schema())
	for i, cond := range p.PhysicalJoin.EqualConditions {
		newSf, err := cond.ResolveIndices(joinedSchema)
		if err != nil {
			return err
		}
		p.PhysicalJoin.EqualConditions[i] = newSf.(*expression.ScalarFunction)
	}
	return
}
1041636
func (sf *ScalarFunction) ResolveIndices(schema *Schema) (Expression, error) {
	newSf := sf.Clone()
	err := newSf.resolveIndices(schema)
	return newSf, err
}