// SetFields sets the Fields field's value.
501233
func (s *PipelineDescription) SetFields(v []*Field) *PipelineDescription {
	s.Fields = v
	return s
}
392037
func SetField(obj interface{}, name string, value interface{}) error {
	structValue := reflect.ValueOf(obj).Elem()
	structFieldValue := structValue.FieldByName(name)

	if !structFieldValue.IsValid() {
		return fmt.Errorf("No such field: %s in obj", name)
	}

	if !structFieldValue.CanSet() {
		return fmt.Errorf("Cannot set %s field value", name)
	}

	structFieldType := structFieldValue.Type()
	val := reflect.ValueOf(value)
	if structFieldType != val.Type() {
		invalidTypeError := errors.New("Provided value type didn't match obj field type")
		return invalidTypeError
	}

	structFieldValue.Set(val)
	return nil
}
250856
func SetField(s interface{}, name string, value interface{}) error {
	return setField(reflect.ValueOf(s), name, name, value)
}
221601
func (s *Group) SetKeys(v []*string) *Group {
	s.Keys = v
	return s
}
566177
func (s *Hit) SetFields(v map[string][]*string) *Hit {
	s.Fields = v
	return s
}
1357682
func (e *Event) Fields(fields map[string]interface{}) *Event {
	if e == nil {
		return e
	}
	e.buf = appendFields(e.buf, fields)
	return e
}
145279
func (s *GetResourcesOutput) SetDocuments(v []*DocumentMetadata) *GetResourcesOutput {
	s.Documents = v
	return s
}
1202687
func (s *PipelineObject) SetFields(v []*Field) *PipelineObject {
	s.Fields = v
	return s
}
691547
func (s *CSVOutput) SetQuoteFields(v string) *CSVOutput {
	s.QuoteFields = &v
	return s
}
1068199
func (s *StreamRecord) SetKeys(v map[string]*dynamodb.AttributeValue) *StreamRecord {
	s.Keys = v
	return s
}
1056366
func (s *DoubleArrayOptions) SetSourceFields(v string) *DoubleArrayOptions {
	s.SourceFields = &v
	return s
}
965349
func (s *Record) SetValues(v []*Value) *Record {
	s.Values = v
	return s
}
536552
func (s *IndicesStatsService) Fields(fields ...string) *IndicesStatsService {
	s.fields = append(s.fields, fields...)
	return s
}
1093196
func AddFields(ctx context.Context, fields logrus.Fields) {
	ctxlogrus.AddFields(ctx, fields)
}
5728
func (m *Message) SetField(name string, val starlark.Value) error {
	fd, ok := m.typ.fields[name]
	if !ok {
		return fmt.Errorf("proto message %q has no field %q", m.Type(), name)
	}

	// Setting a field to None removes it completely.
	if val == starlark.None {
		if err := m.checkMutable(); err != nil {
			return err
		}
		delete(m.fields, name)
		return nil
	}

	// If assigning to a messaged-valued field (singular or repeated), recognize
	// dicts and Nones and use them to instantiate values (perhaps empty) of the
	// corresponding proto type. This allows to construct deeply nested protobuf
	// messages just by using lists, dicts and primitive values. Python does this
	// too.
	val, err := maybeMakeMessages(fd.typ, val)
	if err != nil {
		return fmt.Errorf("when constructing %q in proto %q - %s", name, m.Type(), err)
	}

	// Do a light type check. It doesn't "recurse" into lists or tuples. So it is
	// still possible to assign e.g. a list of strings to a "repeated int64"
	// field. This will be discovered later in ToProto when trying to construct
	// a proto message from Starlark values.
	if err := checkAssignable(fd.typ, val); err != nil {
		return fmt.Errorf("can't assign value of type %q to field %q in proto %q - %s", val.Type(), name, m.Type(), err)
	}
	if err := m.checkMutable(); err != nil {
		return err
	}
	m.fields[name] = val

	// onChanged hooks is used by oneof's to clear alternatives that weren't
	// picked.
	if fd.onChanged != nil {
		fd.onChanged(m.fields)
	}

	return nil
}
205001
func (s *GetRecordsOutput) SetRecords(v []*Record) *GetRecordsOutput {
	s.Records = v
	return s
}
337588
func (s *UpdateRecordsOutput) SetRecords(v []*Record) *UpdateRecordsOutput {
	s.Records = v
	return s
}