sponsoredadsreportv3

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package sponsoredadsreportv3 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

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCreateAsyncReportRequestWithApplicationVndCreateasyncreportrequestV3PlusJSONBody

func NewCreateAsyncReportRequestWithApplicationVndCreateasyncreportrequestV3PlusJSONBody(server string, params *CreateAsyncReportParams, body CreateAsyncReportApplicationVndCreateasyncreportrequestV3PlusJSONRequestBody) (*http.Request, error)

NewCreateAsyncReportRequestWithApplicationVndCreateasyncreportrequestV3PlusJSONBody calls the generic CreateAsyncReport builder with application/vnd.createasyncreportrequest.v3+json body

func NewCreateAsyncReportRequestWithBody

func NewCreateAsyncReportRequestWithBody(server string, params *CreateAsyncReportParams, contentType string, body io.Reader) (*http.Request, error)

NewCreateAsyncReportRequestWithBody generates requests for CreateAsyncReport with any type of body

func NewDeleteAsyncReportRequest

func NewDeleteAsyncReportRequest(server string, reportId string, params *DeleteAsyncReportParams) (*http.Request, error)

NewDeleteAsyncReportRequest generates requests for DeleteAsyncReport

func NewGetAsyncReportRequest

func NewGetAsyncReportRequest(server string, reportId string, params *GetAsyncReportParams) (*http.Request, error)

NewGetAsyncReportRequest generates requests for GetAsyncReport

Types

type AsyncReport

type AsyncReport struct {
	Configuration AsyncReportConfiguration `json:"configuration"`

	// CreatedAt The date at which the report was created in ISO 8601 date time format.
	CreatedAt string `json:"createdAt"`

	// EndDate The end date for the reporting period in YYYY-mm-dd format.
	EndDate string `json:"endDate"`

	// FailureReason Present for failed reports only. The reason why a report failed to generate.
	FailureReason *string `json:"failureReason"`

	// FileSize The size of the report file, in bytes.
	FileSize *float32 `json:"fileSize"`

	// GeneratedAt The date at which the report was generated in ISO 8601 date time format.
	GeneratedAt *string `json:"generatedAt"`

	// Name Optional. The name of the generated report.
	Name *string `json:"name"`

	// ReportId The identifier of the requested report.
	ReportId string `json:"reportId"`

	// StartDate The start date for the reporting period in YYYY-mm-dd format.
	StartDate string `json:"startDate"`

	// Status The build status of the report.
	//   - `PENDING` - Report is created and awaiting processing.
	//   - `PROCESSING` - Report is processing. Please wait.
	//   - `COMPLETED` - Report has completed.  Check the `url` for the output file.
	//   - `FAILED` - Report generation failed.  Check the `failureReason` for details.
	Status AsyncReportStatus `json:"status"`

	// UpdatedAt The date at which the report was last updated in ISO 8601 date time format.
	UpdatedAt string `json:"updatedAt"`

	// Url URL of the generated report.
	Url *string `json:"url"`

	// UrlExpiresAt The date at which the download URL for the generated report expires. urlExpires at this time defaults to 3600 seconds but may vary in the future.
	UrlExpiresAt *string `json:"urlExpiresAt"`
}

AsyncReport defines model for AsyncReport.

type AsyncReportAdProduct

type AsyncReportAdProduct string

AsyncReportAdProduct The advertising product such as SPONSORED_PRODUCTS or SPONSORED_BRANDS.

const (
	SPONSOREDBRANDS   AsyncReportAdProduct = "SPONSORED_BRANDS"
	SPONSOREDPRODUCTS AsyncReportAdProduct = "SPONSORED_PRODUCTS"
)

Defines values for AsyncReportAdProduct.

type AsyncReportConfiguration

type AsyncReportConfiguration struct {
	// AdProduct The advertising product such as SPONSORED_PRODUCTS or SPONSORED_BRANDS.
	AdProduct AsyncReportAdProduct `json:"adProduct"`

	// Columns The list of columns to be used for report. The availability of
	// columns depends on the selection of reportTypeId. This list cannot be null or empty.
	Columns []string `json:"columns"`

	// Filters The list of filters supported by a report type. The availability of filters fields depends on the selection of reportTypeId.
	Filters *[]AsyncReportFilter `json:"filters"`

	// Format The report file format.
	Format AsyncReportConfigurationFormat `json:"format"`

	// GroupBy This field determines the aggregation level of the report data and also makes additional fields available
	// for selection. This field cannot be null or empty.
	GroupBy []string `json:"groupBy"`

	// ReportTypeId The identifier of the Report Type to be generated.
	ReportTypeId string `json:"reportTypeId"`

	// TimeUnit The aggregation level of report data. If the timeUnit is set to `SUMMARY`, the report data is aggregated at the time period specified. The availability
	// of time unit breakdowns depends on the selection of reportTypeId.
	TimeUnit AsyncReportConfigurationTimeUnit `json:"timeUnit"`
}

AsyncReportConfiguration defines model for AsyncReportConfiguration.

type AsyncReportConfigurationFormat

type AsyncReportConfigurationFormat string

AsyncReportConfigurationFormat The report file format.

const (
	GZIPJSON AsyncReportConfigurationFormat = "GZIP_JSON"
)

Defines values for AsyncReportConfigurationFormat.

type AsyncReportConfigurationTimeUnit

type AsyncReportConfigurationTimeUnit string

AsyncReportConfigurationTimeUnit The aggregation level of report data. If the timeUnit is set to `SUMMARY`, the report data is aggregated at the time period specified. The availability of time unit breakdowns depends on the selection of reportTypeId.

const (
	DAILY   AsyncReportConfigurationTimeUnit = "DAILY"
	SUMMARY AsyncReportConfigurationTimeUnit = "SUMMARY"
)

Defines values for AsyncReportConfigurationTimeUnit.

type AsyncReportFilter

type AsyncReportFilter struct {
	// Field The field name of the filter
	Field *string `json:"field,omitempty"`

	// Values The values to be filtered by
	Values *[]string `json:"values,omitempty"`
}

AsyncReportFilter defines model for AsyncReportFilter.

type AsyncReportStatus

type AsyncReportStatus string

AsyncReportStatus The build status of the report.

  • `PENDING` - Report is created and awaiting processing.
  • `PROCESSING` - Report is processing. Please wait.
  • `COMPLETED` - Report has completed. Check the `url` for the output file.
  • `FAILED` - Report generation failed. Check the `failureReason` for details.
const (
	COMPLETED  AsyncReportStatus = "COMPLETED"
	FAILED     AsyncReportStatus = "FAILED"
	PENDING    AsyncReportStatus = "PENDING"
	PROCESSING AsyncReportStatus = "PROCESSING"
)

Defines values for AsyncReportStatus.

type AsyncReportingError

type AsyncReportingError struct {
	// Code The HTTP status code of the response.
	Code *string `json:"code,omitempty"`

	// Detail A human-readable description of the response.
	Detail *string `json:"detail,omitempty"`
}

AsyncReportingError The Error Response.

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) CreateAsyncReportWithBody

func (c *Client) CreateAsyncReportWithBody(ctx context.Context, params *CreateAsyncReportParams, contentType string, body io.Reader) (*http.Response, error)

func (*Client) DeleteAsyncReport

func (c *Client) DeleteAsyncReport(ctx context.Context, reportId string, params *DeleteAsyncReportParams) (*http.Response, error)

func (*Client) GetAsyncReport

func (c *Client) GetAsyncReport(ctx context.Context, reportId string, params *GetAsyncReportParams) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// CreateAsyncReportWithBody request with any body
	CreateAsyncReportWithBody(ctx context.Context, params *CreateAsyncReportParams, contentType string, body io.Reader) (*http.Response, error)

	CreateAsyncReportWithApplicationVndCreateasyncreportrequestV3PlusJSONBody(ctx context.Context, params *CreateAsyncReportParams, body CreateAsyncReportApplicationVndCreateasyncreportrequestV3PlusJSONRequestBody) (*http.Response, error)

	// DeleteAsyncReport request
	DeleteAsyncReport(ctx context.Context, reportId string, params *DeleteAsyncReportParams) (*http.Response, error)

	// GetAsyncReport request
	GetAsyncReport(ctx context.Context, reportId string, params *GetAsyncReportParams) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

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) CreateAsyncReportWithBodyWithResponse

func (c *ClientWithResponses) CreateAsyncReportWithBodyWithResponse(ctx context.Context, params *CreateAsyncReportParams, contentType string, body io.Reader) (*CreateAsyncReportResp, error)

CreateAsyncReportWithBodyWithResponse request with arbitrary body returning *CreateAsyncReportResp

func (*ClientWithResponses) DeleteAsyncReportWithResponse

func (c *ClientWithResponses) DeleteAsyncReportWithResponse(ctx context.Context, reportId string, params *DeleteAsyncReportParams) (*DeleteAsyncReportResp, error)

DeleteAsyncReportWithResponse request returning *DeleteAsyncReportResp

func (*ClientWithResponses) GetAsyncReportWithResponse

func (c *ClientWithResponses) GetAsyncReportWithResponse(ctx context.Context, reportId string, params *GetAsyncReportParams) (*GetAsyncReportResp, error)

GetAsyncReportWithResponse request returning *GetAsyncReportResp

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// CreateAsyncReportWithBodyWithResponse request with any body
	CreateAsyncReportWithBodyWithResponse(ctx context.Context, params *CreateAsyncReportParams, contentType string, body io.Reader) (*CreateAsyncReportResp, error)

	CreateAsyncReportWithApplicationVndCreateasyncreportrequestV3PlusJSONBodyWithResponse(ctx context.Context, params *CreateAsyncReportParams, body CreateAsyncReportApplicationVndCreateasyncreportrequestV3PlusJSONRequestBody) (*CreateAsyncReportResp, error)

	// DeleteAsyncReportWithResponse request
	DeleteAsyncReportWithResponse(ctx context.Context, reportId string, params *DeleteAsyncReportParams) (*DeleteAsyncReportResp, error)

	// GetAsyncReportWithResponse request
	GetAsyncReportWithResponse(ctx context.Context, reportId string, params *GetAsyncReportParams) (*GetAsyncReportResp, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CreateAsyncReportApplicationVndCreateasyncreportrequestV3PlusJSONRequestBody

type CreateAsyncReportApplicationVndCreateasyncreportrequestV3PlusJSONRequestBody = CreateAsyncReportRequest

CreateAsyncReportApplicationVndCreateasyncreportrequestV3PlusJSONRequestBody defines body for CreateAsyncReport for application/vnd.createasyncreportrequest.v3+json ContentType.

type CreateAsyncReportParams

type CreateAsyncReportParams struct {
	// AmazonAdvertisingAPIClientId The client identifier of the customer making the request.
	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.
	AmazonAdvertisingAPIScope string `json:"Amazon-Advertising-API-Scope"`
}

CreateAsyncReportParams defines parameters for CreateAsyncReport.

type CreateAsyncReportRequest

type CreateAsyncReportRequest struct {
	Configuration AsyncReportConfiguration `json:"configuration"`

	// EndDate YYYY-MM-DD format. The maximum lookback window supported depends on the selection of reportTypeId. Most report types support `95 days` as lookback window.
	EndDate string `json:"endDate"`

	// Name The name of the report.
	Name *string `json:"name,omitempty"`

	// StartDate YYYY-MM-DD format. The maximum lookback window supported depends on the selection of reportTypeId. Most report types support `95 days` as lookback window.
	StartDate string `json:"startDate"`
}

CreateAsyncReportRequest defines model for CreateAsyncReportRequest.

type CreateAsyncReportResp

type CreateAsyncReportResp struct {
	Body                                             []byte
	HTTPResponse                                     *http.Response
	ApplicationvndCreateasyncreportresponseV3JSON200 *AsyncReport
	JSON400                                          *AsyncReportingError
	JSON401                                          *AsyncReportingError
	JSON422                                          *AsyncReportingError
	JSON429                                          *AsyncReportingError
	JSON500                                          *AsyncReportingError
}

func ParseCreateAsyncReportResp

func ParseCreateAsyncReportResp(rsp *http.Response) (*CreateAsyncReportResp, error)

ParseCreateAsyncReportResp parses an HTTP response from a CreateAsyncReportWithResponse call

func (CreateAsyncReportResp) Status

func (r CreateAsyncReportResp) Status() string

Status returns HTTPResponse.Status

func (CreateAsyncReportResp) StatusCode

func (r CreateAsyncReportResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteAsyncReportParams

type DeleteAsyncReportParams struct {
	// 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.
	AmazonAdvertisingAPIScope string `json:"Amazon-Advertising-API-Scope"`
}

DeleteAsyncReportParams defines parameters for DeleteAsyncReport.

type DeleteAsyncReportResp

type DeleteAsyncReportResp struct {
	Body                                             []byte
	HTTPResponse                                     *http.Response
	ApplicationvndDeleteasyncreportresponseV3JSON200 *DeleteAsyncReportResponse
	JSON400                                          *AsyncReportingError
	JSON401                                          *AsyncReportingError
	JSON403                                          *AsyncReportingError
	JSON404                                          *AsyncReportingError
	JSON429                                          *AsyncReportingError
	JSON500                                          *AsyncReportingError
}

func ParseDeleteAsyncReportResp

func ParseDeleteAsyncReportResp(rsp *http.Response) (*DeleteAsyncReportResp, error)

ParseDeleteAsyncReportResp parses an HTTP response from a DeleteAsyncReportWithResponse call

func (DeleteAsyncReportResp) Status

func (r DeleteAsyncReportResp) Status() string

Status returns HTTPResponse.Status

func (DeleteAsyncReportResp) StatusCode

func (r DeleteAsyncReportResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteAsyncReportResponse

type DeleteAsyncReportResponse struct {
	// Code The HTTP status code of the response.
	Code *string `json:"code,omitempty"`

	// Detail A human-readable description of the response.
	Detail *string `json:"detail,omitempty"`

	// ReportId The identifier of the report.
	ReportId *string `json:"reportId,omitempty"`
}

DeleteAsyncReportResponse defines model for DeleteAsyncReportResponse.

type GetAsyncReportParams

type GetAsyncReportParams struct {
	// 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.
	AmazonAdvertisingAPIScope string `json:"Amazon-Advertising-API-Scope"`
}

GetAsyncReportParams defines parameters for GetAsyncReport.

type GetAsyncReportResp

type GetAsyncReportResp struct {
	Body                                          []byte
	HTTPResponse                                  *http.Response
	ApplicationvndGetasyncreportresponseV3JSON200 *AsyncReport
	JSON400                                       *AsyncReportingError
	JSON401                                       *AsyncReportingError
	JSON404                                       *AsyncReportingError
	JSON429                                       *AsyncReportingError
	JSON500                                       *AsyncReportingError
}

func ParseGetAsyncReportResp

func ParseGetAsyncReportResp(rsp *http.Response) (*GetAsyncReportResp, error)

ParseGetAsyncReportResp parses an HTTP response from a GetAsyncReportWithResponse call

func (GetAsyncReportResp) Status

func (r GetAsyncReportResp) Status() string

Status returns HTTPResponse.Status

func (GetAsyncReportResp) StatusCode

func (r GetAsyncReportResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type ResponseEditorFn added in v0.0.2

type ResponseEditorFn func(ctx context.Context, rsp *http.Response) error

ResponseEditorFn is the function signature for the ResponseEditor callback function

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL