Documentation ¶
Overview ¶
Package merchantapi provides access to the Merchant API.
For product documentation, see: https://developers.devsite.corp.google.com/merchant/api
Library status ¶
These client libraries are officially supported by Google. However, this library is considered complete and is in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features.
When possible, we recommend using our newer [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) that are still actively being worked and iterated on.
Creating a client ¶
Usage example:
import "google.golang.org/api/merchantapi/datasources_v1beta" ... ctx := context.Background() merchantapiService, err := merchantapi.NewService(ctx)
In this example, Google Application Default Credentials are used for authentication. For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options ¶
To use an API key for authentication (note: some APIs do not support API keys), use google.golang.org/api/option.WithAPIKey:
merchantapiService, err := merchantapi.NewService(ctx, option.WithAPIKey("AIza..."))
To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow, use google.golang.org/api/option.WithTokenSource:
config := &oauth2.Config{...} // ... token, err := config.Exchange(ctx, ...) merchantapiService, err := merchantapi.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
See google.golang.org/api/option.ClientOption for details on options.
Index ¶
- Constants
- type AccountsDataSourcesCreateCall
- func (c *AccountsDataSourcesCreateCall) Context(ctx context.Context) *AccountsDataSourcesCreateCall
- func (c *AccountsDataSourcesCreateCall) Do(opts ...googleapi.CallOption) (*DataSource, error)
- func (c *AccountsDataSourcesCreateCall) Fields(s ...googleapi.Field) *AccountsDataSourcesCreateCall
- func (c *AccountsDataSourcesCreateCall) Header() http.Header
- type AccountsDataSourcesDeleteCall
- func (c *AccountsDataSourcesDeleteCall) Context(ctx context.Context) *AccountsDataSourcesDeleteCall
- func (c *AccountsDataSourcesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *AccountsDataSourcesDeleteCall) Fields(s ...googleapi.Field) *AccountsDataSourcesDeleteCall
- func (c *AccountsDataSourcesDeleteCall) Header() http.Header
- type AccountsDataSourcesFetchCall
- func (c *AccountsDataSourcesFetchCall) Context(ctx context.Context) *AccountsDataSourcesFetchCall
- func (c *AccountsDataSourcesFetchCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *AccountsDataSourcesFetchCall) Fields(s ...googleapi.Field) *AccountsDataSourcesFetchCall
- func (c *AccountsDataSourcesFetchCall) Header() http.Header
- type AccountsDataSourcesFileUploadsGetCall
- func (c *AccountsDataSourcesFileUploadsGetCall) Context(ctx context.Context) *AccountsDataSourcesFileUploadsGetCall
- func (c *AccountsDataSourcesFileUploadsGetCall) Do(opts ...googleapi.CallOption) (*FileUpload, error)
- func (c *AccountsDataSourcesFileUploadsGetCall) Fields(s ...googleapi.Field) *AccountsDataSourcesFileUploadsGetCall
- func (c *AccountsDataSourcesFileUploadsGetCall) Header() http.Header
- func (c *AccountsDataSourcesFileUploadsGetCall) IfNoneMatch(entityTag string) *AccountsDataSourcesFileUploadsGetCall
- type AccountsDataSourcesFileUploadsService
- type AccountsDataSourcesGetCall
- func (c *AccountsDataSourcesGetCall) Context(ctx context.Context) *AccountsDataSourcesGetCall
- func (c *AccountsDataSourcesGetCall) Do(opts ...googleapi.CallOption) (*DataSource, error)
- func (c *AccountsDataSourcesGetCall) Fields(s ...googleapi.Field) *AccountsDataSourcesGetCall
- func (c *AccountsDataSourcesGetCall) Header() http.Header
- func (c *AccountsDataSourcesGetCall) IfNoneMatch(entityTag string) *AccountsDataSourcesGetCall
- type AccountsDataSourcesListCall
- func (c *AccountsDataSourcesListCall) Context(ctx context.Context) *AccountsDataSourcesListCall
- func (c *AccountsDataSourcesListCall) Do(opts ...googleapi.CallOption) (*ListDataSourcesResponse, error)
- func (c *AccountsDataSourcesListCall) Fields(s ...googleapi.Field) *AccountsDataSourcesListCall
- func (c *AccountsDataSourcesListCall) Header() http.Header
- func (c *AccountsDataSourcesListCall) IfNoneMatch(entityTag string) *AccountsDataSourcesListCall
- func (c *AccountsDataSourcesListCall) PageSize(pageSize int64) *AccountsDataSourcesListCall
- func (c *AccountsDataSourcesListCall) PageToken(pageToken string) *AccountsDataSourcesListCall
- func (c *AccountsDataSourcesListCall) Pages(ctx context.Context, f func(*ListDataSourcesResponse) error) error
- type AccountsDataSourcesPatchCall
- func (c *AccountsDataSourcesPatchCall) Context(ctx context.Context) *AccountsDataSourcesPatchCall
- func (c *AccountsDataSourcesPatchCall) Do(opts ...googleapi.CallOption) (*DataSource, error)
- func (c *AccountsDataSourcesPatchCall) Fields(s ...googleapi.Field) *AccountsDataSourcesPatchCall
- func (c *AccountsDataSourcesPatchCall) Header() http.Header
- func (c *AccountsDataSourcesPatchCall) UpdateMask(updateMask string) *AccountsDataSourcesPatchCall
- type AccountsDataSourcesService
- func (r *AccountsDataSourcesService) Create(parent string, datasource *DataSource) *AccountsDataSourcesCreateCall
- func (r *AccountsDataSourcesService) Delete(name string) *AccountsDataSourcesDeleteCall
- func (r *AccountsDataSourcesService) Fetch(name string, fetchdatasourcerequest *FetchDataSourceRequest) *AccountsDataSourcesFetchCall
- func (r *AccountsDataSourcesService) Get(name string) *AccountsDataSourcesGetCall
- func (r *AccountsDataSourcesService) List(parent string) *AccountsDataSourcesListCall
- func (r *AccountsDataSourcesService) Patch(name string, datasource *DataSource) *AccountsDataSourcesPatchCall
- type AccountsService
- type DataSource
- type DataSourceReference
- type DefaultRule
- type Empty
- type FetchDataSourceRequest
- type FetchSettings
- type FileInput
- type FileUpload
- type Issue
- type ListDataSourcesResponse
- type LocalInventoryDataSource
- type MerchantReviewDataSource
- type PrimaryProductDataSource
- type ProductChange
- type ProductReviewDataSource
- type ProductStatusChangeMessage
- type PromotionDataSource
- type RegionalInventoryDataSource
- type Service
- type SupplementalProductDataSource
- type TimeOfDay
Constants ¶
const (
// Manage your product listings and accounts for Google Shopping
ContentScope = "https://www.googleapis.com/auth/content"
)
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountsDataSourcesCreateCall ¶
type AccountsDataSourcesCreateCall struct {
// contains filtered or unexported fields
}
func (*AccountsDataSourcesCreateCall) Context ¶
func (c *AccountsDataSourcesCreateCall) Context(ctx context.Context) *AccountsDataSourcesCreateCall
Context sets the context to be used in this call's Do method.
func (*AccountsDataSourcesCreateCall) Do ¶
func (c *AccountsDataSourcesCreateCall) Do(opts ...googleapi.CallOption) (*DataSource, error)
Do executes the "merchantapi.accounts.dataSources.create" call. Any non-2xx status code is an error. Response headers are in either *DataSource.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*AccountsDataSourcesCreateCall) Fields ¶
func (c *AccountsDataSourcesCreateCall) Fields(s ...googleapi.Field) *AccountsDataSourcesCreateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*AccountsDataSourcesCreateCall) Header ¶
func (c *AccountsDataSourcesCreateCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type AccountsDataSourcesDeleteCall ¶
type AccountsDataSourcesDeleteCall struct {
// contains filtered or unexported fields
}
func (*AccountsDataSourcesDeleteCall) Context ¶
func (c *AccountsDataSourcesDeleteCall) Context(ctx context.Context) *AccountsDataSourcesDeleteCall
Context sets the context to be used in this call's Do method.
func (*AccountsDataSourcesDeleteCall) Do ¶
func (c *AccountsDataSourcesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
Do executes the "merchantapi.accounts.dataSources.delete" call. Any non-2xx status code is an error. Response headers are in either *Empty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*AccountsDataSourcesDeleteCall) Fields ¶
func (c *AccountsDataSourcesDeleteCall) Fields(s ...googleapi.Field) *AccountsDataSourcesDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*AccountsDataSourcesDeleteCall) Header ¶
func (c *AccountsDataSourcesDeleteCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type AccountsDataSourcesFetchCall ¶
type AccountsDataSourcesFetchCall struct {
// contains filtered or unexported fields
}
func (*AccountsDataSourcesFetchCall) Context ¶
func (c *AccountsDataSourcesFetchCall) Context(ctx context.Context) *AccountsDataSourcesFetchCall
Context sets the context to be used in this call's Do method.
func (*AccountsDataSourcesFetchCall) Do ¶
func (c *AccountsDataSourcesFetchCall) Do(opts ...googleapi.CallOption) (*Empty, error)
Do executes the "merchantapi.accounts.dataSources.fetch" call. Any non-2xx status code is an error. Response headers are in either *Empty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*AccountsDataSourcesFetchCall) Fields ¶
func (c *AccountsDataSourcesFetchCall) Fields(s ...googleapi.Field) *AccountsDataSourcesFetchCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*AccountsDataSourcesFetchCall) Header ¶
func (c *AccountsDataSourcesFetchCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type AccountsDataSourcesFileUploadsGetCall ¶ added in v0.198.0
type AccountsDataSourcesFileUploadsGetCall struct {
// contains filtered or unexported fields
}
func (*AccountsDataSourcesFileUploadsGetCall) Context ¶ added in v0.198.0
func (c *AccountsDataSourcesFileUploadsGetCall) Context(ctx context.Context) *AccountsDataSourcesFileUploadsGetCall
Context sets the context to be used in this call's Do method.
func (*AccountsDataSourcesFileUploadsGetCall) Do ¶ added in v0.198.0
func (c *AccountsDataSourcesFileUploadsGetCall) Do(opts ...googleapi.CallOption) (*FileUpload, error)
Do executes the "merchantapi.accounts.dataSources.fileUploads.get" call. Any non-2xx status code is an error. Response headers are in either *FileUpload.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*AccountsDataSourcesFileUploadsGetCall) Fields ¶ added in v0.198.0
func (c *AccountsDataSourcesFileUploadsGetCall) Fields(s ...googleapi.Field) *AccountsDataSourcesFileUploadsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*AccountsDataSourcesFileUploadsGetCall) Header ¶ added in v0.198.0
func (c *AccountsDataSourcesFileUploadsGetCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*AccountsDataSourcesFileUploadsGetCall) IfNoneMatch ¶ added in v0.198.0
func (c *AccountsDataSourcesFileUploadsGetCall) IfNoneMatch(entityTag string) *AccountsDataSourcesFileUploadsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.
type AccountsDataSourcesFileUploadsService ¶ added in v0.198.0
type AccountsDataSourcesFileUploadsService struct {
// contains filtered or unexported fields
}
func NewAccountsDataSourcesFileUploadsService ¶ added in v0.198.0
func NewAccountsDataSourcesFileUploadsService(s *Service) *AccountsDataSourcesFileUploadsService
func (*AccountsDataSourcesFileUploadsService) Get ¶ added in v0.198.0
func (r *AccountsDataSourcesFileUploadsService) Get(name string) *AccountsDataSourcesFileUploadsGetCall
Get: Gets the latest data source file upload. Only the `latest` alias is accepted for a file upload.
- name: The name of the data source file upload to retrieve. Format: `accounts/{account}/dataSources/{datasource}/fileUploads/latest`.
type AccountsDataSourcesGetCall ¶
type AccountsDataSourcesGetCall struct {
// contains filtered or unexported fields
}
func (*AccountsDataSourcesGetCall) Context ¶
func (c *AccountsDataSourcesGetCall) Context(ctx context.Context) *AccountsDataSourcesGetCall
Context sets the context to be used in this call's Do method.
func (*AccountsDataSourcesGetCall) Do ¶
func (c *AccountsDataSourcesGetCall) Do(opts ...googleapi.CallOption) (*DataSource, error)
Do executes the "merchantapi.accounts.dataSources.get" call. Any non-2xx status code is an error. Response headers are in either *DataSource.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*AccountsDataSourcesGetCall) Fields ¶
func (c *AccountsDataSourcesGetCall) Fields(s ...googleapi.Field) *AccountsDataSourcesGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*AccountsDataSourcesGetCall) Header ¶
func (c *AccountsDataSourcesGetCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*AccountsDataSourcesGetCall) IfNoneMatch ¶
func (c *AccountsDataSourcesGetCall) IfNoneMatch(entityTag string) *AccountsDataSourcesGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.
type AccountsDataSourcesListCall ¶
type AccountsDataSourcesListCall struct {
// contains filtered or unexported fields
}
func (*AccountsDataSourcesListCall) Context ¶
func (c *AccountsDataSourcesListCall) Context(ctx context.Context) *AccountsDataSourcesListCall
Context sets the context to be used in this call's Do method.
func (*AccountsDataSourcesListCall) Do ¶
func (c *AccountsDataSourcesListCall) Do(opts ...googleapi.CallOption) (*ListDataSourcesResponse, error)
Do executes the "merchantapi.accounts.dataSources.list" call. Any non-2xx status code is an error. Response headers are in either *ListDataSourcesResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*AccountsDataSourcesListCall) Fields ¶
func (c *AccountsDataSourcesListCall) Fields(s ...googleapi.Field) *AccountsDataSourcesListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*AccountsDataSourcesListCall) Header ¶
func (c *AccountsDataSourcesListCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*AccountsDataSourcesListCall) IfNoneMatch ¶
func (c *AccountsDataSourcesListCall) IfNoneMatch(entityTag string) *AccountsDataSourcesListCall
IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.
func (*AccountsDataSourcesListCall) PageSize ¶
func (c *AccountsDataSourcesListCall) PageSize(pageSize int64) *AccountsDataSourcesListCall
PageSize sets the optional parameter "pageSize": The maximum number of data sources to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 will be coerced to 1000. If unspecified, the maximum number of data sources will be returned.
func (*AccountsDataSourcesListCall) PageToken ¶
func (c *AccountsDataSourcesListCall) PageToken(pageToken string) *AccountsDataSourcesListCall
PageToken sets the optional parameter "pageToken": A page token, received from a previous `ListDataSources` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDataSources` must match the call that provided the page token.
func (*AccountsDataSourcesListCall) Pages ¶
func (c *AccountsDataSourcesListCall) Pages(ctx context.Context, f func(*ListDataSourcesResponse) error) error
Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.
type AccountsDataSourcesPatchCall ¶
type AccountsDataSourcesPatchCall struct {
// contains filtered or unexported fields
}
func (*AccountsDataSourcesPatchCall) Context ¶
func (c *AccountsDataSourcesPatchCall) Context(ctx context.Context) *AccountsDataSourcesPatchCall
Context sets the context to be used in this call's Do method.
func (*AccountsDataSourcesPatchCall) Do ¶
func (c *AccountsDataSourcesPatchCall) Do(opts ...googleapi.CallOption) (*DataSource, error)
Do executes the "merchantapi.accounts.dataSources.patch" call. Any non-2xx status code is an error. Response headers are in either *DataSource.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*AccountsDataSourcesPatchCall) Fields ¶
func (c *AccountsDataSourcesPatchCall) Fields(s ...googleapi.Field) *AccountsDataSourcesPatchCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*AccountsDataSourcesPatchCall) Header ¶
func (c *AccountsDataSourcesPatchCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*AccountsDataSourcesPatchCall) UpdateMask ¶
func (c *AccountsDataSourcesPatchCall) UpdateMask(updateMask string) *AccountsDataSourcesPatchCall
UpdateMask sets the optional parameter "updateMask": Required. The list of data source fields to be updated. Fields specified in the update mask without a value specified in the body will be deleted from the data source. Providing special "*" value for full data source replacement is not supported.
type AccountsDataSourcesService ¶
type AccountsDataSourcesService struct { FileUploads *AccountsDataSourcesFileUploadsService // contains filtered or unexported fields }
func NewAccountsDataSourcesService ¶
func NewAccountsDataSourcesService(s *Service) *AccountsDataSourcesService
func (*AccountsDataSourcesService) Create ¶
func (r *AccountsDataSourcesService) Create(parent string, datasource *DataSource) *AccountsDataSourcesCreateCall
Create: Creates the new data source configuration for the given account.
- parent: The account where this data source will be created. Format: `accounts/{account}`.
func (*AccountsDataSourcesService) Delete ¶
func (r *AccountsDataSourcesService) Delete(name string) *AccountsDataSourcesDeleteCall
Delete: Deletes a data source from your Merchant Center account.
- name: The name of the data source to delete. Format: `accounts/{account}/dataSources/{datasource}`.
func (*AccountsDataSourcesService) Fetch ¶
func (r *AccountsDataSourcesService) Fetch(name string, fetchdatasourcerequest *FetchDataSourceRequest) *AccountsDataSourcesFetchCall
Fetch: Performs the data fetch immediately (even outside fetch schedule) on a data source from your Merchant Center Account. If you need to call this method more than once per day, you should use the Products service to update your product data instead. This method only works on data sources with a file input set.
- name: The name of the data source resource to fetch. Format: `accounts/{account}/dataSources/{datasource}`.
func (*AccountsDataSourcesService) Get ¶
func (r *AccountsDataSourcesService) Get(name string) *AccountsDataSourcesGetCall
Get: Retrieves the data source configuration for the given account.
- name: The name of the data source to retrieve. Format: `accounts/{account}/dataSources/{datasource}`.
func (*AccountsDataSourcesService) List ¶
func (r *AccountsDataSourcesService) List(parent string) *AccountsDataSourcesListCall
List: Lists the configurations for data sources for the given account.
- parent: The account to list data sources for. Format: `accounts/{account}`.
func (*AccountsDataSourcesService) Patch ¶
func (r *AccountsDataSourcesService) Patch(name string, datasource *DataSource) *AccountsDataSourcesPatchCall
Patch: Updates the existing data source configuration. The fields that are set in the update mask but not provided in the resource will be deleted.
- name: Identifier. The name of the data source. Format: `{datasource.name=accounts/{account}/dataSources/{datasource}}`.
type AccountsService ¶
type AccountsService struct { DataSources *AccountsDataSourcesService // contains filtered or unexported fields }
func NewAccountsService ¶
func NewAccountsService(s *Service) *AccountsService
type DataSource ¶
type DataSource struct { // DataSourceId: Output only. The data source id. DataSourceId int64 `json:"dataSourceId,omitempty,string"` // DisplayName: Required. The displayed data source name in the Merchant Center // UI. DisplayName string `json:"displayName,omitempty"` // FileInput: Optional. The field is used only when data is managed through a // file. FileInput *FileInput `json:"fileInput,omitempty"` // Input: Output only. Determines the type of input to the data source. Based // on the input some settings might not work. Only generic data sources can be // created through the API. // // Possible values: // "INPUT_UNSPECIFIED" - Input unspecified. // "API" - Represents data sources for which the data is primarily provided // through the API. // "FILE" - Represents data sources for which the data is primarily provided // through file input. Data can still be provided through the API. // "UI" - The data source for products added directly in Merchant Center. // This type of data source can not be created or updated through this API, // only by Merchant Center UI. This type of data source is read only. // "AUTOFEED" - This is also known as [Automated // feeds](https://support.google.com/merchants/answer/12158480) used to // automatically build your product data. This type of data source can be // enabled or disabled through the Accounts bundle. Input string `json:"input,omitempty"` // LocalInventoryDataSource: Required. The local inventory // (https://support.google.com/merchants/answer/7023001) data source. LocalInventoryDataSource *LocalInventoryDataSource `json:"localInventoryDataSource,omitempty"` // MerchantReviewDataSource: Required. The merchant review // (https://support.google.com/merchants/answer/7045996) data source. MerchantReviewDataSource *MerchantReviewDataSource `json:"merchantReviewDataSource,omitempty"` // Name: Identifier. The name of the data source. Format: // `{datasource.name=accounts/{account}/dataSources/{datasource}}` Name string `json:"name,omitempty"` // PrimaryProductDataSource: Required. The primary data source // (https://support.google.com/merchants/answer/7439058) for local and online // products. PrimaryProductDataSource *PrimaryProductDataSource `json:"primaryProductDataSource,omitempty"` // ProductReviewDataSource: Required. The product review // (https://support.google.com/merchants/answer/7045996) data source. ProductReviewDataSource *ProductReviewDataSource `json:"productReviewDataSource,omitempty"` // PromotionDataSource: Required. The promotion // (https://support.google.com/merchants/answer/2906014) data source. PromotionDataSource *PromotionDataSource `json:"promotionDataSource,omitempty"` // RegionalInventoryDataSource: Required. The regional inventory // (https://support.google.com/merchants/answer/7439058) data source. RegionalInventoryDataSource *RegionalInventoryDataSource `json:"regionalInventoryDataSource,omitempty"` // SupplementalProductDataSource: Required. The supplemental data source // (https://support.google.com/merchants/answer/7439058) for local and online // products. SupplementalProductDataSource *SupplementalProductDataSource `json:"supplementalProductDataSource,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "DataSourceId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "DataSourceId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
DataSource: The data source (https://support.google.com/merchants/answer/7439058) for the Merchant Center account.
func (DataSource) MarshalJSON ¶
func (s DataSource) MarshalJSON() ([]byte, error)
type DataSourceReference ¶ added in v0.198.0
type DataSourceReference struct { // PrimaryDataSourceName: Optional. The name of the primary data source. // Format: `accounts/{account}/dataSources/{datasource}` PrimaryDataSourceName string `json:"primaryDataSourceName,omitempty"` // Self: Self should be used to reference the primary data source itself. Self bool `json:"self,omitempty"` // SupplementalDataSourceName: Optional. The name of the supplemental data // source. Format: `accounts/{account}/dataSources/{datasource}` SupplementalDataSourceName string `json:"supplementalDataSourceName,omitempty"` // ForceSendFields is a list of field names (e.g. "PrimaryDataSourceName") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "PrimaryDataSourceName") to // include in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
DataSourceReference: Data source reference can be used to manage related data sources within the data source service.
func (DataSourceReference) MarshalJSON ¶ added in v0.198.0
func (s DataSourceReference) MarshalJSON() ([]byte, error)
type DefaultRule ¶ added in v0.198.0
type DefaultRule struct { // TakeFromDataSources: Required. The list of data sources linked in the // default rule (https://support.google.com/merchants/answer/7450276). This // list is ordered by the default rule priority of joining the data. It might // include none or multiple references to `self` and supplemental data sources. // The list must not be empty. To link the data source to the default rule, you // need to add a new reference to this list (in sequential order). To unlink // the data source from the default rule, you need to remove the given // reference from this list. Changing the order of this list will result in // changing the priority of data sources in the default rule. For example, // providing the following list: [`1001`, `self`] will take attribute values // from supplemental data source `1001`, and fallback to `self` if the // attribute is not set in `1001`. TakeFromDataSources []*DataSourceReference `json:"takeFromDataSources,omitempty"` // ForceSendFields is a list of field names (e.g. "TakeFromDataSources") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "TakeFromDataSources") to include // in API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
DefaultRule: Default rule management of the data source.
func (DefaultRule) MarshalJSON ¶ added in v0.198.0
func (s DefaultRule) MarshalJSON() ([]byte, error)
type Empty ¶
type Empty struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` }
Empty: A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
type FetchDataSourceRequest ¶
type FetchDataSourceRequest struct { }
FetchDataSourceRequest: Request message for the FetchDataSource method.
type FetchSettings ¶
type FetchSettings struct { // DayOfMonth: Optional. The day of the month when the data source file should // be fetched (1-31). This field can only be set for monthly frequency. DayOfMonth int64 `json:"dayOfMonth,omitempty"` // DayOfWeek: Optional. The day of the week when the data source file should be // fetched. This field can only be set for weekly frequency. // // Possible values: // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. // "MONDAY" - Monday // "TUESDAY" - Tuesday // "WEDNESDAY" - Wednesday // "THURSDAY" - Thursday // "FRIDAY" - Friday // "SATURDAY" - Saturday // "SUNDAY" - Sunday DayOfWeek string `json:"dayOfWeek,omitempty"` // Enabled: Optional. Enables or pauses the fetch schedule. Enabled bool `json:"enabled,omitempty"` // FetchUri: Optional. The URL where the data source file can be fetched. // Google Merchant Center supports automatic scheduled uploads using the HTTP, // HTTPS or SFTP protocols, so the value will need to be a valid link using one // of those three protocols. Immutable for Google Sheets files. FetchUri string `json:"fetchUri,omitempty"` // Frequency: Required. The frequency describing fetch schedule. // // Possible values: // "FREQUENCY_UNSPECIFIED" - Frequency unspecified. // "FREQUENCY_DAILY" - The fetch happens every day. // "FREQUENCY_WEEKLY" - The fetch happens every week. // "FREQUENCY_MONTHLY" - The fetch happens every month. Frequency string `json:"frequency,omitempty"` // Password: Optional. An optional password for fetch_uri. Used for submitting // data sources through SFTP // (https://support.google.com/merchants/answer/13813117). Password string `json:"password,omitempty"` // TimeOfDay: Optional. The hour of the day when the data source file should be // fetched. Minutes and seconds are not supported and will be ignored. TimeOfDay *TimeOfDay `json:"timeOfDay,omitempty"` // TimeZone: Optional. Time zone (https://cldr.unicode.org) used for schedule. // UTC by default. For example, "America/Los_Angeles". TimeZone string `json:"timeZone,omitempty"` // Username: Optional. An optional user name for fetch_uri. Used for submitting // data sources through SFTP // (https://support.google.com/merchants/answer/13813117). Username string `json:"username,omitempty"` // ForceSendFields is a list of field names (e.g. "DayOfMonth") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "DayOfMonth") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
FetchSettings: Fetch details to deliver the data source.
func (FetchSettings) MarshalJSON ¶
func (s FetchSettings) MarshalJSON() ([]byte, error)
type FileInput ¶
type FileInput struct { // FetchSettings: Optional. Fetch details to deliver the data source. It // contains settings for `FETCH` and `GOOGLE_SHEETS` file input types. The // required fields vary based on the frequency of fetching. FetchSettings *FetchSettings `json:"fetchSettings,omitempty"` // FileInputType: Output only. The type of file input. // // Possible values: // "FILE_INPUT_TYPE_UNSPECIFIED" - File input type unspecified. // "UPLOAD" - The file is uploaded through SFTP, Google Cloud Storage or // manually in the Merchant Center. // "FETCH" - The file is fetched from the configured fetch_uri. // "GOOGLE_SHEETS" - The file is fetched from Google Sheets specified in the // fetch_uri. FileInputType string `json:"fileInputType,omitempty"` // FileName: Optional. The file name of the data source. Required for `UPLOAD` // file input type. FileName string `json:"fileName,omitempty"` // ForceSendFields is a list of field names (e.g. "FetchSettings") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "FetchSettings") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
FileInput: The data specific for file data sources. This field is empty for other data source inputs.
func (FileInput) MarshalJSON ¶
type FileUpload ¶ added in v0.198.0
type FileUpload struct { // DataSourceId: Output only. The data source id. DataSourceId int64 `json:"dataSourceId,omitempty,string"` // Issues: Output only. The list of issues occurring in the data source. Issues []*Issue `json:"issues,omitempty"` // ItemsCreated: Output only. The number of items in the data source that were // created. ItemsCreated int64 `json:"itemsCreated,omitempty,string"` // ItemsTotal: Output only. The number of items in the data source that were // processed. ItemsTotal int64 `json:"itemsTotal,omitempty,string"` // ItemsUpdated: Output only. The number of items in the data source that were // updated. ItemsUpdated int64 `json:"itemsUpdated,omitempty,string"` // Name: Identifier. The name of the data source file upload. Format: // `{datasource.name=accounts/{account}/dataSources/{datasource}/fileUploads/{fi // leupload}}` Name string `json:"name,omitempty"` // ProcessingState: Output only. The processing state of the data source. // // Possible values: // "PROCESSING_STATE_UNSPECIFIED" - Processing state unspecified. // "FAILED" - The data source could not be processed or all the items had // errors. // "IN_PROGRESS" - The data source is being processed. // "SUCCEEDED" - The data source was processed successfully, though some // items might have had errors. ProcessingState string `json:"processingState,omitempty"` // UploadTime: Output only. The date at which the file of the data source was // uploaded. UploadTime string `json:"uploadTime,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "DataSourceId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "DataSourceId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
FileUpload: The file upload of a specific data source, that is, the result of the retrieval of the data source at a certain timestamp computed asynchronously when the data source processing is finished. Only applicable to file data sources.
func (FileUpload) MarshalJSON ¶ added in v0.198.0
func (s FileUpload) MarshalJSON() ([]byte, error)
type Issue ¶ added in v0.198.0
type Issue struct { // Code: Output only. The code of the error, for example, // "validation/invalid_value". Returns "?" if the code is unknown. Code string `json:"code,omitempty"` // Count: Output only. The number of occurrences of the error in the file // upload. Count int64 `json:"count,omitempty,string"` // Description: Output only. The error description, for example, "Your data // source contains items which have too many attributes, or are too big. These // items will be dropped". Description string `json:"description,omitempty"` // DocumentationUri: Output only. Link to the documentation explaining the // issue in more details, if available. DocumentationUri string `json:"documentationUri,omitempty"` // Severity: Output only. The severity of the issue. // // Possible values: // "SEVERITY_UNSPECIFIED" - Severity unspecified. // "WARNING" - The issue is the warning. // "ERROR" - The issue is an error. Severity string `json:"severity,omitempty"` // Title: Output only. The title of the issue, for example, "Item too big". Title string `json:"title,omitempty"` // ForceSendFields is a list of field names (e.g. "Code") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Code") to include in API requests // with the JSON null value. By default, fields with empty values are omitted // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
Issue: An error occurring in the data source, like "invalid price".
func (Issue) MarshalJSON ¶ added in v0.198.0
type ListDataSourcesResponse ¶
type ListDataSourcesResponse struct { // DataSources: The data sources from the specified account. DataSources []*DataSource `json:"dataSources,omitempty"` // NextPageToken: A token, which can be sent as `page_token` to retrieve the // next page. If this field is omitted, there are no subsequent pages. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "DataSources") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "DataSources") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
ListDataSourcesResponse: Response message for the ListDataSources method.
func (ListDataSourcesResponse) MarshalJSON ¶
func (s ListDataSourcesResponse) MarshalJSON() ([]byte, error)
type LocalInventoryDataSource ¶
type LocalInventoryDataSource struct { // ContentLanguage: Required. Immutable. The two-letter ISO 639-1 language of // the items to which the local inventory is provided. ContentLanguage string `json:"contentLanguage,omitempty"` // FeedLabel: Required. Immutable. The feed label of the offers to which the // local inventory is provided. Must be less than or equal to 20 uppercase // letters (A-Z), numbers (0-9), and dashes (-). See also migration to feed // labels // (https://developers.google.com/shopping-content/guides/products/feed-labels). FeedLabel string `json:"feedLabel,omitempty"` // ForceSendFields is a list of field names (e.g. "ContentLanguage") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "ContentLanguage") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
LocalInventoryDataSource: The local inventory data source.
func (LocalInventoryDataSource) MarshalJSON ¶
func (s LocalInventoryDataSource) MarshalJSON() ([]byte, error)
type MerchantReviewDataSource ¶ added in v0.202.0
type MerchantReviewDataSource struct { }
MerchantReviewDataSource: The merchant review data source.
type PrimaryProductDataSource ¶
type PrimaryProductDataSource struct { // Channel: Required. Immutable. Specifies the type of data source channel. // // Possible values: // "CHANNEL_UNSPECIFIED" - Not specified. // "ONLINE_PRODUCTS" - Online product. // "LOCAL_PRODUCTS" - Local product. // "PRODUCTS" - Unified data source for both local and online products. Note: // Products management through the API is not possible for this channel. Channel string `json:"channel,omitempty"` // ContentLanguage: Optional. Immutable. The two-letter ISO 639-1 language of // the items in the data source. `feedLabel` and `contentLanguage` must be // either both set or unset. The fields can only be unset for data sources // without file input. If set, the data source will only accept products // matching this combination. If unset, the data source will accept products // without that restriction. ContentLanguage string `json:"contentLanguage,omitempty"` // Countries: Optional. The countries where the items may be displayed. // Represented as a CLDR territory code // (https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). Countries []string `json:"countries,omitempty"` // DefaultRule: Optional. Default rule management of the data source. If set, // the linked data sources will be replaced. DefaultRule *DefaultRule `json:"defaultRule,omitempty"` // FeedLabel: Optional. Immutable. The feed label that is specified on the data // source level. Must be less than or equal to 20 uppercase letters (A-Z), // numbers (0-9), and dashes (-). See also migration to feed labels // (https://developers.google.com/shopping-content/guides/products/feed-labels). // `feedLabel` and `contentLanguage` must be either both set or unset for data // sources with product content type. They must be set for data sources with a // file input. If set, the data source will only accept products matching this // combination. If unset, the data source will accept products without that // restriction. FeedLabel string `json:"feedLabel,omitempty"` // ForceSendFields is a list of field names (e.g. "Channel") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Channel") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
PrimaryProductDataSource: The primary data source for local and online products.
func (PrimaryProductDataSource) MarshalJSON ¶
func (s PrimaryProductDataSource) MarshalJSON() ([]byte, error)
type ProductChange ¶
type ProductChange struct { // NewValue: The new value of the changed resource or attribute. NewValue string `json:"newValue,omitempty"` // OldValue: The old value of the changed resource or attribute. OldValue string `json:"oldValue,omitempty"` // RegionCode: Countries that have the change (if applicable) RegionCode string `json:"regionCode,omitempty"` // ReportingContext: Reporting contexts that have the change (if applicable) // // Possible values: // "REPORTING_CONTEXT_ENUM_UNSPECIFIED" - Not specified. // "SHOPPING_ADS" - [Shopping // ads](https://support.google.com/merchants/answer/6149970). // "DISCOVERY_ADS" - Deprecated: Use `DEMAND_GEN_ADS` instead. [Discovery and // Demand Gen ads](https://support.google.com/merchants/answer/13389785). // "DEMAND_GEN_ADS" - [Demand Gen // ads](https://support.google.com/merchants/answer/13389785). // "DEMAND_GEN_ADS_DISCOVER_SURFACE" - [Demand Gen ads on Discover // surface](https://support.google.com/merchants/answer/13389785). // "VIDEO_ADS" - [Video // ads](https://support.google.com/google-ads/answer/6340491). // "DISPLAY_ADS" - [Display // ads](https://support.google.com/merchants/answer/6069387). // "LOCAL_INVENTORY_ADS" - [Local inventory // ads](https://support.google.com/merchants/answer/3271956). // "VEHICLE_INVENTORY_ADS" - [Vehicle inventory // ads](https://support.google.com/merchants/answer/11544533). // "FREE_LISTINGS" - [Free product // listings](https://support.google.com/merchants/answer/9199328). // "FREE_LOCAL_LISTINGS" - [Free local product // listings](https://support.google.com/merchants/answer/9825611). // "FREE_LOCAL_VEHICLE_LISTINGS" - [Free local vehicle // listings](https://support.google.com/merchants/answer/11544533). // "YOUTUBE_SHOPPING" - [YouTube // Shopping](https://support.google.com/merchants/answer/13478370). // "CLOUD_RETAIL" - [Cloud // retail](https://cloud.google.com/solutions/retail). // "LOCAL_CLOUD_RETAIL" - [Local cloud // retail](https://cloud.google.com/solutions/retail). // "PRODUCT_REVIEWS" - [Product // Reviews](https://support.google.com/merchants/answer/14620732). // "MERCHANT_REVIEWS" - [Merchant // Reviews](https://developers.google.com/merchant-review-feeds). // "YOUTUBE_CHECKOUT" - [YouTube Checkout]( ReportingContext string `json:"reportingContext,omitempty"` // ForceSendFields is a list of field names (e.g. "NewValue") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "NewValue") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
ProductChange: The change that happened to the product including old value, new value, country code as the region code and reporting context.
func (ProductChange) MarshalJSON ¶
func (s ProductChange) MarshalJSON() ([]byte, error)
type ProductReviewDataSource ¶ added in v0.202.0
type ProductReviewDataSource struct { }
ProductReviewDataSource: The product review data source.
type ProductStatusChangeMessage ¶
type ProductStatusChangeMessage struct { // Account: The target account that owns the entity that changed. Format : // `accounts/{merchant_id}` Account string `json:"account,omitempty"` // Attribute: The attribute in the resource that changed, in this case it will // be always `Status`. // // Possible values: // "ATTRIBUTE_UNSPECIFIED" - Unspecified attribute // "STATUS" - Status of the changed entity Attribute string `json:"attribute,omitempty"` // Changes: A message to describe the change that happened to the product Changes []*ProductChange `json:"changes,omitempty"` // ExpirationTime: The product expiration time. ExpirationTime string `json:"expirationTime,omitempty"` // ManagingAccount: The account that manages the merchant's account. can be the // same as merchant id if it is standalone account. Format : // `accounts/{service_provider_id}` ManagingAccount string `json:"managingAccount,omitempty"` // Resource: The product name. Format: // `{product.name=accounts/{account}/products/{product}}` Resource string `json:"resource,omitempty"` // ResourceId: The product id. ResourceId string `json:"resourceId,omitempty"` // ResourceType: The resource that changed, in this case it will always be // `Product`. // // Possible values: // "RESOURCE_UNSPECIFIED" - Unspecified resource // "PRODUCT" - Resource type : product ResourceType string `json:"resourceType,omitempty"` // ForceSendFields is a list of field names (e.g. "Account") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Account") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
ProductStatusChangeMessage: The message that the merchant will receive to notify about product status change event
func (ProductStatusChangeMessage) MarshalJSON ¶
func (s ProductStatusChangeMessage) MarshalJSON() ([]byte, error)
type PromotionDataSource ¶
type PromotionDataSource struct { // ContentLanguage: Required. Immutable. The two-letter ISO 639-1 language of // the items in the data source. ContentLanguage string `json:"contentLanguage,omitempty"` // TargetCountry: Required. Immutable. The target country used as part of the // unique identifier. Represented as a CLDR territory code // (https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). // Promotions are only available in selected countries // (https://support.google.com/merchants/answer/4588460). TargetCountry string `json:"targetCountry,omitempty"` // ForceSendFields is a list of field names (e.g. "ContentLanguage") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "ContentLanguage") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
PromotionDataSource: The promotion data source.
func (PromotionDataSource) MarshalJSON ¶
func (s PromotionDataSource) MarshalJSON() ([]byte, error)
type RegionalInventoryDataSource ¶
type RegionalInventoryDataSource struct { // ContentLanguage: Required. Immutable. The two-letter ISO 639-1 language of // the items to which the regional inventory is provided. ContentLanguage string `json:"contentLanguage,omitempty"` // FeedLabel: Required. Immutable. The feed label of the offers to which the // regional inventory is provided. Must be less than or equal to 20 uppercase // letters (A-Z), numbers (0-9), and dashes (-). See also migration to feed // labels // (https://developers.google.com/shopping-content/guides/products/feed-labels). FeedLabel string `json:"feedLabel,omitempty"` // ForceSendFields is a list of field names (e.g. "ContentLanguage") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "ContentLanguage") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
RegionalInventoryDataSource: The regional inventory data source.
func (RegionalInventoryDataSource) MarshalJSON ¶
func (s RegionalInventoryDataSource) MarshalJSON() ([]byte, error)
type Service ¶
type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment Accounts *AccountsService // contains filtered or unexported fields }
func New
deprecated
New creates a new Service. It uses the provided http.Client for requests.
Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func NewService ¶
NewService creates a new Service.
type SupplementalProductDataSource ¶
type SupplementalProductDataSource struct { // ContentLanguage: Optional. Immutable. The two-letter ISO 639-1 language of // the items in the data source. `feedLabel` and `contentLanguage` must be // either both set or unset. The fields can only be unset for data sources // without file input. If set, the data source will only accept products // matching this combination. If unset, the data source will accept produts // without that restriction. ContentLanguage string `json:"contentLanguage,omitempty"` // FeedLabel: Optional. Immutable. The feed label that is specified on the data // source level. Must be less than or equal to 20 uppercase letters (A-Z), // numbers (0-9), and dashes (-). See also migration to feed labels // (https://developers.google.com/shopping-content/guides/products/feed-labels). // `feedLabel` and `contentLanguage` must be either both set or unset for data // sources with product content type. They must be set for data sources with a // file input. The fields must be unset for data sources without file input. If // set, the data source will only accept products matching this combination. If // unset, the data source will accept produts without that restriction. FeedLabel string `json:"feedLabel,omitempty"` // ReferencingPrimaryDataSources: Output only. The (unordered and deduplicated) // list of all primary data sources linked to this data source in either // default or custom rules. Supplemental data source cannot be deleted before // all links are removed. ReferencingPrimaryDataSources []*DataSourceReference `json:"referencingPrimaryDataSources,omitempty"` // ForceSendFields is a list of field names (e.g. "ContentLanguage") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "ContentLanguage") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
SupplementalProductDataSource: The supplemental data source for local and online products. After creation, you should make sure to link the supplemental product data source into one or more primary product data sources.
func (SupplementalProductDataSource) MarshalJSON ¶
func (s SupplementalProductDataSource) MarshalJSON() ([]byte, error)
type TimeOfDay ¶
type TimeOfDay struct { // Hours: Hours of a day in 24 hour format. Must be greater than or equal to 0 // and typically must be less than or equal to 23. An API may choose to allow // the value "24:00:00" for scenarios like business closing time. Hours int64 `json:"hours,omitempty"` // Minutes: Minutes of an hour. Must be greater than or equal to 0 and less // than or equal to 59. Minutes int64 `json:"minutes,omitempty"` // Nanos: Fractions of seconds, in nanoseconds. Must be greater than or equal // to 0 and less than or equal to 999,999,999. Nanos int64 `json:"nanos,omitempty"` // Seconds: Seconds of a minute. Must be greater than or equal to 0 and // typically must be less than or equal to 59. An API may allow the value 60 if // it allows leap-seconds. Seconds int64 `json:"seconds,omitempty"` // ForceSendFields is a list of field names (e.g. "Hours") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Hours") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
TimeOfDay: Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.