code: func (s *FieldSort) Source() (interface{}, error) {
  	source := make(map[string]interface{})
  	x := make(map[string]interface{})
  	source[s.fieldName] = x
  	if s.ascending {
  		x["order"] = "asc"
  	} else {
  		x["order"] = "desc"
  	}
  	if s.missing != nil {
  		x["missing"] = s.missing
  	}
  	if s.unmappedType != nil {
  		x["unmapped_type"] = *s.unmappedType
  	}
  	if s.sortMode != nil {
  		x["mode"] = *s.sortMode
  	}
  	if s.filter != nil {
  		src, err := s.filter.Source()
  		if err != nil {
  			return nil, err
  		}
  		x["filter"] = src
  	}
  	if s.path != nil {
  		x["path"] = *s.path
  	}
  	if s.nested != nil {
  		src, err := s.nested.Source()
  		if err != nil {
  			return nil, err
  		}
  		x["nested"] = src
  	}
  	return source, nil
  }
docs: // Source returns the JSON-serializable data.