Documentation ¶
Overview ¶
Package dspaudiences provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.15.0 DO NOT EDIT.
Index ¶
- func NewDspCreateAudiencesPostRequestWithApplicationVndDspaudiencesV1PlusJSONBody(server string, params *DspCreateAudiencesPostParams, ...) (*http.Request, error)
- func NewDspCreateAudiencesPostRequestWithBody(server string, params *DspCreateAudiencesPostParams, contentType string, ...) (*http.Request, error)
- type Client
- func (c *Client) DspCreateAudiencesPostWithApplicationVndDspaudiencesV1PlusJSONBody(ctx context.Context, params *DspCreateAudiencesPostParams, ...) (*http.Response, error)
- func (c *Client) DspCreateAudiencesPostWithBody(ctx context.Context, params *DspCreateAudiencesPostParams, contentType string, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) DspCreateAudiencesPostWithApplicationVndDspaudiencesV1PlusJSONBodyWithResponse(ctx context.Context, params *DspCreateAudiencesPostParams, ...) (*DspCreateAudiencesPostResp, error)
- func (c *ClientWithResponses) DspCreateAudiencesPostWithBodyWithResponse(ctx context.Context, params *DspCreateAudiencesPostParams, contentType string, ...) (*DspCreateAudiencesPostResp, error)
- type ClientWithResponsesInterface
- type DspAudienceCreateRequestItem
- type DspAudienceCreateRequestItemAudienceType
- type DspAudienceError
- type DspAudienceErrorItem
- type DspAudienceErrorItemError
- type DspAudienceErrorItemErrorErrorType
- type DspAudienceResponse
- type DspAudienceRule
- type DspAudienceRuleAttributeType
- type DspAudienceRuleClause
- type DspAudienceRuleOperator
- type DspAudienceSuccessItem
- type DspCreateAudiencesPostApplicationVndDspaudiencesV1PlusJSONBody
- type DspCreateAudiencesPostApplicationVndDspaudiencesV1PlusJSONRequestBody
- type DspCreateAudiencesPostParams
- type DspCreateAudiencesPostResp
- type HttpRequestDoer
- type RequestEditorFn
- type ResponseEditorFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDspCreateAudiencesPostRequestWithApplicationVndDspaudiencesV1PlusJSONBody ¶
func NewDspCreateAudiencesPostRequestWithApplicationVndDspaudiencesV1PlusJSONBody(server string, params *DspCreateAudiencesPostParams, body DspCreateAudiencesPostApplicationVndDspaudiencesV1PlusJSONRequestBody) (*http.Request, error)
NewDspCreateAudiencesPostRequestWithApplicationVndDspaudiencesV1PlusJSONBody calls the generic DspCreateAudiencesPost builder with application/vnd.dspaudiences.v1+json body
func NewDspCreateAudiencesPostRequestWithBody ¶
func NewDspCreateAudiencesPostRequestWithBody(server string, params *DspCreateAudiencesPostParams, contentType string, body io.Reader) (*http.Request, error)
NewDspCreateAudiencesPostRequestWithBody generates requests for DspCreateAudiencesPost with any type of body
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) DspCreateAudiencesPostWithApplicationVndDspaudiencesV1PlusJSONBody ¶
func (c *Client) DspCreateAudiencesPostWithApplicationVndDspaudiencesV1PlusJSONBody(ctx context.Context, params *DspCreateAudiencesPostParams, body DspCreateAudiencesPostApplicationVndDspaudiencesV1PlusJSONRequestBody) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // DspCreateAudiencesPostWithBody request with any body DspCreateAudiencesPostWithBody(ctx context.Context, params *DspCreateAudiencesPostParams, contentType string, body io.Reader) (*http.Response, error) DspCreateAudiencesPostWithApplicationVndDspaudiencesV1PlusJSONBody(ctx context.Context, params *DspCreateAudiencesPostParams, body DspCreateAudiencesPostApplicationVndDspaudiencesV1PlusJSONRequestBody) (*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 ¶ added in v0.0.2
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) DspCreateAudiencesPostWithApplicationVndDspaudiencesV1PlusJSONBodyWithResponse ¶
func (c *ClientWithResponses) DspCreateAudiencesPostWithApplicationVndDspaudiencesV1PlusJSONBodyWithResponse(ctx context.Context, params *DspCreateAudiencesPostParams, body DspCreateAudiencesPostApplicationVndDspaudiencesV1PlusJSONRequestBody) (*DspCreateAudiencesPostResp, error)
func (*ClientWithResponses) DspCreateAudiencesPostWithBodyWithResponse ¶
func (c *ClientWithResponses) DspCreateAudiencesPostWithBodyWithResponse(ctx context.Context, params *DspCreateAudiencesPostParams, contentType string, body io.Reader) (*DspCreateAudiencesPostResp, error)
DspCreateAudiencesPostWithBodyWithResponse request with arbitrary body returning *DspCreateAudiencesPostResp
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // DspCreateAudiencesPostWithBodyWithResponse request with any body DspCreateAudiencesPostWithBodyWithResponse(ctx context.Context, params *DspCreateAudiencesPostParams, contentType string, body io.Reader) (*DspCreateAudiencesPostResp, error) DspCreateAudiencesPostWithApplicationVndDspaudiencesV1PlusJSONBodyWithResponse(ctx context.Context, params *DspCreateAudiencesPostParams, body DspCreateAudiencesPostApplicationVndDspaudiencesV1PlusJSONRequestBody) (*DspCreateAudiencesPostResp, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type DspAudienceCreateRequestItem ¶
type DspAudienceCreateRequestItem struct { // AudienceType Type of audience to create. AudienceType DspAudienceCreateRequestItemAudienceType `json:"audienceType"` // Description The audience description. Description string `json:"description"` // IdempotencyKey The unique UUID for this requested audience. IdempotencyKey openapi_types.UUID `json:"idempotencyKey"` // Lookback The specified time period (in days) to include those who performed the action in the audience. // Lookback Constraints Table: Provides available valid values of lookback allowed for given audienceType // | audienceType | lookback range | // |------------------------------|-------| // | PRODUCT_PURCHASES | 1-365 | // | PRODUCT_VIEWS | 1-90 | // | PRODUCT_SEARCH | 1-90 | // | PRODUCT_SIMS | 1-90 | // | WHOLE_FOODS_MARKET_PURCHASES | 1-365 | Lookback int `json:"lookback"` // Name The audience name. Name string `json:"name"` // Rules The set of rules defining an audience; these rules will be ORed. Rules []DspAudienceRule `json:"rules"` }
DspAudienceCreateRequestItem Complete audience model to be used for creation of the audience.
type DspAudienceCreateRequestItemAudienceType ¶
type DspAudienceCreateRequestItemAudienceType string
DspAudienceCreateRequestItemAudienceType Type of audience to create.
const ( PRODUCTPURCHASES DspAudienceCreateRequestItemAudienceType = "PRODUCT_PURCHASES" PRODUCTSEARCH DspAudienceCreateRequestItemAudienceType = "PRODUCT_SEARCH" PRODUCTSIMS DspAudienceCreateRequestItemAudienceType = "PRODUCT_SIMS" PRODUCTVIEWS DspAudienceCreateRequestItemAudienceType = "PRODUCT_VIEWS" WHOLEFOODSMARKETPURCHASES DspAudienceCreateRequestItemAudienceType = "WHOLE_FOODS_MARKET_PURCHASES" )
Defines values for DspAudienceCreateRequestItemAudienceType.
type DspAudienceError ¶
type DspAudienceError struct {
Message string `json:"message"`
}
DspAudienceError The error object.
type DspAudienceErrorItem ¶
type DspAudienceErrorItem struct { Errors []DspAudienceErrorItemError `json:"errors"` // IdempotencyKey The UUID provided in the request for creation of this audience. IdempotencyKey string `json:"idempotencyKey"` // Index The index of the DspAudienceCreateRequestItem from the request, e.g. 1st item in the batch request will correspond to index 0 in the response. Index int `json:"index"` // Message A human-readable description of the response. Message string `json:"message"` }
DspAudienceErrorItem The error response object.
type DspAudienceErrorItemError ¶
type DspAudienceErrorItemError struct { ErrorType DspAudienceErrorItemErrorErrorType `json:"errorType"` FieldName *string `json:"fieldName,omitempty"` Message string `json:"message"` }
DspAudienceErrorItemError The error object.
type DspAudienceErrorItemErrorErrorType ¶
type DspAudienceErrorItemErrorErrorType string
DspAudienceErrorItemErrorErrorType defines model for DspAudienceErrorItemError.ErrorType.
const ( OTHER DspAudienceErrorItemErrorErrorType = "OTHER" VALUEINVALID DspAudienceErrorItemErrorErrorType = "VALUE_INVALID" VALUEOUTOFRANGE DspAudienceErrorItemErrorErrorType = "VALUE_OUT_OF_RANGE" )
Defines values for DspAudienceErrorItemErrorErrorType.
type DspAudienceResponse ¶
type DspAudienceResponse struct { // Error The items in this array represent items in the request that failed. Error []DspAudienceErrorItem `json:"error"` // Success The items in this array represent items in the request that were successful. Success []DspAudienceSuccessItem `json:"success"` }
DspAudienceResponse This holds an array of successful items and an array of error items from the request.
type DspAudienceRule ¶
type DspAudienceRule struct { // AttributeType For a given audienceType, the type of the attributes being supplied. AttributeType DspAudienceRuleAttributeType `json:"attributeType"` // AttributeValues For a given audienceType and attributeType combination, the attribute values being supplied. AttributeValues []string `json:"attributeValues"` // Clause This parameter is used to include or exclude this particular rule. Currently only include is supported. Clause DspAudienceRuleClause `json:"clause"` // Operator For a given attributeType, the operator used for attributeValues. Operator DspAudienceRuleOperator `json:"operator"` }
DspAudienceRule A rule for defining an audience.
**Rule Constraints Table**: Provides available valid combinations of parameters allowed in DspAudienceRule | audienceType | attributeType | attributeValues | max attribute values | max rules | |------------------------------|-----------|-----------------------------------------------------------------------------------------------------|------|---| | PRODUCT_PURCHASES | ASIN | product IDs (ASINs) e.g. B08V4T57R2 | 1000 | 1 | | PRODUCT_VIEWS | ASIN | product IDs (ASINs) e.g. B08V4T57R2 | 1000 | 1 | | PRODUCT_SEARCH | ASIN | product IDs (ASINs) e.g. B08V4T57R2 | 1000 | 1 | | PRODUCT_SIMS | ASIN | product IDs (ASINs) e.g. B08V4T57R2 | 1000 | 1 | | WHOLE_FOODS_MARKET_PURCHASES | ASIN | Whole Foods Market product IDs (ASINs) e.g. B01B2OVUAG | 500 | 1 |
type DspAudienceRuleAttributeType ¶
type DspAudienceRuleAttributeType string
DspAudienceRuleAttributeType For a given audienceType, the type of the attributes being supplied.
const (
ASIN DspAudienceRuleAttributeType = "ASIN"
)
Defines values for DspAudienceRuleAttributeType.
type DspAudienceRuleClause ¶
type DspAudienceRuleClause string
DspAudienceRuleClause This parameter is used to include or exclude this particular rule. Currently only include is supported.
const (
INCLUDE DspAudienceRuleClause = "INCLUDE"
)
Defines values for DspAudienceRuleClause.
type DspAudienceRuleOperator ¶
type DspAudienceRuleOperator string
DspAudienceRuleOperator For a given attributeType, the operator used for attributeValues.
const (
ONEOF DspAudienceRuleOperator = "ONE_OF"
)
Defines values for DspAudienceRuleOperator.
type DspAudienceSuccessItem ¶
type DspAudienceSuccessItem struct { // AudienceId The audience identifier. AudienceId string `json:"audienceId"` // IdempotencyKey The UUID provided in the request for creation of this audience. IdempotencyKey string `json:"idempotencyKey"` // Index The index of the DspAudienceCreateRequestItem from the request, e.g. 1st item in the batch request will correspond to index 0 in the response. Index int `json:"index"` }
DspAudienceSuccessItem The success response object.
type DspCreateAudiencesPostApplicationVndDspaudiencesV1PlusJSONBody ¶
type DspCreateAudiencesPostApplicationVndDspaudiencesV1PlusJSONBody = []DspAudienceCreateRequestItem
DspCreateAudiencesPostApplicationVndDspaudiencesV1PlusJSONBody defines parameters for DspCreateAudiencesPost.
type DspCreateAudiencesPostApplicationVndDspaudiencesV1PlusJSONRequestBody ¶
type DspCreateAudiencesPostApplicationVndDspaudiencesV1PlusJSONRequestBody = DspCreateAudiencesPostApplicationVndDspaudiencesV1PlusJSONBody
DspCreateAudiencesPostApplicationVndDspaudiencesV1PlusJSONRequestBody defines body for DspCreateAudiencesPost for application/vnd.dspaudiences.v1+json ContentType.
type DspCreateAudiencesPostParams ¶
type DspCreateAudiencesPostParams struct { // AdvertiserId The advertiser to create audience for. AdvertiserId string `form:"AdvertiserId" json:"AdvertiserId"` // AmazonAdvertisingAPIClientId The identifier of a client associated with a "Login with Amazon" account. AmazonAdvertisingAPIClientId string `json:"Amazon-Advertising-API-ClientId"` // AmazonAdvertisingAPIScope The identifier of a profile associated with the advertiser account. Use `GET` method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header and choose profile id `profileId` from the response to pass it as input. AmazonAdvertisingAPIScope string `json:"Amazon-Advertising-API-Scope"` }
DspCreateAudiencesPostParams defines parameters for DspCreateAudiencesPost.
type DspCreateAudiencesPostResp ¶
type DspCreateAudiencesPostResp struct { Body []byte HTTPResponse *http.Response ApplicationvndDspaudiencesresponseV1JSON207 *DspAudienceResponse ApplicationvndDspaudienceserrorV1JSON400 *DspAudienceError ApplicationvndDspaudienceserrorV1JSON403 *DspAudienceError }
func ParseDspCreateAudiencesPostResp ¶
func ParseDspCreateAudiencesPostResp(rsp *http.Response) (*DspCreateAudiencesPostResp, error)
ParseDspCreateAudiencesPostResp parses an HTTP response from a DspCreateAudiencesPostWithResponse call
func (DspCreateAudiencesPostResp) Status ¶
func (r DspCreateAudiencesPostResp) Status() string
Status returns HTTPResponse.Status
func (DspCreateAudiencesPostResp) StatusCode ¶
func (r DspCreateAudiencesPostResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function