code: func (p *PercentilesBucketAggregation) Source() (interface{}, error) {
  	source := make(map[string]interface{})
  	params := make(map[string]interface{})
  	source["percentiles_bucket"] = params
  
  	if p.format != "" {
  		params["format"] = p.format
  	}
  	if p.gapPolicy != "" {
  		params["gap_policy"] = p.gapPolicy
  	}
  
  	// Add buckets paths
  	switch len(p.bucketsPaths) {
  	case 0:
  	case 1:
  		params["buckets_path"] = p.bucketsPaths[0]
  	default:
  		params["buckets_path"] = p.bucketsPaths
  	}
  
  	// Add percents
  	if len(p.percents) > 0 {
  		params["percents"] = p.percents
  	}
  
  	// Add Meta data if available
  	if len(p.meta) > 0 {
  		source["meta"] = p.meta
  	}
  
  	return source, nil
  }
docs: // Source returns the a JSON-serializable interface.