code: func (b *IndicesCreateService) Do(ctx context.Context) (*IndicesCreateResult, error) {
  	if b.index == "" {
  		return nil, errors.New("missing index name")
  	}
  
  	// Build url
  	path, err := uritemplates.Expand("/{index}", map[string]string{
  		"index": b.index,
  	})
  	if err != nil {
  		return nil, err
  	}
  
  	params := make(url.Values)
  	if b.pretty {
  		params.Set("pretty", "true")
  	}
  	if b.masterTimeout != "" {
  		params.Set("master_timeout", b.masterTimeout)
  	}
  	if b.timeout != "" {
  		params.Set("timeout", b.timeout)
  	}
  
  	// Setup HTTP request body
  	var body interface{}
  	if b.bodyJson != nil {
  		body = b.bodyJson
  	} else {
  		body = b.bodyString
  	}
  
  	// Get response
  	res, err := b.client.PerformRequest(ctx, PerformRequestOptions{
  		Method: "PUT",
  		Path:   path,
  		Params: params,
  		Body:   body,
  	})
  	if err != nil {
  		return nil, err
  	}
  
  	ret := new(IndicesCreateResult)
  	if err := b.client.decoder.Decode(res.Body, ret); err != nil {
  		return nil, err
  	}
  	return ret, nil
  }
docs: // Do executes the operation.