func (c *Client) NewShowBottleRequest(ctx context.Context, path string) (*http.Request, error) {
	scheme := c.Scheme
	if scheme == "" {
		scheme = "http"
	}
	u := url.URL{Host: c.Host, Scheme: scheme, Path: path}
	req, err := http.NewRequest("GET", u.String(), nil)
	if err != nil {
		return nil, err
	}
	return req, nil
}
NewShowBottleRequest create the request corresponding to the show action endpoint of the bottle resource.
package client
import (
	"bytes"
	"context"
	"fmt"
	"golang.org/x/net/websocket"
	"net/http"
	"net/url"
	"strconv"
)
type CreateBottlePayload struct {
	Color     string  `form:"color" json:"color" xml:"color"`
	Country   *string `form:"country,omitempty" json:"country,omitempty" xml:"country,omitempty"`
	Name      string  `form:"name" json:"name" xml:"name"`
	Region    *string `form:"region,omitempty" json:"region,omitempty" xml:"region,omitempty"`
	Review    *string `form:"review,omitempty" json:"review,omitempty" xml:"review,omitempty"`
	Sweetness *int    `form:"sweetness,omitempty" json:"sweetness,omitempty" xml:"sweetness,omitempty"`
	Varietal  string  `form:"varietal" json:"varietal" xml:"varietal"`
	Vineyard  string  `form:"vineyard" json:"vineyard" xml:"vineyard"`
	Vintage   int     `form:"vintage" json:"vintage" xml:"vintage"`
}
func CreateBottlePath(accountID int) string {
	param0 := strconv.Itoa(accountID)
	return fmt.Sprintf("/cellar/accounts/%s/bottles", param0)
}
func (c *Client) CreateBottle(ctx context.Context, path string, payload *CreateBottlePayload, contentType string) (*http.Response, error) {
	req, err := c.NewCreateBottleRequest(ctx, path, payload, contentType)
	if err != nil {
		return nil, err
	}
	return c.Client.Do(ctx, req)
}
func (c *Client) NewCreateBottleRequest(ctx context.Context, path string, payload *CreateBottlePayload, contentType string) (*http.Request, error) {
	var body bytes.Buffer
	if contentType == "" {
		contentType = "*/*"  
	}
	err := c.Encoder.Encode(payload, &body, contentType)
	if err != nil {
		return nil, fmt.Errorf("failed to encode body: %s", err)
	}
	scheme := c.Scheme
	if scheme == "" {
		scheme = "http"
	}
	u := url.URL{Host: c.Host, Scheme: scheme, Path: path}
	req, err := http.NewRequest("POST", u.String(), &body)
	if err != nil {
		return nil, err
	}
	header := req.Header
	if contentType == "*/*" {
		header.Set("Content-Type", "application/json")
	} else {
		header.Set("Content-Type", contentType)
	}
	return req, nil
}
func DeleteBottlePath(accountID int, bottleID int) string {
	param0 := strconv.Itoa(accountID)
	param1 := strconv.Itoa(bottleID)
	return fmt.Sprintf("/cellar/accounts/%s/bottles/%s", param0, param1)
}
func (c *Client) DeleteBottle(ctx context.Context, path string) (*http.Response, error) {
	req, err := c.NewDeleteBottleRequest(ctx, path)
	if err != nil {
		return nil, err
	}
	return c.Client.Do(ctx, req)
}
func (c *Client) NewDeleteBottleRequest(ctx context.Context, path string) (*http.Request, error) {
	scheme := c.Scheme
	if scheme == "" {
		scheme = "http"
	}
	u := url.URL{Host: c.Host, Scheme: scheme, Path: path}
	req, err := http.NewRequest("DELETE", u.String(), nil)
	if err != nil {
		return nil, err
	}
	return req, nil
}
func ListBottlePath(accountID int) string {
	param0 := strconv.Itoa(accountID)
	return fmt.Sprintf("/cellar/accounts/%s/bottles", param0)
}
func (c *Client) ListBottle(ctx context.Context, path string, years []int) (*http.Response, error) {
	req, err := c.NewListBottleRequest(ctx, path, years)
	if err != nil {
		return nil, err
	}
	return c.Client.Do(ctx, req)
}
func (c *Client) NewListBottleRequest(ctx context.Context, path string, years []int) (*http.Request, error) {
	scheme := c.Scheme
	if scheme == "" {
		scheme = "http"
	}
	u := url.URL{Host: c.Host, Scheme: scheme, Path: path}
	values := u.Query()
	for _, p := range years {
		tmp14 := strconv.Itoa(p)
		values.Add("years", tmp14)
	}
	u.RawQuery = values.Encode()
	req, err := http.NewRequest("GET", u.String(), nil)
	if err != nil {
		return nil, err
	}
	return req, nil
}
type RateBottlePayload struct {
	Rating int `form:"rating" json:"rating" xml:"rating"`
}
func RateBottlePath(accountID int, bottleID int) string {
	param0 := strconv.Itoa(accountID)
	param1 := strconv.Itoa(bottleID)
	return fmt.Sprintf("/cellar/accounts/%s/bottles/%s/actions/rate", param0, param1)
}
func (c *Client) RateBottle(ctx context.Context, path string, payload *RateBottlePayload, contentType string) (*http.Response, error) {
	req, err := c.NewRateBottleRequest(ctx, path, payload, contentType)
	if err != nil {
		return nil, err
	}
	return c.Client.Do(ctx, req)
}
func (c *Client) NewRateBottleRequest(ctx context.Context, path string, payload *RateBottlePayload, contentType string) (*http.Request, error) {
	var body bytes.Buffer
	if contentType == "" {
		contentType = "*/*"  
	}
	err := c.Encoder.Encode(payload, &body, contentType)
	if err != nil {
		return nil, fmt.Errorf("failed to encode body: %s", err)
	}
	scheme := c.Scheme
	if scheme == "" {
		scheme = "http"
	}
	u := url.URL{Host: c.Host, Scheme: scheme, Path: path}
	req, err := http.NewRequest("PUT", u.String(), &body)
	if err != nil {
		return nil, err
	}
	header := req.Header
	if contentType == "*/*" {
		header.Set("Content-Type", "application/json")
	} else {
		header.Set("Content-Type", contentType)
	}
	return req, nil
}
func ShowBottlePath(accountID int, bottleID int) string {
	param0 := strconv.Itoa(accountID)
	param1 := strconv.Itoa(bottleID)
	return fmt.Sprintf("/cellar/accounts/%s/bottles/%s", param0, param1)
}
func (c *Client) ShowBottle(ctx context.Context, path string) (*http.Response, error) {
	req, err := c.NewShowBottleRequest(ctx, path)
	if err != nil {
		return nil, err
	}
	return c.Client.Do(ctx, req)
}