Movatterモバイル変換


[0]ホーム

URL:


adsense

package
v0.257.0Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License:BSD-3-ClauseImports:18Imported by:0

Details

Repository

github.com/googleapis/google-api-go-client

Links

Documentation

Overview

Package adsense provides access to the AdSense Management API.

For product documentation, see:https://developers.google.com/adsense/management/

Library status

These client libraries are officially supported by Google. However, thislibrary is considered complete and is in maintenance mode. This meansthat we will address critical bugs and security issues but will not addany new features.

When possible, we recommend using our newer[Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)that are still actively being worked and iterated on.

Creating a client

Usage example:

import "google.golang.org/api/adsense/v2"...ctx := context.Background()adsenseService, err := adsense.NewService(ctx)

In this example, Google Application Default Credentials are used forauthentication. For information on how to create and obtain ApplicationDefault Credentials, seehttps://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, usegoogle.golang.org/api/option.WithScopes:

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

To use an API key for authentication (note: some APIs do not support APIkeys), usegoogle.golang.org/api/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 OAuthflow, usegoogle.golang.org/api/option.WithTokenSource:

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

Seegoogle.golang.org/api/option.ClientOption for details on options.

Index

Constants

View Source
const (// View and manage your AdSense dataAdsenseScope = "https://www.googleapis.com/auth/adsense"// View your AdSense dataAdsenseReadonlyScope = "https://www.googleapis.com/auth/adsense.readonly")

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

typeAccount

type Account struct {// CreateTime: Output only. Creation time of the account.CreateTimestring `json:"createTime,omitempty"`// DisplayName: Output only. Display name of this account.DisplayNamestring `json:"displayName,omitempty"`// Name: Output only. Resource name of the account. Format: accounts/pub-[0-9]+Namestring `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 accounts have// access to additional spam-related metrics.Premiumbool `json:"premium,omitempty"`// State: Output only. State of the account.//// Possible values://   "STATE_UNSPECIFIED" - State unspecified.//   "READY" - The account is open and ready to serve ads.//   "NEEDS_ATTENTION" - There are some issues with this account. Publishers// should visit AdSense in order to fix the account.//   "CLOSED" - The account is closed and can't serve ads.Statestring `json:"state,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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CreateTime") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Account: Representation of an account.

func (Account)MarshalJSON

func (sAccount) MarshalJSON() ([]byte,error)

typeAccountsAdclientsAdunitsCreateCalladded inv0.98.0

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

func (*AccountsAdclientsAdunitsCreateCall)Contextadded inv0.98.0

Context sets the context to be used in this call's Do method.

func (*AccountsAdclientsAdunitsCreateCall)Doadded inv0.98.0

Do executes the "adsense.accounts.adclients.adunits.create" call.Any non-2xx status code is an error. Response headers are in either*AdUnit.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*AccountsAdclientsAdunitsCreateCall)Fieldsadded inv0.98.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsAdclientsAdunitsCreateCall)Headeradded inv0.98.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typeAccountsAdclientsAdunitsGetAdcodeCall

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

func (*AccountsAdclientsAdunitsGetAdcodeCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsAdclientsAdunitsGetAdcodeCall)Do

Do executes the "adsense.accounts.adclients.adunits.getAdcode" call.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 checkwhether the returned error was because http.StatusNotModified was returned.

func (*AccountsAdclientsAdunitsGetAdcodeCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsAdclientsAdunitsGetAdcodeCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsAdclientsAdunitsGetAdcodeCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

typeAccountsAdclientsAdunitsGetCall

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

func (*AccountsAdclientsAdunitsGetCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsAdclientsAdunitsGetCall)Do

Do executes the "adsense.accounts.adclients.adunits.get" call.Any non-2xx status code is an error. Response headers are in either*AdUnit.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*AccountsAdclientsAdunitsGetCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsAdclientsAdunitsGetCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsAdclientsAdunitsGetCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

typeAccountsAdclientsAdunitsListCall

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

func (*AccountsAdclientsAdunitsListCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsAdclientsAdunitsListCall)Do

Do executes the "adsense.accounts.adclients.adunits.list" call.Any non-2xx status code is an error. Response headers are in either*ListAdUnitsResponse.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.

func (*AccountsAdclientsAdunitsListCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsAdclientsAdunitsListCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsAdclientsAdunitsListCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*AccountsAdclientsAdunitsListCall)PageSize

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

func (*AccountsAdclientsAdunitsListCall)PageToken

PageToken sets the optional parameter "pageToken": A page token, receivedfrom a previous `ListAdUnits` call. Provide this to retrieve the subsequentpage. When paginating, all other parameters provided to `ListAdUnits` mustmatch 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.

typeAccountsAdclientsAdunitsListLinkedCustomChannelsCall

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

func (*AccountsAdclientsAdunitsListLinkedCustomChannelsCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsAdclientsAdunitsListLinkedCustomChannelsCall)Do

Do executes the "adsense.accounts.adclients.adunits.listLinkedCustomChannels" call.Any non-2xx status code is an error. Response headers are in either*ListLinkedCustomChannelsResponse.ServerResponse.Header or (if a responsewas returned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*AccountsAdclientsAdunitsListLinkedCustomChannelsCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsAdclientsAdunitsListLinkedCustomChannelsCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsAdclientsAdunitsListLinkedCustomChannelsCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*AccountsAdclientsAdunitsListLinkedCustomChannelsCall)PageSize

PageSize sets the optional parameter "pageSize": The maximum number ofcustom 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, receivedfrom a previous `ListLinkedCustomChannels` call. Provide this to retrievethe 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.

typeAccountsAdclientsAdunitsPatchCalladded inv0.98.0

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

func (*AccountsAdclientsAdunitsPatchCall)Contextadded inv0.98.0

Context sets the context to be used in this call's Do method.

func (*AccountsAdclientsAdunitsPatchCall)Doadded inv0.98.0

Do executes the "adsense.accounts.adclients.adunits.patch" call.Any non-2xx status code is an error. Response headers are in either*AdUnit.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*AccountsAdclientsAdunitsPatchCall)Fieldsadded inv0.98.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsAdclientsAdunitsPatchCall)Headeradded inv0.98.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsAdclientsAdunitsPatchCall)UpdateMaskadded inv0.98.0

UpdateMask sets the optional parameter "updateMask": The list of fields toupdate. If empty, a full update is performed.

typeAccountsAdclientsAdunitsService

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

funcNewAccountsAdclientsAdunitsService

func NewAccountsAdclientsAdunitsService(s *Service) *AccountsAdclientsAdunitsService

func (*AccountsAdclientsAdunitsService)Createadded inv0.98.0

Create: Creates an ad unit. This method can be called only by a restrictedset of projects, which are usually owned by AdSense for Platforms(https://developers.google.com/adsense/platforms/) publishers. Contact youraccount manager if you need to use this method. Note that ad units can onlybe created for ad clients with an "AFC" product code. For more info see theAdClient resource(/adsense/management/reference/rest/v2/accounts.adclients). For now, thismethod can only be used to create `DISPLAY` ad units. See:https://support.google.com/adsense/answer/9183566

  • parent: Ad client to create an ad unit under. Format:accounts/{account}/adclients/{adclient}.

func (*AccountsAdclientsAdunitsService)Get

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

  • name: AdUnit to get information about. Format:accounts/{account}/adclients/{adclient}/adunits/{adunit}.

func (*AccountsAdclientsAdunitsService)GetAdcode

GetAdcode: Gets the ad unit code for a given ad unit. For more information,see About the AdSense code(https://support.google.com/adsense/answer/9274634) and Where to place thead code in your HTML (https://support.google.com/adsense/answer/9190028).

  • 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 adunit.

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

func (*AccountsAdclientsAdunitsService)Patchadded inv0.98.0

Patch: Updates an ad unit. This method can be called only by a restrictedset of projects, which are usually owned by AdSense for Platforms(https://developers.google.com/adsense/platforms/) publishers. Contact youraccount manager if you need to use this method. For now, this method canonly be used to update `DISPLAY` ad units. See:https://support.google.com/adsense/answer/9183566

  • name: Output only. Resource name of the ad unit. Format:accounts/{account}/adclients/{adclient}/adunits/{adunit}.

typeAccountsAdclientsCustomchannelsCreateCalladded inv0.98.0

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

func (*AccountsAdclientsCustomchannelsCreateCall)Contextadded inv0.98.0

Context sets the context to be used in this call's Do method.

func (*AccountsAdclientsCustomchannelsCreateCall)Doadded inv0.98.0

Do executes the "adsense.accounts.adclients.customchannels.create" call.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 checkwhether the returned error was because http.StatusNotModified was returned.

func (*AccountsAdclientsCustomchannelsCreateCall)Fieldsadded inv0.98.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsAdclientsCustomchannelsCreateCall)Headeradded inv0.98.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typeAccountsAdclientsCustomchannelsDeleteCalladded inv0.98.0

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

func (*AccountsAdclientsCustomchannelsDeleteCall)Contextadded inv0.98.0

Context sets the context to be used in this call's Do method.

func (*AccountsAdclientsCustomchannelsDeleteCall)Doadded inv0.98.0

Do executes the "adsense.accounts.adclients.customchannels.delete" call.Any non-2xx status code is an error. Response headers are in either*Empty.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*AccountsAdclientsCustomchannelsDeleteCall)Fieldsadded inv0.98.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsAdclientsCustomchannelsDeleteCall)Headeradded inv0.98.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typeAccountsAdclientsCustomchannelsGetCall

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

func (*AccountsAdclientsCustomchannelsGetCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsAdclientsCustomchannelsGetCall)Do

Do executes the "adsense.accounts.adclients.customchannels.get" call.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 checkwhether the returned error was because http.StatusNotModified was returned.

func (*AccountsAdclientsCustomchannelsGetCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsAdclientsCustomchannelsGetCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsAdclientsCustomchannelsGetCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

typeAccountsAdclientsCustomchannelsListCall

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

func (*AccountsAdclientsCustomchannelsListCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsAdclientsCustomchannelsListCall)Do

Do executes the "adsense.accounts.adclients.customchannels.list" call.Any non-2xx status code is an error. Response headers are in either*ListCustomChannelsResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*AccountsAdclientsCustomchannelsListCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsAdclientsCustomchannelsListCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsAdclientsCustomchannelsListCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*AccountsAdclientsCustomchannelsListCall)PageSize

PageSize sets the optional parameter "pageSize": The maximum number ofcustom 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, receivedfrom a previous `ListCustomChannels` call. Provide this to retrieve thesubsequent 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.

typeAccountsAdclientsCustomchannelsListLinkedAdUnitsCall

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

func (*AccountsAdclientsCustomchannelsListLinkedAdUnitsCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsAdclientsCustomchannelsListLinkedAdUnitsCall)Do

Do executes the "adsense.accounts.adclients.customchannels.listLinkedAdUnits" call.Any non-2xx status code is an error. Response headers are in either*ListLinkedAdUnitsResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*AccountsAdclientsCustomchannelsListLinkedAdUnitsCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsAdclientsCustomchannelsListLinkedAdUnitsCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsAdclientsCustomchannelsListLinkedAdUnitsCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*AccountsAdclientsCustomchannelsListLinkedAdUnitsCall)PageSize

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

func (*AccountsAdclientsCustomchannelsListLinkedAdUnitsCall)PageToken

PageToken sets the optional parameter "pageToken": A page token, receivedfrom a previous `ListLinkedAdUnits` call. Provide this to retrieve thesubsequent 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.

typeAccountsAdclientsCustomchannelsPatchCalladded inv0.98.0

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

func (*AccountsAdclientsCustomchannelsPatchCall)Contextadded inv0.98.0

Context sets the context to be used in this call's Do method.

func (*AccountsAdclientsCustomchannelsPatchCall)Doadded inv0.98.0

Do executes the "adsense.accounts.adclients.customchannels.patch" call.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 checkwhether the returned error was because http.StatusNotModified was returned.

func (*AccountsAdclientsCustomchannelsPatchCall)Fieldsadded inv0.98.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsAdclientsCustomchannelsPatchCall)Headeradded inv0.98.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsAdclientsCustomchannelsPatchCall)UpdateMaskadded inv0.98.0

UpdateMask sets the optional parameter "updateMask": The list of fields toupdate. If empty, a full update is performed.

typeAccountsAdclientsCustomchannelsService

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

func (*AccountsAdclientsCustomchannelsService)Createadded inv0.98.0

Create: Creates a custom channel. This method can be called only by arestricted set of projects, which are usually owned by AdSense for Platforms(https://developers.google.com/adsense/platforms/) publishers. Contact youraccount manager if you need to use this method.

  • parent: The ad client to create a custom channel under. Format:accounts/{account}/adclients/{adclient}.

func (*AccountsAdclientsCustomchannelsService)Deleteadded inv0.98.0

Delete: Deletes a custom channel. This method can be called only by arestricted set of projects, which are usually owned by AdSense for Platforms(https://developers.google.com/adsense/platforms/) publishers. Contact youraccount manager if you need to use this method.

  • name: Name of the custom channel to delete. Format:accounts/{account}/adclients/{adclient}/customchannels/{customchannel}.

func (*AccountsAdclientsCustomchannelsService)Get

Get: Gets information about the selected custom channel.

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

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/{customchannel}.

func (*AccountsAdclientsCustomchannelsService)Patchadded inv0.98.0

Patch: Updates a custom channel. This method can be called only by arestricted set of projects, which are usually owned by AdSense for Platforms(https://developers.google.com/adsense/platforms/) publishers. Contact youraccount manager if you need to use this method.

  • name: Output only. Resource name of the custom channel. Format:accounts/{account}/adclients/{adclient}/customchannels/{customchannel}.

typeAccountsAdclientsGetAdcodeCall

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

func (*AccountsAdclientsGetAdcodeCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsAdclientsGetAdcodeCall)Do

Do executes the "adsense.accounts.adclients.getAdcode" call.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 checkwhether the returned error was because http.StatusNotModified was returned.

func (*AccountsAdclientsGetAdcodeCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsAdclientsGetAdcodeCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsAdclientsGetAdcodeCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

typeAccountsAdclientsGetCalladded inv0.79.0

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

func (*AccountsAdclientsGetCall)Contextadded inv0.79.0

Context sets the context to be used in this call's Do method.

func (*AccountsAdclientsGetCall)Doadded inv0.79.0

Do executes the "adsense.accounts.adclients.get" call.Any non-2xx status code is an error. Response headers are in either*AdClient.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*AccountsAdclientsGetCall)Fieldsadded inv0.79.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsAdclientsGetCall)Headeradded inv0.79.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsAdclientsGetCall)IfNoneMatchadded inv0.79.0

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

typeAccountsAdclientsListCall

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

func (*AccountsAdclientsListCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsAdclientsListCall)Do

Do executes the "adsense.accounts.adclients.list" call.Any non-2xx status code is an error. Response headers are in either*ListAdClientsResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.

func (*AccountsAdclientsListCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsAdclientsListCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsAdclientsListCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*AccountsAdclientsListCall)PageSize

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

func (*AccountsAdclientsListCall)PageToken

PageToken sets the optional parameter "pageToken": A page token, receivedfrom a previous `ListAdClients` call. Provide this to retrieve thesubsequent 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.

typeAccountsAdclientsService

type AccountsAdclientsService struct {Adunits *AccountsAdclientsAdunitsServiceCustomchannels *AccountsAdclientsCustomchannelsServiceUrlchannels *AccountsAdclientsUrlchannelsService// contains filtered or unexported fields}

funcNewAccountsAdclientsService

func NewAccountsAdclientsService(s *Service) *AccountsAdclientsService

func (*AccountsAdclientsService)Getadded inv0.79.0

Get: Gets the ad client from the given resource name.

  • name: The name of the ad client to retrieve. Format:accounts/{account}/adclients/{adclient}.

func (*AccountsAdclientsService)GetAdcode

GetAdcode: Gets the AdSense code for a given ad client. This returns whatwas previously known as the 'auto ad code'. This is only supported for adclients with a product_code of AFC. For more information, see About theAdSense 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}.

typeAccountsAdclientsUrlchannelsGetCalladded inv0.79.0

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

func (*AccountsAdclientsUrlchannelsGetCall)Contextadded inv0.79.0

Context sets the context to be used in this call's Do method.

func (*AccountsAdclientsUrlchannelsGetCall)Doadded inv0.79.0

Do executes the "adsense.accounts.adclients.urlchannels.get" call.Any non-2xx status code is an error. Response headers are in either*UrlChannel.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*AccountsAdclientsUrlchannelsGetCall)Fieldsadded inv0.79.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsAdclientsUrlchannelsGetCall)Headeradded inv0.79.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsAdclientsUrlchannelsGetCall)IfNoneMatchadded inv0.79.0

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

typeAccountsAdclientsUrlchannelsListCall

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

func (*AccountsAdclientsUrlchannelsListCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsAdclientsUrlchannelsListCall)Do

Do executes the "adsense.accounts.adclients.urlchannels.list" call.Any non-2xx status code is an error. Response headers are in either*ListUrlChannelsResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*AccountsAdclientsUrlchannelsListCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsAdclientsUrlchannelsListCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsAdclientsUrlchannelsListCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*AccountsAdclientsUrlchannelsListCall)PageSize

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

func (*AccountsAdclientsUrlchannelsListCall)PageToken

PageToken sets the optional parameter "pageToken": A page token, receivedfrom a previous `ListUrlChannels` call. Provide this to retrieve thesubsequent 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.

typeAccountsAdclientsUrlchannelsService

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

func (*AccountsAdclientsUrlchannelsService)Getadded inv0.79.0

Get: Gets information about the selected url channel.

  • name: The name of the url channel to retrieve. Format:accounts/{account}/adclients/{adclient}/urlchannels/{urlchannel}.

func (*AccountsAdclientsUrlchannelsService)List

List: Lists active url channels.

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

typeAccountsAlertsListCall

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

func (*AccountsAlertsListCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsAlertsListCall)Do

Do executes the "adsense.accounts.alerts.list" call.Any non-2xx status code is an error. Response headers are in either*ListAlertsResponse.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.

func (*AccountsAlertsListCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsAlertsListCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsAlertsListCall)IfNoneMatch

func (c *AccountsAlertsListCall) IfNoneMatch(entityTagstring) *AccountsAlertsListCall

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*AccountsAlertsListCall)LanguageCode

func (c *AccountsAlertsListCall) LanguageCode(languageCodestring) *AccountsAlertsListCall

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

typeAccountsAlertsService

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

funcNewAccountsAlertsService

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}.

typeAccountsGetAdBlockingRecoveryTagCalladded inv0.94.0

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

func (*AccountsGetAdBlockingRecoveryTagCall)Contextadded inv0.94.0

Context sets the context to be used in this call's Do method.

func (*AccountsGetAdBlockingRecoveryTagCall)Doadded inv0.94.0

Do executes the "adsense.accounts.getAdBlockingRecoveryTag" call.Any non-2xx status code is an error. Response headers are in either*AdBlockingRecoveryTag.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.

func (*AccountsGetAdBlockingRecoveryTagCall)Fieldsadded inv0.94.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsGetAdBlockingRecoveryTagCall)Headeradded inv0.94.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsGetAdBlockingRecoveryTagCall)IfNoneMatchadded inv0.94.0

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

typeAccountsGetCall

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

func (*AccountsGetCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsGetCall)Do

Do executes the "adsense.accounts.get" call.Any non-2xx status code is an error. Response headers are in either*Account.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*AccountsGetCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsGetCall)Header

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

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsGetCall)IfNoneMatch

func (c *AccountsGetCall) IfNoneMatch(entityTagstring) *AccountsGetCall

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

typeAccountsListCall

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

func (*AccountsListCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsListCall)Do

Do executes the "adsense.accounts.list" call.Any non-2xx status code is an error. Response headers are in either*ListAccountsResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.

func (*AccountsListCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsListCall)Header

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

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsListCall)IfNoneMatch

func (c *AccountsListCall) IfNoneMatch(entityTagstring) *AccountsListCall

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*AccountsListCall)PageSize

func (c *AccountsListCall) PageSize(pageSizeint64) *AccountsListCall

PageSize sets the optional parameter "pageSize": The maximum number ofaccounts to include in the response, used for paging. If unspecified, atmost 10000 accounts will be returned. The maximum value is 10000; valuesabove 10000 will be coerced to 10000.

func (*AccountsListCall)PageToken

func (c *AccountsListCall) PageToken(pageTokenstring) *AccountsListCall

PageToken sets the optional parameter "pageToken": A page token, receivedfrom a previous `ListAccounts` call. Provide this to retrieve the subsequentpage. When paginating, all other parameters provided to `ListAccounts` mustmatch 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.

typeAccountsListChildAccountsCall

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

func (*AccountsListChildAccountsCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsListChildAccountsCall)Do

Do executes the "adsense.accounts.listChildAccounts" call.Any non-2xx status code is an error. Response headers are in either*ListChildAccountsResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*AccountsListChildAccountsCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsListChildAccountsCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsListChildAccountsCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*AccountsListChildAccountsCall)PageSize

PageSize sets the optional parameter "pageSize": The maximum number ofaccounts to include in the response, used for paging. If unspecified, atmost 10000 accounts will be returned. The maximum value is 10000; valuesabove 10000 will be coerced to 10000.

func (*AccountsListChildAccountsCall)PageToken

PageToken sets the optional parameter "pageToken": A page token, receivedfrom a previous `ListChildAccounts` call. Provide this to retrieve thesubsequent page. When paginating, all other parameters provided to`ListChildAccounts` 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.

typeAccountsPaymentsListCall

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

func (*AccountsPaymentsListCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsPaymentsListCall)Do

Do executes the "adsense.accounts.payments.list" call.Any non-2xx status code is an error. Response headers are in either*ListPaymentsResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.

func (*AccountsPaymentsListCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsPaymentsListCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsPaymentsListCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

typeAccountsPaymentsService

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

funcNewAccountsPaymentsService

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}.

typeAccountsPolicyIssuesGetCalladded inv0.147.0

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

func (*AccountsPolicyIssuesGetCall)Contextadded inv0.147.0

Context sets the context to be used in this call's Do method.

func (*AccountsPolicyIssuesGetCall)Doadded inv0.147.0

Do executes the "adsense.accounts.policyIssues.get" call.Any non-2xx status code is an error. Response headers are in either*PolicyIssue.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*AccountsPolicyIssuesGetCall)Fieldsadded inv0.147.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsPolicyIssuesGetCall)Headeradded inv0.147.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsPolicyIssuesGetCall)IfNoneMatchadded inv0.147.0

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

typeAccountsPolicyIssuesListCalladded inv0.147.0

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

func (*AccountsPolicyIssuesListCall)Contextadded inv0.147.0

Context sets the context to be used in this call's Do method.

func (*AccountsPolicyIssuesListCall)Doadded inv0.147.0

Do executes the "adsense.accounts.policyIssues.list" call.Any non-2xx status code is an error. Response headers are in either*ListPolicyIssuesResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*AccountsPolicyIssuesListCall)Fieldsadded inv0.147.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsPolicyIssuesListCall)Headeradded inv0.147.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsPolicyIssuesListCall)IfNoneMatchadded inv0.147.0

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*AccountsPolicyIssuesListCall)PageSizeadded inv0.147.0

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

func (*AccountsPolicyIssuesListCall)PageTokenadded inv0.147.0

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

func (*AccountsPolicyIssuesListCall)Pagesadded inv0.147.0

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.

typeAccountsPolicyIssuesServiceadded inv0.147.0

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

funcNewAccountsPolicyIssuesServiceadded inv0.147.0

func NewAccountsPolicyIssuesService(s *Service) *AccountsPolicyIssuesService

func (*AccountsPolicyIssuesService)Getadded inv0.147.0

Get: Gets information about the selected policy issue.

  • name: Name of the policy issue. Format:accounts/{account}/policyIssues/{policy_issue}.

func (*AccountsPolicyIssuesService)Listadded inv0.147.0

List: Lists all the policy issues where the specified account is involved,both directly and through any AFP child accounts.

  • parent: The account for which policy issues are being retrieved. Format:accounts/{account}.

typeAccountsReportsGenerateCall

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

func (*AccountsReportsGenerateCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsReportsGenerateCall)CurrencyCode

CurrencyCode sets the optional parameter "currencyCode": The ISO-4217currency code (https://en.wikipedia.org/wiki/ISO_4217) to use when reportingon 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

Dimensions sets the optional parameter "dimensions": Dimensions to base thereport 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 bythe language_code specified in a report generation request (so e.g. thiswould 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.

"HOSTED_AD_CLIENT_ID" - Unique ID of a sub-account's ad client. The

members of this dimension match the values fromAdClient.reporting_dimension_id (for the sub-account).

"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 fromAdUnit.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.

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

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

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

dimension match the values from Site.reporting_dimension_id.

"PAGE_URL" - URL of the page upon which the ad was served. This is a

complete URL including scheme and query parameters. Note that the URL thatappears in this dimension may be a canonicalized version of the one that wasused in the original request, and so may not exactly match the URL that auser might have seen. Note that there are also some caveats to be aware ofwhen using this dimension. For more information, see [Page URLbreakdown](https://support.google.com/adsense/answer/11988478).

"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").

"TRAFFIC_SOURCE_NAME" - Localized traffic source name (e.g. "Google",

"Bing", "Facebook", "Other"). For more information, see [Traffic sourcebreakdown](https://support.google.com/adsense/answer/16474600).

"TRAFFIC_SOURCE_CODE" - Traffic source code (e.g. "GOOGLE", "BING",

"FACEBOOK", "OTHER"). For more information, see [Traffic sourcebreakdown](https://support.google.com/adsense/answer/16474600).

"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").

"AD_FORMAT_NAME" - Localized ad format name indicating the way an ad is

shown to the users on your site (e.g. "In-page", "Anchor", "Vignette").

"AD_FORMAT_CODE" - Ad format code indicating the way an ad is shown to the

users on your site (e.g. "ON_PAGE", "ANCHOR", "INTERSTITIAL").

"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.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 checkwhether the returned error was because http.StatusNotModified was returned.

func (*AccountsReportsGenerateCall)EndDateDay

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

func (*AccountsReportsGenerateCall)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 (*AccountsReportsGenerateCall)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 (*AccountsReportsGenerateCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsReportsGenerateCall)Filters

Filters sets the optional parameter "filters": A list of filters(/adsense/management/reporting/filtering) to apply to the report. Allprovided filters must match in order for the data to be included in thereport.

func (*AccountsReportsGenerateCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsReportsGenerateCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*AccountsReportsGenerateCall)LanguageCode

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

func (*AccountsReportsGenerateCall)Limit

Limit sets the optional parameter "limit": The maximum number of rows ofreport data to return. Reports producing more rows than the requested limitwill 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 beidentified (for `Reports.GenerateReport` only) by comparing the number ofrows 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, ormultiple individual ad impressions depending on the size of the ad unit andwhether 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 andhas begun to load. It is the number of ad units (for content ads) or searchqueries (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 begunto 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 ormore ads. Also, the number of ads in an ad unit may vary depending onwhether the ad unit is displaying standard text ads, expanded text ads orimage 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 [premiumaccounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).

"AD_REQUESTS_SPAM_RATIO" - Fraction of ad requests considered to be spam.

Only available to [premiumaccounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).

"MATCHED_AD_REQUESTS_SPAM_RATIO" - Fraction of ad requests that returned

ads considered to be spam. Only available to [premiumaccounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).

"IMPRESSIONS_SPAM_RATIO" - Fraction of impressions considered to be spam.

Only available to [premiumaccounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).

"INDIVIDUAL_AD_IMPRESSIONS_SPAM_RATIO" - Fraction of ad impressions

considered to be spam. Only available to [premiumaccounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).

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

available to [premiumaccounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).

"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 estimateddue 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 by1000.

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

by dividing estimated revenue by the number of ad requests multiplied by1000.

"MATCHED_AD_REQUESTS_RPM" - Revenue per thousand matched ad requests. This

is calculated by dividing estimated revenue by the number of matched adrequests multiplied by 1000.

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

calculated by dividing estimated revenue by the number of ad impressionsmultiplied by 1000.

"INDIVIDUAL_AD_IMPRESSIONS_RPM" - Revenue per thousand individual ad

impressions. This is calculated by dividing estimated revenue by the numberof 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 ofclicks received.

"ADS_PER_IMPRESSION" - Number of ad views per impression."TOTAL_EARNINGS" - Total earnings are the gross estimated earnings from

revenue shared traffic before any parent and child account revenue share isapplied.

"WEBSEARCH_RESULT_PAGES" - Number of results pages. This metric can only

be used when generating a report in the Google timezone, not the accounttimezone. Since the account timezone is the default for report generation,this metric can only be used by explicitly specifying`reportingTimeZone=GOOGLE_TIME_ZONE`.

"FUNNEL_REQUESTS" - Number of requests for non-ad units (for example a

related search unit). For more information, see [Funnelrequests](https://support.google.com/adsense/answer/11586959).

"FUNNEL_IMPRESSIONS" - Number of requests for non-ad units ads that

returned content that was shown to the user. For more information, see[Funnel impressions](https://support.google.com/adsense/answer/11585767).

"FUNNEL_CLICKS" - Number of times a user clicked on a non-ad unit,

triggering further ad requests. For more information, see [Funnelclicks](https://support.google.com/adsense/answer/11586382).

"FUNNEL_RPM" - Revenue per thousand funnel impressions. This is calculated

by dividing estimated revenue by the number of funnel impressions multipliedby 1000. For more information, see [FunnelRPM](https://support.google.com/adsense/answer/11585979).

func (*AccountsReportsGenerateCall)OrderBy

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

func (*AccountsReportsGenerateCall)ReportingTimeZone

func (c *AccountsReportsGenerateCall) ReportingTimeZone(reportingTimeZonestring) *AccountsReportsGenerateCall

ReportingTimeZone sets the optional parameter "reportingTimeZone": Timezonein which to generate the report. If unspecified, this defaults to theaccount timezone. For more information, see changing the time zone of yourreports (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

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 ayear by itself or a year and month where the day isn't significant.

func (*AccountsReportsGenerateCall)StartDateMonth

func (c *AccountsReportsGenerateCall) StartDateMonth(startDateMonthint64) *AccountsReportsGenerateCall

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

func (*AccountsReportsGenerateCall)StartDateYear

func (c *AccountsReportsGenerateCall) StartDateYear(startDateYearint64) *AccountsReportsGenerateCall

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

typeAccountsReportsGenerateCsvCall

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

func (*AccountsReportsGenerateCsvCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsReportsGenerateCsvCall)CurrencyCode

CurrencyCode sets the optional parameter "currencyCode": The ISO-4217currency code (https://en.wikipedia.org/wiki/ISO_4217) to use when reportingon 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 thereport 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 bythe language_code specified in a report generation request (so e.g. thiswould 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.

"HOSTED_AD_CLIENT_ID" - Unique ID of a sub-account's ad client. The

members of this dimension match the values fromAdClient.reporting_dimension_id (for the sub-account).

"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 fromAdUnit.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.

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

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

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

dimension match the values from Site.reporting_dimension_id.

"PAGE_URL" - URL of the page upon which the ad was served. This is a

complete URL including scheme and query parameters. Note that the URL thatappears in this dimension may be a canonicalized version of the one that wasused in the original request, and so may not exactly match the URL that auser might have seen. Note that there are also some caveats to be aware ofwhen using this dimension. For more information, see [Page URLbreakdown](https://support.google.com/adsense/answer/11988478).

"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").

"TRAFFIC_SOURCE_NAME" - Localized traffic source name (e.g. "Google",

"Bing", "Facebook", "Other"). For more information, see [Traffic sourcebreakdown](https://support.google.com/adsense/answer/16474600).

"TRAFFIC_SOURCE_CODE" - Traffic source code (e.g. "GOOGLE", "BING",

"FACEBOOK", "OTHER"). For more information, see [Traffic sourcebreakdown](https://support.google.com/adsense/answer/16474600).

"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").

"AD_FORMAT_NAME" - Localized ad format name indicating the way an ad is

shown to the users on your site (e.g. "In-page", "Anchor", "Vignette").

"AD_FORMAT_CODE" - Ad format code indicating the way an ad is shown to the

users on your site (e.g. "ON_PAGE", "ANCHOR", "INTERSTITIAL").

"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.Any non-2xx status code is an error. Response headers are in either*HttpBody.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*AccountsReportsGenerateCsvCall)EndDateDay

EndDateDay sets the optional parameter "endDate.day": Day of a month. Mustbe from 1 to 31 and valid for the year and month, or 0 to specify a year byitself 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. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsReportsGenerateCsvCall)Filters

Filters sets the optional parameter "filters": A list of filters(/adsense/management/reporting/filtering) to apply to the report. Allprovided filters must match in order for the data to be included in thereport.

func (*AccountsReportsGenerateCsvCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsReportsGenerateCsvCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*AccountsReportsGenerateCsvCall)LanguageCode

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

func (*AccountsReportsGenerateCsvCall)Limit

Limit sets the optional parameter "limit": The maximum number of rows ofreport data to return. Reports producing more rows than the requested limitwill 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 beidentified (for `Reports.GenerateReport` only) by comparing the number ofrows 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, ormultiple individual ad impressions depending on the size of the ad unit andwhether 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 andhas begun to load. It is the number of ad units (for content ads) or searchqueries (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 begunto 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 ormore ads. Also, the number of ads in an ad unit may vary depending onwhether the ad unit is displaying standard text ads, expanded text ads orimage 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 [premiumaccounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).

"AD_REQUESTS_SPAM_RATIO" - Fraction of ad requests considered to be spam.

Only available to [premiumaccounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).

"MATCHED_AD_REQUESTS_SPAM_RATIO" - Fraction of ad requests that returned

ads considered to be spam. Only available to [premiumaccounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).

"IMPRESSIONS_SPAM_RATIO" - Fraction of impressions considered to be spam.

Only available to [premiumaccounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).

"INDIVIDUAL_AD_IMPRESSIONS_SPAM_RATIO" - Fraction of ad impressions

considered to be spam. Only available to [premiumaccounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).

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

available to [premiumaccounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).

"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 estimateddue 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 by1000.

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

by dividing estimated revenue by the number of ad requests multiplied by1000.

"MATCHED_AD_REQUESTS_RPM" - Revenue per thousand matched ad requests. This

is calculated by dividing estimated revenue by the number of matched adrequests multiplied by 1000.

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

calculated by dividing estimated revenue by the number of ad impressionsmultiplied by 1000.

"INDIVIDUAL_AD_IMPRESSIONS_RPM" - Revenue per thousand individual ad

impressions. This is calculated by dividing estimated revenue by the numberof 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 ofclicks received.

"ADS_PER_IMPRESSION" - Number of ad views per impression."TOTAL_EARNINGS" - Total earnings are the gross estimated earnings from

revenue shared traffic before any parent and child account revenue share isapplied.

"WEBSEARCH_RESULT_PAGES" - Number of results pages. This metric can only

be used when generating a report in the Google timezone, not the accounttimezone. Since the account timezone is the default for report generation,this metric can only be used by explicitly specifying`reportingTimeZone=GOOGLE_TIME_ZONE`.

"FUNNEL_REQUESTS" - Number of requests for non-ad units (for example a

related search unit). For more information, see [Funnelrequests](https://support.google.com/adsense/answer/11586959).

"FUNNEL_IMPRESSIONS" - Number of requests for non-ad units ads that

returned content that was shown to the user. For more information, see[Funnel impressions](https://support.google.com/adsense/answer/11585767).

"FUNNEL_CLICKS" - Number of times a user clicked on a non-ad unit,

triggering further ad requests. For more information, see [Funnelclicks](https://support.google.com/adsense/answer/11586382).

"FUNNEL_RPM" - Revenue per thousand funnel impressions. This is calculated

by dividing estimated revenue by the number of funnel impressions multipliedby 1000. For more information, see [FunnelRPM](https://support.google.com/adsense/answer/11585979).

func (*AccountsReportsGenerateCsvCall)OrderBy

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

func (*AccountsReportsGenerateCsvCall)ReportingTimeZone

func (c *AccountsReportsGenerateCsvCall) ReportingTimeZone(reportingTimeZonestring) *AccountsReportsGenerateCsvCall

ReportingTimeZone sets the optional parameter "reportingTimeZone": Timezonein which to generate the report. If unspecified, this defaults to theaccount timezone. For more information, see changing the time zone of yourreports (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 ayear by itself or a year and month where the day isn't significant.

func (*AccountsReportsGenerateCsvCall)StartDateMonth

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

func (*AccountsReportsGenerateCsvCall)StartDateYear

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

typeAccountsReportsGetSavedCalladded inv0.79.0

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

func (*AccountsReportsGetSavedCall)Contextadded inv0.79.0

Context sets the context to be used in this call's Do method.

func (*AccountsReportsGetSavedCall)Doadded inv0.79.0

Do executes the "adsense.accounts.reports.getSaved" call.Any non-2xx status code is an error. Response headers are in either*SavedReport.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*AccountsReportsGetSavedCall)Fieldsadded inv0.79.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsReportsGetSavedCall)Headeradded inv0.79.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsReportsGetSavedCall)IfNoneMatchadded inv0.79.0

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

typeAccountsReportsSavedGenerateCall

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

func (*AccountsReportsSavedGenerateCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsReportsSavedGenerateCall)CurrencyCode

CurrencyCode sets the optional parameter "currencyCode": The ISO-4217currency code (https://en.wikipedia.org/wiki/ISO_4217) to use when reportingon 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.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 checkwhether the returned error was because http.StatusNotModified was returned.

func (*AccountsReportsSavedGenerateCall)EndDateDay

EndDateDay sets the optional parameter "endDate.day": Day of a month. Mustbe from 1 to 31 and valid for the year and month, or 0 to specify a year byitself 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. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsReportsSavedGenerateCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsReportsSavedGenerateCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*AccountsReportsSavedGenerateCall)LanguageCode

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

func (*AccountsReportsSavedGenerateCall)ReportingTimeZone

func (c *AccountsReportsSavedGenerateCall) ReportingTimeZone(reportingTimeZonestring) *AccountsReportsSavedGenerateCall

ReportingTimeZone sets the optional parameter "reportingTimeZone": Timezonein which to generate the report. If unspecified, this defaults to theaccount timezone. For more information, see changing the time zone of yourreports (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 ayear by itself or a year and month where the day isn't significant.

func (*AccountsReportsSavedGenerateCall)StartDateMonth

StartDateMonth sets the optional parameter "startDate.month": Month of ayear. 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 thedate. Must be from 1 to 9999, or 0 to specify a date without a year.

typeAccountsReportsSavedGenerateCsvCall

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

func (*AccountsReportsSavedGenerateCsvCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsReportsSavedGenerateCsvCall)CurrencyCode

CurrencyCode sets the optional parameter "currencyCode": The ISO-4217currency code (https://en.wikipedia.org/wiki/ISO_4217) to use when reportingon 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.Any non-2xx status code is an error. Response headers are in either*HttpBody.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*AccountsReportsSavedGenerateCsvCall)EndDateDay

EndDateDay sets the optional parameter "endDate.day": Day of a month. Mustbe from 1 to 31 and valid for the year and month, or 0 to specify a year byitself 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. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsReportsSavedGenerateCsvCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsReportsSavedGenerateCsvCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*AccountsReportsSavedGenerateCsvCall)LanguageCode

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

func (*AccountsReportsSavedGenerateCsvCall)ReportingTimeZone

ReportingTimeZone sets the optional parameter "reportingTimeZone": Timezonein which to generate the report. If unspecified, this defaults to theaccount timezone. For more information, see changing the time zone of yourreports (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 ayear 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 ayear. 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 thedate. Must be from 1 to 9999, or 0 to specify a date without a year.

typeAccountsReportsSavedListCall

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

func (*AccountsReportsSavedListCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsReportsSavedListCall)Do

Do executes the "adsense.accounts.reports.saved.list" call.Any non-2xx status code is an error. Response headers are in either*ListSavedReportsResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*AccountsReportsSavedListCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsReportsSavedListCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsReportsSavedListCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*AccountsReportsSavedListCall)PageSize

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

func (*AccountsReportsSavedListCall)PageToken

PageToken sets the optional parameter "pageToken": A page token, receivedfrom a previous `ListSavedReports` call. Provide this to retrieve thesubsequent page. When paginating, all other parameters provided to`ListSavedReports` 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.

typeAccountsReportsSavedService

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

funcNewAccountsReportsSavedService

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}.

typeAccountsReportsService

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

funcNewAccountsReportsService

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}.

func (*AccountsReportsService)GetSavedadded inv0.79.0

GetSaved: Gets the saved report from the given resource name.

  • name: The name of the saved report to retrieve. Format:accounts/{account}/reports/{report}.

typeAccountsService

type AccountsService struct {Adclients *AccountsAdclientsServiceAlerts *AccountsAlertsServicePayments *AccountsPaymentsServicePolicyIssues *AccountsPolicyIssuesServiceReports *AccountsReportsServiceSites *AccountsSitesService// contains filtered or unexported fields}

funcNewAccountsService

func NewAccountsService(s *Service) *AccountsService

func (*AccountsService)Get

Get: Gets information about the selected AdSense account.

- name: Account to get information about. Format: accounts/{account}.

func (*AccountsService)GetAdBlockingRecoveryTagadded inv0.94.0

func (r *AccountsService) GetAdBlockingRecoveryTag(namestring) *AccountsGetAdBlockingRecoveryTagCall

GetAdBlockingRecoveryTag: Gets the ad blocking recovery tag of an account.

  • name: The name of the account to get the tag for. Format:accounts/{account}.

func (*AccountsService)List

List: Lists all accounts available to this user.

func (*AccountsService)ListChildAccounts

func (r *AccountsService) ListChildAccounts(parentstring) *AccountsListChildAccountsCall

ListChildAccounts: Lists all accounts directly managed by the given AdSenseaccount.

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

typeAccountsSitesGetCall

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

func (*AccountsSitesGetCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsSitesGetCall)Do

Do executes the "adsense.accounts.sites.get" call.Any non-2xx status code is an error. Response headers are in either*Site.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*AccountsSitesGetCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsSitesGetCall)Header

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

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsSitesGetCall)IfNoneMatch

func (c *AccountsSitesGetCall) IfNoneMatch(entityTagstring) *AccountsSitesGetCall

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

typeAccountsSitesListCall

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

func (*AccountsSitesListCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsSitesListCall)Do

Do executes the "adsense.accounts.sites.list" call.Any non-2xx status code is an error. Response headers are in either*ListSitesResponse.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.

func (*AccountsSitesListCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsSitesListCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsSitesListCall)IfNoneMatch

func (c *AccountsSitesListCall) IfNoneMatch(entityTagstring) *AccountsSitesListCall

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*AccountsSitesListCall)PageSize

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

func (*AccountsSitesListCall)PageToken

func (c *AccountsSitesListCall) PageToken(pageTokenstring) *AccountsSitesListCall

PageToken sets the optional parameter "pageToken": A page token, receivedfrom a previous `ListSites` call. Provide this to retrieve the subsequentpage. When paginating, all other parameters provided to `ListSites` mustmatch 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.

typeAccountsSitesService

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

funcNewAccountsSitesService

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}.

typeAdBlockingRecoveryTagadded inv0.94.0

type AdBlockingRecoveryTag struct {// ErrorProtectionCode: Error protection code that can be used in conjunction// with the tag. It'll display a message to users if an ad blocking extension// blocks their access to your site// (https://support.google.com/adsense/answer/11575480).ErrorProtectionCodestring `json:"errorProtectionCode,omitempty"`// Tag: The ad blocking recovery tag. Note that the message generated by the// tag can be blocked by an ad blocking extension. If this is not your desired// outcome, then you'll need to use it in conjunction with the error protection// code.Tagstring `json:"tag,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "ErrorProtectionCode") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ErrorProtectionCode") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

AdBlockingRecoveryTag: Representation of an ad blocking recovery tag. Seehttps://support.google.com/adsense/answer/11575177.

func (AdBlockingRecoveryTag)MarshalJSONadded inv0.94.0

func (sAdBlockingRecoveryTag) MarshalJSON() ([]byte,error)

typeAdClient

type AdClient struct {// Name: Output only. Resource name of the ad client. Format:// accounts/{account}/adclients/{adclient}Namestring `json:"name,omitempty"`// ProductCode: Output only. Reporting product code of the ad client. For// example, "AFC" for AdSense for Content. Corresponds to the `PRODUCT_CODE`// dimension, and present only if the ad client supports reporting.ProductCodestring `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.ReportingDimensionIdstring `json:"reportingDimensionId,omitempty"`// State: Output only. State of the ad client.//// Possible values://   "STATE_UNSPECIFIED" - State unspecified.//   "READY" - The ad client is ready to show ads.//   "GETTING_READY" - Running some checks on the ad client before it is ready// to serve ads.//   "REQUIRES_REVIEW" - The ad client hasn't been checked yet. There are tasks// pending before AdSense will start the review.Statestring `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. "Name") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Name") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

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

func (AdClient)MarshalJSON

func (sAdClient) MarshalJSON() ([]byte,error)

typeAdClientAdCode

type AdClientAdCode struct {// AdCode: Output only. The AdSense code snippet to add to the head of an HTML// page.AdCodestring `json:"adCode,omitempty"`// AmpBody: Output only. The AdSense code snippet to add to the body of an AMP// page.AmpBodystring `json:"ampBody,omitempty"`// AmpHead: Output only. The AdSense code snippet to add to the head of an AMP// page.AmpHeadstring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AdCode") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

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 (sAdClientAdCode) MarshalJSON() ([]byte,error)

typeAdUnit

type AdUnit struct {// ContentAdsSettings: Required. Settings specific to content ads (AFC).ContentAdsSettings *ContentAdsSettings `json:"contentAdsSettings,omitempty"`// DisplayName: Required. Display name of the ad unit, as provided when the ad// unit was created.DisplayNamestring `json:"displayName,omitempty"`// Name: Output only. Resource name of the ad unit. Format:// accounts/{account}/adclients/{adclient}/adunits/{adunit}Namestring `json:"name,omitempty"`// ReportingDimensionId: Output only. Unique ID of the ad unit as used in the// `AD_UNIT_ID` reporting dimension.ReportingDimensionIdstring `json:"reportingDimensionId,omitempty"`// State: Required. State of the ad unit.//// Possible values://   "STATE_UNSPECIFIED" - State unspecified.//   "ACTIVE" - Ad unit has been activated by the user.//   "ARCHIVED" - Ad unit has been archived by the user. Note that archived ad// units are only removed from the default view in the UI. Archived ad units// can still serve ads.Statestring `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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ContentAdsSettings") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

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

func (AdUnit)MarshalJSON

func (sAdUnit) MarshalJSON() ([]byte,error)

typeAdUnitAdCode

type AdUnitAdCode struct {// AdCode: Output only. The code snippet to add to the body of an HTML page.AdCodestring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AdCode") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

AdUnitAdCode: Representation of the ad unit code for a given ad unit. Formore information, see About the AdSense code(https://support.google.com/adsense/answer/9274634) and Where to place thead code in your HTML (https://support.google.com/adsense/answer/9190028).

func (AdUnitAdCode)MarshalJSON

func (sAdUnitAdCode) MarshalJSON() ([]byte,error)

typeAlert

type Alert struct {// Message: Output only. The localized alert message. This may contain HTML// markup, such as phrase elements or links.Messagestring `json:"message,omitempty"`// Name: Output only. Resource name of the alert. Format:// accounts/{account}/alerts/{alert}Namestring `json:"name,omitempty"`// Severity: Output only. Severity of this alert.//// Possible values://   "SEVERITY_UNSPECIFIED" - Unspecified severity.//   "INFO" - Info.//   "WARNING" - Warning.//   "SEVERE" - Severe.Severitystring `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".Typestring `json:"type,omitempty"`// ForceSendFields is a list of field names (e.g. "Message") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Message") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Alert: Representation of an alert.

func (Alert)MarshalJSON

func (sAlert) MarshalJSON() ([]byte,error)

typeCell

type Cell struct {// Value: Value in the cell. The dimension cells contain strings, and the// metric cells contain numbers.Valuestring `json:"value,omitempty"`// ForceSendFields is a list of field names (e.g. "Value") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Value") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Cell: Cell representation.

func (Cell)MarshalJSON

func (sCell) MarshalJSON() ([]byte,error)

typeContentAdsSettings

type ContentAdsSettings struct {// Size: Required. Size of the ad unit. e.g. "728x90", "1x3" (for responsive ad// units).Sizestring `json:"size,omitempty"`// Type: Required. 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 have now been retired, see//https://support.google.com/adsense/answer/9987221.Typestring `json:"type,omitempty"`// ForceSendFields is a list of field names (e.g. "Size") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Size") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ContentAdsSettings: Settings specific to content ads (AFC).

func (ContentAdsSettings)MarshalJSON

func (sContentAdsSettings) MarshalJSON() ([]byte,error)

typeCustomChannel

type CustomChannel struct {// Active: Whether the custom channel is active and collecting data. See//https://support.google.com/adsense/answer/10077192.Activebool `json:"active,omitempty"`// DisplayName: Required. Display name of the custom channel.DisplayNamestring `json:"displayName,omitempty"`// Name: Output only. Resource name of the custom channel. Format:// accounts/{account}/adclients/{adclient}/customchannels/{customchannel}Namestring `json:"name,omitempty"`// ReportingDimensionId: Output only. Unique ID of the custom channel as used// in the `CUSTOM_CHANNEL_ID` reporting dimension.ReportingDimensionIdstring `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. "Active") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Active") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

CustomChannel: Representation of a custom channel.

func (CustomChannel)MarshalJSON

func (sCustomChannel) MarshalJSON() ([]byte,error)

typeDate

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.Dayint64 `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.Monthint64 `json:"month,omitempty"`// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date// without a year.Yearint64 `json:"year,omitempty"`// ForceSendFields is a list of field names (e.g. "Day") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Day") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Date: Represents a whole or partial calendar date, such as a birthday. Thetime of day and time zone are either specified elsewhere or areinsignificant. The date is relative to the Gregorian Calendar. This canrepresent one of the following: * A full date, with non-zero year, month,and day values. * A month and day, with a zero year (for example, ananniversary). * A year on its own, with a zero month and a zero day. * Ayear and month, with a zero day (for example, a credit card expirationdate). Related types: * google.type.TimeOfDay * google.type.DateTime *google.protobuf.Timestamp

func (Date)MarshalJSON

func (sDate) MarshalJSON() ([]byte,error)

typeEmptyadded inv0.98.0

type Empty struct {// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`}

Empty: A generic empty message that you can re-use to avoid definingduplicated empty messages in your APIs. A typical example is to use it asthe request or the response type of an API method. For instance: service Foo{ rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

typeHeader

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.CurrencyCodestring `json:"currencyCode,omitempty"`// Name: Required. Name of the header.Namestring `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.Typestring `json:"type,omitempty"`// ForceSendFields is a list of field names (e.g. "CurrencyCode") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CurrencyCode") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

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

func (Header)MarshalJSON

func (sHeader) MarshalJSON() ([]byte,error)

typeHttpBody

type HttpBody struct {// ContentType: The HTTP Content-Type header value specifying the content type// of the body.ContentTypestring `json:"contentType,omitempty"`// Data: The HTTP request/response body as raw binary.Datastring `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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ContentType") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

HttpBody: Message that represents an arbitrary HTTP body. It should only beused for payload formats that can't be represented as JSON, such as rawbinary or an HTML page. This message can be used both in streaming andnon-streaming API methods in the request as well as the response. It can beused as a top-level request field, which is convenient if one wants toextract parameters from either the URL or HTTP template into the requestfields and also want access to the raw HTTP body. Example: messageGetResourceRequest { // A unique request id. string request_id = 1; // Theraw 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: serviceCaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (streamgoogle.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns(stream google.api.HttpBody); } Use of this type only changes how therequest and response bodies are handled, all other features will continue towork unchanged.

func (HttpBody)MarshalJSON

func (sHttpBody) MarshalJSON() ([]byte,error)

typeListAccountsResponse

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.NextPageTokenstring `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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Accounts") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ListAccountsResponse: Response definition for the account list rpc.

func (ListAccountsResponse)MarshalJSON

func (sListAccountsResponse) MarshalJSON() ([]byte,error)

typeListAdClientsResponse

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.NextPageTokenstring `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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AdClients") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ListAdClientsResponse: Response definition for the ad client list rpc.

func (ListAdClientsResponse)MarshalJSON

func (sListAdClientsResponse) MarshalJSON() ([]byte,error)

typeListAdUnitsResponse

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.NextPageTokenstring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AdUnits") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ListAdUnitsResponse: Response definition for the adunit list rpc.

func (ListAdUnitsResponse)MarshalJSON

func (sListAdUnitsResponse) MarshalJSON() ([]byte,error)

typeListAlertsResponse

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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Alerts") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ListAlertsResponse: Response definition for the alerts list rpc.

func (ListAlertsResponse)MarshalJSON

func (sListAlertsResponse) MarshalJSON() ([]byte,error)

typeListChildAccountsResponse

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.NextPageTokenstring `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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Accounts") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ListChildAccountsResponse: Response definition for the child account listrpc.

func (ListChildAccountsResponse)MarshalJSON

func (sListChildAccountsResponse) MarshalJSON() ([]byte,error)

typeListCustomChannelsResponse

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.NextPageTokenstring `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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CustomChannels") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ListCustomChannelsResponse: Response definition for the custom channel listrpc.

func (ListCustomChannelsResponse)MarshalJSON

func (sListCustomChannelsResponse) MarshalJSON() ([]byte,error)

typeListLinkedAdUnitsResponse

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.NextPageTokenstring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AdUnits") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

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

func (ListLinkedAdUnitsResponse)MarshalJSON

func (sListLinkedAdUnitsResponse) MarshalJSON() ([]byte,error)

typeListLinkedCustomChannelsResponse

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.NextPageTokenstring `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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CustomChannels") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

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

func (ListLinkedCustomChannelsResponse)MarshalJSON

func (sListLinkedCustomChannelsResponse) MarshalJSON() ([]byte,error)

typeListPaymentsResponse

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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Payments") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ListPaymentsResponse: Response definition for the payments list rpc.

func (ListPaymentsResponse)MarshalJSON

func (sListPaymentsResponse) MarshalJSON() ([]byte,error)

typeListPolicyIssuesResponseadded inv0.147.0

type ListPolicyIssuesResponse struct {// NextPageToken: Continuation token used to page through policy issues. To// retrieve the next page of the results, set the next request's "page_token"// value to this.NextPageTokenstring `json:"nextPageToken,omitempty"`// PolicyIssues: The policy issues returned in the list response.PolicyIssues []*PolicyIssue `json:"policyIssues,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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "NextPageToken") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ListPolicyIssuesResponse: Response definition for the policy issues listrpc. Policy issues are reported only if the publisher has at least one AFCad client in READY or GETTING_READY state. If the publisher has no such AFCad client, the response will be an empty list.

func (ListPolicyIssuesResponse)MarshalJSONadded inv0.147.0

func (sListPolicyIssuesResponse) MarshalJSON() ([]byte,error)

typeListSavedReportsResponse

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.NextPageTokenstring `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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "NextPageToken") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ListSavedReportsResponse: Response definition for the saved reports listrpc.

func (ListSavedReportsResponse)MarshalJSON

func (sListSavedReportsResponse) MarshalJSON() ([]byte,error)

typeListSitesResponse

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.NextPageTokenstring `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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "NextPageToken") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ListSitesResponse: Response definition for the sites list rpc.

func (ListSitesResponse)MarshalJSON

func (sListSitesResponse) MarshalJSON() ([]byte,error)

typeListUrlChannelsResponse

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.NextPageTokenstring `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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "NextPageToken") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ListUrlChannelsResponse: Response definition for the url channels list rpc.

func (ListUrlChannelsResponse)MarshalJSON

func (sListUrlChannelsResponse) MarshalJSON() ([]byte,error)

typePayment

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".Amountstring `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: Output only. Resource name of the payment. Format: -// accounts/{account}/payments/unpaid for unpaid (current) AdSense earnings. -// accounts/{account}/payments/youtube-unpaid for unpaid (current) YouTube// earnings. - accounts/{account}/payments/yyyy-MM-dd for paid AdSense// earnings. - accounts/{account}/payments/youtube-yyyy-MM-dd for paid YouTube// earnings.Namestring `json:"name,omitempty"`// ForceSendFields is a list of field names (e.g. "Amount") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Amount") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Payment: Representation of an unpaid or paid payment. See Payment timelinesfor AdSense (https://support.google.com/adsense/answer/7164703) for moreinformation about payments and the YouTube homepage and payments account(https://support.google.com/adsense/answer/11622510) article for informationabout dedicated payments accounts for YouTube.

func (Payment)MarshalJSON

func (sPayment) MarshalJSON() ([]byte,error)

typePolicyIssueadded inv0.147.0

type PolicyIssue struct {// Action: Required. The most severe action taken on the entity over the past// seven days.//// Possible values://   "ENFORCEMENT_ACTION_UNSPECIFIED" - The action is unspecified.//   "WARNED" - No ad serving enforcement is currently present, but enforcement// will start on the `warning_escalation_date` if the issue is not resolved.//   "AD_SERVING_RESTRICTED" - Ad serving demand has been restricted on the// entity.//   "AD_SERVING_DISABLED" - Ad serving has been disabled on the entity.//   "AD_SERVED_WITH_CLICK_CONFIRMATION" - Ads are being served for the entity// but Confirmed Click is being applied to the ads. See//https://support.google.com/adsense/answer/10025624.//   "AD_PERSONALIZATION_RESTRICTED" - Ad personalization is restricted because// the ad requests coming from the EEA and UK do not have a TCF string or the// Consent Management Platform (CMP) indicated by the TCF string is not Google// certified. As a result, basic/limited ads will be served. See//https://support.google.com/adsense/answer/13554116.Actionstring `json:"action,omitempty"`// AdClients: Optional. List of ad clients associated with the policy issue// (either as the primary ad client or an associated host/secondary ad client).// In the latter case, this will be an ad client that is not owned by the// current account.AdClients []string `json:"adClients,omitempty"`// AdRequestCount: Required. Total number of ad requests affected by the policy// violations over the past seven days.AdRequestCountint64 `json:"adRequestCount,omitempty,string"`// EntityType: Required. Type of the entity indicating if the entity is a site,// site-section, or page.//// Possible values://   "ENTITY_TYPE_UNSPECIFIED" - The entity type is unspecified.//   "SITE" - The enforced entity is an entire website.//   "SITE_SECTION" - The enforced entity is a particular section of a website.// All the pages with this prefix are enforced.//   "PAGE" - The enforced entity is a single web page.EntityTypestring `json:"entityType,omitempty"`// FirstDetectedDate: Required. The date (in the America/Los_Angeles timezone)// when policy violations were first detected on the entity.FirstDetectedDate *Date `json:"firstDetectedDate,omitempty"`// LastDetectedDate: Required. The date (in the America/Los_Angeles timezone)// when policy violations were last detected on the entity.LastDetectedDate *Date `json:"lastDetectedDate,omitempty"`// Name: Required. Resource name of the entity with policy issues. Format:// accounts/{account}/policyIssues/{policy_issue}Namestring `json:"name,omitempty"`// PolicyTopics: Required. Unordered list. The policy topics that this entity// was found to violate over the past seven days.PolicyTopics []*PolicyTopic `json:"policyTopics,omitempty"`// Site: Required. Hostname/domain of the entity (for example "foo.com" or// "www.foo.com"). This _should_ be a bare domain/host name without any// protocol. This will be present for all policy issues.Sitestring `json:"site,omitempty"`// SiteSection: Optional. Prefix of the site-section having policy issues (For// example "foo.com/bar-section"). This will be present if the `entity_type` is// `SITE_SECTION` and will be absent for other entity types.SiteSectionstring `json:"siteSection,omitempty"`// Uri: Optional. URI of the page having policy violations (for example// "foo.com/bar" or "www.foo.com/bar"). This will be present if the// `entity_type` is `PAGE` and will be absent for other entity types.Uristring `json:"uri,omitempty"`// WarningEscalationDate: Optional. The date (in the America/Los_Angeles// timezone) when the entity will have ad serving demand restricted or ad// serving disabled. This is present only for issues with a `WARNED`// enforcement action. Seehttps://support.google.com/adsense/answer/11066888.WarningEscalationDate *Date `json:"warningEscalationDate,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Action") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Action") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

PolicyIssue: Representation of a policy issue for a single entity (site,site-section, or page). All issues for a single entity are represented by asingle PolicyIssue resource, though that PolicyIssue can have multiplecauses (or "topics") that can change over time. Policy issues are removed ifthere are no issues detected recently or if there's a recent successfulappeal for the entity.

func (PolicyIssue)MarshalJSONadded inv0.147.0

func (sPolicyIssue) MarshalJSON() ([]byte,error)

typePolicyTopicadded inv0.147.0

type PolicyTopic struct {// MustFix: Required. Deprecated. Always set to false.MustFixbool `json:"mustFix,omitempty"`// Topic: Required. The policy topic. For example, "sexual-content" or// "ads-obscuring-content"."Topicstring `json:"topic,omitempty"`// Type: Optional. The type of policy topic. For example, "POLICY" represents// all the policy topics that are related to the Google Publisher Policy (GPP).// Seehttps://support.google.com/adsense/answer/15689616.//// Possible values://   "POLICY_TOPIC_TYPE_UNSPECIFIED" - The type is unspecified.//   "POLICY" - Topics that are primarily related to the Google Publisher// Policy (GPP) (https://support.google.com/publisherpolicies/answer/10502938)// or the Google Publisher Restrictions (GPR) policies// (https://support.google.com/publisherpolicies/answer/10437795).//   "ADVERTISER_PREFERENCE" - Topics that are related to advertiser// preferences. Certain advertisers may choose not to bid on content that are// labeled with certain policies.//   "REGULATORY" - Any topics that are a result of a country or regional// regulatory requirement body.Typestring `json:"type,omitempty"`// ForceSendFields is a list of field names (e.g. "MustFix") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "MustFix") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

PolicyTopic: Information about a particular policy topic. A policy topicrepresents a single class of policy issue that can impact ad serving foryour site. For example, sexual content or having ads that obscure yourcontent. A single policy issue can have multiple policy topics for a singleentity.

func (PolicyTopic)MarshalJSONadded inv0.147.0

func (sPolicyTopic) MarshalJSON() ([]byte,error)

typeReportResult

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.TotalMatchedRowsint64 `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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Averages") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ReportResult: Result of a generated report.

func (ReportResult)MarshalJSON

func (sReportResult) MarshalJSON() ([]byte,error)

typeRow

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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Cells") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Row: Row representation.

func (Row)MarshalJSON

func (sRow) MarshalJSON() ([]byte,error)

typeSavedReport

type SavedReport struct {// Name: Output only. Resource name of the report. Format:// accounts/{account}/reports/{report}Namestring `json:"name,omitempty"`// Title: Report title as specified by publisher.Titlestring `json:"title,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Name") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Name") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

SavedReport: Representation of a saved report.

func (SavedReport)MarshalJSON

func (sSavedReport) MarshalJSON() ([]byte,error)

typeService

type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentAccounts *AccountsService// contains filtered or unexported fields}

funcNewdeprecated

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.

funcNewService

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

NewService creates a new Service.

typeSite

type Site struct {// AutoAdsEnabled: Whether auto ads is turned on for the site.AutoAdsEnabledbool `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.Domainstring `json:"domain,omitempty"`// Name: Output only. Resource name of a site. Format:// accounts/{account}/sites/{site}Namestring `json:"name,omitempty"`// ReportingDimensionId: Output only. Unique ID of the site as used in the// `OWNED_SITE_ID` reporting dimension.ReportingDimensionIdstring `json:"reportingDimensionId,omitempty"`// State: Output only. State of a site.//// Possible values://   "STATE_UNSPECIFIED" - State unspecified.//   "REQUIRES_REVIEW" - Either: * The site hasn't been checked yet. * The site// is inactive and needs another review before it can show ads again. Learn how// to [request a review for an inactive// site](https://support.google.com/adsense/answer/9393996).//   "GETTING_READY" - Google is running some checks on the site. This usually// takes a few days, but in some cases it can take two to four weeks.//   "READY" - The site is ready to show ads. Learn how to [set up ads on the// site](https://support.google.com/adsense/answer/7037624).//   "NEEDS_ATTENTION" - Publisher needs to fix some issues before the site is// ready to show ads. Learn what to do [if a new site isn't// ready](https://support.google.com/adsense/answer/9061852).Statestring `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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AutoAdsEnabled") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Site: Representation of a Site.

func (Site)MarshalJSON

func (sSite) MarshalJSON() ([]byte,error)

typeTimeZone

type TimeZone struct {// Id: IANA Time Zone Database time zone. For example "America/New_York".Idstring `json:"id,omitempty"`// Version: Optional. IANA Time Zone Database version number. For example// "2019a".Versionstring `json:"version,omitempty"`// ForceSendFields is a list of field names (e.g. "Id") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Id") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

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

func (TimeZone)MarshalJSON

func (sTimeZone) MarshalJSON() ([]byte,error)

typeUrlChannel

type UrlChannel struct {// Name: Output only. Resource name of the URL channel. Format:// accounts/{account}/adclients/{adclient}/urlchannels/{urlchannel}Namestring `json:"name,omitempty"`// ReportingDimensionId: Output only. Unique ID of the custom channel as used// in the `URL_CHANNEL_ID` reporting dimension.ReportingDimensionIdstring `json:"reportingDimensionId,omitempty"`// UriPattern: URI pattern of the channel. Does not include "http://" or// "https://". Example: www.example.com/homeUriPatternstring `json:"uriPattern,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Name") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Name") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

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

func (UrlChannel)MarshalJSON

func (sUrlChannel) MarshalJSON() ([]byte,error)

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp