adsense

package
v0.48.1-0...-67a0a95 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2021 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package adsense provides access to the AdSense Management API.

For product documentation, see: http://code.google.com/apis/adsense/management/

Creating a client

Usage example:

import "google.golang.org/api/adsense/v2"
...
ctx := context.Background()
adsenseService, err := adsense.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

By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:

adsenseService, err := adsense.NewService(ctx, option.WithScopes(adsense.AdsenseReadonlyScope))

To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:

adsenseService, err := adsense.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
adsenseService, err := adsense.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See https://godoc.org/google.golang.org/api/option/ for details on options.

Index

Constants

View Source
const (
	// View and manage your AdSense data
	AdsenseScope = "https://www.googleapis.com/auth/adsense"

	// View your AdSense data
	AdsenseReadonlyScope = "https://www.googleapis.com/auth/adsense.readonly"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	// CreateTime: Output only. Creation time of the account.
	CreateTime string `json:"createTime,omitempty"`

	// DisplayName: Output only. Display name of this account.
	DisplayName string `json:"displayName,omitempty"`

	// Name: Resource name of the account. Format: accounts/pub-[0-9]+
	Name string `json:"name,omitempty"`

	// PendingTasks: Output only. Outstanding tasks that need to be
	// completed as part of the sign-up process for a new account. e.g.
	// "billing-profile-creation", "phone-pin-verification".
	PendingTasks []string `json:"pendingTasks,omitempty"`

	// Premium: Output only. Whether this account is premium.
	Premium bool `json:"premium,omitempty"`

	// TimeZone: The account time zone, as used by reporting. For more
	// information, see changing the time zone of your reports
	// (https://support.google.com/adsense/answer/9830725).
	TimeZone *TimeZone `json:"timeZone,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "CreateTime") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "CreateTime") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Account: Representation of an account.

func (*Account) MarshalJSON

func (s *Account) MarshalJSON() ([]byte, error)

type AccountsAdclientsAdunitsGetAdcodeCall

type AccountsAdclientsAdunitsGetAdcodeCall struct {
	// contains filtered or unexported fields
}

func (*AccountsAdclientsAdunitsGetAdcodeCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsAdclientsAdunitsGetAdcodeCall) Do

Do executes the "adsense.accounts.adclients.adunits.getAdcode" call. Exactly one of *AdUnitAdCode or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *AdUnitAdCode.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 (*AccountsAdclientsAdunitsGetAdcodeCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsAdclientsAdunitsGetAdcodeCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsAdclientsAdunitsGetAdcodeCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type AccountsAdclientsAdunitsGetCall

type AccountsAdclientsAdunitsGetCall struct {
	// contains filtered or unexported fields
}

func (*AccountsAdclientsAdunitsGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsAdclientsAdunitsGetCall) Do

Do executes the "adsense.accounts.adclients.adunits.get" call. Exactly one of *AdUnit or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *AdUnit.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 (*AccountsAdclientsAdunitsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsAdclientsAdunitsGetCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsAdclientsAdunitsGetCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type AccountsAdclientsAdunitsListCall

type AccountsAdclientsAdunitsListCall struct {
	// contains filtered or unexported fields
}

func (*AccountsAdclientsAdunitsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsAdclientsAdunitsListCall) Do

Do executes the "adsense.accounts.adclients.adunits.list" call. Exactly one of *ListAdUnitsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListAdUnitsResponse.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 (*AccountsAdclientsAdunitsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsAdclientsAdunitsListCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsAdclientsAdunitsListCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AccountsAdclientsAdunitsListCall) PageSize

PageSize sets the optional parameter "pageSize": The maximum number of ad units to include in the response, used for paging. If unspecified, at most 10000 ad units will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000.

func (*AccountsAdclientsAdunitsListCall) PageToken

PageToken sets the optional parameter "pageToken": A page token, received from a previous `ListAdUnits` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAdUnits` must match the call that provided the page token.

func (*AccountsAdclientsAdunitsListCall) Pages

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 AccountsAdclientsAdunitsListLinkedCustomChannelsCall

type AccountsAdclientsAdunitsListLinkedCustomChannelsCall struct {
	// contains filtered or unexported fields
}

func (*AccountsAdclientsAdunitsListLinkedCustomChannelsCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsAdclientsAdunitsListLinkedCustomChannelsCall) Do

Do executes the "adsense.accounts.adclients.adunits.listLinkedCustomChannels" call. Exactly one of *ListLinkedCustomChannelsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListLinkedCustomChannelsResponse.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 (*AccountsAdclientsAdunitsListLinkedCustomChannelsCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsAdclientsAdunitsListLinkedCustomChannelsCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsAdclientsAdunitsListLinkedCustomChannelsCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AccountsAdclientsAdunitsListLinkedCustomChannelsCall) PageSize

PageSize sets the optional parameter "pageSize": The maximum number of custom channels to include in the response, used for paging. If unspecified, at most 10000 custom channels will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000.

func (*AccountsAdclientsAdunitsListLinkedCustomChannelsCall) PageToken

PageToken sets the optional parameter "pageToken": A page token, received from a previous `ListLinkedCustomChannels` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListLinkedCustomChannels` must match the call that provided the page token.

func (*AccountsAdclientsAdunitsListLinkedCustomChannelsCall) Pages

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 AccountsAdclientsAdunitsService

type AccountsAdclientsAdunitsService struct {
	// contains filtered or unexported fields
}

func NewAccountsAdclientsAdunitsService

func NewAccountsAdclientsAdunitsService(s *Service) *AccountsAdclientsAdunitsService

func (*AccountsAdclientsAdunitsService) Get

Get: Gets an ad unit from a specified account and ad client.

  • name: AdUnit to get information about. Format: accounts/{account_id}/adclient/{adclient_id}/adunit/{adunit_id}.

func (*AccountsAdclientsAdunitsService) GetAdcode

GetAdcode: Gets the AdSense code for a given ad unit.

  • name: Name of the adunit for which to get the adcode. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}.

func (*AccountsAdclientsAdunitsService) List

List: Lists all ad units under a specified account and ad client.

  • parent: The ad client which owns the collection of ad units. Format: accounts/{account}/adclients/{adclient}.

func (*AccountsAdclientsAdunitsService) ListLinkedCustomChannels

ListLinkedCustomChannels: Lists all the custom channels available for an ad unit.

  • parent: The ad unit which owns the collection of custom channels. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}.

type AccountsAdclientsCustomchannelsGetCall

type AccountsAdclientsCustomchannelsGetCall struct {
	// contains filtered or unexported fields
}

func (*AccountsAdclientsCustomchannelsGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsAdclientsCustomchannelsGetCall) Do

Do executes the "adsense.accounts.adclients.customchannels.get" call. Exactly one of *CustomChannel or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *CustomChannel.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 (*AccountsAdclientsCustomchannelsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsAdclientsCustomchannelsGetCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsAdclientsCustomchannelsGetCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type AccountsAdclientsCustomchannelsListCall

type AccountsAdclientsCustomchannelsListCall struct {
	// contains filtered or unexported fields
}

func (*AccountsAdclientsCustomchannelsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsAdclientsCustomchannelsListCall) Do

Do executes the "adsense.accounts.adclients.customchannels.list" call. Exactly one of *ListCustomChannelsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListCustomChannelsResponse.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 (*AccountsAdclientsCustomchannelsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsAdclientsCustomchannelsListCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsAdclientsCustomchannelsListCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AccountsAdclientsCustomchannelsListCall) PageSize

PageSize sets the optional parameter "pageSize": The maximum number of custom channels to include in the response, used for paging. If unspecified, at most 10000 custom channels will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000.

func (*AccountsAdclientsCustomchannelsListCall) PageToken

PageToken sets the optional parameter "pageToken": A page token, received from a previous `ListCustomChannels` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCustomChannels` must match the call that provided the page token.

func (*AccountsAdclientsCustomchannelsListCall) Pages

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 AccountsAdclientsCustomchannelsListLinkedAdUnitsCall

type AccountsAdclientsCustomchannelsListLinkedAdUnitsCall struct {
	// contains filtered or unexported fields
}

func (*AccountsAdclientsCustomchannelsListLinkedAdUnitsCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsAdclientsCustomchannelsListLinkedAdUnitsCall) Do

Do executes the "adsense.accounts.adclients.customchannels.listLinkedAdUnits" call. Exactly one of *ListLinkedAdUnitsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListLinkedAdUnitsResponse.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 (*AccountsAdclientsCustomchannelsListLinkedAdUnitsCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsAdclientsCustomchannelsListLinkedAdUnitsCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsAdclientsCustomchannelsListLinkedAdUnitsCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AccountsAdclientsCustomchannelsListLinkedAdUnitsCall) PageSize

PageSize sets the optional parameter "pageSize": The maximum number of ad units to include in the response, used for paging. If unspecified, at most 10000 ad units will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000.

func (*AccountsAdclientsCustomchannelsListLinkedAdUnitsCall) PageToken

PageToken sets the optional parameter "pageToken": A page token, received from a previous `ListLinkedAdUnits` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListLinkedAdUnits` must match the call that provided the page token.

func (*AccountsAdclientsCustomchannelsListLinkedAdUnitsCall) Pages

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 AccountsAdclientsCustomchannelsService

type AccountsAdclientsCustomchannelsService struct {
	// contains filtered or unexported fields
}

func NewAccountsAdclientsCustomchannelsService

func NewAccountsAdclientsCustomchannelsService(s *Service) *AccountsAdclientsCustomchannelsService

func (*AccountsAdclientsCustomchannelsService) Get

Get: Gets information about the selected custom channel.

  • name: Name of the custom channel. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchanne l}.

func (*AccountsAdclientsCustomchannelsService) List

List: Lists all the custom channels available in an ad client.

  • parent: The ad client which owns the collection of custom channels. Format: accounts/{account}/adclients/{adclient}.

func (*AccountsAdclientsCustomchannelsService) ListLinkedAdUnits

ListLinkedAdUnits: Lists all the ad units available for a custom channel.

  • parent: The custom channel which owns the collection of ad units. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchanne l}.

type AccountsAdclientsGetAdcodeCall

type AccountsAdclientsGetAdcodeCall struct {
	// contains filtered or unexported fields
}

func (*AccountsAdclientsGetAdcodeCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsAdclientsGetAdcodeCall) Do

Do executes the "adsense.accounts.adclients.getAdcode" call. Exactly one of *AdClientAdCode or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *AdClientAdCode.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 (*AccountsAdclientsGetAdcodeCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsAdclientsGetAdcodeCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsAdclientsGetAdcodeCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type AccountsAdclientsListCall

type AccountsAdclientsListCall struct {
	// contains filtered or unexported fields
}

func (*AccountsAdclientsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsAdclientsListCall) Do

Do executes the "adsense.accounts.adclients.list" call. Exactly one of *ListAdClientsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListAdClientsResponse.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 (*AccountsAdclientsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsAdclientsListCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsAdclientsListCall) IfNoneMatch

func (c *AccountsAdclientsListCall) IfNoneMatch(entityTag string) *AccountsAdclientsListCall

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AccountsAdclientsListCall) PageSize

PageSize sets the optional parameter "pageSize": The maximum number of ad clients to include in the response, used for paging. If unspecified, at most 10000 ad clients will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000.

func (*AccountsAdclientsListCall) PageToken

PageToken sets the optional parameter "pageToken": A page token, received from a previous `ListAdClients` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAdClients` must match the call that provided the page token.

func (*AccountsAdclientsListCall) Pages

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 AccountsAdclientsService

type AccountsAdclientsService struct {
	Adunits *AccountsAdclientsAdunitsService

	Customchannels *AccountsAdclientsCustomchannelsService

	Urlchannels *AccountsAdclientsUrlchannelsService
	// contains filtered or unexported fields
}

func NewAccountsAdclientsService

func NewAccountsAdclientsService(s *Service) *AccountsAdclientsService

func (*AccountsAdclientsService) GetAdcode

GetAdcode: Gets the AdSense code for a given ad client. This returns what was previously known as the 'auto ad code'. This is only supported for ad clients with a product_code of AFC. For more information, see About the AdSense code (https://support.google.com/adsense/answer/9274634).

  • name: Name of the ad client for which to get the adcode. Format: accounts/{account}/adclients/{adclient}.

func (*AccountsAdclientsService) List

List: Lists all the ad clients available in an account.

  • parent: The account which owns the collection of ad clients. Format: accounts/{account}.

type AccountsAdclientsUrlchannelsListCall

type AccountsAdclientsUrlchannelsListCall struct {
	// contains filtered or unexported fields
}

func (*AccountsAdclientsUrlchannelsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsAdclientsUrlchannelsListCall) Do

Do executes the "adsense.accounts.adclients.urlchannels.list" call. Exactly one of *ListUrlChannelsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListUrlChannelsResponse.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 (*AccountsAdclientsUrlchannelsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsAdclientsUrlchannelsListCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsAdclientsUrlchannelsListCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AccountsAdclientsUrlchannelsListCall) PageSize

PageSize sets the optional parameter "pageSize": The maximum number of url channels to include in the response, used for paging. If unspecified, at most 10000 url channels will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000.

func (*AccountsAdclientsUrlchannelsListCall) PageToken

PageToken sets the optional parameter "pageToken": A page token, received from a previous `ListUrlChannels` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListUrlChannels` must match the call that provided the page token.

func (*AccountsAdclientsUrlchannelsListCall) Pages

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 AccountsAdclientsUrlchannelsService

type AccountsAdclientsUrlchannelsService struct {
	// contains filtered or unexported fields
}

func NewAccountsAdclientsUrlchannelsService

func NewAccountsAdclientsUrlchannelsService(s *Service) *AccountsAdclientsUrlchannelsService

func (*AccountsAdclientsUrlchannelsService) List

List: Lists active url channels.

  • parent: The ad client which owns the collection of url channels. Format: accounts/{account}/adclients/{adclient}.

type AccountsAlertsListCall

type AccountsAlertsListCall struct {
	// contains filtered or unexported fields
}

func (*AccountsAlertsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsAlertsListCall) Do

Do executes the "adsense.accounts.alerts.list" call. Exactly one of *ListAlertsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListAlertsResponse.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 (*AccountsAlertsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsAlertsListCall) Header

func (c *AccountsAlertsListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsAlertsListCall) IfNoneMatch

func (c *AccountsAlertsListCall) IfNoneMatch(entityTag string) *AccountsAlertsListCall

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AccountsAlertsListCall) LanguageCode

func (c *AccountsAlertsListCall) LanguageCode(languageCode string) *AccountsAlertsListCall

LanguageCode sets the optional parameter "languageCode": The language to use for translating alert messages. If unspecified, this defaults to the user's display language. If the given language is not supported, alerts will be returned in English. The language is specified as an IETF BCP-47 language code (https://en.wikipedia.org/wiki/IETF_language_tag).

type AccountsAlertsService

type AccountsAlertsService struct {
	// contains filtered or unexported fields
}

func NewAccountsAlertsService

func NewAccountsAlertsService(s *Service) *AccountsAlertsService

func (*AccountsAlertsService) List

List: Lists all the alerts available in an account.

  • parent: The account which owns the collection of alerts. Format: accounts/{account}.

type AccountsGetCall

type AccountsGetCall struct {
	// contains filtered or unexported fields
}

func (*AccountsGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsGetCall) Do

func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error)

Do executes the "adsense.accounts.get" call. Exactly one of *Account or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Account.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 (*AccountsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsGetCall) Header

func (c *AccountsGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsGetCall) IfNoneMatch

func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type AccountsListCall

type AccountsListCall struct {
	// contains filtered or unexported fields
}

func (*AccountsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsListCall) Do

Do executes the "adsense.accounts.list" call. Exactly one of *ListAccountsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListAccountsResponse.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 (*AccountsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsListCall) Header

func (c *AccountsListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsListCall) IfNoneMatch

func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AccountsListCall) PageSize

func (c *AccountsListCall) PageSize(pageSize int64) *AccountsListCall

PageSize sets the optional parameter "pageSize": The maximum number of accounts to include in the response, used for paging. If unspecified, at most 10000 accounts will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000.

func (*AccountsListCall) PageToken

func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall

PageToken sets the optional parameter "pageToken": A page token, received from a previous `ListAccounts` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccounts` must match the call that provided the page token.

func (*AccountsListCall) Pages

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 AccountsListChildAccountsCall

type AccountsListChildAccountsCall struct {
	// contains filtered or unexported fields
}

func (*AccountsListChildAccountsCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsListChildAccountsCall) Do

Do executes the "adsense.accounts.listChildAccounts" call. Exactly one of *ListChildAccountsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListChildAccountsResponse.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 (*AccountsListChildAccountsCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsListChildAccountsCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsListChildAccountsCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AccountsListChildAccountsCall) PageSize

PageSize sets the optional parameter "pageSize": The maximum number of accounts to include in the response, used for paging. If unspecified, at most 10000 accounts will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000.

func (*AccountsListChildAccountsCall) PageToken

PageToken sets the optional parameter "pageToken": A page token, received from a previous `ListAccounts` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccounts` must match the call that provided the page token.

func (*AccountsListChildAccountsCall) Pages

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 AccountsPaymentsListCall

type AccountsPaymentsListCall struct {
	// contains filtered or unexported fields
}

func (*AccountsPaymentsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsPaymentsListCall) Do

Do executes the "adsense.accounts.payments.list" call. Exactly one of *ListPaymentsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListPaymentsResponse.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 (*AccountsPaymentsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsPaymentsListCall) Header

func (c *AccountsPaymentsListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsPaymentsListCall) IfNoneMatch

func (c *AccountsPaymentsListCall) IfNoneMatch(entityTag string) *AccountsPaymentsListCall

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type AccountsPaymentsService

type AccountsPaymentsService struct {
	// contains filtered or unexported fields
}

func NewAccountsPaymentsService

func NewAccountsPaymentsService(s *Service) *AccountsPaymentsService

func (*AccountsPaymentsService) List

List: Lists all the payments available for an account.

  • parent: The account which owns the collection of payments. Format: accounts/{account}.

type AccountsReportsGenerateCall

type AccountsReportsGenerateCall struct {
	// contains filtered or unexported fields
}

func (*AccountsReportsGenerateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsReportsGenerateCall) CurrencyCode

func (c *AccountsReportsGenerateCall) CurrencyCode(currencyCode string) *AccountsReportsGenerateCall

CurrencyCode sets the optional parameter "currencyCode": The ISO-4217 currency code (https://en.wikipedia.org/wiki/ISO_4217) to use when reporting on monetary metrics. Defaults to the account's currency if not set.

func (*AccountsReportsGenerateCall) DateRange

DateRange sets the optional parameter "dateRange": Date range of the report, if unset the range will be considered CUSTOM.

Possible values:

"REPORTING_DATE_RANGE_UNSPECIFIED" - Unspecified date range.
"CUSTOM" - A custom date range specified using the `start_date` and

`end_date` fields. This is the default if no ReportingDateRange is provided.

"TODAY" - Current day.
"YESTERDAY" - Yesterday.
"MONTH_TO_DATE" - From the start of the current month to the

current day. e.g. if the current date is 2020-03-12 then the range will be [2020-03-01, 2020-03-12].

"YEAR_TO_DATE" - From the start of the current year to the current

day. e.g. if the current date is 2020-03-12 then the range will be [2020-01-01, 2020-03-12].

"LAST_7_DAYS" - Last 7 days, excluding current day.
"LAST_30_DAYS" - Last 30 days, excluding current day.

func (*AccountsReportsGenerateCall) Dimensions

func (c *AccountsReportsGenerateCall) Dimensions(dimensions ...string) *AccountsReportsGenerateCall

Dimensions sets the optional parameter "dimensions": Dimensions to base the report on.

Possible values:

"DIMENSION_UNSPECIFIED" - Unspecified dimension.
"DATE" - Date dimension in YYYY-MM-DD format (e.g. "2010-02-10").
"WEEK" - Week dimension in YYYY-MM-DD format, representing the

first day of each week (e.g. "2010-02-08"). The first day of the week is determined by the language_code specified in a report generation request (so e.g. this would be a Monday for "en-GB" or "es", but a Sunday for "en" or "fr-CA").

"MONTH" - Month dimension in YYYY-MM format (e.g. "2010-02").
"ACCOUNT_NAME" - Account name. The members of this dimension match

the values from Account.display_name.

"AD_CLIENT_ID" - Unique ID of an ad client. The members of this

dimension match the values from AdClient.reporting_dimension_id.

"PRODUCT_NAME" - Localized product name (e.g. "AdSense for

Content", "AdSense for Search").

"PRODUCT_CODE" - Product code (e.g. "AFC", "AFS"). The members of

this dimension match the values from AdClient.product_code.

"AD_UNIT_NAME" - Ad unit name (within which an ad was served). The

members of this dimension match the values from AdUnit.display_name.

"AD_UNIT_ID" - Unique ID of an ad unit (within which an ad was

served). The members of this dimension match the values from AdUnit.reporting_dimension_id.

"AD_UNIT_SIZE_NAME" - Localized size of an ad unit (e.g. "728x90",

"Responsive").

"AD_UNIT_SIZE_CODE" - The size code of an ad unit (e.g. "728x90",

"responsive").

"CUSTOM_CHANNEL_NAME" - Custom channel name. The members of this

dimension match the values from CustomChannel.display_name.

"CUSTOM_CHANNEL_ID" - Unique ID of a custom channel. The members of

this dimension match the values from CustomChannel.reporting_dimension_id.

"OWNED_SITE_DOMAIN_NAME" - Domain name of a verified site (e.g.

"example.com"). The members of this dimension match the values from Site.domain.

"OWNED_SITE_ID" - Unique ID of a verified site. The members of this

dimension match the values from Site.reporting_dimension_id.

"URL_CHANNEL_NAME" - Name of a URL channel. The members of this

dimension match the values from UrlChannel.uri_pattern.

"URL_CHANNEL_ID" - Unique ID of a URL channel. The members of this

dimension match the values from UrlChannel.reporting_dimension_id.

"BUYER_NETWORK_NAME" - Name of an ad network that returned the

winning ads for an ad request (e.g. "Google AdWords"). Note that unlike other "NAME" dimensions, the members of this dimensions are not localized.

"BUYER_NETWORK_ID" - Unique (opaque) ID of an ad network that

returned the winning ads for an ad request.

"BID_TYPE_NAME" - Localized bid type name (e.g. "CPC bids", "CPM

bids") for a served ad.

"BID_TYPE_CODE" - Type of a bid (e.g. "cpc", "cpm") for a served

ad.

"CREATIVE_SIZE_NAME" - Localized creative size name (e.g. "728x90",

"Dynamic") of a served ad.

"CREATIVE_SIZE_CODE" - Creative size code (e.g. "728x90",

"dynamic") of a served ad.

"DOMAIN_NAME" - Localized name of a host on which an ad was served,

after IDNA decoding (e.g. "www.google.com", "Web caches and other", "bücher.example").

"DOMAIN_CODE" - Name of a host on which an ad was served (e.g.

"www.google.com", "webcaches", "xn--bcher-kva.example").

"COUNTRY_NAME" - Localized region name of a user viewing an ad

(e.g. "United States", "France").

"COUNTRY_CODE" - CLDR region code of a user viewing an ad (e.g.

"US", "FR").

"PLATFORM_TYPE_NAME" - Localized platform type name (e.g. "High-end

mobile devices", "Desktop").

"PLATFORM_TYPE_CODE" - Platform type code (e.g. "HighEndMobile",

"Desktop").

"TARGETING_TYPE_NAME" - Localized targeting type name (e.g.

"Contextual", "Personalized", "Run of Network").

"TARGETING_TYPE_CODE" - Targeting type code (e.g. "Keyword",

"UserInterest", "RunOfNetwork").

"CONTENT_PLATFORM_NAME" - Localized content platform name an ad

request was made from (e.g. "AMP", "Web").

"CONTENT_PLATFORM_CODE" - Content platform code an ad request was

made from (e.g. "AMP", "HTML").

"AD_PLACEMENT_NAME" - Localized ad placement name (e.g. "Ad unit",

"Global settings", "Manual").

"AD_PLACEMENT_CODE" - Ad placement code (e.g. "AD_UNIT",

"ca-pub-123456:78910", "OTHER").

"REQUESTED_AD_TYPE_NAME" - Localized requested ad type name (e.g.

"Display", "Link unit", "Other").

"REQUESTED_AD_TYPE_CODE" - Requested ad type code (e.g. "IMAGE",

"RADLINK", "OTHER").

"SERVED_AD_TYPE_NAME" - Localized served ad type name (e.g.

"Display", "Link unit", "Other").

"SERVED_AD_TYPE_CODE" - Served ad type code (e.g. "IMAGE",

"RADLINK", "OTHER").

"CUSTOM_SEARCH_STYLE_NAME" - Custom search style name.
"CUSTOM_SEARCH_STYLE_ID" - Custom search style id.
"DOMAIN_REGISTRANT" - Domain registrants.
"WEBSEARCH_QUERY_STRING" - Query strings for web searches.

func (*AccountsReportsGenerateCall) Do

Do executes the "adsense.accounts.reports.generate" call. Exactly one of *ReportResult or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ReportResult.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 (*AccountsReportsGenerateCall) EndDateDay

EndDateDay sets the optional parameter "endDate.day": Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

func (*AccountsReportsGenerateCall) EndDateMonth

func (c *AccountsReportsGenerateCall) EndDateMonth(endDateMonth int64) *AccountsReportsGenerateCall

EndDateMonth sets the optional parameter "endDate.month": Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

func (*AccountsReportsGenerateCall) EndDateYear

func (c *AccountsReportsGenerateCall) EndDateYear(endDateYear int64) *AccountsReportsGenerateCall

EndDateYear sets the optional parameter "endDate.year": Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

func (*AccountsReportsGenerateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsReportsGenerateCall) Filters

Filters sets the optional parameter "filters": Filters to be run on the report.

func (*AccountsReportsGenerateCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsReportsGenerateCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AccountsReportsGenerateCall) LanguageCode

func (c *AccountsReportsGenerateCall) LanguageCode(languageCode string) *AccountsReportsGenerateCall

LanguageCode sets the optional parameter "languageCode": The language to use for translating report output. If unspecified, this defaults to English ("en"). If the given language is not supported, report output will be returned in English. The language is specified as an IETF BCP-47 language code (https://en.wikipedia.org/wiki/IETF_language_tag).

func (*AccountsReportsGenerateCall) Limit

Limit sets the optional parameter "limit": The maximum number of rows of report data to return. Reports producing more rows than the requested limit will be truncated. If unset, this defaults to 100,000 rows for `Reports.GenerateReport` and 1,000,000 rows for `Reports.GenerateCsvReport`, which are also the maximum values permitted here. Report truncation can be identified (for `Reports.GenerateReport` only) by comparing the number of rows returned to the value returned in `total_matched_rows`.

func (*AccountsReportsGenerateCall) Metrics

Metrics sets the optional parameter "metrics": Required. Reporting metrics.

Possible values:

"METRIC_UNSPECIFIED" - Unspecified metric.
"PAGE_VIEWS" - Number of page views.
"AD_REQUESTS" - Number of ad units that requested ads (for content

ads) or search queries (for search ads). An ad request may result in zero, one, or multiple individual ad impressions depending on the size of the ad unit and whether any ads were available.

"MATCHED_AD_REQUESTS" - Requests that returned at least one ad.
"TOTAL_IMPRESSIONS" - Impressions. An impression is counted for

each ad request where at least one ad has been downloaded to the user’s device and has begun to load. It is the number of ad units (for content ads) or search queries (for search ads) that showed ads.

"IMPRESSIONS" - Impressions. An impression is counted for each ad

request where at least one ad has been downloaded to the user’s device and has begun to load. It is the number of ad units (for content ads) or search queries (for search ads) that showed ads.

"INDIVIDUAL_AD_IMPRESSIONS" - Ads shown. Different ad formats will

display varying numbers of ads. For example, a vertical banner may consist of 2 or more ads. Also, the number of ads in an ad unit may vary depending on whether the ad unit is displaying standard text ads, expanded text ads or image ads.

"CLICKS" - Number of times a user clicked on a standard content ad.
"PAGE_VIEWS_SPAM_RATIO" - Fraction of page views considered to be

spam. Only available to premium accounts.

"AD_REQUESTS_SPAM_RATIO" - Fraction of ad requests considered to be

spam. Only available to premium accounts.

"MATCHED_AD_REQUESTS_SPAM_RATIO" - Fraction of ad requests that

returned ads considered to be spam. Only available to premium accounts.

"IMPRESSIONS_SPAM_RATIO" - Fraction of impressions considered to be

spam. Only available to premium accounts.

"INDIVIDUAL_AD_IMPRESSIONS_SPAM_RATIO" - Fraction of ad impressions

considered to be spam. Only available to premium accounts.

"CLICKS_SPAM_RATIO" - Fraction of clicks considered to be spam.

Only available to premium accounts.

"AD_REQUESTS_COVERAGE" - Ratio of requested ad units or queries to

the number returned to the site.

"PAGE_VIEWS_CTR" - Ratio of individual page views that resulted in

a click.

"AD_REQUESTS_CTR" - Ratio of ad requests that resulted in a click.
"MATCHED_AD_REQUESTS_CTR" - Ratio of clicks to matched requests.
"IMPRESSIONS_CTR" - Ratio of IMPRESSIONS that resulted in a click.
"INDIVIDUAL_AD_IMPRESSIONS_CTR" - Ratio of individual ad

impressions that resulted in a click.

"ACTIVE_VIEW_MEASURABILITY" - Ratio of requests that were

measurable for viewability.

"ACTIVE_VIEW_VIEWABILITY" - Ratio of requests that were viewable.
"ACTIVE_VIEW_TIME" - Mean time an ad was displayed on screen.
"ESTIMATED_EARNINGS" - Estimated earnings of the publisher. Note

that earnings up to yesterday are accurate, more recent earnings are estimated due to the possibility of spam, or exchange rate fluctuations.

"PAGE_VIEWS_RPM" - Revenue per thousand page views. This is

calculated by dividing the estimated revenue by the number of page views multiplied by 1000.

"AD_REQUESTS_RPM" - Revenue per thousand ad requests. This is

calculated by dividing estimated revenue by the number of ad requests multiplied by 1000.

"MATCHED_AD_REQUESTS_RPM" - Revenue per thousand matched ad

requests. This is calculated by dividing estimated revenue by the number of matched ad requests multiplied by 1000.

"IMPRESSIONS_RPM" - Revenue per thousand ad impressions. This is

calculated by dividing estimated revenue by the number of ad impressions multiplied by 1000.

"INDIVIDUAL_AD_IMPRESSIONS_RPM" - Revenue per thousand individual

ad impressions. This is calculated by dividing estimated revenue by the number of individual ad impressions multiplied by 1000.

"COST_PER_CLICK" - Amount the publisher earns each time a user

clicks on an ad. CPC is calculated by dividing the estimated revenue by the number of clicks received.

"ADS_PER_IMPRESSION" - Number of ad views per impression.
"TOTAL_EARNINGS" - Total earnings.
"WEBSEARCH_RESULT_PAGES" - Number of results pages.

func (*AccountsReportsGenerateCall) OrderBy

OrderBy sets the optional parameter "orderBy": The name of a dimension or metric to sort the resulting report on, can be prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending.

func (*AccountsReportsGenerateCall) ReportingTimeZone

func (c *AccountsReportsGenerateCall) ReportingTimeZone(reportingTimeZone string) *AccountsReportsGenerateCall

ReportingTimeZone sets the optional parameter "reportingTimeZone": Timezone in which to generate the report. If unspecified, this defaults to the account timezone. For more information, see changing the time zone of your reports (https://support.google.com/adsense/answer/9830725).

Possible values:

"REPORTING_TIME_ZONE_UNSPECIFIED" - Unspecified timezone.
"ACCOUNT_TIME_ZONE" - Use the account timezone in the report.
"GOOGLE_TIME_ZONE" - Use the Google timezone in the report

(America/Los_Angeles).

func (*AccountsReportsGenerateCall) StartDateDay

func (c *AccountsReportsGenerateCall) StartDateDay(startDateDay int64) *AccountsReportsGenerateCall

StartDateDay sets the optional parameter "startDate.day": Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

func (*AccountsReportsGenerateCall) StartDateMonth

func (c *AccountsReportsGenerateCall) StartDateMonth(startDateMonth int64) *AccountsReportsGenerateCall

StartDateMonth sets the optional parameter "startDate.month": Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

func (*AccountsReportsGenerateCall) StartDateYear

func (c *AccountsReportsGenerateCall) StartDateYear(startDateYear int64) *AccountsReportsGenerateCall

StartDateYear sets the optional parameter "startDate.year": Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

type AccountsReportsGenerateCsvCall

type AccountsReportsGenerateCsvCall struct {
	// contains filtered or unexported fields
}

func (*AccountsReportsGenerateCsvCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsReportsGenerateCsvCall) CurrencyCode

CurrencyCode sets the optional parameter "currencyCode": The ISO-4217 currency code (https://en.wikipedia.org/wiki/ISO_4217) to use when reporting on monetary metrics. Defaults to the account's currency if not set.

func (*AccountsReportsGenerateCsvCall) DateRange

DateRange sets the optional parameter "dateRange": Date range of the report, if unset the range will be considered CUSTOM.

Possible values:

"REPORTING_DATE_RANGE_UNSPECIFIED" - Unspecified date range.
"CUSTOM" - A custom date range specified using the `start_date` and

`end_date` fields. This is the default if no ReportingDateRange is provided.

"TODAY" - Current day.
"YESTERDAY" - Yesterday.
"MONTH_TO_DATE" - From the start of the current month to the

current day. e.g. if the current date is 2020-03-12 then the range will be [2020-03-01, 2020-03-12].

"YEAR_TO_DATE" - From the start of the current year to the current

day. e.g. if the current date is 2020-03-12 then the range will be [2020-01-01, 2020-03-12].

"LAST_7_DAYS" - Last 7 days, excluding current day.
"LAST_30_DAYS" - Last 30 days, excluding current day.

func (*AccountsReportsGenerateCsvCall) Dimensions

Dimensions sets the optional parameter "dimensions": Dimensions to base the report on.

Possible values:

"DIMENSION_UNSPECIFIED" - Unspecified dimension.
"DATE" - Date dimension in YYYY-MM-DD format (e.g. "2010-02-10").
"WEEK" - Week dimension in YYYY-MM-DD format, representing the

first day of each week (e.g. "2010-02-08"). The first day of the week is determined by the language_code specified in a report generation request (so e.g. this would be a Monday for "en-GB" or "es", but a Sunday for "en" or "fr-CA").

"MONTH" - Month dimension in YYYY-MM format (e.g. "2010-02").
"ACCOUNT_NAME" - Account name. The members of this dimension match

the values from Account.display_name.

"AD_CLIENT_ID" - Unique ID of an ad client. The members of this

dimension match the values from AdClient.reporting_dimension_id.

"PRODUCT_NAME" - Localized product name (e.g. "AdSense for

Content", "AdSense for Search").

"PRODUCT_CODE" - Product code (e.g. "AFC", "AFS"). The members of

this dimension match the values from AdClient.product_code.

"AD_UNIT_NAME" - Ad unit name (within which an ad was served). The

members of this dimension match the values from AdUnit.display_name.

"AD_UNIT_ID" - Unique ID of an ad unit (within which an ad was

served). The members of this dimension match the values from AdUnit.reporting_dimension_id.

"AD_UNIT_SIZE_NAME" - Localized size of an ad unit (e.g. "728x90",

"Responsive").

"AD_UNIT_SIZE_CODE" - The size code of an ad unit (e.g. "728x90",

"responsive").

"CUSTOM_CHANNEL_NAME" - Custom channel name. The members of this

dimension match the values from CustomChannel.display_name.

"CUSTOM_CHANNEL_ID" - Unique ID of a custom channel. The members of

this dimension match the values from CustomChannel.reporting_dimension_id.

"OWNED_SITE_DOMAIN_NAME" - Domain name of a verified site (e.g.

"example.com"). The members of this dimension match the values from Site.domain.

"OWNED_SITE_ID" - Unique ID of a verified site. The members of this

dimension match the values from Site.reporting_dimension_id.

"URL_CHANNEL_NAME" - Name of a URL channel. The members of this

dimension match the values from UrlChannel.uri_pattern.

"URL_CHANNEL_ID" - Unique ID of a URL channel. The members of this

dimension match the values from UrlChannel.reporting_dimension_id.

"BUYER_NETWORK_NAME" - Name of an ad network that returned the

winning ads for an ad request (e.g. "Google AdWords"). Note that unlike other "NAME" dimensions, the members of this dimensions are not localized.

"BUYER_NETWORK_ID" - Unique (opaque) ID of an ad network that

returned the winning ads for an ad request.

"BID_TYPE_NAME" - Localized bid type name (e.g. "CPC bids", "CPM

bids") for a served ad.

"BID_TYPE_CODE" - Type of a bid (e.g. "cpc", "cpm") for a served

ad.

"CREATIVE_SIZE_NAME" - Localized creative size name (e.g. "728x90",

"Dynamic") of a served ad.

"CREATIVE_SIZE_CODE" - Creative size code (e.g. "728x90",

"dynamic") of a served ad.

"DOMAIN_NAME" - Localized name of a host on which an ad was served,

after IDNA decoding (e.g. "www.google.com", "Web caches and other", "bücher.example").

"DOMAIN_CODE" - Name of a host on which an ad was served (e.g.

"www.google.com", "webcaches", "xn--bcher-kva.example").

"COUNTRY_NAME" - Localized region name of a user viewing an ad

(e.g. "United States", "France").

"COUNTRY_CODE" - CLDR region code of a user viewing an ad (e.g.

"US", "FR").

"PLATFORM_TYPE_NAME" - Localized platform type name (e.g. "High-end

mobile devices", "Desktop").

"PLATFORM_TYPE_CODE" - Platform type code (e.g. "HighEndMobile",

"Desktop").

"TARGETING_TYPE_NAME" - Localized targeting type name (e.g.

"Contextual", "Personalized", "Run of Network").

"TARGETING_TYPE_CODE" - Targeting type code (e.g. "Keyword",

"UserInterest", "RunOfNetwork").

"CONTENT_PLATFORM_NAME" - Localized content platform name an ad

request was made from (e.g. "AMP", "Web").

"CONTENT_PLATFORM_CODE" - Content platform code an ad request was

made from (e.g. "AMP", "HTML").

"AD_PLACEMENT_NAME" - Localized ad placement name (e.g. "Ad unit",

"Global settings", "Manual").

"AD_PLACEMENT_CODE" - Ad placement code (e.g. "AD_UNIT",

"ca-pub-123456:78910", "OTHER").

"REQUESTED_AD_TYPE_NAME" - Localized requested ad type name (e.g.

"Display", "Link unit", "Other").

"REQUESTED_AD_TYPE_CODE" - Requested ad type code (e.g. "IMAGE",

"RADLINK", "OTHER").

"SERVED_AD_TYPE_NAME" - Localized served ad type name (e.g.

"Display", "Link unit", "Other").

"SERVED_AD_TYPE_CODE" - Served ad type code (e.g. "IMAGE",

"RADLINK", "OTHER").

"CUSTOM_SEARCH_STYLE_NAME" - Custom search style name.
"CUSTOM_SEARCH_STYLE_ID" - Custom search style id.
"DOMAIN_REGISTRANT" - Domain registrants.
"WEBSEARCH_QUERY_STRING" - Query strings for web searches.

func (*AccountsReportsGenerateCsvCall) Do

Do executes the "adsense.accounts.reports.generateCsv" call. Exactly one of *HttpBody or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *HttpBody.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 (*AccountsReportsGenerateCsvCall) EndDateDay

EndDateDay sets the optional parameter "endDate.day": Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

func (*AccountsReportsGenerateCsvCall) EndDateMonth

EndDateMonth sets the optional parameter "endDate.month": Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

func (*AccountsReportsGenerateCsvCall) EndDateYear

EndDateYear sets the optional parameter "endDate.year": Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

func (*AccountsReportsGenerateCsvCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsReportsGenerateCsvCall) Filters

Filters sets the optional parameter "filters": Filters to be run on the report.

func (*AccountsReportsGenerateCsvCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsReportsGenerateCsvCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AccountsReportsGenerateCsvCall) LanguageCode

LanguageCode sets the optional parameter "languageCode": The language to use for translating report output. If unspecified, this defaults to English ("en"). If the given language is not supported, report output will be returned in English. The language is specified as an IETF BCP-47 language code (https://en.wikipedia.org/wiki/IETF_language_tag).

func (*AccountsReportsGenerateCsvCall) Limit

Limit sets the optional parameter "limit": The maximum number of rows of report data to return. Reports producing more rows than the requested limit will be truncated. If unset, this defaults to 100,000 rows for `Reports.GenerateReport` and 1,000,000 rows for `Reports.GenerateCsvReport`, which are also the maximum values permitted here. Report truncation can be identified (for `Reports.GenerateReport` only) by comparing the number of rows returned to the value returned in `total_matched_rows`.

func (*AccountsReportsGenerateCsvCall) Metrics

Metrics sets the optional parameter "metrics": Required. Reporting metrics.

Possible values:

"METRIC_UNSPECIFIED" - Unspecified metric.
"PAGE_VIEWS" - Number of page views.
"AD_REQUESTS" - Number of ad units that requested ads (for content

ads) or search queries (for search ads). An ad request may result in zero, one, or multiple individual ad impressions depending on the size of the ad unit and whether any ads were available.

"MATCHED_AD_REQUESTS" - Requests that returned at least one ad.
"TOTAL_IMPRESSIONS" - Impressions. An impression is counted for

each ad request where at least one ad has been downloaded to the user’s device and has begun to load. It is the number of ad units (for content ads) or search queries (for search ads) that showed ads.

"IMPRESSIONS" - Impressions. An impression is counted for each ad

request where at least one ad has been downloaded to the user’s device and has begun to load. It is the number of ad units (for content ads) or search queries (for search ads) that showed ads.

"INDIVIDUAL_AD_IMPRESSIONS" - Ads shown. Different ad formats will

display varying numbers of ads. For example, a vertical banner may consist of 2 or more ads. Also, the number of ads in an ad unit may vary depending on whether the ad unit is displaying standard text ads, expanded text ads or image ads.

"CLICKS" - Number of times a user clicked on a standard content ad.
"PAGE_VIEWS_SPAM_RATIO" - Fraction of page views considered to be

spam. Only available to premium accounts.

"AD_REQUESTS_SPAM_RATIO" - Fraction of ad requests considered to be

spam. Only available to premium accounts.

"MATCHED_AD_REQUESTS_SPAM_RATIO" - Fraction of ad requests that

returned ads considered to be spam. Only available to premium accounts.

"IMPRESSIONS_SPAM_RATIO" - Fraction of impressions considered to be

spam. Only available to premium accounts.

"INDIVIDUAL_AD_IMPRESSIONS_SPAM_RATIO" - Fraction of ad impressions

considered to be spam. Only available to premium accounts.

"CLICKS_SPAM_RATIO" - Fraction of clicks considered to be spam.

Only available to premium accounts.

"AD_REQUESTS_COVERAGE" - Ratio of requested ad units or queries to

the number returned to the site.

"PAGE_VIEWS_CTR" - Ratio of individual page views that resulted in

a click.

"AD_REQUESTS_CTR" - Ratio of ad requests that resulted in a click.
"MATCHED_AD_REQUESTS_CTR" - Ratio of clicks to matched requests.
"IMPRESSIONS_CTR" - Ratio of IMPRESSIONS that resulted in a click.
"INDIVIDUAL_AD_IMPRESSIONS_CTR" - Ratio of individual ad

impressions that resulted in a click.

"ACTIVE_VIEW_MEASURABILITY" - Ratio of requests that were

measurable for viewability.

"ACTIVE_VIEW_VIEWABILITY" - Ratio of requests that were viewable.
"ACTIVE_VIEW_TIME" - Mean time an ad was displayed on screen.
"ESTIMATED_EARNINGS" - Estimated earnings of the publisher. Note

that earnings up to yesterday are accurate, more recent earnings are estimated due to the possibility of spam, or exchange rate fluctuations.

"PAGE_VIEWS_RPM" - Revenue per thousand page views. This is

calculated by dividing the estimated revenue by the number of page views multiplied by 1000.

"AD_REQUESTS_RPM" - Revenue per thousand ad requests. This is

calculated by dividing estimated revenue by the number of ad requests multiplied by 1000.

"MATCHED_AD_REQUESTS_RPM" - Revenue per thousand matched ad

requests. This is calculated by dividing estimated revenue by the number of matched ad requests multiplied by 1000.

"IMPRESSIONS_RPM" - Revenue per thousand ad impressions. This is

calculated by dividing estimated revenue by the number of ad impressions multiplied by 1000.

"INDIVIDUAL_AD_IMPRESSIONS_RPM" - Revenue per thousand individual

ad impressions. This is calculated by dividing estimated revenue by the number of individual ad impressions multiplied by 1000.

"COST_PER_CLICK" - Amount the publisher earns each time a user

clicks on an ad. CPC is calculated by dividing the estimated revenue by the number of clicks received.

"ADS_PER_IMPRESSION" - Number of ad views per impression.
"TOTAL_EARNINGS" - Total earnings.
"WEBSEARCH_RESULT_PAGES" - Number of results pages.

func (*AccountsReportsGenerateCsvCall) OrderBy

OrderBy sets the optional parameter "orderBy": The name of a dimension or metric to sort the resulting report on, can be prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending.

func (*AccountsReportsGenerateCsvCall) ReportingTimeZone

func (c *AccountsReportsGenerateCsvCall) ReportingTimeZone(reportingTimeZone string) *AccountsReportsGenerateCsvCall

ReportingTimeZone sets the optional parameter "reportingTimeZone": Timezone in which to generate the report. If unspecified, this defaults to the account timezone. For more information, see changing the time zone of your reports (https://support.google.com/adsense/answer/9830725).

Possible values:

"REPORTING_TIME_ZONE_UNSPECIFIED" - Unspecified timezone.
"ACCOUNT_TIME_ZONE" - Use the account timezone in the report.
"GOOGLE_TIME_ZONE" - Use the Google timezone in the report

(America/Los_Angeles).

func (*AccountsReportsGenerateCsvCall) StartDateDay

StartDateDay sets the optional parameter "startDate.day": Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

func (*AccountsReportsGenerateCsvCall) StartDateMonth

func (c *AccountsReportsGenerateCsvCall) StartDateMonth(startDateMonth int64) *AccountsReportsGenerateCsvCall

StartDateMonth sets the optional parameter "startDate.month": Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

func (*AccountsReportsGenerateCsvCall) StartDateYear

func (c *AccountsReportsGenerateCsvCall) StartDateYear(startDateYear int64) *AccountsReportsGenerateCsvCall

StartDateYear sets the optional parameter "startDate.year": Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

type AccountsReportsSavedGenerateCall

type AccountsReportsSavedGenerateCall struct {
	// contains filtered or unexported fields
}

func (*AccountsReportsSavedGenerateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsReportsSavedGenerateCall) CurrencyCode

CurrencyCode sets the optional parameter "currencyCode": The ISO-4217 currency code (https://en.wikipedia.org/wiki/ISO_4217) to use when reporting on monetary metrics. Defaults to the account's currency if not set.

func (*AccountsReportsSavedGenerateCall) DateRange

DateRange sets the optional parameter "dateRange": Date range of the report, if unset the range will be considered CUSTOM.

Possible values:

"REPORTING_DATE_RANGE_UNSPECIFIED" - Unspecified date range.
"CUSTOM" - A custom date range specified using the `start_date` and

`end_date` fields. This is the default if no ReportingDateRange is provided.

"TODAY" - Current day.
"YESTERDAY" - Yesterday.
"MONTH_TO_DATE" - From the start of the current month to the

current day. e.g. if the current date is 2020-03-12 then the range will be [2020-03-01, 2020-03-12].

"YEAR_TO_DATE" - From the start of the current year to the current

day. e.g. if the current date is 2020-03-12 then the range will be [2020-01-01, 2020-03-12].

"LAST_7_DAYS" - Last 7 days, excluding current day.
"LAST_30_DAYS" - Last 30 days, excluding current day.

func (*AccountsReportsSavedGenerateCall) Do

Do executes the "adsense.accounts.reports.saved.generate" call. Exactly one of *ReportResult or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ReportResult.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 (*AccountsReportsSavedGenerateCall) EndDateDay

EndDateDay sets the optional parameter "endDate.day": Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

func (*AccountsReportsSavedGenerateCall) EndDateMonth

EndDateMonth sets the optional parameter "endDate.month": Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

func (*AccountsReportsSavedGenerateCall) EndDateYear

EndDateYear sets the optional parameter "endDate.year": Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

func (*AccountsReportsSavedGenerateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsReportsSavedGenerateCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsReportsSavedGenerateCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AccountsReportsSavedGenerateCall) LanguageCode

LanguageCode sets the optional parameter "languageCode": The language to use for translating report output. If unspecified, this defaults to English ("en"). If the given language is not supported, report output will be returned in English. The language is specified as an IETF BCP-47 language code (https://en.wikipedia.org/wiki/IETF_language_tag).

func (*AccountsReportsSavedGenerateCall) ReportingTimeZone

func (c *AccountsReportsSavedGenerateCall) ReportingTimeZone(reportingTimeZone string) *AccountsReportsSavedGenerateCall

ReportingTimeZone sets the optional parameter "reportingTimeZone": Timezone in which to generate the report. If unspecified, this defaults to the account timezone. For more information, see changing the time zone of your reports (https://support.google.com/adsense/answer/9830725).

Possible values:

"REPORTING_TIME_ZONE_UNSPECIFIED" - Unspecified timezone.
"ACCOUNT_TIME_ZONE" - Use the account timezone in the report.
"GOOGLE_TIME_ZONE" - Use the Google timezone in the report

(America/Los_Angeles).

func (*AccountsReportsSavedGenerateCall) StartDateDay

StartDateDay sets the optional parameter "startDate.day": Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

func (*AccountsReportsSavedGenerateCall) StartDateMonth

func (c *AccountsReportsSavedGenerateCall) StartDateMonth(startDateMonth int64) *AccountsReportsSavedGenerateCall

StartDateMonth sets the optional parameter "startDate.month": Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

func (*AccountsReportsSavedGenerateCall) StartDateYear

StartDateYear sets the optional parameter "startDate.year": Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

type AccountsReportsSavedGenerateCsvCall

type AccountsReportsSavedGenerateCsvCall struct {
	// contains filtered or unexported fields
}

func (*AccountsReportsSavedGenerateCsvCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsReportsSavedGenerateCsvCall) CurrencyCode

CurrencyCode sets the optional parameter "currencyCode": The ISO-4217 currency code (https://en.wikipedia.org/wiki/ISO_4217) to use when reporting on monetary metrics. Defaults to the account's currency if not set.

func (*AccountsReportsSavedGenerateCsvCall) DateRange

DateRange sets the optional parameter "dateRange": Date range of the report, if unset the range will be considered CUSTOM.

Possible values:

"REPORTING_DATE_RANGE_UNSPECIFIED" - Unspecified date range.
"CUSTOM" - A custom date range specified using the `start_date` and

`end_date` fields. This is the default if no ReportingDateRange is provided.

"TODAY" - Current day.
"YESTERDAY" - Yesterday.
"MONTH_TO_DATE" - From the start of the current month to the

current day. e.g. if the current date is 2020-03-12 then the range will be [2020-03-01, 2020-03-12].

"YEAR_TO_DATE" - From the start of the current year to the current

day. e.g. if the current date is 2020-03-12 then the range will be [2020-01-01, 2020-03-12].

"LAST_7_DAYS" - Last 7 days, excluding current day.
"LAST_30_DAYS" - Last 30 days, excluding current day.

func (*AccountsReportsSavedGenerateCsvCall) Do

Do executes the "adsense.accounts.reports.saved.generateCsv" call. Exactly one of *HttpBody or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *HttpBody.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 (*AccountsReportsSavedGenerateCsvCall) EndDateDay

EndDateDay sets the optional parameter "endDate.day": Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

func (*AccountsReportsSavedGenerateCsvCall) EndDateMonth

EndDateMonth sets the optional parameter "endDate.month": Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

func (*AccountsReportsSavedGenerateCsvCall) EndDateYear

EndDateYear sets the optional parameter "endDate.year": Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

func (*AccountsReportsSavedGenerateCsvCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsReportsSavedGenerateCsvCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsReportsSavedGenerateCsvCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AccountsReportsSavedGenerateCsvCall) LanguageCode

LanguageCode sets the optional parameter "languageCode": The language to use for translating report output. If unspecified, this defaults to English ("en"). If the given language is not supported, report output will be returned in English. The language is specified as an IETF BCP-47 language code (https://en.wikipedia.org/wiki/IETF_language_tag).

func (*AccountsReportsSavedGenerateCsvCall) ReportingTimeZone

func (c *AccountsReportsSavedGenerateCsvCall) ReportingTimeZone(reportingTimeZone string) *AccountsReportsSavedGenerateCsvCall

ReportingTimeZone sets the optional parameter "reportingTimeZone": Timezone in which to generate the report. If unspecified, this defaults to the account timezone. For more information, see changing the time zone of your reports (https://support.google.com/adsense/answer/9830725).

Possible values:

"REPORTING_TIME_ZONE_UNSPECIFIED" - Unspecified timezone.
"ACCOUNT_TIME_ZONE" - Use the account timezone in the report.
"GOOGLE_TIME_ZONE" - Use the Google timezone in the report

(America/Los_Angeles).

func (*AccountsReportsSavedGenerateCsvCall) StartDateDay

StartDateDay sets the optional parameter "startDate.day": Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

func (*AccountsReportsSavedGenerateCsvCall) StartDateMonth

StartDateMonth sets the optional parameter "startDate.month": Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

func (*AccountsReportsSavedGenerateCsvCall) StartDateYear

StartDateYear sets the optional parameter "startDate.year": Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

type AccountsReportsSavedListCall

type AccountsReportsSavedListCall struct {
	// contains filtered or unexported fields
}

func (*AccountsReportsSavedListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsReportsSavedListCall) Do

Do executes the "adsense.accounts.reports.saved.list" call. Exactly one of *ListSavedReportsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListSavedReportsResponse.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 (*AccountsReportsSavedListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsReportsSavedListCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsReportsSavedListCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AccountsReportsSavedListCall) PageSize

PageSize sets the optional parameter "pageSize": The maximum number of reports to include in the response, used for paging. If unspecified, at most 10000 reports will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000.

func (*AccountsReportsSavedListCall) PageToken

PageToken sets the optional parameter "pageToken": A page token, received from a previous `ListPayments` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPayments` must match the call that provided the page token.

func (*AccountsReportsSavedListCall) Pages

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 AccountsReportsSavedService

type AccountsReportsSavedService struct {
	// contains filtered or unexported fields
}

func NewAccountsReportsSavedService

func NewAccountsReportsSavedService(s *Service) *AccountsReportsSavedService

func (*AccountsReportsSavedService) Generate

Generate: Generates a saved report.

  • name: Name of the saved report. Format: accounts/{account}/reports/{report}.

func (*AccountsReportsSavedService) GenerateCsv

GenerateCsv: Generates a csv formatted saved report.

  • name: Name of the saved report. Format: accounts/{account}/reports/{report}.

func (*AccountsReportsSavedService) List

List: Lists saved reports.

  • parent: The account which owns the collection of reports. Format: accounts/{account}.

type AccountsReportsService

type AccountsReportsService struct {
	Saved *AccountsReportsSavedService
	// contains filtered or unexported fields
}

func NewAccountsReportsService

func NewAccountsReportsService(s *Service) *AccountsReportsService

func (*AccountsReportsService) Generate

Generate: Generates an ad hoc report.

  • account: The account which owns the collection of reports. Format: accounts/{account}.

func (*AccountsReportsService) GenerateCsv

GenerateCsv: Generates a csv formatted ad hoc report.

  • account: The account which owns the collection of reports. Format: accounts/{account}.

type AccountsService

type AccountsService struct {
	Adclients *AccountsAdclientsService

	Alerts *AccountsAlertsService

	Payments *AccountsPaymentsService

	Reports *AccountsReportsService

	Sites *AccountsSitesService
	// contains filtered or unexported fields
}

func NewAccountsService

func NewAccountsService(s *Service) *AccountsService

func (*AccountsService) Get

func (r *AccountsService) Get(name string) *AccountsGetCall

Get: Gets information about the selected AdSense account.

  • name: Account to get information about. Format: accounts/{account_id}.

func (*AccountsService) List

func (r *AccountsService) List() *AccountsListCall

List: Lists all accounts available to this user.

func (*AccountsService) ListChildAccounts

func (r *AccountsService) ListChildAccounts(parent string) *AccountsListChildAccountsCall

ListChildAccounts: Lists all accounts directly managed by the given AdSense account.

  • parent: The parent account, which owns the child accounts. Format: accounts/{account}.

type AccountsSitesGetCall

type AccountsSitesGetCall struct {
	// contains filtered or unexported fields
}

func (*AccountsSitesGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsSitesGetCall) Do

func (c *AccountsSitesGetCall) Do(opts ...googleapi.CallOption) (*Site, error)

Do executes the "adsense.accounts.sites.get" call. Exactly one of *Site or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Site.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 (*AccountsSitesGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsSitesGetCall) Header

func (c *AccountsSitesGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsSitesGetCall) IfNoneMatch

func (c *AccountsSitesGetCall) IfNoneMatch(entityTag string) *AccountsSitesGetCall

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type AccountsSitesListCall

type AccountsSitesListCall struct {
	// contains filtered or unexported fields
}

func (*AccountsSitesListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsSitesListCall) Do

Do executes the "adsense.accounts.sites.list" call. Exactly one of *ListSitesResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListSitesResponse.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 (*AccountsSitesListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsSitesListCall) Header

func (c *AccountsSitesListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsSitesListCall) IfNoneMatch

func (c *AccountsSitesListCall) IfNoneMatch(entityTag string) *AccountsSitesListCall

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AccountsSitesListCall) PageSize

func (c *AccountsSitesListCall) PageSize(pageSize int64) *AccountsSitesListCall

PageSize sets the optional parameter "pageSize": The maximum number of sites to include in the response, used for paging. If unspecified, at most 10000 sites will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000.

func (*AccountsSitesListCall) PageToken

func (c *AccountsSitesListCall) PageToken(pageToken string) *AccountsSitesListCall

PageToken sets the optional parameter "pageToken": A page token, received from a previous `ListSites` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSites` must match the call that provided the page token.

func (*AccountsSitesListCall) Pages

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 AccountsSitesService

type AccountsSitesService struct {
	// contains filtered or unexported fields
}

func NewAccountsSitesService

func NewAccountsSitesService(s *Service) *AccountsSitesService

func (*AccountsSitesService) Get

Get: Gets information about the selected site.

- name: Name of the site. Format: accounts/{account}/sites/{site}.

func (*AccountsSitesService) List

List: Lists all the sites available in an account.

  • parent: The account which owns the collection of sites. Format: accounts/{account}.

type AdClient

type AdClient struct {
	// Name: Resource name of the ad client. Format:
	// accounts/{account}/adclient/{adclient}
	Name string `json:"name,omitempty"`

	// ProductCode: Output only. Product code of the ad client. For example,
	// "AFC" for AdSense for Content.
	ProductCode string `json:"productCode,omitempty"`

	// ReportingDimensionId: Output only. Unique ID of the ad client as used
	// in the `AD_CLIENT_ID` reporting dimension. Present only if the ad
	// client supports reporting.
	ReportingDimensionId string `json:"reportingDimensionId,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Name") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Name") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

AdClient: Representation of an ad client. An ad client represents a user's subscription with a specific AdSense product.

func (*AdClient) MarshalJSON

func (s *AdClient) MarshalJSON() ([]byte, error)

type AdClientAdCode

type AdClientAdCode struct {
	// AdCode: Output only. The AdSense code snippet to add to the head of
	// an HTML page.
	AdCode string `json:"adCode,omitempty"`

	// AmpBody: Output only. The AdSense code snippet to add to the body of
	// an AMP page.
	AmpBody string `json:"ampBody,omitempty"`

	// AmpHead: Output only. The AdSense code snippet to add to the head of
	// an AMP page.
	AmpHead string `json:"ampHead,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "AdCode") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AdCode") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

AdClientAdCode: Representation of the AdSense code for a given ad client. For more information, see About the AdSense code (https://support.google.com/adsense/answer/9274634).

func (*AdClientAdCode) MarshalJSON

func (s *AdClientAdCode) MarshalJSON() ([]byte, error)

type AdUnit

type AdUnit struct {
	// ContentAdsSettings: Settings specific to content ads (AFC).
	ContentAdsSettings *ContentAdsSettings `json:"contentAdsSettings,omitempty"`

	// DisplayName: Display name of the ad unit, as provided when the ad
	// unit was created.
	DisplayName string `json:"displayName,omitempty"`

	// Name: Resource name of the ad unit. Format:
	// accounts/{account}/adclient/{adclient}/adunits/{adunit}
	Name string `json:"name,omitempty"`

	// ReportingDimensionId: Output only. Unique ID of the ad unit as used
	// in the `AD_UNIT_ID` reporting dimension.
	ReportingDimensionId string `json:"reportingDimensionId,omitempty"`

	// State: State of the ad unit.
	//
	// Possible values:
	//   "STATE_UNSPECIFIED" - State unspecified.
	//   "ACTIVE" - Ad unit has been activated by the user and can serve
	// ads.
	//   "ARCHIVED" - Ad unit has been archived by the user and can no
	// longer serve ads.
	State string `json:"state,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "ContentAdsSettings")
	// to unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ContentAdsSettings") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

AdUnit: Representation of an ad unit. An ad unit represents a saved ad unit with a specific set of ad settings that have been customized within an account.

func (*AdUnit) MarshalJSON

func (s *AdUnit) MarshalJSON() ([]byte, error)

type AdUnitAdCode

type AdUnitAdCode struct {
	// AdCode: Output only. The AdSense code snippet to add to the body of
	// an HTML page.
	AdCode string `json:"adCode,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "AdCode") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AdCode") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

AdUnitAdCode: Representation of the AdSense code for a given ad unit.

func (*AdUnitAdCode) MarshalJSON

func (s *AdUnitAdCode) MarshalJSON() ([]byte, error)

type Alert

type Alert struct {
	// Message: Output only. The localized alert message. This may contain
	// HTML markup, such as phrase elements or links.
	Message string `json:"message,omitempty"`

	// Name: Resource name of the alert. Format:
	// accounts/{account}/alerts/{alert}
	Name string `json:"name,omitempty"`

	// Severity: Output only. Severity of this alert.
	//
	// Possible values:
	//   "SEVERITY_UNSPECIFIED" - Unspecified severity.
	//   "INFO" - Info.
	//   "WARNING" - Warning.
	//   "SEVERE" - Severe.
	Severity string `json:"severity,omitempty"`

	// Type: Output only. Type of alert. This identifies the broad type of
	// this alert, and provides a stable machine-readable identifier that
	// will not be translated. For example, "payment-hold".
	Type string `json:"type,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Message") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Message") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Alert: Representation of an alert.

func (*Alert) MarshalJSON

func (s *Alert) MarshalJSON() ([]byte, error)

type Cell

type Cell struct {
	// Value: Value in the cell. The dimension cells contain strings, and
	// the metric cells contain numbers.
	Value string `json:"value,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Value") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Value") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Cell: Cell representation.

func (*Cell) MarshalJSON

func (s *Cell) MarshalJSON() ([]byte, error)

type ContentAdsSettings

type ContentAdsSettings struct {
	// Size: Size of the ad unit. e.g. "728x90", "1x3" (for responsive ad
	// units).
	Size string `json:"size,omitempty"`

	// Type: Type of the ad unit.
	//
	// Possible values:
	//   "TYPE_UNSPECIFIED" - Unspecified ad unit type.
	//   "DISPLAY" - Display ad unit.
	//   "FEED" - In-feed ad unit.
	//   "ARTICLE" - In-article ad unit.
	//   "MATCHED_CONTENT" - Matched content unit.
	//   "LINK" - Link ad unit. Note that link ad units are being retired,
	// see https://support.google.com/adsense/answer/9987221.
	Type string `json:"type,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Size") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Size") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ContentAdsSettings: Settings specific to content ads (AFC).

func (*ContentAdsSettings) MarshalJSON

func (s *ContentAdsSettings) MarshalJSON() ([]byte, error)

type CustomChannel

type CustomChannel struct {
	// DisplayName: Display name of the custom channel.
	DisplayName string `json:"displayName,omitempty"`

	// Name: Resource name of the custom channel. Format:
	// accounts/{account}/adclients/{adclient}/customchannels/{customchannel}
	Name string `json:"name,omitempty"`

	// ReportingDimensionId: Output only. Unique ID of the custom channel as
	// used in the `CUSTOM_CHANNEL_ID` reporting dimension.
	ReportingDimensionId string `json:"reportingDimensionId,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "DisplayName") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "DisplayName") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

CustomChannel: Representation of a custom channel.

func (*CustomChannel) MarshalJSON

func (s *CustomChannel) MarshalJSON() ([]byte, error)

type Date

type Date struct {
	// Day: Day of a month. Must be from 1 to 31 and valid for the year and
	// month, or 0 to specify a year by itself or a year and month where the
	// day isn't significant.
	Day int64 `json:"day,omitempty"`

	// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year
	// without a month and day.
	Month int64 `json:"month,omitempty"`

	// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a
	// date without a year.
	Year int64 `json:"year,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Day") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Day") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Date: Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.

func (*Date) MarshalJSON

func (s *Date) MarshalJSON() ([]byte, error)
type Header struct {
	// CurrencyCode: The ISO-4217 currency code
	// (https://en.wikipedia.org/wiki/ISO_4217) of this column. Only present
	// if the header type is METRIC_CURRENCY.
	CurrencyCode string `json:"currencyCode,omitempty"`

	// Name: Required. Name of the header.
	Name string `json:"name,omitempty"`

	// Type: Required. Type of the header.
	//
	// Possible values:
	//   "HEADER_TYPE_UNSPECIFIED" - Unspecified header.
	//   "DIMENSION" - Dimension header type.
	//   "METRIC_TALLY" - Tally header type.
	//   "METRIC_RATIO" - Ratio header type.
	//   "METRIC_CURRENCY" - Currency header type.
	//   "METRIC_MILLISECONDS" - Milliseconds header type.
	//   "METRIC_DECIMAL" - Decimal header type.
	Type string `json:"type,omitempty"`

	// ForceSendFields is a list of field names (e.g. "CurrencyCode") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "CurrencyCode") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Header: The header information of the columns requested in the report.

func (*Header) MarshalJSON

func (s *Header) MarshalJSON() ([]byte, error)

type HttpBody

type HttpBody struct {
	// ContentType: The HTTP Content-Type header value specifying the
	// content type of the body.
	ContentType string `json:"contentType,omitempty"`

	// Data: The HTTP request/response body as raw binary.
	Data string `json:"data,omitempty"`

	// Extensions: Application specific response metadata. Must be set in
	// the first response for streaming APIs.
	Extensions []googleapi.RawMessage `json:"extensions,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "ContentType") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ContentType") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

HttpBody: Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.

func (*HttpBody) MarshalJSON

func (s *HttpBody) MarshalJSON() ([]byte, error)

type ListAccountsResponse

type ListAccountsResponse struct {
	// Accounts: The accounts returned in this list response.
	Accounts []*Account `json:"accounts,omitempty"`

	// NextPageToken: Continuation token used to page through accounts. To
	// retrieve the next page of the results, set the next request's
	// "page_token" value to this.
	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. "Accounts") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Accounts") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListAccountsResponse: Response definition for the account list rpc.

func (*ListAccountsResponse) MarshalJSON

func (s *ListAccountsResponse) MarshalJSON() ([]byte, error)

type ListAdClientsResponse

type ListAdClientsResponse struct {
	// AdClients: The ad clients returned in this list response.
	AdClients []*AdClient `json:"adClients,omitempty"`

	// NextPageToken: Continuation token used to page through ad clients. To
	// retrieve the next page of the results, set the next request's
	// "page_token" value to this.
	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. "AdClients") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AdClients") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListAdClientsResponse: Response definition for the ad client list rpc.

func (*ListAdClientsResponse) MarshalJSON

func (s *ListAdClientsResponse) MarshalJSON() ([]byte, error)

type ListAdUnitsResponse

type ListAdUnitsResponse struct {
	// AdUnits: The ad units returned in the list response.
	AdUnits []*AdUnit `json:"adUnits,omitempty"`

	// NextPageToken: Continuation token used to page through ad units. To
	// retrieve the next page of the results, set the next request's
	// "page_token" value to this.
	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. "AdUnits") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AdUnits") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListAdUnitsResponse: Response definition for the adunit list rpc.

func (*ListAdUnitsResponse) MarshalJSON

func (s *ListAdUnitsResponse) MarshalJSON() ([]byte, error)

type ListAlertsResponse

type ListAlertsResponse struct {
	// Alerts: The alerts returned in this list response.
	Alerts []*Alert `json:"alerts,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Alerts") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Alerts") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListAlertsResponse: Response definition for the alerts list rpc.

func (*ListAlertsResponse) MarshalJSON

func (s *ListAlertsResponse) MarshalJSON() ([]byte, error)

type ListChildAccountsResponse

type ListChildAccountsResponse struct {
	// Accounts: The accounts returned in this list response.
	Accounts []*Account `json:"accounts,omitempty"`

	// NextPageToken: Continuation token used to page through accounts. To
	// retrieve the next page of the results, set the next request's
	// "page_token" value to this.
	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. "Accounts") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Accounts") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListChildAccountsResponse: Response definition for the child account list rpc.

func (*ListChildAccountsResponse) MarshalJSON

func (s *ListChildAccountsResponse) MarshalJSON() ([]byte, error)

type ListCustomChannelsResponse

type ListCustomChannelsResponse struct {
	// CustomChannels: The custom channels returned in this list response.
	CustomChannels []*CustomChannel `json:"customChannels,omitempty"`

	// NextPageToken: Continuation token used to page through alerts. To
	// retrieve the next page of the results, set the next request's
	// "page_token" value to this.
	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. "CustomChannels") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "CustomChannels") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

ListCustomChannelsResponse: Response definition for the custom channel list rpc.

func (*ListCustomChannelsResponse) MarshalJSON

func (s *ListCustomChannelsResponse) MarshalJSON() ([]byte, error)

type ListLinkedAdUnitsResponse

type ListLinkedAdUnitsResponse struct {
	// AdUnits: The ad units returned in the list response.
	AdUnits []*AdUnit `json:"adUnits,omitempty"`

	// NextPageToken: Continuation token used to page through ad units. To
	// retrieve the next page of the results, set the next request's
	// "page_token" value to this.
	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. "AdUnits") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AdUnits") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListLinkedAdUnitsResponse: Response definition for the ad units linked to a custom channel list rpc.

func (*ListLinkedAdUnitsResponse) MarshalJSON

func (s *ListLinkedAdUnitsResponse) MarshalJSON() ([]byte, error)

type ListLinkedCustomChannelsResponse

type ListLinkedCustomChannelsResponse struct {
	// CustomChannels: The custom channels returned in this list response.
	CustomChannels []*CustomChannel `json:"customChannels,omitempty"`

	// NextPageToken: Continuation token used to page through alerts. To
	// retrieve the next page of the results, set the next request's
	// "page_token" value to this.
	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. "CustomChannels") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "CustomChannels") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

ListLinkedCustomChannelsResponse: Response definition for the custom channels linked to an adunit list rpc.

func (*ListLinkedCustomChannelsResponse) MarshalJSON

func (s *ListLinkedCustomChannelsResponse) MarshalJSON() ([]byte, error)

type ListPaymentsResponse

type ListPaymentsResponse struct {
	// Payments: The payments returned in this list response.
	Payments []*Payment `json:"payments,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Payments") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Payments") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListPaymentsResponse: Response definition for the payments list rpc.

func (*ListPaymentsResponse) MarshalJSON

func (s *ListPaymentsResponse) MarshalJSON() ([]byte, error)

type ListSavedReportsResponse

type ListSavedReportsResponse struct {
	// NextPageToken: Continuation token used to page through reports. To
	// retrieve the next page of the results, set the next request's
	// "page_token" value to this.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// SavedReports: The reports returned in this list response.
	SavedReports []*SavedReport `json:"savedReports,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "NextPageToken") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListSavedReportsResponse: Response definition for the saved reports list rpc.

func (*ListSavedReportsResponse) MarshalJSON

func (s *ListSavedReportsResponse) MarshalJSON() ([]byte, error)

type ListSitesResponse

type ListSitesResponse struct {
	// NextPageToken: Continuation token used to page through sites. To
	// retrieve the next page of the results, set the next request's
	// "page_token" value to this.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// Sites: The sites returned in this list response.
	Sites []*Site `json:"sites,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "NextPageToken") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListSitesResponse: Response definition for the sites list rpc.

func (*ListSitesResponse) MarshalJSON

func (s *ListSitesResponse) MarshalJSON() ([]byte, error)

type ListUrlChannelsResponse

type ListUrlChannelsResponse struct {
	// NextPageToken: Continuation token used to page through url channels.
	// To retrieve the next page of the results, set the next request's
	// "page_token" value to this.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// UrlChannels: The url channels returned in this list response.
	UrlChannels []*UrlChannel `json:"urlChannels,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "NextPageToken") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListUrlChannelsResponse: Response definition for the url channels list rpc.

func (*ListUrlChannelsResponse) MarshalJSON

func (s *ListUrlChannelsResponse) MarshalJSON() ([]byte, error)

type Payment

type Payment struct {
	// Amount: Output only. The amount of unpaid or paid earnings, as a
	// formatted string, including the currency. E.g. "¥1,235 JPY",
	// "$1,234.57", "£87.65".
	Amount string `json:"amount,omitempty"`

	// Date: Output only. For paid earnings, the date that the payment was
	// credited. For unpaid earnings, this field is empty. Payment dates are
	// always returned in the billing timezone (America/Los_Angeles).
	Date *Date `json:"date,omitempty"`

	// Name: Resource name of the payment. Format:
	// accounts/{account}/payments/unpaid for unpaid (current) earnings.
	// accounts/{account}/payments/yyyy-MM-dd for paid earnings.
	Name string `json:"name,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Amount") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Amount") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Payment: Representation of an unpaid or paid payment. See Payment timelines for AdSense (https://support.google.com/adsense/answer/7164703) for more information about payments.

func (*Payment) MarshalJSON

func (s *Payment) MarshalJSON() ([]byte, error)

type ReportResult

type ReportResult struct {
	// Averages: The averages of the report. This is the same length as any
	// other row in the report; cells corresponding to dimension columns are
	// empty.
	Averages *Row `json:"averages,omitempty"`

	// EndDate: Required. End date of the range (inclusive).
	EndDate *Date `json:"endDate,omitempty"`

	// Headers: The header information; one for each dimension in the
	// request, followed by one for each metric in the request.
	Headers []*Header `json:"headers,omitempty"`

	// Rows: The output rows of the report. Each row is a list of cells; one
	// for each dimension in the request, followed by one for each metric in
	// the request.
	Rows []*Row `json:"rows,omitempty"`

	// StartDate: Required. Start date of the range (inclusive).
	StartDate *Date `json:"startDate,omitempty"`

	// TotalMatchedRows: The total number of rows matched by the report
	// request.
	TotalMatchedRows int64 `json:"totalMatchedRows,omitempty,string"`

	// Totals: The totals of the report. This is the same length as any
	// other row in the report; cells corresponding to dimension columns are
	// empty.
	Totals *Row `json:"totals,omitempty"`

	// Warnings: Any warnings associated with generation of the report.
	// These warnings are always returned in English.
	Warnings []string `json:"warnings,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Averages") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Averages") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ReportResult: Result of a generated report.

func (*ReportResult) MarshalJSON

func (s *ReportResult) MarshalJSON() ([]byte, error)

type Row

type Row struct {
	// Cells: Cells in the row.
	Cells []*Cell `json:"cells,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Cells") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Cells") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Row: Row representation.

func (*Row) MarshalJSON

func (s *Row) MarshalJSON() ([]byte, error)

type SavedReport

type SavedReport struct {
	// Name: Resource name of the report. Format:
	// accounts/{account}/reports/{report}
	Name string `json:"name,omitempty"`

	// Title: Report title as specified by publisher.
	Title string `json:"title,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Name") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Name") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

SavedReport: Representation of a saved report.

func (*SavedReport) MarshalJSON

func (s *SavedReport) 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

func New(client *http.Client) (*Service, error)

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

func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)

NewService creates a new Service.

type Site

type Site struct {
	// AutoAdsEnabled: Whether auto ads is turned on for the site.
	AutoAdsEnabled bool `json:"autoAdsEnabled,omitempty"`

	// Domain: Domain (or subdomain) of the site, e.g. "example.com" or
	// "www.example.com". This is used in the `OWNED_SITE_DOMAIN_NAME`
	// reporting dimension.
	Domain string `json:"domain,omitempty"`

	// Name: Resource name of a site. Format:
	// accounts/{account}/sites/{site}
	Name string `json:"name,omitempty"`

	// ReportingDimensionId: Output only. Unique ID of the site as used in
	// the `OWNED_SITE_ID` reporting dimension.
	ReportingDimensionId string `json:"reportingDimensionId,omitempty"`

	// State: Output only. State of a site.
	//
	// Possible values:
	//   "STATE_UNSPECIFIED" - State unspecified.
	//   "REQUIRES_REVIEW" - The site hasn't been checked yet.
	//   "GETTING_READY" - Running some checks on the site. This usually
	// takes a few days, but in some cases can take up to 2 weeks.
	//   "READY" - The site is ready to show ads.
	//   "NEEDS_ATTENTION" - Publisher needs to fix some issues before the
	// site is ready to show ads.
	State string `json:"state,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "AutoAdsEnabled") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AutoAdsEnabled") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

Site: Representation of a Site.

func (*Site) MarshalJSON

func (s *Site) MarshalJSON() ([]byte, error)

type TimeZone

type TimeZone struct {
	// Id: IANA Time Zone Database time zone, e.g. "America/New_York".
	Id string `json:"id,omitempty"`

	// Version: Optional. IANA Time Zone Database version number, e.g.
	// "2019a".
	Version string `json:"version,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Id") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Id") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

TimeZone: Represents a time zone from the IANA Time Zone Database (https://www.iana.org/time-zones).

func (*TimeZone) MarshalJSON

func (s *TimeZone) MarshalJSON() ([]byte, error)

type UrlChannel

type UrlChannel struct {
	// Name: Resource name of the URL channel. Format:
	// accounts/{account}/adclient/{adclient}/urlchannels/{urlchannel}
	Name string `json:"name,omitempty"`

	// ReportingDimensionId: Output only. Unique ID of the custom channel as
	// used in the `URL_CHANNEL_ID` reporting dimension.
	ReportingDimensionId string `json:"reportingDimensionId,omitempty"`

	// UriPattern: URI pattern of the channel. Does not include "http://" or
	// "https://". Example: www.example.com/home
	UriPattern string `json:"uriPattern,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Name") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Name") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

UrlChannel: Representation of a URL channel. URL channels allow you to track the performance of particular pages in your site; see URL channels (https://support.google.com/adsense/answer/2923836) for more information.

func (*UrlChannel) MarshalJSON

func (s *UrlChannel) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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