// SetField sets the Field field's value.
174684
func (s *PlacementStrategy) SetField(v string) *PlacementStrategy {
	s.Field = &v
	return s
}
295432
func (s *DescribeIndexFieldsOutput) SetIndexFields(v []*IndexFieldStatus) *DescribeIndexFieldsOutput {
	s.IndexFields = v
	return s
}
1202687
func (s *PipelineObject) SetFields(v []*Field) *PipelineObject {
	s.Fields = v
	return s
}
713203
func (s *GetDocumentPathInput) SetFields(v string) *GetDocumentPathInput {
	s.Fields = &v
	return s
}
1029542
func SetToFields(s fieldpath.Set) (metav1.Fields, error) {
	var err error
	f := newFields()
	s.Iterate(func(path fieldpath.Path) {
		if err != nil {
			return
		}
		tf := f
		for _, pe := range path {
			var str string
			str, err = PathElementString(pe)
			if err != nil {
				break
			}
			if _, ok := tf.Map[str]; ok {
				tf = tf.Map[str]
			} else {
				tf.Map[str] = newFields()
				tf = tf.Map[str]
			}
		}
		tf.Map["."] = newFields()
	})
	f = removeUselessDots(f)
	return f, err
}
748510
func (s *GetFolderPathInput) SetFields(v string) *GetFolderPathInput {
	s.Fields = &v
	return s
}
1276337
func (field *Field) Set(value interface{}) (err error) {
	if !field.Field.IsValid() {
		return errors.New("field value not valid")
	}

	if !field.Field.CanAddr() {
		return ErrUnaddressable
	}

	reflectValue, ok := value.(reflect.Value)
	if !ok {
		reflectValue = reflect.ValueOf(value)
	}

	fieldValue := field.Field
	if reflectValue.IsValid() {
		if reflectValue.Type().ConvertibleTo(fieldValue.Type()) {
			fieldValue.Set(reflectValue.Convert(fieldValue.Type()))
		} else {
			if fieldValue.Kind() == reflect.Ptr {
				if fieldValue.IsNil() {
					fieldValue.Set(reflect.New(field.Struct.Type.Elem()))
				}
				fieldValue = fieldValue.Elem()
			}

			if reflectValue.Type().ConvertibleTo(fieldValue.Type()) {
				fieldValue.Set(reflectValue.Convert(fieldValue.Type()))
			} else if scanner, ok := fieldValue.Addr().Interface().(sql.Scanner); ok {
				v := reflectValue.Interface()
				if valuer, ok := v.(driver.Valuer); ok {
					if v, err = valuer.Value(); err == nil {
						err = scanner.Scan(v)
					}
				} else {
					err = scanner.Scan(v)
				}
			} else {
				err = fmt.Errorf("could not convert argument of field %s from %s to %s", field.Name, reflectValue.Type(), fieldValue.Type())
			}
		}
	} else {
		field.Field.Set(reflect.Zero(field.Field.Type()))
	}

	field.IsBlank = isBlank(field.Field)
	return err
}
628528
func (dt *DbfTable) SetFieldValue(row int, fieldIndex int, value string) (err error) {

	b := []byte(dt.encoder.ConvertString(value))

	fieldLength := int(dt.fields[fieldIndex].length)

	//DEBUG

	//fmt.Printf("dt.numberOfBytesInHeader=%v\n\n", dt.numberOfBytesInHeader)
	//fmt.Printf("dt.lengthOfEachRecord=%v\n\n", dt.lengthOfEachRecord)

	// locate the offset of the field in DbfTable dataStore
	offset := int(dt.numberOfBytesInHeader)
	lengthOfRecord := int(dt.lengthOfEachRecord)

	offset = offset + (row * lengthOfRecord)

	recordOffset := 1

	for i := 0; i < len(dt.fields); i++ {
		if i == fieldIndex {
			break
		} else {
			recordOffset += int(dt.fields[i].length)
		}
	}

	dt.fillFieldWithBlanks(fieldLength, offset, recordOffset)

	// write new value
	switch dt.fields[fieldIndex].fieldType {
	case Character, Logical, Date:
		for i := 0; i < len(b) && i < fieldLength; i++ {
			dt.dataStore[offset+recordOffset+i] = b[i]
		}
	case Float, Numeric:
		for i := 0; i < fieldLength; i++ {
			// fmt.Printf("i:%v\n", i)
			if i < len(b) {
				dt.dataStore[offset+recordOffset+(fieldLength-i-1)] = b[(len(b)-1)-i]
			} else {
				break
			}
		}
	}

	return

	//fmt.Printf("field value:%#v\n", []byte(value))
	//fmt.Printf("field index:%#v\n", fieldIndex)
	//fmt.Printf("field fixedFieldLength:%v\n", dt.Fields[fieldIndex].fixedFieldLength)
	//fmt.Printf("string to byte:%#v\n", b)
}
1965
func (f *Field) SetStyle(style string) FieldInterface {
	f.tmplStyle = style
	f.Widget = widgets.BaseWidget(style, f.fieldType, f.tmpl)
	return f
}
595734
func (s *ReportTaskProgressInput) SetFields(v []*Field) *ReportTaskProgressInput {
	s.Fields = v
	return s
}
566177
func (s *Hit) SetFields(v map[string][]*string) *Hit {
	s.Fields = v
	return s
}
501233
func (s *PipelineDescription) SetFields(v []*Field) *PipelineDescription {
	s.Fields = v
	return s
}
515512
func setField(fr *Frame, x Value, name string, y Value) error {
	if x, ok := x.(HasSetField); ok {
		err := x.SetField(name, y)
		return err
	}
	return fmt.Errorf("can't assign to .%s field of %s", name, x.Type())
}
717045
func (s *DoubleOptions) SetSourceField(v string) *DoubleOptions {
	s.SourceField = &v
	return s
}
99734
func (s *Field) SetKey(v string) *Field {
	s.Key = &v
	return s
}
29766
func (s *TagKeyOnly) SetKey(v string) *TagKeyOnly {
	s.Key = &v
	return s
}
839028
func (s *Resolver) SetFieldName(v string) *Resolver {
	s.FieldName = &v
	return s
}