Documentation
¶
Overview ¶
Package brandmetricsreport 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 NewGenerateBrandMetricsReportRequestWithApplicationVndInsightsBrandMetricsV1PlusJSONBody(server string, params *GenerateBrandMetricsReportParams, ...) (*http.Request, error)
- func NewGenerateBrandMetricsReportRequestWithBody(server string, params *GenerateBrandMetricsReportParams, contentType string, ...) (*http.Request, error)
- func NewGetBrandMetricsReportRequest(server string, reportId string, params *GetBrandMetricsReportParams) (*http.Request, error)
- type BrandMetricsError
- type BrandMetricsGenerateReportRequest
- type BrandMetricsGenerateReportRequestFormat
- type BrandMetricsGenerateReportRequestLookBackPeriod
- type BrandMetricsGenerateReportResponse
- type BrandMetricsGenerateReportResponseFormat
- type BrandMetricsGenerateReportResponseStatus
- type BrandMetricsGetReportByIdResponse
- type BrandMetricsGetReportByIdResponseFormat
- type BrandMetricsGetReportByIdResponseStatus
- type Client
- func (c *Client) GenerateBrandMetricsReportWithApplicationVndInsightsBrandMetricsV1PlusJSONBody(ctx context.Context, params *GenerateBrandMetricsReportParams, ...) (*http.Response, error)
- func (c *Client) GenerateBrandMetricsReportWithBody(ctx context.Context, params *GenerateBrandMetricsReportParams, ...) (*http.Response, error)
- func (c *Client) GetBrandMetricsReport(ctx context.Context, reportId string, params *GetBrandMetricsReportParams) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GenerateBrandMetricsReportWithApplicationVndInsightsBrandMetricsV1PlusJSONBodyWithResponse(ctx context.Context, params *GenerateBrandMetricsReportParams, ...) (*GenerateBrandMetricsReportResp, error)
- func (c *ClientWithResponses) GenerateBrandMetricsReportWithBodyWithResponse(ctx context.Context, params *GenerateBrandMetricsReportParams, ...) (*GenerateBrandMetricsReportResp, error)
- func (c *ClientWithResponses) GetBrandMetricsReportWithResponse(ctx context.Context, reportId string, params *GetBrandMetricsReportParams) (*GetBrandMetricsReportResp, error)
- type ClientWithResponsesInterface
- type GenerateBrandMetricsReportApplicationVndInsightsBrandMetricsV1PlusJSONRequestBody
- type GenerateBrandMetricsReportParams
- type GenerateBrandMetricsReportResp
- type GetBrandMetricsReportParams
- type GetBrandMetricsReportResp
- type HttpRequestDoer
- type RequestEditorFn
- type ResponseEditorFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGenerateBrandMetricsReportRequestWithApplicationVndInsightsBrandMetricsV1PlusJSONBody ¶
func NewGenerateBrandMetricsReportRequestWithApplicationVndInsightsBrandMetricsV1PlusJSONBody(server string, params *GenerateBrandMetricsReportParams, body GenerateBrandMetricsReportApplicationVndInsightsBrandMetricsV1PlusJSONRequestBody) (*http.Request, error)
NewGenerateBrandMetricsReportRequestWithApplicationVndInsightsBrandMetricsV1PlusJSONBody calls the generic GenerateBrandMetricsReport builder with application/vnd.insightsBrandMetrics.v1+json body
func NewGenerateBrandMetricsReportRequestWithBody ¶
func NewGenerateBrandMetricsReportRequestWithBody(server string, params *GenerateBrandMetricsReportParams, contentType string, body io.Reader) (*http.Request, error)
NewGenerateBrandMetricsReportRequestWithBody generates requests for GenerateBrandMetricsReport with any type of body
func NewGetBrandMetricsReportRequest ¶
func NewGetBrandMetricsReportRequest(server string, reportId string, params *GetBrandMetricsReportParams) (*http.Request, error)
NewGetBrandMetricsReportRequest generates requests for GetBrandMetricsReport
Types ¶
type BrandMetricsError ¶
type BrandMetricsError struct { // Code The HTTP status code of the response. Code *string `json:"code,omitempty"` // Details A human-readable description of the response. Details *string `json:"details,omitempty"` }
BrandMetricsError The error response object.
type BrandMetricsGenerateReportRequest ¶
type BrandMetricsGenerateReportRequest struct { // BrandName Optional. Brand Name. If no Brand Name is passed, then all data available for all brands belonging to the entity are retrieved. BrandName *string `json:"brandName,omitempty"` // CategoryNodePath Optional. The hierarchical path that leads to a node starting with the root node. If no Category Node Name is passed, then all data available for all brands belonging to the entity are retrieved. CategoryNodePath *[]string `json:"categoryNodePath,omitempty"` // CategoryNodeTreeName Optional. The node at the top of a browse tree. It is the start node of a tree CategoryNodeTreeName *string `json:"categoryNodeTreeName,omitempty"` // Format Format of the report Format *BrandMetricsGenerateReportRequestFormat `json:"format,omitempty"` // LookBackPeriod Currently supported values: "1w" (one week), "1m" (one month) and "1cm" (one calendar month). This defines the period of time used to determine the number of shoppers in the metrics computation. LookBackPeriod *BrandMetricsGenerateReportRequestLookBackPeriod `json:"lookBackPeriod,omitempty"` // Metrics Optional. Specify an array of string of metrics field names to include in the report. If no metric field names are specified, all metrics are returned. Metrics *[]string `json:"metrics,omitempty"` // ReportEndDate Optional. Retrieves metrics with metricsComputationDate between reportStartDate and reportEndDate (inclusive). The date will be in the Coordinated Universal Time (UTC) timezone in YYYY-MM-DD format. If no date is passed in reportEndDate, all available metrics with metricsComputationDate from the reportStartDate will be provided. If no date is passed for either reportStartDate or reportEndDate, the metrics with the most receont metricsComputationDate will be returned. ReportEndDate *openapi_types.Date `json:"reportEndDate,omitempty"` // ReportStartDate Optional. Retrieves metrics with metricsComputationDate between reportStartDate and reportEndDate (inclusive). The date will be in the Coordinated Universal Time (UTC) timezone in YYYY-MM-DD format. If no date is passed in reportStartDate, all available metrics with metricsComputationDate till the reportEndDate will be provided. If no date is passed for either reportStartDate or reportEndDate, the metrics with the most receont metricsComputationDate will be returned. ReportStartDate *openapi_types.Date `json:"reportStartDate,omitempty"` }
BrandMetricsGenerateReportRequest Request object to generate the Brand Metrics Report
type BrandMetricsGenerateReportRequestFormat ¶
type BrandMetricsGenerateReportRequestFormat string
BrandMetricsGenerateReportRequestFormat Format of the report
const ( BrandMetricsGenerateReportRequestFormatCSV BrandMetricsGenerateReportRequestFormat = "CSV" BrandMetricsGenerateReportRequestFormatJSON BrandMetricsGenerateReportRequestFormat = "JSON" )
Defines values for BrandMetricsGenerateReportRequestFormat.
type BrandMetricsGenerateReportRequestLookBackPeriod ¶
type BrandMetricsGenerateReportRequestLookBackPeriod string
BrandMetricsGenerateReportRequestLookBackPeriod Currently supported values: "1w" (one week), "1m" (one month) and "1cm" (one calendar month). This defines the period of time used to determine the number of shoppers in the metrics computation.
const ( N1cm BrandMetricsGenerateReportRequestLookBackPeriod = "1cm" N1m BrandMetricsGenerateReportRequestLookBackPeriod = "1m" N1w BrandMetricsGenerateReportRequestLookBackPeriod = "1w" )
Defines values for BrandMetricsGenerateReportRequestLookBackPeriod.
type BrandMetricsGenerateReportResponse ¶
type BrandMetricsGenerateReportResponse struct { // Expiration The expiration time of the URI in the location property in milliseconds. The expiration time is the interval between the time the response was generated and the time the URI expires. Expiration int64 `json:"expiration"` // Format Format of the report Format BrandMetricsGenerateReportResponseFormat `json:"format"` // Location The URI address of the report. Location *string `json:"location,omitempty"` // ReportId The identifier of the report. ReportId string `json:"reportId"` // Status The build status of the report. Status BrandMetricsGenerateReportResponseStatus `json:"status"` // StatusDetails A human-readable description of the current status. StatusDetails string `json:"statusDetails"` }
BrandMetricsGenerateReportResponse Response object containing Brand Metrics Report metadata
type BrandMetricsGenerateReportResponseFormat ¶
type BrandMetricsGenerateReportResponseFormat string
BrandMetricsGenerateReportResponseFormat Format of the report
const ( BrandMetricsGenerateReportResponseFormatCSV BrandMetricsGenerateReportResponseFormat = "CSV" BrandMetricsGenerateReportResponseFormatJSON BrandMetricsGenerateReportResponseFormat = "JSON" )
Defines values for BrandMetricsGenerateReportResponseFormat.
type BrandMetricsGenerateReportResponseStatus ¶
type BrandMetricsGenerateReportResponseStatus string
BrandMetricsGenerateReportResponseStatus The build status of the report.
const ( BrandMetricsGenerateReportResponseStatusFAILURE BrandMetricsGenerateReportResponseStatus = "FAILURE" BrandMetricsGenerateReportResponseStatusINPROGRESS BrandMetricsGenerateReportResponseStatus = "IN_PROGRESS" BrandMetricsGenerateReportResponseStatusSUCCESS BrandMetricsGenerateReportResponseStatus = "SUCCESS" )
Defines values for BrandMetricsGenerateReportResponseStatus.
type BrandMetricsGetReportByIdResponse ¶
type BrandMetricsGetReportByIdResponse struct { // BrandsInfo List of first 200 brands for which the Brand Metrics report is generated. The report may contain more than 200 brands. This list is only populated with brands if the Brand Metrics are available for the brands that an advertiser has access to. BrandsInfo *[]struct { // Id Id Id *string `json:"id,omitempty"` // Name Brand Name Name *string `json:"name,omitempty"` } `json:"brandsInfo,omitempty"` // Expiration The expiration time of the URI in the location property in milliseconds. The expiration time is the interval between the time the response was generated and the time the URI expires. Expiration int64 `json:"expiration"` // Format Format of the report Format BrandMetricsGetReportByIdResponseFormat `json:"format"` // Location The URI address of the report. Only available if the report is generated successfully. The location is empty if the Brand Metrics are not available or if the report is not generated successfully. Location *string `json:"location,omitempty"` // ReportId The identifier of the report. ReportId string `json:"reportId"` // Status The build status of the report. Status BrandMetricsGetReportByIdResponseStatus `json:"status"` // StatusDetails A human-readable description of the current status. StatusDetails string `json:"statusDetails"` }
BrandMetricsGetReportByIdResponse Response object containing Brand Metrics Report status metadata
type BrandMetricsGetReportByIdResponseFormat ¶
type BrandMetricsGetReportByIdResponseFormat string
BrandMetricsGetReportByIdResponseFormat Format of the report
const ( CSV BrandMetricsGetReportByIdResponseFormat = "CSV" JSON BrandMetricsGetReportByIdResponseFormat = "JSON" )
Defines values for BrandMetricsGetReportByIdResponseFormat.
type BrandMetricsGetReportByIdResponseStatus ¶
type BrandMetricsGetReportByIdResponseStatus string
BrandMetricsGetReportByIdResponseStatus The build status of the report.
const ( BrandMetricsGetReportByIdResponseStatusFAILURE BrandMetricsGetReportByIdResponseStatus = "FAILURE" BrandMetricsGetReportByIdResponseStatusINPROGRESS BrandMetricsGetReportByIdResponseStatus = "IN_PROGRESS" BrandMetricsGetReportByIdResponseStatusSUCCESS BrandMetricsGetReportByIdResponseStatus = "SUCCESS" )
Defines values for BrandMetricsGetReportByIdResponseStatus.
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) GenerateBrandMetricsReportWithApplicationVndInsightsBrandMetricsV1PlusJSONBody ¶
func (c *Client) GenerateBrandMetricsReportWithApplicationVndInsightsBrandMetricsV1PlusJSONBody(ctx context.Context, params *GenerateBrandMetricsReportParams, body GenerateBrandMetricsReportApplicationVndInsightsBrandMetricsV1PlusJSONRequestBody) (*http.Response, error)
func (*Client) GenerateBrandMetricsReportWithBody ¶
func (*Client) GetBrandMetricsReport ¶
type ClientInterface ¶
type ClientInterface interface { // GenerateBrandMetricsReportWithBody request with any body GenerateBrandMetricsReportWithBody(ctx context.Context, params *GenerateBrandMetricsReportParams, contentType string, body io.Reader) (*http.Response, error) GenerateBrandMetricsReportWithApplicationVndInsightsBrandMetricsV1PlusJSONBody(ctx context.Context, params *GenerateBrandMetricsReportParams, body GenerateBrandMetricsReportApplicationVndInsightsBrandMetricsV1PlusJSONRequestBody) (*http.Response, error) // GetBrandMetricsReport request GetBrandMetricsReport(ctx context.Context, reportId string, params *GetBrandMetricsReportParams) (*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) GenerateBrandMetricsReportWithApplicationVndInsightsBrandMetricsV1PlusJSONBodyWithResponse ¶
func (c *ClientWithResponses) GenerateBrandMetricsReportWithApplicationVndInsightsBrandMetricsV1PlusJSONBodyWithResponse(ctx context.Context, params *GenerateBrandMetricsReportParams, body GenerateBrandMetricsReportApplicationVndInsightsBrandMetricsV1PlusJSONRequestBody) (*GenerateBrandMetricsReportResp, error)
func (*ClientWithResponses) GenerateBrandMetricsReportWithBodyWithResponse ¶
func (c *ClientWithResponses) GenerateBrandMetricsReportWithBodyWithResponse(ctx context.Context, params *GenerateBrandMetricsReportParams, contentType string, body io.Reader) (*GenerateBrandMetricsReportResp, error)
GenerateBrandMetricsReportWithBodyWithResponse request with arbitrary body returning *GenerateBrandMetricsReportResp
func (*ClientWithResponses) GetBrandMetricsReportWithResponse ¶
func (c *ClientWithResponses) GetBrandMetricsReportWithResponse(ctx context.Context, reportId string, params *GetBrandMetricsReportParams) (*GetBrandMetricsReportResp, error)
GetBrandMetricsReportWithResponse request returning *GetBrandMetricsReportResp
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // GenerateBrandMetricsReportWithBodyWithResponse request with any body GenerateBrandMetricsReportWithBodyWithResponse(ctx context.Context, params *GenerateBrandMetricsReportParams, contentType string, body io.Reader) (*GenerateBrandMetricsReportResp, error) GenerateBrandMetricsReportWithApplicationVndInsightsBrandMetricsV1PlusJSONBodyWithResponse(ctx context.Context, params *GenerateBrandMetricsReportParams, body GenerateBrandMetricsReportApplicationVndInsightsBrandMetricsV1PlusJSONRequestBody) (*GenerateBrandMetricsReportResp, error) // GetBrandMetricsReportWithResponse request GetBrandMetricsReportWithResponse(ctx context.Context, reportId string, params *GetBrandMetricsReportParams) (*GetBrandMetricsReportResp, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type GenerateBrandMetricsReportApplicationVndInsightsBrandMetricsV1PlusJSONRequestBody ¶
type GenerateBrandMetricsReportApplicationVndInsightsBrandMetricsV1PlusJSONRequestBody = BrandMetricsGenerateReportRequest
GenerateBrandMetricsReportApplicationVndInsightsBrandMetricsV1PlusJSONRequestBody defines body for GenerateBrandMetricsReport for application/vnd.insightsBrandMetrics.v1+json ContentType.
type GenerateBrandMetricsReportParams ¶
type GenerateBrandMetricsReportParams struct { // AmazonAdvertisingAPIScope The profile Id, for example, 195213312458027. AmazonAdvertisingAPIScope string `json:"Amazon-Advertising-API-Scope"` // AmazonAdvertisingAPIClientID The client Id, for example, amzn1.application-oa2-client.8baa9caa3eac48eab89780e73ce03b19. AmazonAdvertisingAPIClientID string `json:"Amazon-Advertising-API-ClientID"` }
GenerateBrandMetricsReportParams defines parameters for GenerateBrandMetricsReport.
type GenerateBrandMetricsReportResp ¶
type GenerateBrandMetricsReportResp struct { Body []byte HTTPResponse *http.Response ApplicationvndInsightsBrandMetricsV1JSON200 *BrandMetricsGenerateReportResponse ApplicationvndInsightsBrandMetricsErrorV1JSON400 *BrandMetricsError ApplicationvndInsightsBrandMetricsErrorV1JSON401 *BrandMetricsError ApplicationvndInsightsBrandMetricsErrorV1JSON403 *BrandMetricsError ApplicationvndInsightsBrandMetricsErrorV1JSON422 *BrandMetricsError ApplicationvndInsightsBrandMetricsErrorV1JSON424 *BrandMetricsError ApplicationvndInsightsBrandMetricsErrorV1JSON429 *BrandMetricsError ApplicationvndInsightsBrandMetricsErrorV1JSON500 *BrandMetricsError }
func ParseGenerateBrandMetricsReportResp ¶
func ParseGenerateBrandMetricsReportResp(rsp *http.Response) (*GenerateBrandMetricsReportResp, error)
ParseGenerateBrandMetricsReportResp parses an HTTP response from a GenerateBrandMetricsReportWithResponse call
func (GenerateBrandMetricsReportResp) Status ¶
func (r GenerateBrandMetricsReportResp) Status() string
Status returns HTTPResponse.Status
func (GenerateBrandMetricsReportResp) StatusCode ¶
func (r GenerateBrandMetricsReportResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetBrandMetricsReportParams ¶
type GetBrandMetricsReportParams struct { // AmazonAdvertisingAPIScope The profile Id, for example, 195213312458027. AmazonAdvertisingAPIScope string `json:"Amazon-Advertising-API-Scope"` // AmazonAdvertisingAPIClientID The client Id, for example, amzn1.application-oa2-client.8baa9caa3eac48eab89780e73ce03b19. AmazonAdvertisingAPIClientID string `json:"Amazon-Advertising-API-ClientID"` }
GetBrandMetricsReportParams defines parameters for GetBrandMetricsReport.
type GetBrandMetricsReportResp ¶
type GetBrandMetricsReportResp struct { Body []byte HTTPResponse *http.Response ApplicationvndInsightsBrandMetricsV1JSON200 *BrandMetricsGetReportByIdResponse ApplicationvndInsightsBrandMetricsErrorV1JSON400 *BrandMetricsError ApplicationvndInsightsBrandMetricsErrorV1JSON401 *BrandMetricsError ApplicationvndInsightsBrandMetricsErrorV1JSON403 *BrandMetricsError ApplicationvndInsightsBrandMetricsErrorV1JSON422 *BrandMetricsError ApplicationvndInsightsBrandMetricsErrorV1JSON424 *BrandMetricsError ApplicationvndInsightsBrandMetricsErrorV1JSON429 *BrandMetricsError ApplicationvndInsightsBrandMetricsErrorV1JSON500 *BrandMetricsError }
func ParseGetBrandMetricsReportResp ¶
func ParseGetBrandMetricsReportResp(rsp *http.Response) (*GetBrandMetricsReportResp, error)
ParseGetBrandMetricsReportResp parses an HTTP response from a GetBrandMetricsReportWithResponse call
func (GetBrandMetricsReportResp) Status ¶
func (r GetBrandMetricsReportResp) Status() string
Status returns HTTPResponse.Status
func (GetBrandMetricsReportResp) StatusCode ¶
func (r GetBrandMetricsReportResp) 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