func (mt *BottleFull) Validate() (err error) {
	if mt.Href == "" {
		err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "href"))
	}
	if mt.Name == "" {
		err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "name"))
	}
	if mt.Vineyard == "" {
		err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "vineyard"))
	}
	if mt.Varietal == "" {
		err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "varietal"))
	}
	if mt.Color == "" {
		err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "color"))
	}
	if mt.Account != nil {
		if err2 := mt.Account.Validate(); err2 != nil {
			err = goa.MergeErrors(err, err2)
		}
	}
	if !(mt.Color == "red" || mt.Color == "white" || mt.Color == "rose" || mt.Color == "yellow" || mt.Color == "sparkling") {
		err = goa.MergeErrors(err, goa.InvalidEnumValueError(`response.color`, mt.Color, []interface{}{"red", "white", "rose", "yellow", "sparkling"}))
	}
	if mt.Country != nil {
		if utf8.RuneCountInString(*mt.Country) < 2 {
			err = goa.MergeErrors(err, goa.InvalidLengthError(`response.country`, *mt.Country, utf8.RuneCountInString(*mt.Country), 2, true))
		}
	}
	if mt.Links != nil {
		if err2 := mt.Links.Validate(); err2 != nil {
			err = goa.MergeErrors(err, err2)
		}
	}
	if utf8.RuneCountInString(mt.Name) < 2 {
		err = goa.MergeErrors(err, goa.InvalidLengthError(`response.name`, mt.Name, utf8.RuneCountInString(mt.Name), 2, true))
	}
	if mt.Rating != nil {
		if *mt.Rating < 1 {
			err = goa.MergeErrors(err, goa.InvalidRangeError(`response.rating`, *mt.Rating, 1, true))
		}
	}
	if mt.Rating != nil {
		if *mt.Rating > 5 {
			err = goa.MergeErrors(err, goa.InvalidRangeError(`response.rating`, *mt.Rating, 5, false))
		}
	}
	if mt.Review != nil {
		if utf8.RuneCountInString(*mt.Review) < 3 {
			err = goa.MergeErrors(err, goa.InvalidLengthError(`response.review`, *mt.Review, utf8.RuneCountInString(*mt.Review), 3, true))
		}
	}
	if mt.Review != nil {
		if utf8.RuneCountInString(*mt.Review) > 300 {
			err = goa.MergeErrors(err, goa.InvalidLengthError(`response.review`, *mt.Review, utf8.RuneCountInString(*mt.Review), 300, false))
		}
	}
	if mt.Sweetness != nil {
		if *mt.Sweetness < 1 {
			err = goa.MergeErrors(err, goa.InvalidRangeError(`response.sweetness`, *mt.Sweetness, 1, true))
		}
	}
	if mt.Sweetness != nil {
		if *mt.Sweetness > 5 {
			err = goa.MergeErrors(err, goa.InvalidRangeError(`response.sweetness`, *mt.Sweetness, 5, false))
		}
	}
	if utf8.RuneCountInString(mt.Varietal) < 4 {
		err = goa.MergeErrors(err, goa.InvalidLengthError(`response.varietal`, mt.Varietal, utf8.RuneCountInString(mt.Varietal), 4, true))
	}
	if utf8.RuneCountInString(mt.Vineyard) < 2 {
		err = goa.MergeErrors(err, goa.InvalidLengthError(`response.vineyard`, mt.Vineyard, utf8.RuneCountInString(mt.Vineyard), 2, true))
	}
	if mt.Vintage < 1900 {
		err = goa.MergeErrors(err, goa.InvalidRangeError(`response.vintage`, mt.Vintage, 1900, true))
	}
	if mt.Vintage > 2020 {
		err = goa.MergeErrors(err, goa.InvalidRangeError(`response.vintage`, mt.Vintage, 2020, false))
	}
	return
}
Validate validates the BottleFull media type instance.
package client
import (
	"github.com/goadesign/goa"
	"net/http"
	"time"
	"unicode/utf8"
)
type Account struct {
	CreatedAt time.Time `form:"created_at" json:"created_at" xml:"created_at"`
	CreatedBy string `form:"created_by" json:"created_by" xml:"created_by"`
	Href string `form:"href" json:"href" xml:"href"`
	ID int `form:"id" json:"id" xml:"id"`
	Name string `form:"name" json:"name" xml:"name"`
}
func (mt *Account) Validate() (err error) {
	if mt.Href == "" {
		err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "href"))
	}
	if mt.Name == "" {
		err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "name"))
	}
	if mt.CreatedBy == "" {
		err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "created_by"))
	}
	if err2 := goa.ValidateFormat(goa.FormatEmail, mt.CreatedBy); err2 != nil {
		err = goa.MergeErrors(err, goa.InvalidFormatError(`response.created_by`, mt.CreatedBy, goa.FormatEmail, err2))
	}
	return
}
type AccountLink struct {
	Href string `form:"href" json:"href" xml:"href"`
	ID int `form:"id" json:"id" xml:"id"`
}
func (mt *AccountLink) Validate() (err error) {
	if mt.Href == "" {
		err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "href"))
	}
	return
}
type AccountTiny struct {
	Href string `form:"href" json:"href" xml:"href"`
	ID int `form:"id" json:"id" xml:"id"`
	Name string `form:"name" json:"name" xml:"name"`
}
func (mt *AccountTiny) Validate() (err error) {
	if mt.Href == "" {
		err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "href"))
	}
	if mt.Name == "" {
		err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "name"))
	}
	return
}
func (c *Client) DecodeAccount(resp *http.Response) (*Account, error) {
	var decoded Account
	err := c.Decoder.Decode(&decoded, resp.Body, resp.Header.Get("Content-Type"))
	return &decoded, err
}
func (c *Client) DecodeAccountLink(resp *http.Response) (*AccountLink, error) {
	var decoded AccountLink
	err := c.Decoder.Decode(&decoded, resp.Body, resp.Header.Get("Content-Type"))
	return &decoded, err
}
func (c *Client) DecodeAccountTiny(resp *http.Response) (*AccountTiny, error) {
	var decoded AccountTiny
	err := c.Decoder.Decode(&decoded, resp.Body, resp.Header.Get("Content-Type"))
	return &decoded, err
}
type AccountCollection []*Account
func (mt AccountCollection) Validate() (err error) {
	for _, e := range mt {
		if e != nil {
			if err2 := e.Validate(); err2 != nil {
				err = goa.MergeErrors(err, err2)
			}
		}
	}
	return
}
type AccountLinkCollection []*AccountLink
func (mt AccountLinkCollection) Validate() (err error) {
	for _, e := range mt {
		if e != nil {
			if err2 := e.Validate(); err2 != nil {
				err = goa.MergeErrors(err, err2)
			}
		}
	}
	return
}
type AccountTinyCollection []*AccountTiny
func (mt AccountTinyCollection) Validate() (err error) {
	for _, e := range mt {
		if e != nil {
			if err2 := e.Validate(); err2 != nil {
				err = goa.MergeErrors(err, err2)
			}
		}
	}
	return
}
func (c *Client) DecodeAccountCollection(resp *http.Response) (AccountCollection, error) {
	var decoded AccountCollection
	err := c.Decoder.Decode(&decoded, resp.Body, resp.Header.Get("Content-Type"))
	return decoded, err
}
func (c *Client) DecodeAccountLinkCollection(resp *http.Response) (AccountLinkCollection, error) {
	var decoded AccountLinkCollection
	err := c.Decoder.Decode(&decoded, resp.Body, resp.Header.Get("Content-Type"))
	return decoded, err
}
func (c *Client) DecodeAccountTinyCollection(resp *http.Response) (AccountTinyCollection, error) {
	var decoded AccountTinyCollection
	err := c.Decoder.Decode(&decoded, resp.Body, resp.Header.Get("Content-Type"))
	return decoded, err
}
type Bottle struct {
	Account *AccountTiny `form:"account,omitempty" json:"account,omitempty" xml:"account,omitempty"`
	Href string `form:"href" json:"href" xml:"href"`
	ID int `form:"id" json:"id" xml:"id"`
	Links *BottleLinks `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"`
	Name  string       `form:"name" json:"name" xml:"name"`
	Rating   *int   `form:"rating,omitempty" json:"rating,omitempty" xml:"rating,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 (mt *Bottle) Validate() (err error) {
	if mt.Href == "" {
		err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "href"))
	}
	if mt.Name == "" {
		err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "name"))
	}
	if mt.Vineyard == "" {
		err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "vineyard"))
	}
	if mt.Varietal == "" {
		err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "varietal"))
	}
	if mt.Account != nil {
		if err2 := mt.Account.Validate(); err2 != nil {
			err = goa.MergeErrors(err, err2)
		}
	}
	if mt.Links != nil {
		if err2 := mt.Links.Validate(); err2 != nil {
			err = goa.MergeErrors(err, err2)
		}
	}
	if utf8.RuneCountInString(mt.Name) < 2 {
		err = goa.MergeErrors(err, goa.InvalidLengthError(`response.name`, mt.Name, utf8.RuneCountInString(mt.Name), 2, true))
	}
	if mt.Rating != nil {
		if *mt.Rating < 1 {
			err = goa.MergeErrors(err, goa.InvalidRangeError(`response.rating`, *mt.Rating, 1, true))
		}
	}
	if mt.Rating != nil {
		if *mt.Rating > 5 {
			err = goa.MergeErrors(err, goa.InvalidRangeError(`response.rating`, *mt.Rating, 5, false))
		}
	}
	if utf8.RuneCountInString(mt.Varietal) < 4 {
		err = goa.MergeErrors(err, goa.InvalidLengthError(`response.varietal`, mt.Varietal, utf8.RuneCountInString(mt.Varietal), 4, true))
	}
	if utf8.RuneCountInString(mt.Vineyard) < 2 {
		err = goa.MergeErrors(err, goa.InvalidLengthError(`response.vineyard`, mt.Vineyard, utf8.RuneCountInString(mt.Vineyard), 2, true))
	}
	if mt.Vintage < 1900 {
		err = goa.MergeErrors(err, goa.InvalidRangeError(`response.vintage`, mt.Vintage, 1900, true))
	}
	if mt.Vintage > 2020 {
		err = goa.MergeErrors(err, goa.InvalidRangeError(`response.vintage`, mt.Vintage, 2020, false))
	}
	return
}
type BottleFull struct {
	Account *Account `form:"account,omitempty" json:"account,omitempty" xml:"account,omitempty"`
	Color   string   `form:"color" json:"color" xml:"color"`
	Country *string  `form:"country,omitempty" json:"country,omitempty" xml:"country,omitempty"`
	CreatedAt time.Time `form:"created_at" json:"created_at" xml:"created_at"`
	Href string `form:"href" json:"href" xml:"href"`
	ID int `form:"id" json:"id" xml:"id"`
	Links *BottleLinks `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"`
	Name  string       `form:"name" json:"name" xml:"name"`
	Rating    *int    `form:"rating,omitempty" json:"rating,omitempty" xml:"rating,omitempty"`
	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"`
	UpdatedAt *time.Time `form:"updated_at,omitempty" json:"updated_at,omitempty" xml:"updated_at,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"`
}