func ParseGetSmallAndLightEnrollmentBySellerSKUResp(rsp *http.Response) (*GetSmallAndLightEnrollmentBySellerSKUResp, error) {
	bodyBytes, err := ioutil.ReadAll(rsp.Body)
	defer rsp.Body.Close()
	if err != nil {
		return nil, err
	}
	response := &GetSmallAndLightEnrollmentBySellerSKUResp{
		Body:         bodyBytes,
		HTTPResponse: rsp,
	}
	switch {
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
		var dest SmallAndLightEnrollment
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON200 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON400 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON403 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON404 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 413:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON413 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 415:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON415 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON429 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON500 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON503 = &dest
	}
	return response, nil
}
ParseGetSmallAndLightEnrollmentBySellerSKUResp parses an HTTP response from a GetSmallAndLightEnrollmentBySellerSKUWithResponse call
package smallAndLight
import (
	"bytes"
	"context"
	"encoding/json"
	"fmt"
	"io"
	"io/ioutil"
	"net/http"
	"net/url"
	runt "runtime"
	"strings"
	"gopkg.me/selling-partner-api-sdk/pkg/runtime"
)
type RequestBeforeFn func(ctx context.Context, req *http.Request) error
type ResponseAfterFn func(ctx context.Context, rsp *http.Response) error
type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}
type Client struct {
	Endpoint string
	Client HttpRequestDoer
	RequestBefore RequestBeforeFn
	ResponseAfter ResponseAfterFn
	UserAgent string
}
type ClientOption func(*Client) error
func NewClient(endpoint string, opts ...ClientOption) (*Client, error) {
	client := Client{
		Endpoint: endpoint,
	}
	for _, o := range opts {
		if err := o(&client); err != nil {
			return nil, err
		}
	}
	if !strings.HasSuffix(client.Endpoint, "/") {
		client.Endpoint += "/"
	}
	if client.Client == nil {
		client.Client = http.DefaultClient
	}
	if client.UserAgent == "" {
		client.UserAgent = fmt.Sprintf("selling-partner-api-sdk/v1.0 (Language=%s; Platform=%s-%s)", strings.Replace(runt.Version(), "go", "go/", -1), runt.GOOS, runt.GOARCH)
	}
	return &client, nil
}
func WithHTTPClient(doer HttpRequestDoer) ClientOption {
	return func(c *Client) error {
		c.Client = doer
		return nil
	}
}
func WithUserAgent(userAgent string) ClientOption {
	return func(c *Client) error {
		c.UserAgent = userAgent
		return nil
	}
}
func WithRequestBefore(fn RequestBeforeFn) ClientOption {
	return func(c *Client) error {
		c.RequestBefore = fn
		return nil
	}
}
func WithResponseAfter(fn ResponseAfterFn) ClientOption {
	return func(c *Client) error {
		c.ResponseAfter = fn
		return nil
	}
}
type ClientInterface interface {
	GetSmallAndLightEligibilityBySellerSKU(ctx context.Context, sellerSKU string, params *GetSmallAndLightEligibilityBySellerSKUParams) (*http.Response, error)
	DeleteSmallAndLightEnrollmentBySellerSKU(ctx context.Context, sellerSKU string, params *DeleteSmallAndLightEnrollmentBySellerSKUParams) (*http.Response, error)
	GetSmallAndLightEnrollmentBySellerSKU(ctx context.Context, sellerSKU string, params *GetSmallAndLightEnrollmentBySellerSKUParams) (*http.Response, error)
	PutSmallAndLightEnrollmentBySellerSKU(ctx context.Context, sellerSKU string, params *PutSmallAndLightEnrollmentBySellerSKUParams) (*http.Response, error)
	GetSmallAndLightFeePreviewWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
	GetSmallAndLightFeePreview(ctx context.Context, body GetSmallAndLightFeePreviewJSONRequestBody) (*http.Response, error)
}
func (c *Client) GetSmallAndLightEligibilityBySellerSKU(ctx context.Context, sellerSKU string, params *GetSmallAndLightEligibilityBySellerSKUParams) (*http.Response, error) {
	req, err := NewGetSmallAndLightEligibilityBySellerSKURequest(c.Endpoint, sellerSKU, params)
	if err != nil {
		return nil, err
	}
	req = req.WithContext(ctx)
	req.Header.Set("User-Agent", c.UserAgent)
	if c.RequestBefore != nil {
		err = c.RequestBefore(ctx, req)
		if err != nil {
			return nil, err
		}
	}
	rsp, err := c.Client.Do(req)
	if err != nil {
		return nil, err
	}
	if c.ResponseAfter != nil {
		err = c.ResponseAfter(ctx, rsp)
		if err != nil {
			return nil, err
		}
	}
	return rsp, nil
}
func (c *Client) DeleteSmallAndLightEnrollmentBySellerSKU(ctx context.Context, sellerSKU string, params *DeleteSmallAndLightEnrollmentBySellerSKUParams) (*http.Response, error) {
	req, err := NewDeleteSmallAndLightEnrollmentBySellerSKURequest(c.Endpoint, sellerSKU, params)
	if err != nil {
		return nil, err
	}
	req = req.WithContext(ctx)
	req.Header.Set("User-Agent", c.UserAgent)
	if c.RequestBefore != nil {
		err = c.RequestBefore(ctx, req)
		if err != nil {
			return nil, err
		}
	}
	rsp, err := c.Client.Do(req)
	if err != nil {
		return nil, err
	}
	if c.ResponseAfter != nil {
		err = c.ResponseAfter(ctx, rsp)
		if err != nil {
			return nil, err
		}
	}
	return rsp, nil
}
func (c *Client) GetSmallAndLightEnrollmentBySellerSKU(ctx context.Context, sellerSKU string, params *GetSmallAndLightEnrollmentBySellerSKUParams) (*http.Response, error) {
	req, err := NewGetSmallAndLightEnrollmentBySellerSKURequest(c.Endpoint, sellerSKU, params)
	if err != nil {
		return nil, err
	}
	req = req.WithContext(ctx)
	req.Header.Set("User-Agent", c.UserAgent)
	if c.RequestBefore != nil {
		err = c.RequestBefore(ctx, req)
		if err != nil {
			return nil, err
		}
	}
	rsp, err := c.Client.Do(req)
	if err != nil {
		return nil, err
	}
	if c.ResponseAfter != nil {
		err = c.ResponseAfter(ctx, rsp)
		if err != nil {
			return nil, err
		}
	}
	return rsp, nil
}
func (c *Client) PutSmallAndLightEnrollmentBySellerSKU(ctx context.Context, sellerSKU string, params *PutSmallAndLightEnrollmentBySellerSKUParams) (*http.Response, error) {
	req, err := NewPutSmallAndLightEnrollmentBySellerSKURequest(c.Endpoint, sellerSKU, params)
	if err != nil {
		return nil, err
	}
	req = req.WithContext(ctx)
	req.Header.Set("User-Agent", c.UserAgent)
	if c.RequestBefore != nil {
		err = c.RequestBefore(ctx, req)
		if err != nil {
			return nil, err
		}
	}
	rsp, err := c.Client.Do(req)
	if err != nil {
		return nil, err
	}
	if c.ResponseAfter != nil {
		err = c.ResponseAfter(ctx, rsp)
		if err != nil {
			return nil, err
		}
	}
	return rsp, nil
}
func (c *Client) GetSmallAndLightFeePreviewWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error) {
	req, err := NewGetSmallAndLightFeePreviewRequestWithBody(c.Endpoint, contentType, body)
	if err != nil {
		return nil, err
	}
	req = req.WithContext(ctx)
	req.Header.Set("User-Agent", c.UserAgent)
	if c.RequestBefore != nil {
		err = c.RequestBefore(ctx, req)
		if err != nil {
			return nil, err
		}
	}
	rsp, err := c.Client.Do(req)
	if err != nil {
		return nil, err
	}
	if c.ResponseAfter != nil {
		err = c.ResponseAfter(ctx, rsp)
		if err != nil {
			return nil, err
		}
	}
	return rsp, nil
}
func (c *Client) GetSmallAndLightFeePreview(ctx context.Context, body GetSmallAndLightFeePreviewJSONRequestBody) (*http.Response, error) {
	req, err := NewGetSmallAndLightFeePreviewRequest(c.Endpoint, body)
	if err != nil {
		return nil, err
	}
	req = req.WithContext(ctx)
	if c.RequestBefore != nil {
		err = c.RequestBefore(ctx, req)
		if err != nil {
			return nil, err
		}
	}
	return c.Client.Do(req)
}
func NewGetSmallAndLightEligibilityBySellerSKURequest(endpoint string, sellerSKU string, params *GetSmallAndLightEligibilityBySellerSKUParams) (*http.Request, error) {
	var err error
	var pathParam0 string
	pathParam0, err = runtime.StyleParam("simple", false, "sellerSKU", sellerSKU)
	if err != nil {
		return nil, err
	}
	queryUrl, err := url.Parse(endpoint)
	if err != nil {
		return nil, err
	}
	basePath := fmt.Sprintf("/fba/smallAndLight/v1/eligibilities/%s", pathParam0)
	if basePath[0] == '/' {
		basePath = basePath[1:]
	}
	queryUrl, err = queryUrl.Parse(basePath)
	if err != nil {
		return nil, err
	}
	queryValues := queryUrl.Query()
	if queryFrag, err := runtime.StyleParam("form", true, "marketplaceIds", params.MarketplaceIds); err != nil {
		return nil, err
	} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
		return nil, err
	} else {
		for k, v := range parsed {
			for _, v2 := range v {
				queryValues.Add(k, v2)
			}
		}
	}
	queryUrl.RawQuery = queryValues.Encode()
	req, err := http.NewRequest("GET", queryUrl.String(), nil)
	if err != nil {
		return nil, err
	}
	return req, nil
}
func NewDeleteSmallAndLightEnrollmentBySellerSKURequest(endpoint string, sellerSKU string, params *DeleteSmallAndLightEnrollmentBySellerSKUParams) (*http.Request, error) {
	var err error
	var pathParam0 string
	pathParam0, err = runtime.StyleParam("simple", false, "sellerSKU", sellerSKU)
	if err != nil {
		return nil, err
	}
	queryUrl, err := url.Parse(endpoint)
	if err != nil {
		return nil, err
	}
	basePath := fmt.Sprintf("/fba/smallAndLight/v1/enrollments/%s", pathParam0)
	if basePath[0] == '/' {
		basePath = basePath[1:]
	}
	queryUrl, err = queryUrl.Parse(basePath)
	if err != nil {
		return nil, err
	}
	queryValues := queryUrl.Query()
	if queryFrag, err := runtime.StyleParam("form", true, "marketplaceIds", params.MarketplaceIds); err != nil {
		return nil, err
	} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
		return nil, err
	} else {
		for k, v := range parsed {
			for _, v2 := range v {
				queryValues.Add(k, v2)
			}
		}
	}
	queryUrl.RawQuery = queryValues.Encode()
	req, err := http.NewRequest("DELETE", queryUrl.String(), nil)
	if err != nil {
		return nil, err
	}
	return req, nil
}
func NewGetSmallAndLightEnrollmentBySellerSKURequest(endpoint string, sellerSKU string, params *GetSmallAndLightEnrollmentBySellerSKUParams) (*http.Request, error) {
	var err error
	var pathParam0 string
	pathParam0, err = runtime.StyleParam("simple", false, "sellerSKU", sellerSKU)
	if err != nil {
		return nil, err
	}
	queryUrl, err := url.Parse(endpoint)
	if err != nil {
		return nil, err
	}
	basePath := fmt.Sprintf("/fba/smallAndLight/v1/enrollments/%s", pathParam0)
	if basePath[0] == '/' {
		basePath = basePath[1:]
	}
	queryUrl, err = queryUrl.Parse(basePath)
	if err != nil {
		return nil, err
	}
	queryValues := queryUrl.Query()
	if queryFrag, err := runtime.StyleParam("form", true, "marketplaceIds", params.MarketplaceIds); err != nil {
		return nil, err
	} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
		return nil, err
	} else {
		for k, v := range parsed {
			for _, v2 := range v {
				queryValues.Add(k, v2)
			}
		}
	}
	queryUrl.RawQuery = queryValues.Encode()
	req, err := http.NewRequest("GET", queryUrl.String(), nil)
	if err != nil {
		return nil, err
	}
	return req, nil
}
func NewPutSmallAndLightEnrollmentBySellerSKURequest(endpoint string, sellerSKU string, params *PutSmallAndLightEnrollmentBySellerSKUParams) (*http.Request, error) {
	var err error
	var pathParam0 string
	pathParam0, err = runtime.StyleParam("simple", false, "sellerSKU", sellerSKU)
	if err != nil {
		return nil, err
	}
	queryUrl, err := url.Parse(endpoint)
	if err != nil {
		return nil, err
	}
	basePath := fmt.Sprintf("/fba/smallAndLight/v1/enrollments/%s", pathParam0)
	if basePath[0] == '/' {
		basePath = basePath[1:]
	}
	queryUrl, err = queryUrl.Parse(basePath)
	if err != nil {
		return nil, err
	}
	queryValues := queryUrl.Query()
	if queryFrag, err := runtime.StyleParam("form", true, "marketplaceIds", params.MarketplaceIds); err != nil {
		return nil, err
	} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
		return nil, err
	} else {
		for k, v := range parsed {
			for _, v2 := range v {
				queryValues.Add(k, v2)
			}
		}
	}
	queryUrl.RawQuery = queryValues.Encode()
	req, err := http.NewRequest("PUT", queryUrl.String(), nil)
	if err != nil {
		return nil, err
	}
	return req, nil
}
func NewGetSmallAndLightFeePreviewRequest(endpoint string, body GetSmallAndLightFeePreviewJSONRequestBody) (*http.Request, error) {
	var bodyReader io.Reader
	buf, err := json.Marshal(body)
	if err != nil {
		return nil, err
	}
	bodyReader = bytes.NewReader(buf)
	return NewGetSmallAndLightFeePreviewRequestWithBody(endpoint, "application/json", bodyReader)
}
func NewGetSmallAndLightFeePreviewRequestWithBody(endpoint string, contentType string, body io.Reader) (*http.Request, error) {
	var err error
	queryUrl, err := url.Parse(endpoint)
	if err != nil {
		return nil, err
	}
	basePath := fmt.Sprintf("/fba/smallAndLight/v1/feePreviews")
	if basePath[0] == '/' {
		basePath = basePath[1:]
	}
	queryUrl, err = queryUrl.Parse(basePath)
	if err != nil {
		return nil, err
	}
	req, err := http.NewRequest("POST", queryUrl.String(), body)
	if err != nil {
		return nil, err
	}
	req.Header.Add("Content-Type", contentType)
	return req, nil
}
type ClientWithResponses struct {
	ClientInterface
}
func NewClientWithResponses(endpoint string, opts ...ClientOption) (*ClientWithResponses, error) {
	client, err := NewClient(endpoint, opts...)
	if err != nil {
		return nil, err
	}
	return &ClientWithResponses{client}, nil
}
func WithBaseURL(baseURL string) ClientOption {
	return func(c *Client) error {
		newBaseURL, err := url.Parse(baseURL)
		if err != nil {
			return err
		}
		c.Endpoint = newBaseURL.String()
		return nil
	}
}
type ClientWithResponsesInterface interface {
	GetSmallAndLightEligibilityBySellerSKUWithResponse(ctx context.Context, sellerSKU string, params *GetSmallAndLightEligibilityBySellerSKUParams) (*GetSmallAndLightEligibilityBySellerSKUResp, error)
	DeleteSmallAndLightEnrollmentBySellerSKUWithResponse(ctx context.Context, sellerSKU string, params *DeleteSmallAndLightEnrollmentBySellerSKUParams) (*DeleteSmallAndLightEnrollmentBySellerSKUResp, error)
	GetSmallAndLightEnrollmentBySellerSKUWithResponse(ctx context.Context, sellerSKU string, params *GetSmallAndLightEnrollmentBySellerSKUParams) (*GetSmallAndLightEnrollmentBySellerSKUResp, error)
	PutSmallAndLightEnrollmentBySellerSKUWithResponse(ctx context.Context, sellerSKU string, params *PutSmallAndLightEnrollmentBySellerSKUParams) (*PutSmallAndLightEnrollmentBySellerSKUResp, error)
	GetSmallAndLightFeePreviewWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*GetSmallAndLightFeePreviewResp, error)
	GetSmallAndLightFeePreviewWithResponse(ctx context.Context, body GetSmallAndLightFeePreviewJSONRequestBody) (*GetSmallAndLightFeePreviewResp, error)
}
type GetSmallAndLightEligibilityBySellerSKUResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SmallAndLightEligibility
	JSON400      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON413      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}
func (r GetSmallAndLightEligibilityBySellerSKUResp) Status() string {
	if r.HTTPResponse != nil {
		return r.HTTPResponse.Status
	}
	return http.StatusText(0)
}
func (r GetSmallAndLightEligibilityBySellerSKUResp) StatusCode() int {
	if r.HTTPResponse != nil {
		return r.HTTPResponse.StatusCode
	}
	return 0
}
type DeleteSmallAndLightEnrollmentBySellerSKUResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON413      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}
func (r DeleteSmallAndLightEnrollmentBySellerSKUResp) Status() string {
	if r.HTTPResponse != nil {
		return r.HTTPResponse.Status
	}
	return http.StatusText(0)
}
func (r DeleteSmallAndLightEnrollmentBySellerSKUResp) StatusCode() int {
	if r.HTTPResponse != nil {
		return r.HTTPResponse.StatusCode
	}
	return 0
}
type GetSmallAndLightEnrollmentBySellerSKUResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SmallAndLightEnrollment
	JSON400      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON413      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}
func (r GetSmallAndLightEnrollmentBySellerSKUResp) Status() string {
	if r.HTTPResponse != nil {
		return r.HTTPResponse.Status
	}
	return http.StatusText(0)
}
func (r GetSmallAndLightEnrollmentBySellerSKUResp) StatusCode() int {
	if r.HTTPResponse != nil {
		return r.HTTPResponse.StatusCode
	}
	return 0
}
type PutSmallAndLightEnrollmentBySellerSKUResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SmallAndLightEnrollment
	JSON400      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON413      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}
func (r PutSmallAndLightEnrollmentBySellerSKUResp) Status() string {
	if r.HTTPResponse != nil {
		return r.HTTPResponse.Status
	}
	return http.StatusText(0)
}
func (r PutSmallAndLightEnrollmentBySellerSKUResp) StatusCode() int {
	if r.HTTPResponse != nil {
		return r.HTTPResponse.StatusCode
	}
	return 0
}
type GetSmallAndLightFeePreviewResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SmallAndLightFeePreviews
	JSON400      *ErrorList
	JSON401      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}
func (r GetSmallAndLightFeePreviewResp) Status() string {
	if r.HTTPResponse != nil {
		return r.HTTPResponse.Status
	}
	return http.StatusText(0)
}
func (r GetSmallAndLightFeePreviewResp) StatusCode() int {
	if r.HTTPResponse != nil {
		return r.HTTPResponse.StatusCode
	}
	return 0
}
func (c *ClientWithResponses) GetSmallAndLightEligibilityBySellerSKUWithResponse(ctx context.Context, sellerSKU string, params *GetSmallAndLightEligibilityBySellerSKUParams) (*GetSmallAndLightEligibilityBySellerSKUResp, error) {
	rsp, err := c.GetSmallAndLightEligibilityBySellerSKU(ctx, sellerSKU, params)
	if err != nil {
		return nil, err
	}
	return ParseGetSmallAndLightEligibilityBySellerSKUResp(rsp)
}
func (c *ClientWithResponses) DeleteSmallAndLightEnrollmentBySellerSKUWithResponse(ctx context.Context, sellerSKU string, params *DeleteSmallAndLightEnrollmentBySellerSKUParams) (*DeleteSmallAndLightEnrollmentBySellerSKUResp, error) {
	rsp, err := c.DeleteSmallAndLightEnrollmentBySellerSKU(ctx, sellerSKU, params)
	if err != nil {
		return nil, err
	}
	return ParseDeleteSmallAndLightEnrollmentBySellerSKUResp(rsp)
}
func (c *ClientWithResponses) GetSmallAndLightEnrollmentBySellerSKUWithResponse(ctx context.Context, sellerSKU string, params *GetSmallAndLightEnrollmentBySellerSKUParams) (*GetSmallAndLightEnrollmentBySellerSKUResp, error) {
	rsp, err := c.GetSmallAndLightEnrollmentBySellerSKU(ctx, sellerSKU, params)
	if err != nil {
		return nil, err
	}
	return ParseGetSmallAndLightEnrollmentBySellerSKUResp(rsp)
}
func (c *ClientWithResponses) PutSmallAndLightEnrollmentBySellerSKUWithResponse(ctx context.Context, sellerSKU string, params *PutSmallAndLightEnrollmentBySellerSKUParams) (*PutSmallAndLightEnrollmentBySellerSKUResp, error) {
	rsp, err := c.PutSmallAndLightEnrollmentBySellerSKU(ctx, sellerSKU, params)
	if err != nil {
		return nil, err
	}
	return ParsePutSmallAndLightEnrollmentBySellerSKUResp(rsp)
}
func (c *ClientWithResponses) GetSmallAndLightFeePreviewWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*GetSmallAndLightFeePreviewResp, error) {
	rsp, err := c.GetSmallAndLightFeePreviewWithBody(ctx, contentType, body)
	if err != nil {
		return nil, err
	}
	return ParseGetSmallAndLightFeePreviewResp(rsp)
}
func (c *ClientWithResponses) GetSmallAndLightFeePreviewWithResponse(ctx context.Context, body GetSmallAndLightFeePreviewJSONRequestBody) (*GetSmallAndLightFeePreviewResp, error) {
	rsp, err := c.GetSmallAndLightFeePreview(ctx, body)
	if err != nil {
		return nil, err
	}
	return ParseGetSmallAndLightFeePreviewResp(rsp)
}
func ParseGetSmallAndLightEligibilityBySellerSKUResp(rsp *http.Response) (*GetSmallAndLightEligibilityBySellerSKUResp, error) {
	bodyBytes, err := ioutil.ReadAll(rsp.Body)
	defer rsp.Body.Close()
	if err != nil {
		return nil, err
	}
	response := &GetSmallAndLightEligibilityBySellerSKUResp{
		Body:         bodyBytes,
		HTTPResponse: rsp,
	}
	switch {
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
		var dest SmallAndLightEligibility
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON200 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON400 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON403 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON404 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 413:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON413 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 415:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON415 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON429 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON500 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON503 = &dest
	}
	return response, nil
}
func ParseDeleteSmallAndLightEnrollmentBySellerSKUResp(rsp *http.Response) (*DeleteSmallAndLightEnrollmentBySellerSKUResp, error) {
	bodyBytes, err := ioutil.ReadAll(rsp.Body)
	defer rsp.Body.Close()
	if err != nil {
		return nil, err
	}
	response := &DeleteSmallAndLightEnrollmentBySellerSKUResp{
		Body:         bodyBytes,
		HTTPResponse: rsp,
	}
	switch {
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON400 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON403 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON404 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 413:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON413 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 415:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON415 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON429 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON500 = &dest
	case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503:
		var dest ErrorList
		if err := json.Unmarshal(bodyBytes, &dest); err != nil {
			return nil, err
		}
		response.JSON503 = &dest
	}
	return response, nil
}