// SetIndexField sets the IndexField field's value.
6850
func (s *DeleteIndexFieldOutput) SetIndexField(v *IndexFieldStatus) *DeleteIndexFieldOutput {
	s.IndexField = v
	return s
}
7616
func (s *DescribeDocumentVersionsInput) SetFields(v string) *DescribeDocumentVersionsInput {
	s.Fields = &v
	return s
}
761922
func (s *ScanInput) SetIndexName(v string) *ScanInput {
	s.IndexName = &v
	return s
}
68879
func (s *ResultField) SetField(v string) *ResultField {
	s.Field = &v
	return s
}
1322380
func (s *GlobalSecondaryIndexDescription) SetIndexName(v string) *GlobalSecondaryIndexDescription {
	s.IndexName = &v
	return s
}
547730
func (s *RuleCondition) SetField(v string) *RuleCondition {
	s.Field = &v
	return s
}
634219
func (s *CreateGlobalSecondaryIndexAction) SetIndexName(v string) *CreateGlobalSecondaryIndexAction {
	s.IndexName = &v
	return s
}
1223139
func (s *ElasticsearchDestinationUpdate) SetIndexName(v string) *ElasticsearchDestinationUpdate {
	s.IndexName = &v
	return s
}
1176403
func (bA *BitArray) SetIndex(i int, v bool) bool {
	if bA == nil {
		return false
	}
	bA.mtx.Lock()
	defer bA.mtx.Unlock()
	return bA.setIndex(i, v)
}
434741
func (s *SearchIndexInput) SetIndexName(v string) *SearchIndexInput {
	s.IndexName = &v
	return s
}
308030
func (s *IndexField) SetIndexFieldType(v string) *IndexField {
	s.IndexFieldType = &v
	return s
}
1081239
func (c *Config) setField(name string, idx int, v value, options []Option) Error {
	opts := makeOptions(options)
	p := parsePathIdx(name, opts.pathSep, idx)

	err := p.SetValue(c, opts, v)
	if err != nil {
		return err
	}

	if opts.meta != nil {
		v.setMeta(opts.meta)
	}
	return nil
}
921042
func (s *GlobalSecondaryIndexDescription) SetIndexArn(v string) *GlobalSecondaryIndexDescription {
	s.IndexArn = &v
	return s
}
410178
func (s *DescribeIndexInput) SetIndexName(v string) *DescribeIndexInput {
	s.IndexName = &v
	return s
}
334872
func (s *BatchDetachFromIndex) SetIndexReference(v *ObjectReference) *BatchDetachFromIndex {
	s.IndexReference = v
	return s
}
692595
func (s *BatchWriteOperationResponse) SetCreateIndex(v *BatchCreateIndexResponse) *BatchWriteOperationResponse {
	s.CreateIndex = v
	return s
}
1263783
func (m *Meta) setField(k string, v starlark.Value) (err error) {
	ptr := m.fieldsMap()[k]
	if ptr == nil {
		return fmt.Errorf("set_meta: no such meta key %q", k)
	}

	// On success, mark the field as modified.
	defer func() {
		if err == nil {
			m.touch(ptr)
		}
	}()

	switch ptr := ptr.(type) {
	case *string:
		if str, ok := v.(starlark.String); ok {
			*ptr = str.GoString()
			return nil
		}
		return fmt.Errorf("set_meta: got %s, expecting string", v.Type())

	case *bool:
		if b, ok := v.(starlark.Bool); ok {
			*ptr = bool(b)
			return nil
		}
		return fmt.Errorf("set_meta: got %s, expecting bool", v.Type())

	case *[]string:
		if iterable, ok := v.(starlark.Iterable); ok {
			iter := iterable.Iterate()
			defer iter.Done()

			var vals []string
			for x := starlark.Value(nil); iter.Next(&x); {
				if str, ok := x.(starlark.String); ok {
					vals = append(vals, str.GoString())
				} else {
					return fmt.Errorf("set_meta: got %s, expecting string", x.Type())
				}
			}

			*ptr = vals
			return nil
		}
		return fmt.Errorf("set_meta: got %s, expecting an iterable", v.Type())

	default:
		panic("impossible")
	}
}