Documentation
¶
Overview ¶
Package definitionsProductTypes20200901 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.0 DO NOT EDIT.
Index ¶
- func NewGetDefinitionsProductTypeRequest(server string, productType string, params *GetDefinitionsProductTypeParams) (*http.Request, error)
- func NewSearchDefinitionsProductTypesRequest(server string, params *SearchDefinitionsProductTypesParams) (*http.Request, error)
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GetDefinitionsProductTypeWithResponse(ctx context.Context, productType string, ...) (*GetDefinitionsProductTypeResp, error)
- func (c *ClientWithResponses) SearchDefinitionsProductTypesWithResponse(ctx context.Context, params *SearchDefinitionsProductTypesParams) (*SearchDefinitionsProductTypesResp, error)
- type ClientWithResponsesInterface
- type Error
- type ErrorList
- type GetDefinitionsProductTypeParams
- type GetDefinitionsProductTypeParamsLocale
- type GetDefinitionsProductTypeParamsRequirements
- type GetDefinitionsProductTypeParamsRequirementsEnforced
- type GetDefinitionsProductTypeResp
- type HttpRequestDoer
- type ProductType
- type ProductTypeDefinition
- type ProductTypeDefinitionRequirements
- type ProductTypeDefinitionRequirementsEnforced
- type ProductTypeList
- type ProductTypeVersion
- type PropertyGroup
- type RequestEditorFn
- type ResponseEditorFn
- type SchemaLink
- type SchemaLinkLinkVerb
- type SearchDefinitionsProductTypesParams
- type SearchDefinitionsProductTypesResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGetDefinitionsProductTypeRequest ¶
func NewGetDefinitionsProductTypeRequest(server string, productType string, params *GetDefinitionsProductTypeParams) (*http.Request, error)
NewGetDefinitionsProductTypeRequest generates requests for GetDefinitionsProductType
func NewSearchDefinitionsProductTypesRequest ¶
func NewSearchDefinitionsProductTypesRequest(server string, params *SearchDefinitionsProductTypesParams) (*http.Request, error)
NewSearchDefinitionsProductTypesRequest generates requests for SearchDefinitionsProductTypes
Types ¶
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
// A callback for modifying response which are generated after receive from the network.
ResponseEditors []ResponseEditorFn
// The user agent header identifies your application, its version number, and the platform and programming language you are using.
// You must include a user agent header in each request submitted to the sales partner API.
UserAgent string
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) GetDefinitionsProductType ¶
func (*Client) SearchDefinitionsProductTypes ¶
type ClientInterface ¶
type ClientInterface interface {
// SearchDefinitionsProductTypes request
SearchDefinitionsProductTypes(ctx context.Context, params *SearchDefinitionsProductTypesParams) (*http.Response, error)
// GetDefinitionsProductType request
GetDefinitionsProductType(ctx context.Context, productType string, params *GetDefinitionsProductTypeParams) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
func WithResponseEditorFn ¶
func WithResponseEditorFn(fn ResponseEditorFn) ClientOption
WithResponseEditorFn allows setting up a callback function, which will be called right after receive the response.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) GetDefinitionsProductTypeWithResponse ¶
func (c *ClientWithResponses) GetDefinitionsProductTypeWithResponse(ctx context.Context, productType string, params *GetDefinitionsProductTypeParams) (*GetDefinitionsProductTypeResp, error)
GetDefinitionsProductTypeWithResponse request returning *GetDefinitionsProductTypeResp
func (*ClientWithResponses) SearchDefinitionsProductTypesWithResponse ¶
func (c *ClientWithResponses) SearchDefinitionsProductTypesWithResponse(ctx context.Context, params *SearchDefinitionsProductTypesParams) (*SearchDefinitionsProductTypesResp, error)
SearchDefinitionsProductTypesWithResponse request returning *SearchDefinitionsProductTypesResp
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// SearchDefinitionsProductTypesWithResponse request
SearchDefinitionsProductTypesWithResponse(ctx context.Context, params *SearchDefinitionsProductTypesParams) (*SearchDefinitionsProductTypesResp, error)
// GetDefinitionsProductTypeWithResponse request
GetDefinitionsProductTypeWithResponse(ctx context.Context, productType string, params *GetDefinitionsProductTypeParams) (*GetDefinitionsProductTypeResp, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Error ¶
type Error struct {
// Code An error code that identifies the type of error that occurred.
Code string `json:"code"`
// Details Additional details that can help the caller understand or fix the issue.
Details *string `json:"details,omitempty"`
// Message A message that describes the error condition.
Message string `json:"message"`
}
Error Error response returned when the request is unsuccessful.
type ErrorList ¶
type ErrorList struct {
Errors []Error `json:"errors"`
}
ErrorList A list of error responses returned when a request is unsuccessful.
type GetDefinitionsProductTypeParams ¶
type GetDefinitionsProductTypeParams struct {
// SellerId A selling partner identifier. When provided, seller-specific requirements and values are populated within the product type definition schema, such as brand names associated with the selling partner.
SellerId *string `form:"sellerId,omitempty" json:"sellerId,omitempty"`
// MarketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
// Note: This parameter is limited to one marketplaceId at this time.
MarketplaceIds []string `form:"marketplaceIds" json:"marketplaceIds"`
// ProductTypeVersion The version of the Amazon product type to retrieve. Defaults to "LATEST",. Prerelease versions of product type definitions may be retrieved with "RELEASE_CANDIDATE". If no prerelease version is currently available, the "LATEST" live version will be provided.
ProductTypeVersion *string `form:"productTypeVersion,omitempty" json:"productTypeVersion,omitempty"`
// Requirements The name of the requirements set to retrieve requirements for.
Requirements *GetDefinitionsProductTypeParamsRequirements `form:"requirements,omitempty" json:"requirements,omitempty"`
// RequirementsEnforced Identifies if the required attributes for a requirements set are enforced by the product type definition schema. Non-enforced requirements enable structural validation of individual attributes without all the required attributes being present (such as for partial updates).
RequirementsEnforced *GetDefinitionsProductTypeParamsRequirementsEnforced `form:"requirementsEnforced,omitempty" json:"requirementsEnforced,omitempty"`
// Locale Locale for retrieving display labels and other presentation details. Defaults to the default language of the first marketplace in the request.
Locale *GetDefinitionsProductTypeParamsLocale `form:"locale,omitempty" json:"locale,omitempty"`
}
GetDefinitionsProductTypeParams defines parameters for GetDefinitionsProductType.
type GetDefinitionsProductTypeParamsLocale ¶
type GetDefinitionsProductTypeParamsLocale string
GetDefinitionsProductTypeParamsLocale defines parameters for GetDefinitionsProductType.
const ( Ar GetDefinitionsProductTypeParamsLocale = "ar" ArAE GetDefinitionsProductTypeParamsLocale = "ar_AE" DEFAULT GetDefinitionsProductTypeParamsLocale = "DEFAULT" De GetDefinitionsProductTypeParamsLocale = "de" DeDE GetDefinitionsProductTypeParamsLocale = "de_DE" En GetDefinitionsProductTypeParamsLocale = "en" EnAE GetDefinitionsProductTypeParamsLocale = "en_AE" EnAU GetDefinitionsProductTypeParamsLocale = "en_AU" EnCA GetDefinitionsProductTypeParamsLocale = "en_CA" EnGB GetDefinitionsProductTypeParamsLocale = "en_GB" EnIN GetDefinitionsProductTypeParamsLocale = "en_IN" EnSG GetDefinitionsProductTypeParamsLocale = "en_SG" EnUS GetDefinitionsProductTypeParamsLocale = "en_US" Es GetDefinitionsProductTypeParamsLocale = "es" EsES GetDefinitionsProductTypeParamsLocale = "es_ES" EsMX GetDefinitionsProductTypeParamsLocale = "es_MX" EsUS GetDefinitionsProductTypeParamsLocale = "es_US" Fr GetDefinitionsProductTypeParamsLocale = "fr" FrCA GetDefinitionsProductTypeParamsLocale = "fr_CA" FrFR GetDefinitionsProductTypeParamsLocale = "fr_FR" It GetDefinitionsProductTypeParamsLocale = "it" ItIT GetDefinitionsProductTypeParamsLocale = "it_IT" Ja GetDefinitionsProductTypeParamsLocale = "ja" JaJP GetDefinitionsProductTypeParamsLocale = "ja_JP" Nl GetDefinitionsProductTypeParamsLocale = "nl" NlNL GetDefinitionsProductTypeParamsLocale = "nl_NL" Pl GetDefinitionsProductTypeParamsLocale = "pl" PlPL GetDefinitionsProductTypeParamsLocale = "pl_PL" Pt GetDefinitionsProductTypeParamsLocale = "pt" PtBR GetDefinitionsProductTypeParamsLocale = "pt_BR" PtPT GetDefinitionsProductTypeParamsLocale = "pt_PT" Sv GetDefinitionsProductTypeParamsLocale = "sv" SvSE GetDefinitionsProductTypeParamsLocale = "sv_SE" Tr GetDefinitionsProductTypeParamsLocale = "tr" TrTR GetDefinitionsProductTypeParamsLocale = "tr_TR" Zh GetDefinitionsProductTypeParamsLocale = "zh" ZhCN GetDefinitionsProductTypeParamsLocale = "zh_CN" ZhTW GetDefinitionsProductTypeParamsLocale = "zh_TW" )
Defines values for GetDefinitionsProductTypeParamsLocale.
type GetDefinitionsProductTypeParamsRequirements ¶
type GetDefinitionsProductTypeParamsRequirements string
GetDefinitionsProductTypeParamsRequirements defines parameters for GetDefinitionsProductType.
const ( GetDefinitionsProductTypeParamsRequirementsLISTING GetDefinitionsProductTypeParamsRequirements = "LISTING" GetDefinitionsProductTypeParamsRequirementsLISTINGOFFERONLY GetDefinitionsProductTypeParamsRequirements = "LISTING_OFFER_ONLY" GetDefinitionsProductTypeParamsRequirementsLISTINGPRODUCTONLY GetDefinitionsProductTypeParamsRequirements = "LISTING_PRODUCT_ONLY" )
Defines values for GetDefinitionsProductTypeParamsRequirements.
type GetDefinitionsProductTypeParamsRequirementsEnforced ¶
type GetDefinitionsProductTypeParamsRequirementsEnforced string
GetDefinitionsProductTypeParamsRequirementsEnforced defines parameters for GetDefinitionsProductType.
const ( GetDefinitionsProductTypeParamsRequirementsEnforcedENFORCED GetDefinitionsProductTypeParamsRequirementsEnforced = "ENFORCED" GetDefinitionsProductTypeParamsRequirementsEnforcedNOTENFORCED GetDefinitionsProductTypeParamsRequirementsEnforced = "NOT_ENFORCED" )
Defines values for GetDefinitionsProductTypeParamsRequirementsEnforced.
type GetDefinitionsProductTypeResp ¶
type GetDefinitionsProductTypeResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ProductTypeDefinition
JSON400 *ErrorList
JSON403 *ErrorList
JSON404 *ErrorList
JSON413 *ErrorList
JSON415 *ErrorList
JSON429 *ErrorList
JSON500 *ErrorList
JSON503 *ErrorList
}
func ParseGetDefinitionsProductTypeResp ¶
func ParseGetDefinitionsProductTypeResp(rsp *http.Response) (*GetDefinitionsProductTypeResp, error)
ParseGetDefinitionsProductTypeResp parses an HTTP response from a GetDefinitionsProductTypeWithResponse call
func (GetDefinitionsProductTypeResp) Status ¶
func (r GetDefinitionsProductTypeResp) Status() string
Status returns HTTPResponse.Status
func (GetDefinitionsProductTypeResp) StatusCode ¶
func (r GetDefinitionsProductTypeResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ProductType ¶
type ProductType struct {
// DisplayName The human-readable and localized description of the Amazon product type.
DisplayName string `json:"displayName"`
// MarketplaceIds The Amazon marketplace identifiers for which the product type definition is available.
MarketplaceIds []string `json:"marketplaceIds"`
// Name The name of the Amazon product type.
Name string `json:"name"`
}
ProductType An Amazon product type with a definition available.
type ProductTypeDefinition ¶
type ProductTypeDefinition struct {
// DisplayName Human-readable and localized description of the Amazon product type.
DisplayName string `json:"displayName"`
// Locale Locale of the display elements contained in the product type definition.
Locale string `json:"locale"`
// MarketplaceIds Amazon marketplace identifiers for which the product type definition is applicable.
MarketplaceIds []string `json:"marketplaceIds"`
MetaSchema *SchemaLink `json:"metaSchema,omitempty"`
// ProductType The name of the Amazon product type that this product type definition applies to.
ProductType string `json:"productType"`
// ProductTypeVersion The version details for an Amazon product type.
ProductTypeVersion ProductTypeVersion `json:"productTypeVersion"`
// PropertyGroups Mapping of property group names to property groups. Property groups represent logical groupings of schema properties that can be used for display or informational purposes.
PropertyGroups map[string]PropertyGroup `json:"propertyGroups"`
// Requirements Name of the requirements set represented in this product type definition.
Requirements ProductTypeDefinitionRequirements `json:"requirements"`
// RequirementsEnforced Identifies if the required attributes for a requirements set are enforced by the product type definition schema. Non-enforced requirements enable structural validation of individual attributes without all of the required attributes being present (such as for partial updates).
RequirementsEnforced ProductTypeDefinitionRequirementsEnforced `json:"requirementsEnforced"`
Schema SchemaLink `json:"schema"`
}
ProductTypeDefinition A product type definition represents the attributes and data requirements for a product type in the Amazon catalog. Product type definitions are used interchangeably between the Selling Partner API for Listings Items, Selling Partner API for Catalog Items, and JSON-based listings feeds in the Selling Partner API for Feeds.
type ProductTypeDefinitionRequirements ¶
type ProductTypeDefinitionRequirements string
ProductTypeDefinitionRequirements Name of the requirements set represented in this product type definition.
const ( ProductTypeDefinitionRequirementsLISTING ProductTypeDefinitionRequirements = "LISTING" ProductTypeDefinitionRequirementsLISTINGOFFERONLY ProductTypeDefinitionRequirements = "LISTING_OFFER_ONLY" ProductTypeDefinitionRequirementsLISTINGPRODUCTONLY ProductTypeDefinitionRequirements = "LISTING_PRODUCT_ONLY" )
Defines values for ProductTypeDefinitionRequirements.
type ProductTypeDefinitionRequirementsEnforced ¶
type ProductTypeDefinitionRequirementsEnforced string
ProductTypeDefinitionRequirementsEnforced Identifies if the required attributes for a requirements set are enforced by the product type definition schema. Non-enforced requirements enable structural validation of individual attributes without all of the required attributes being present (such as for partial updates).
const ( ProductTypeDefinitionRequirementsEnforcedENFORCED ProductTypeDefinitionRequirementsEnforced = "ENFORCED" ProductTypeDefinitionRequirementsEnforcedNOTENFORCED ProductTypeDefinitionRequirementsEnforced = "NOT_ENFORCED" )
Defines values for ProductTypeDefinitionRequirementsEnforced.
type ProductTypeList ¶
type ProductTypeList struct {
// ProductTypeVersion Amazon product type version identifier.
ProductTypeVersion string `json:"productTypeVersion"`
ProductTypes []ProductType `json:"productTypes"`
}
ProductTypeList A list of Amazon product types with definitions available.
type ProductTypeVersion ¶
type ProductTypeVersion struct {
// Latest When true, the version indicated by the version identifier is the latest available for the Amazon product type.
Latest bool `json:"latest"`
// ReleaseCandidate When true, the version indicated by the version identifier is the prerelease (release candidate) for the Amazon product type.
ReleaseCandidate *bool `json:"releaseCandidate,omitempty"`
// Version Version identifier.
Version string `json:"version"`
}
ProductTypeVersion The version details for an Amazon product type.
type PropertyGroup ¶
type PropertyGroup struct {
// Description The description of the property group.
Description *string `json:"description,omitempty"`
// PropertyNames The names of the schema properties for the property group.
PropertyNames *[]string `json:"propertyNames,omitempty"`
// Title The display label of the property group.
Title *string `json:"title,omitempty"`
}
PropertyGroup A property group represents a logical grouping of schema properties that can be used for display or informational purposes.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ResponseEditorFn ¶
ResponseEditorFn is the function signature for the ResponseEditor callback function
type SchemaLink ¶
type SchemaLink struct {
// Checksum Checksum hash of the schema (Base64 MD5). Can be used to verify schema contents, identify changes between schema versions, and for caching.
Checksum string `json:"checksum"`
// Link Link to retrieve the schema.
Link struct {
// Resource URI resource for the link.
Resource string `json:"resource"`
// Verb HTTP method for the link operation.
Verb SchemaLinkLinkVerb `json:"verb"`
} `json:"link"`
}
SchemaLink defines model for SchemaLink.
type SchemaLinkLinkVerb ¶
type SchemaLinkLinkVerb string
SchemaLinkLinkVerb HTTP method for the link operation.
const (
GET SchemaLinkLinkVerb = "GET"
)
Defines values for SchemaLinkLinkVerb.
type SearchDefinitionsProductTypesParams ¶
type SearchDefinitionsProductTypesParams struct {
// Keywords A comma-delimited list of keywords to search product types. **Note:** Cannot be used with `itemName`.
Keywords *[]string `form:"keywords,omitempty" json:"keywords,omitempty"`
// MarketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
MarketplaceIds []string `form:"marketplaceIds" json:"marketplaceIds"`
// ItemName The title of the ASIN to get the product type recommendation. **Note:** Cannot be used with `keywords`.
ItemName *string `form:"itemName,omitempty" json:"itemName,omitempty"`
// Locale The locale for the display names in the response. Defaults to the primary locale of the marketplace.
Locale *string `form:"locale,omitempty" json:"locale,omitempty"`
// SearchLocale The locale used for the `keywords` and `itemName` parameters. Defaults to the primary locale of the marketplace.
SearchLocale *string `form:"searchLocale,omitempty" json:"searchLocale,omitempty"`
}
SearchDefinitionsProductTypesParams defines parameters for SearchDefinitionsProductTypes.
type SearchDefinitionsProductTypesResp ¶
type SearchDefinitionsProductTypesResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ProductTypeList
JSON400 *ErrorList
JSON403 *ErrorList
JSON404 *ErrorList
JSON413 *ErrorList
JSON415 *ErrorList
JSON429 *ErrorList
JSON500 *ErrorList
JSON503 *ErrorList
}
func ParseSearchDefinitionsProductTypesResp ¶
func ParseSearchDefinitionsProductTypesResp(rsp *http.Response) (*SearchDefinitionsProductTypesResp, error)
ParseSearchDefinitionsProductTypesResp parses an HTTP response from a SearchDefinitionsProductTypesWithResponse call
func (SearchDefinitionsProductTypesResp) Status ¶
func (r SearchDefinitionsProductTypesResp) Status() string
Status returns HTTPResponse.Status
func (SearchDefinitionsProductTypesResp) StatusCode ¶
func (r SearchDefinitionsProductTypesResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode