...

Source file src/google.golang.org/api/realtimebidding/v1/realtimebidding-gen.go

Documentation: google.golang.org/api/realtimebidding/v1

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package realtimebidding provides access to the Real-time Bidding API.
     8  //
     9  // For product documentation, see: https://developers.google.com/authorized-buyers/apis/realtimebidding/reference/rest/
    10  //
    11  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/realtimebidding/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	realtimebiddingService, err := realtimebidding.NewService(ctx)
    30  //
    31  // In this example, Google Application Default Credentials are used for
    32  // authentication. For information on how to create and obtain Application
    33  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    34  //
    35  // # Other authentication options
    36  //
    37  // To use an API key for authentication (note: some APIs do not support API
    38  // keys), use [google.golang.org/api/option.WithAPIKey]:
    39  //
    40  //	realtimebiddingService, err := realtimebidding.NewService(ctx, option.WithAPIKey("AIza..."))
    41  //
    42  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    43  // flow, use [google.golang.org/api/option.WithTokenSource]:
    44  //
    45  //	config := &oauth2.Config{...}
    46  //	// ...
    47  //	token, err := config.Exchange(ctx, ...)
    48  //	realtimebiddingService, err := realtimebidding.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package realtimebidding // import "google.golang.org/api/realtimebidding/v1"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "realtimebidding:v1"
    90  const apiName = "realtimebidding"
    91  const apiVersion = "v1"
    92  const basePath = "https://realtimebidding.googleapis.com/"
    93  const basePathTemplate = "https://realtimebidding.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://realtimebidding.mtls.googleapis.com/"
    95  
    96  // OAuth2 scopes used by this API.
    97  const (
    98  	// See, create, edit, and delete your Authorized Buyers and Open Bidding
    99  	// account entities
   100  	RealtimeBiddingScope = "https://www.googleapis.com/auth/realtime-bidding"
   101  )
   102  
   103  // NewService creates a new Service.
   104  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   105  	scopesOption := internaloption.WithDefaultScopes(
   106  		"https://www.googleapis.com/auth/realtime-bidding",
   107  	)
   108  	// NOTE: prepend, so we don't override user-specified scopes.
   109  	opts = append([]option.ClientOption{scopesOption}, opts...)
   110  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   111  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   112  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   113  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   114  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   115  	if err != nil {
   116  		return nil, err
   117  	}
   118  	s, err := New(client)
   119  	if err != nil {
   120  		return nil, err
   121  	}
   122  	if endpoint != "" {
   123  		s.BasePath = endpoint
   124  	}
   125  	return s, nil
   126  }
   127  
   128  // New creates a new Service. It uses the provided http.Client for requests.
   129  //
   130  // Deprecated: please use NewService instead.
   131  // To provide a custom HTTP client, use option.WithHTTPClient.
   132  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   133  func New(client *http.Client) (*Service, error) {
   134  	if client == nil {
   135  		return nil, errors.New("client is nil")
   136  	}
   137  	s := &Service{client: client, BasePath: basePath}
   138  	s.Bidders = NewBiddersService(s)
   139  	s.Buyers = NewBuyersService(s)
   140  	return s, nil
   141  }
   142  
   143  type Service struct {
   144  	client    *http.Client
   145  	BasePath  string // API endpoint base URL
   146  	UserAgent string // optional additional User-Agent fragment
   147  
   148  	Bidders *BiddersService
   149  
   150  	Buyers *BuyersService
   151  }
   152  
   153  func (s *Service) userAgent() string {
   154  	if s.UserAgent == "" {
   155  		return googleapi.UserAgent
   156  	}
   157  	return googleapi.UserAgent + " " + s.UserAgent
   158  }
   159  
   160  func NewBiddersService(s *Service) *BiddersService {
   161  	rs := &BiddersService{s: s}
   162  	rs.Creatives = NewBiddersCreativesService(s)
   163  	rs.Endpoints = NewBiddersEndpointsService(s)
   164  	rs.PretargetingConfigs = NewBiddersPretargetingConfigsService(s)
   165  	rs.PublisherConnections = NewBiddersPublisherConnectionsService(s)
   166  	return rs
   167  }
   168  
   169  type BiddersService struct {
   170  	s *Service
   171  
   172  	Creatives *BiddersCreativesService
   173  
   174  	Endpoints *BiddersEndpointsService
   175  
   176  	PretargetingConfigs *BiddersPretargetingConfigsService
   177  
   178  	PublisherConnections *BiddersPublisherConnectionsService
   179  }
   180  
   181  func NewBiddersCreativesService(s *Service) *BiddersCreativesService {
   182  	rs := &BiddersCreativesService{s: s}
   183  	return rs
   184  }
   185  
   186  type BiddersCreativesService struct {
   187  	s *Service
   188  }
   189  
   190  func NewBiddersEndpointsService(s *Service) *BiddersEndpointsService {
   191  	rs := &BiddersEndpointsService{s: s}
   192  	return rs
   193  }
   194  
   195  type BiddersEndpointsService struct {
   196  	s *Service
   197  }
   198  
   199  func NewBiddersPretargetingConfigsService(s *Service) *BiddersPretargetingConfigsService {
   200  	rs := &BiddersPretargetingConfigsService{s: s}
   201  	return rs
   202  }
   203  
   204  type BiddersPretargetingConfigsService struct {
   205  	s *Service
   206  }
   207  
   208  func NewBiddersPublisherConnectionsService(s *Service) *BiddersPublisherConnectionsService {
   209  	rs := &BiddersPublisherConnectionsService{s: s}
   210  	return rs
   211  }
   212  
   213  type BiddersPublisherConnectionsService struct {
   214  	s *Service
   215  }
   216  
   217  func NewBuyersService(s *Service) *BuyersService {
   218  	rs := &BuyersService{s: s}
   219  	rs.Creatives = NewBuyersCreativesService(s)
   220  	rs.UserLists = NewBuyersUserListsService(s)
   221  	return rs
   222  }
   223  
   224  type BuyersService struct {
   225  	s *Service
   226  
   227  	Creatives *BuyersCreativesService
   228  
   229  	UserLists *BuyersUserListsService
   230  }
   231  
   232  func NewBuyersCreativesService(s *Service) *BuyersCreativesService {
   233  	rs := &BuyersCreativesService{s: s}
   234  	return rs
   235  }
   236  
   237  type BuyersCreativesService struct {
   238  	s *Service
   239  }
   240  
   241  func NewBuyersUserListsService(s *Service) *BuyersUserListsService {
   242  	rs := &BuyersUserListsService{s: s}
   243  	return rs
   244  }
   245  
   246  type BuyersUserListsService struct {
   247  	s *Service
   248  }
   249  
   250  // ActivatePretargetingConfigRequest: A request to activate a pretargeting
   251  // configuration. Sets the configuration's state to ACTIVE.
   252  type ActivatePretargetingConfigRequest struct {
   253  }
   254  
   255  // AdTechnologyProviders: The list of detected Ad Technology Providers for this
   256  // creative. Bids placed for inventory that will serve to EEA or UK users are
   257  // expected to comply with GDPR requirements. You must ensure that the
   258  // creatives used in such bids should contain only user consented ad technology
   259  // providers as indicated in the bid request. Google reserves the right to
   260  // filter non-compliant bids. User consented ad technology providers can be
   261  // found in the Google Protocol
   262  // (https://developers.google.com/authorized-buyers/rtb/downloads/realtime-bidding-proto)
   263  // with the `BidRequest.adslot.consented_providers_settings` field, and can be
   264  // found as an OpenRTB extension
   265  // (https://developers.google.com/authorized-buyers/rtb/downloads/openrtb-adx-proto)
   266  // with the `BidRequest.user.ext.consented_providers_settings` and
   267  // `BidRequest.user.ext.consent` fields. See
   268  // https://support.google.com/authorizedbuyers/answer/9789378 for additional
   269  // information about the Google TCF v2 integration.
   270  type AdTechnologyProviders struct {
   271  	// DetectedGvlIds: The detected IAB Global Vendor List (GVL) IDs for this
   272  	// creative. See the IAB Global Vendor List at
   273  	// https://vendor-list.consensu.org/v2/vendor-list.json for details about the
   274  	// vendors.
   275  	DetectedGvlIds googleapi.Int64s `json:"detectedGvlIds,omitempty"`
   276  	// DetectedProviderIds: The detected Google Ad Tech Providers (ATP)
   277  	// (https://support.google.com/admanager/answer/9012903) for this creative. See
   278  	// https://storage.googleapis.com/adx-rtb-dictionaries/providers.csv for
   279  	// mapping of provider ID to provided name, a privacy policy URL, and a list of
   280  	// domains which can be attributed to the provider.
   281  	DetectedProviderIds googleapi.Int64s `json:"detectedProviderIds,omitempty"`
   282  	// UnidentifiedProviderDomains: Domains of detected unidentified ad technology
   283  	// providers (if any). You must ensure that the creatives used in bids placed
   284  	// for inventory that will serve to EEA or UK users does not contain
   285  	// unidentified ad technology providers. Google reserves the right to filter
   286  	// non-compliant bids.
   287  	UnidentifiedProviderDomains []string `json:"unidentifiedProviderDomains,omitempty"`
   288  	// ForceSendFields is a list of field names (e.g. "DetectedGvlIds") to
   289  	// unconditionally include in API requests. By default, fields with empty or
   290  	// default values are omitted from API requests. See
   291  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   292  	// details.
   293  	ForceSendFields []string `json:"-"`
   294  	// NullFields is a list of field names (e.g. "DetectedGvlIds") to include in
   295  	// API requests with the JSON null value. By default, fields with empty values
   296  	// are omitted from API requests. See
   297  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   298  	NullFields []string `json:"-"`
   299  }
   300  
   301  func (s *AdTechnologyProviders) MarshalJSON() ([]byte, error) {
   302  	type NoMethod AdTechnologyProviders
   303  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   304  }
   305  
   306  // AddTargetedAppsRequest: A request to start targeting the provided app IDs in
   307  // a specific pretargeting configuration. The pretargeting configuration itself
   308  // specifies how these apps are targeted. in
   309  // PretargetingConfig.appTargeting.mobileAppTargeting.
   310  type AddTargetedAppsRequest struct {
   311  	// AppIds: A list of app IDs to target in the pretargeting configuration. These
   312  	// values will be added to the list of targeted app IDs in
   313  	// PretargetingConfig.appTargeting.mobileAppTargeting.values.
   314  	AppIds []string `json:"appIds,omitempty"`
   315  	// TargetingMode: Required. The targeting mode that should be applied to the
   316  	// list of app IDs. If there are existing targeted app IDs, must be equal to
   317  	// the existing
   318  	// PretargetingConfig.appTargeting.mobileAppTargeting.targetingMode or a 400
   319  	// bad request error will be returned.
   320  	//
   321  	// Possible values:
   322  	//   "TARGETING_MODE_UNSPECIFIED" - Placeholder for undefined targeting mode.
   323  	//   "INCLUSIVE" - The inclusive list type. Inventory must match an item in
   324  	// this list to be targeted.
   325  	//   "EXCLUSIVE" - The exclusive list type. Inventory must not match any item
   326  	// in this list to be targeted.
   327  	TargetingMode string `json:"targetingMode,omitempty"`
   328  	// ForceSendFields is a list of field names (e.g. "AppIds") to unconditionally
   329  	// include in API requests. By default, fields with empty or default values are
   330  	// omitted from API requests. See
   331  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   332  	// details.
   333  	ForceSendFields []string `json:"-"`
   334  	// NullFields is a list of field names (e.g. "AppIds") to include in API
   335  	// requests with the JSON null value. By default, fields with empty values are
   336  	// omitted from API requests. See
   337  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   338  	NullFields []string `json:"-"`
   339  }
   340  
   341  func (s *AddTargetedAppsRequest) MarshalJSON() ([]byte, error) {
   342  	type NoMethod AddTargetedAppsRequest
   343  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   344  }
   345  
   346  // AddTargetedPublishersRequest: A request to start targeting the provided
   347  // publishers in a specific pretargeting configuration. The pretargeting
   348  // configuration itself specifies how these publishers are targeted in
   349  // PretargetingConfig.publisherTargeting.
   350  type AddTargetedPublishersRequest struct {
   351  	// PublisherIds: A list of publisher IDs to target in the pretargeting
   352  	// configuration. These values will be added to the list of targeted publisher
   353  	// IDs in PretargetingConfig.publisherTargeting.values. Publishers are
   354  	// identified by their publisher ID from ads.txt / app-ads.txt. See
   355  	// https://iabtechlab.com/ads-txt/ and https://iabtechlab.com/app-ads-txt/ for
   356  	// more details.
   357  	PublisherIds []string `json:"publisherIds,omitempty"`
   358  	// TargetingMode: Required. The targeting mode that should be applied to the
   359  	// list of publisher IDs. If are existing publisher IDs, must be equal to the
   360  	// existing PretargetingConfig.publisherTargeting.targetingMode or a 400 bad
   361  	// request error will be returned.
   362  	//
   363  	// Possible values:
   364  	//   "TARGETING_MODE_UNSPECIFIED" - Placeholder for undefined targeting mode.
   365  	//   "INCLUSIVE" - The inclusive list type. Inventory must match an item in
   366  	// this list to be targeted.
   367  	//   "EXCLUSIVE" - The exclusive list type. Inventory must not match any item
   368  	// in this list to be targeted.
   369  	TargetingMode string `json:"targetingMode,omitempty"`
   370  	// ForceSendFields is a list of field names (e.g. "PublisherIds") to
   371  	// unconditionally include in API requests. By default, fields with empty or
   372  	// default values are omitted from API requests. See
   373  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   374  	// details.
   375  	ForceSendFields []string `json:"-"`
   376  	// NullFields is a list of field names (e.g. "PublisherIds") to include in API
   377  	// requests with the JSON null value. By default, fields with empty values are
   378  	// omitted from API requests. See
   379  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   380  	NullFields []string `json:"-"`
   381  }
   382  
   383  func (s *AddTargetedPublishersRequest) MarshalJSON() ([]byte, error) {
   384  	type NoMethod AddTargetedPublishersRequest
   385  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   386  }
   387  
   388  // AddTargetedSitesRequest: A request to start targeting the provided sites in
   389  // a specific pretargeting configuration. The pretargeting configuration itself
   390  // specifies how these sites are targeted in PretargetingConfig.webTargeting.
   391  type AddTargetedSitesRequest struct {
   392  	// Sites: A list of site URLs to target in the pretargeting configuration.
   393  	// These values will be added to the list of targeted URLs in
   394  	// PretargetingConfig.webTargeting.values.
   395  	Sites []string `json:"sites,omitempty"`
   396  	// TargetingMode: Required. The targeting mode that should be applied to the
   397  	// list of site URLs. If there are existing targeted sites, must be equal to
   398  	// the existing PretargetingConfig.webTargeting.targetingMode or a 400 bad
   399  	// request error will be returned.
   400  	//
   401  	// Possible values:
   402  	//   "TARGETING_MODE_UNSPECIFIED" - Placeholder for undefined targeting mode.
   403  	//   "INCLUSIVE" - The inclusive list type. Inventory must match an item in
   404  	// this list to be targeted.
   405  	//   "EXCLUSIVE" - The exclusive list type. Inventory must not match any item
   406  	// in this list to be targeted.
   407  	TargetingMode string `json:"targetingMode,omitempty"`
   408  	// ForceSendFields is a list of field names (e.g. "Sites") to unconditionally
   409  	// include in API requests. By default, fields with empty or default values are
   410  	// omitted from API requests. See
   411  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   412  	// details.
   413  	ForceSendFields []string `json:"-"`
   414  	// NullFields is a list of field names (e.g. "Sites") to include in API
   415  	// requests with the JSON null value. By default, fields with empty values are
   416  	// omitted from API requests. See
   417  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   418  	NullFields []string `json:"-"`
   419  }
   420  
   421  func (s *AddTargetedSitesRequest) MarshalJSON() ([]byte, error) {
   422  	type NoMethod AddTargetedSitesRequest
   423  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   424  }
   425  
   426  // AdvertiserAndBrand: Detected advertiser and brand information.
   427  type AdvertiserAndBrand struct {
   428  	// AdvertiserId: See
   429  	// https://storage.googleapis.com/adx-rtb-dictionaries/advertisers.txt for the
   430  	// list of possible values. Can be used to filter the response of the
   431  	// creatives.list method.
   432  	AdvertiserId int64 `json:"advertiserId,omitempty,string"`
   433  	// AdvertiserName: Advertiser name. Can be used to filter the response of the
   434  	// creatives.list method.
   435  	AdvertiserName string `json:"advertiserName,omitempty"`
   436  	// BrandId: Detected brand ID or zero if no brand has been detected. See
   437  	// https://storage.googleapis.com/adx-rtb-dictionaries/brands.txt for the list
   438  	// of possible values. Can be used to filter the response of the creatives.list
   439  	// method.
   440  	BrandId int64 `json:"brandId,omitempty,string"`
   441  	// BrandName: Brand name. Can be used to filter the response of the
   442  	// creatives.list method.
   443  	BrandName string `json:"brandName,omitempty"`
   444  	// ForceSendFields is a list of field names (e.g. "AdvertiserId") to
   445  	// unconditionally include in API requests. By default, fields with empty or
   446  	// default values are omitted from API requests. See
   447  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   448  	// details.
   449  	ForceSendFields []string `json:"-"`
   450  	// NullFields is a list of field names (e.g. "AdvertiserId") to include in API
   451  	// requests with the JSON null value. By default, fields with empty values are
   452  	// omitted from API requests. See
   453  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   454  	NullFields []string `json:"-"`
   455  }
   456  
   457  func (s *AdvertiserAndBrand) MarshalJSON() ([]byte, error) {
   458  	type NoMethod AdvertiserAndBrand
   459  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   460  }
   461  
   462  // AppTargeting: A subset of app inventory to target. Bid requests that match
   463  // criteria in at least one of the specified dimensions will be sent.
   464  type AppTargeting struct {
   465  	// MobileAppCategoryTargeting: Lists of included and excluded mobile app
   466  	// categories as defined in
   467  	// https://developers.google.com/adwords/api/docs/appendix/mobileappcategories.csv.
   468  	MobileAppCategoryTargeting *NumericTargetingDimension `json:"mobileAppCategoryTargeting,omitempty"`
   469  	// MobileAppTargeting: Targeted app IDs. App IDs can refer to those found in an
   470  	// app store or ones that are not published in an app store. A maximum of
   471  	// 30,000 app IDs can be targeted.
   472  	MobileAppTargeting *StringTargetingDimension `json:"mobileAppTargeting,omitempty"`
   473  	// ForceSendFields is a list of field names (e.g. "MobileAppCategoryTargeting")
   474  	// to unconditionally include in API requests. By default, fields with empty or
   475  	// default values are omitted from API requests. See
   476  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   477  	// details.
   478  	ForceSendFields []string `json:"-"`
   479  	// NullFields is a list of field names (e.g. "MobileAppCategoryTargeting") to
   480  	// include in API requests with the JSON null value. By default, fields with
   481  	// empty values are omitted from API requests. See
   482  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   483  	NullFields []string `json:"-"`
   484  }
   485  
   486  func (s *AppTargeting) MarshalJSON() ([]byte, error) {
   487  	type NoMethod AppTargeting
   488  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   489  }
   490  
   491  // BatchApprovePublisherConnectionsRequest: A request to approve a batch of
   492  // publisher connections.
   493  type BatchApprovePublisherConnectionsRequest struct {
   494  	// Names: Required. The names of the publishers with which connections will be
   495  	// approved. In the pattern `bidders/{bidder}/publisherConnections/{publisher}`
   496  	// where `{bidder}` is the account ID of the bidder, and `{publisher}` is the
   497  	// ads.txt/app-ads.txt publisher ID.
   498  	Names []string `json:"names,omitempty"`
   499  	// ForceSendFields is a list of field names (e.g. "Names") to unconditionally
   500  	// include in API requests. By default, fields with empty or default values are
   501  	// omitted from API requests. See
   502  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   503  	// details.
   504  	ForceSendFields []string `json:"-"`
   505  	// NullFields is a list of field names (e.g. "Names") to include in API
   506  	// requests with the JSON null value. By default, fields with empty values are
   507  	// omitted from API requests. See
   508  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   509  	NullFields []string `json:"-"`
   510  }
   511  
   512  func (s *BatchApprovePublisherConnectionsRequest) MarshalJSON() ([]byte, error) {
   513  	type NoMethod BatchApprovePublisherConnectionsRequest
   514  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   515  }
   516  
   517  // BatchApprovePublisherConnectionsResponse: A response for the request to
   518  // approve a batch of publisher connections.
   519  type BatchApprovePublisherConnectionsResponse struct {
   520  	// PublisherConnections: The publisher connections that have been approved.
   521  	PublisherConnections []*PublisherConnection `json:"publisherConnections,omitempty"`
   522  
   523  	// ServerResponse contains the HTTP response code and headers from the server.
   524  	googleapi.ServerResponse `json:"-"`
   525  	// ForceSendFields is a list of field names (e.g. "PublisherConnections") to
   526  	// unconditionally include in API requests. By default, fields with empty or
   527  	// default values are omitted from API requests. See
   528  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   529  	// details.
   530  	ForceSendFields []string `json:"-"`
   531  	// NullFields is a list of field names (e.g. "PublisherConnections") to include
   532  	// in API requests with the JSON null value. By default, fields with empty
   533  	// values are omitted from API requests. See
   534  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   535  	NullFields []string `json:"-"`
   536  }
   537  
   538  func (s *BatchApprovePublisherConnectionsResponse) MarshalJSON() ([]byte, error) {
   539  	type NoMethod BatchApprovePublisherConnectionsResponse
   540  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   541  }
   542  
   543  // BatchRejectPublisherConnectionsRequest: A request to reject a batch of
   544  // publisher connections.
   545  type BatchRejectPublisherConnectionsRequest struct {
   546  	// Names: Required. The names of the publishers with whom connection will be
   547  	// rejected. In the pattern `bidders/{bidder}/publisherConnections/{publisher}`
   548  	// where `{bidder}` is the account ID of the bidder, and `{publisher}` is the
   549  	// ads.txt/app-ads.txt publisher ID.
   550  	Names []string `json:"names,omitempty"`
   551  	// ForceSendFields is a list of field names (e.g. "Names") to unconditionally
   552  	// include in API requests. By default, fields with empty or default values are
   553  	// omitted from API requests. See
   554  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   555  	// details.
   556  	ForceSendFields []string `json:"-"`
   557  	// NullFields is a list of field names (e.g. "Names") to include in API
   558  	// requests with the JSON null value. By default, fields with empty values are
   559  	// omitted from API requests. See
   560  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   561  	NullFields []string `json:"-"`
   562  }
   563  
   564  func (s *BatchRejectPublisherConnectionsRequest) MarshalJSON() ([]byte, error) {
   565  	type NoMethod BatchRejectPublisherConnectionsRequest
   566  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   567  }
   568  
   569  // BatchRejectPublisherConnectionsResponse: A response for the request to
   570  // reject a batch of publisher connections.
   571  type BatchRejectPublisherConnectionsResponse struct {
   572  	// PublisherConnections: The publisher connections that have been rejected.
   573  	PublisherConnections []*PublisherConnection `json:"publisherConnections,omitempty"`
   574  
   575  	// ServerResponse contains the HTTP response code and headers from the server.
   576  	googleapi.ServerResponse `json:"-"`
   577  	// ForceSendFields is a list of field names (e.g. "PublisherConnections") to
   578  	// unconditionally include in API requests. By default, fields with empty or
   579  	// default values are omitted from API requests. See
   580  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   581  	// details.
   582  	ForceSendFields []string `json:"-"`
   583  	// NullFields is a list of field names (e.g. "PublisherConnections") to include
   584  	// in API requests with the JSON null value. By default, fields with empty
   585  	// values are omitted from API requests. See
   586  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   587  	NullFields []string `json:"-"`
   588  }
   589  
   590  func (s *BatchRejectPublisherConnectionsResponse) MarshalJSON() ([]byte, error) {
   591  	type NoMethod BatchRejectPublisherConnectionsResponse
   592  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   593  }
   594  
   595  // Bidder: Bidder settings.
   596  type Bidder struct {
   597  	// BypassNonguaranteedDealsPretargeting: Output only. An option to bypass
   598  	// pretargeting for private auctions and preferred deals. When true, bid
   599  	// requests from these nonguaranteed deals will always be sent. When false, bid
   600  	// requests will be subject to regular pretargeting configurations.
   601  	// Programmatic Guaranteed deals will always be sent to the bidder, regardless
   602  	// of the value for this flag. Auction packages are not impacted by this value
   603  	// and are subject to the regular pretargeting configurations.
   604  	BypassNonguaranteedDealsPretargeting bool `json:"bypassNonguaranteedDealsPretargeting,omitempty"`
   605  	// CookieMatchingNetworkId: Output only. The buyer's network ID used for cookie
   606  	// matching. This ID corresponds to the `google_nid` parameter in the URL used
   607  	// in cookie match requests. Refer to
   608  	// https://developers.google.com/authorized-buyers/rtb/cookie-guide for further
   609  	// information.
   610  	CookieMatchingNetworkId string `json:"cookieMatchingNetworkId,omitempty"`
   611  	// CookieMatchingUrl: Output only. The base URL used in cookie match requests.
   612  	// Refer to https://developers.google.com/authorized-buyers/rtb/cookie-guide
   613  	// for further information.
   614  	CookieMatchingUrl string `json:"cookieMatchingUrl,omitempty"`
   615  	// DealsBillingId: Output only. The billing ID for the deals pretargeting
   616  	// config. This billing ID is sent on the bid request for guaranteed and
   617  	// nonguaranteed deals matched in pretargeting.
   618  	DealsBillingId string `json:"dealsBillingId,omitempty"`
   619  	// Name: Output only. Name of the bidder resource that must follow the pattern
   620  	// `bidders/{bidderAccountId}`, where `{bidderAccountId}` is the account ID of
   621  	// the bidder whose information is to be received. One can get their account ID
   622  	// on the Authorized Buyers or Open Bidding UI, or by contacting their Google
   623  	// account manager.
   624  	Name string `json:"name,omitempty"`
   625  
   626  	// ServerResponse contains the HTTP response code and headers from the server.
   627  	googleapi.ServerResponse `json:"-"`
   628  	// ForceSendFields is a list of field names (e.g.
   629  	// "BypassNonguaranteedDealsPretargeting") to unconditionally include in API
   630  	// requests. By default, fields with empty or default values are omitted from
   631  	// API requests. See
   632  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   633  	// details.
   634  	ForceSendFields []string `json:"-"`
   635  	// NullFields is a list of field names (e.g.
   636  	// "BypassNonguaranteedDealsPretargeting") to include in API requests with the
   637  	// JSON null value. By default, fields with empty values are omitted from API
   638  	// requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for
   639  	// more details.
   640  	NullFields []string `json:"-"`
   641  }
   642  
   643  func (s *Bidder) MarshalJSON() ([]byte, error) {
   644  	type NoMethod Bidder
   645  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   646  }
   647  
   648  // Buyer: RTB Buyer account information.
   649  type Buyer struct {
   650  	// ActiveCreativeCount: Output only. The number of creatives that this buyer
   651  	// submitted through the API or bid with in the last 30 days. This is counted
   652  	// against the maximum number of active creatives.
   653  	ActiveCreativeCount int64 `json:"activeCreativeCount,omitempty,string"`
   654  	// Bidder: Output only. The name of the bidder resource that is responsible for
   655  	// receiving bidding traffic for this account. The bidder name must follow the
   656  	// pattern `bidders/{bidderAccountId}`, where `{bidderAccountId}` is the
   657  	// account ID of the bidder receiving traffic for this buyer.
   658  	Bidder string `json:"bidder,omitempty"`
   659  	// BillingIds: Output only. A list of billing IDs associated with this account.
   660  	// These IDs appear on: 1. A bid request, to signal which buyers are eligible
   661  	// to bid on a given opportunity, and which pretargeting configurations were
   662  	// matched for each eligible buyer. 2. The bid response, to attribute a winning
   663  	// impression to a specific account for billing, reporting, policy and
   664  	// publisher block enforcement.
   665  	BillingIds []string `json:"billingIds,omitempty"`
   666  	// DisplayName: Output only. The diplay name associated with this buyer
   667  	// account, as visible to sellers.
   668  	DisplayName string `json:"displayName,omitempty"`
   669  	// MaximumActiveCreativeCount: Output only. The maximum number of active
   670  	// creatives that this buyer can have.
   671  	MaximumActiveCreativeCount int64 `json:"maximumActiveCreativeCount,omitempty,string"`
   672  	// Name: Output only. Name of the buyer resource that must follow the pattern
   673  	// `buyers/{buyerAccountId}`, where `{buyerAccountId}` is the account ID of the
   674  	// buyer account whose information is to be received. One can get their account
   675  	// ID on the Authorized Buyers or Open Bidding UI, or by contacting their
   676  	// Google account manager.
   677  	Name string `json:"name,omitempty"`
   678  
   679  	// ServerResponse contains the HTTP response code and headers from the server.
   680  	googleapi.ServerResponse `json:"-"`
   681  	// ForceSendFields is a list of field names (e.g. "ActiveCreativeCount") to
   682  	// unconditionally include in API requests. By default, fields with empty or
   683  	// default values are omitted from API requests. See
   684  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   685  	// details.
   686  	ForceSendFields []string `json:"-"`
   687  	// NullFields is a list of field names (e.g. "ActiveCreativeCount") to include
   688  	// in API requests with the JSON null value. By default, fields with empty
   689  	// values are omitted from API requests. See
   690  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   691  	NullFields []string `json:"-"`
   692  }
   693  
   694  func (s *Buyer) MarshalJSON() ([]byte, error) {
   695  	type NoMethod Buyer
   696  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   697  }
   698  
   699  // CloseUserListRequest: A request to close a specified user list.
   700  type CloseUserListRequest struct {
   701  }
   702  
   703  // Creative: A creative and its classification data.
   704  type Creative struct {
   705  	// AccountId: Output only. ID of the buyer account that this creative is owned
   706  	// by. Can be used to filter the response of the creatives.list method with
   707  	// equality and inequality check.
   708  	AccountId int64 `json:"accountId,omitempty,string"`
   709  	// AdChoicesDestinationUrl: The link to AdChoices destination page. This is
   710  	// only supported for native ads.
   711  	AdChoicesDestinationUrl string `json:"adChoicesDestinationUrl,omitempty"`
   712  	// AdvertiserName: The name of the company being advertised in the creative.
   713  	// Can be used to filter the response of the creatives.list method.
   714  	AdvertiserName string `json:"advertiserName,omitempty"`
   715  	// AgencyId: The agency ID for this creative.
   716  	AgencyId int64 `json:"agencyId,omitempty,string"`
   717  	// ApiUpdateTime: Output only. The last update timestamp of the creative
   718  	// through the API.
   719  	ApiUpdateTime string `json:"apiUpdateTime,omitempty"`
   720  	// CreativeFormat: Output only. The format of this creative. Can be used to
   721  	// filter the response of the creatives.list method.
   722  	//
   723  	// Possible values:
   724  	//   "CREATIVE_FORMAT_UNSPECIFIED" - The format is unknown.
   725  	//   "HTML" - HTML creative.
   726  	//   "VIDEO" - Video creative.
   727  	//   "NATIVE" - Native creative.
   728  	CreativeFormat string `json:"creativeFormat,omitempty"`
   729  	// CreativeId: Buyer-specific creative ID that references this creative in bid
   730  	// responses. This field is Ignored in update operations. Can be used to filter
   731  	// the response of the creatives.list method. The maximum length of the
   732  	// creative ID is 128 bytes.
   733  	CreativeId string `json:"creativeId,omitempty"`
   734  	// CreativeServingDecision: Output only. Top level status and detected
   735  	// attributes of a creative (for example domain, language, advertiser, product
   736  	// category, etc.) that affect whether (status) and where (context) a creative
   737  	// will be allowed to serve.
   738  	CreativeServingDecision *CreativeServingDecision `json:"creativeServingDecision,omitempty"`
   739  	// DealIds: Output only. IDs of all of the deals with which this creative has
   740  	// been used in bidding. Can be used to filter the response of the
   741  	// creatives.list method.
   742  	DealIds []string `json:"dealIds,omitempty"`
   743  	// DeclaredAttributes: All declared attributes for the ads that may be shown
   744  	// from this creative. Can be used to filter the response of the creatives.list
   745  	// method. If the `excluded_attribute` field of a bid request
   746  	// (https://developers.google.com/authorized-buyers/rtb/downloads/realtime-bidding-proto")
   747  	// contains one of the attributes that were declared or detected for a given
   748  	// creative, and a bid is submitted with that creative, the bid will be
   749  	// filtered before the auction.
   750  	//
   751  	// Possible values:
   752  	//   "ATTRIBUTE_UNSPECIFIED" - Do not use. This is a placeholder value only.
   753  	//   "IMAGE_RICH_MEDIA" - The creative is of type image/rich media. For
   754  	// pretargeting.
   755  	//   "ADOBE_FLASH_FLV" - The creative is of video type Adobe Flash FLV. For
   756  	// pretargeting.
   757  	//   "IS_TAGGED" - The creative is tagged.
   758  	//   "IS_COOKIE_TARGETED" - The creative is cookie targeted.
   759  	//   "IS_USER_INTEREST_TARGETED" - The creative is user interest targeted.
   760  	//   "EXPANDING_DIRECTION_NONE" - The creative does not expand.
   761  	//   "EXPANDING_DIRECTION_UP" - The creative expands up.
   762  	//   "EXPANDING_DIRECTION_DOWN" - The creative expands down.
   763  	//   "EXPANDING_DIRECTION_LEFT" - The creative expands left.
   764  	//   "EXPANDING_DIRECTION_RIGHT" - The creative expands right.
   765  	//   "EXPANDING_DIRECTION_UP_LEFT" - The creative expands up and left.
   766  	//   "EXPANDING_DIRECTION_UP_RIGHT" - The creative expands up and right.
   767  	//   "EXPANDING_DIRECTION_DOWN_LEFT" - The creative expands down and left.
   768  	//   "EXPANDING_DIRECTION_DOWN_RIGHT" - The creative expands down and right.
   769  	//   "CREATIVE_TYPE_HTML" - The creative type is HTML.
   770  	//   "CREATIVE_TYPE_VAST_VIDEO" - The creative type is VAST video.
   771  	//   "EXPANDING_DIRECTION_UP_OR_DOWN" - The creative expands up or down.
   772  	//   "EXPANDING_DIRECTION_LEFT_OR_RIGHT" - The creative expands left or right.
   773  	//   "EXPANDING_DIRECTION_ANY_DIAGONAL" - The creative expands on any diagonal.
   774  	//   "EXPANDING_ACTION_ROLLOVER_TO_EXPAND" - The creative expands when rolled
   775  	// over.
   776  	//   "INSTREAM_VAST_VIDEO_TYPE_VPAID_FLASH" - The instream vast video type is
   777  	// vpaid flash.
   778  	//   "RICH_MEDIA_CAPABILITY_TYPE_MRAID" - The creative is MRAID.
   779  	//   "RICH_MEDIA_CAPABILITY_TYPE_FLASH" - The creative is Flash.
   780  	//   "RICH_MEDIA_CAPABILITY_TYPE_HTML5" - The creative is HTML5.
   781  	//   "SKIPPABLE_INSTREAM_VIDEO" - The creative has an instream VAST video type
   782  	// of skippable instream video. For pretargeting.
   783  	//   "RICH_MEDIA_CAPABILITY_TYPE_SSL" - The creative is SSL.
   784  	//   "RICH_MEDIA_CAPABILITY_TYPE_NON_SSL" - The creative is non-SSL.
   785  	//   "RICH_MEDIA_CAPABILITY_TYPE_INTERSTITIAL" - The creative is an
   786  	// interstitial.
   787  	//   "NON_SKIPPABLE_INSTREAM_VIDEO" - The creative has an instream VAST video
   788  	// type of non-skippable instream video. For pretargeting.
   789  	//   "NATIVE_ELIGIBILITY_ELIGIBLE" - The creative is eligible for native.
   790  	//   "NON_VPAID" - The creative has an instream VAST video type of non-VPAID.
   791  	// For pretargeting.
   792  	//   "NATIVE_ELIGIBILITY_NOT_ELIGIBLE" - The creative is not eligible for
   793  	// native.
   794  	//   "ANY_INTERSTITIAL" - The creative has an interstitial size of any
   795  	// interstitial. For pretargeting.
   796  	//   "NON_INTERSTITIAL" - The creative has an interstitial size of non
   797  	// interstitial. For pretargeting.
   798  	//   "IN_BANNER_VIDEO" - The video type is in-banner video.
   799  	//   "RENDERING_SIZELESS_ADX" - The creative can dynamically resize to fill a
   800  	// variety of slot sizes.
   801  	//   "OMSDK_1_0" - The open measurement SDK is supported.
   802  	//   "RENDERING_PLAYABLE" - The creative is considered a playable display
   803  	// creative.
   804  	DeclaredAttributes []string `json:"declaredAttributes,omitempty"`
   805  	// DeclaredClickThroughUrls: The set of declared destination URLs for the
   806  	// creative. Can be used to filter the response of the creatives.list method.
   807  	DeclaredClickThroughUrls []string `json:"declaredClickThroughUrls,omitempty"`
   808  	// DeclaredRestrictedCategories: All declared restricted categories for the ads
   809  	// that may be shown from this creative. Can be used to filter the response of
   810  	// the creatives.list method.
   811  	//
   812  	// Possible values:
   813  	//   "RESTRICTED_CATEGORY_UNSPECIFIED" - Default value that should never be
   814  	// used.
   815  	//   "ALCOHOL" - The alcohol restricted category.
   816  	DeclaredRestrictedCategories []string `json:"declaredRestrictedCategories,omitempty"`
   817  	// DeclaredVendorIds: IDs for the declared ad technology vendors that may be
   818  	// used by this creative. See
   819  	// https://storage.googleapis.com/adx-rtb-dictionaries/vendors.txt for possible
   820  	// values. Can be used to filter the response of the creatives.list method.
   821  	DeclaredVendorIds []int64 `json:"declaredVendorIds,omitempty"`
   822  	// Html: An HTML creative.
   823  	Html *HtmlContent `json:"html,omitempty"`
   824  	// ImpressionTrackingUrls: The set of URLs to be called to record an
   825  	// impression.
   826  	ImpressionTrackingUrls []string `json:"impressionTrackingUrls,omitempty"`
   827  	// Name: Output only. Name of the creative. Follows the pattern
   828  	// `buyers/{buyer}/creatives/{creative}`, where `{buyer}` represents the
   829  	// account ID of the buyer who owns the creative, and `{creative}` is the
   830  	// buyer-specific creative ID that references this creative in the bid
   831  	// response.
   832  	Name string `json:"name,omitempty"`
   833  	// Native: A native creative.
   834  	Native *NativeContent `json:"native,omitempty"`
   835  	// RenderUrl: Experimental field that can be used during the FLEDGE Origin
   836  	// Trial (/authorized-buyers/rtb/fledge-origin-trial). The URL to fetch an
   837  	// interest group ad used in TURTLEDOVE on-device auction
   838  	// (https://github.com/WICG/turtledove/blob/main/FLEDGE.md#1-browsers-record-interest-groups").
   839  	// This should be unique among all creatives for a given `accountId`. This URL
   840  	// should be the same as the URL returned by generateBid()
   841  	// (https://github.com/WICG/turtledove/blob/main/FLEDGE.md#32-on-device-bidding).
   842  	RenderUrl string `json:"renderUrl,omitempty"`
   843  	// RestrictedCategories: All restricted categories for the ads that may be
   844  	// shown from this creative.
   845  	//
   846  	// Possible values:
   847  	//   "RESTRICTED_CATEGORY_UNSPECIFIED" - Default value that should never be
   848  	// used.
   849  	//   "ALCOHOL" - The alcohol restricted category.
   850  	RestrictedCategories []string `json:"restrictedCategories,omitempty"`
   851  	// Version: Output only. The version of the creative. Version for a new
   852  	// creative is 1 and it increments during subsequent creative updates.
   853  	Version int64 `json:"version,omitempty"`
   854  	// Video: A video creative.
   855  	Video *VideoContent `json:"video,omitempty"`
   856  
   857  	// ServerResponse contains the HTTP response code and headers from the server.
   858  	googleapi.ServerResponse `json:"-"`
   859  	// ForceSendFields is a list of field names (e.g. "AccountId") to
   860  	// unconditionally include in API requests. By default, fields with empty or
   861  	// default values are omitted from API requests. See
   862  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   863  	// details.
   864  	ForceSendFields []string `json:"-"`
   865  	// NullFields is a list of field names (e.g. "AccountId") to include in API
   866  	// requests with the JSON null value. By default, fields with empty values are
   867  	// omitted from API requests. See
   868  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   869  	NullFields []string `json:"-"`
   870  }
   871  
   872  func (s *Creative) MarshalJSON() ([]byte, error) {
   873  	type NoMethod Creative
   874  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   875  }
   876  
   877  // CreativeDimensions: The dimensions of a creative. This applies to only HTML
   878  // and Native creatives.
   879  type CreativeDimensions struct {
   880  	// Height: The height of the creative in pixels.
   881  	Height int64 `json:"height,omitempty,string"`
   882  	// Width: The width of the creative in pixels.
   883  	Width int64 `json:"width,omitempty,string"`
   884  	// ForceSendFields is a list of field names (e.g. "Height") to unconditionally
   885  	// include in API requests. By default, fields with empty or default values are
   886  	// omitted from API requests. See
   887  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   888  	// details.
   889  	ForceSendFields []string `json:"-"`
   890  	// NullFields is a list of field names (e.g. "Height") to include in API
   891  	// requests with the JSON null value. By default, fields with empty values are
   892  	// omitted from API requests. See
   893  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   894  	NullFields []string `json:"-"`
   895  }
   896  
   897  func (s *CreativeDimensions) MarshalJSON() ([]byte, error) {
   898  	type NoMethod CreativeDimensions
   899  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   900  }
   901  
   902  // CreativeServingDecision: Top level status and detected attributes of a
   903  // creative.
   904  type CreativeServingDecision struct {
   905  	// AdTechnologyProviders: The detected ad technology providers.
   906  	AdTechnologyProviders *AdTechnologyProviders `json:"adTechnologyProviders,omitempty"`
   907  	// ChinaPolicyCompliance: The policy compliance of this creative in China. When
   908  	// approved or disapproved, this applies to both deals and open auction in
   909  	// China. When pending review, this creative is allowed to serve for deals but
   910  	// not for open auction.
   911  	ChinaPolicyCompliance *PolicyCompliance `json:"chinaPolicyCompliance,omitempty"`
   912  	// DealsPolicyCompliance: Policy compliance of this creative when bidding on
   913  	// Programmatic Guaranteed and Preferred Deals (outside of Russia and China).
   914  	DealsPolicyCompliance *PolicyCompliance `json:"dealsPolicyCompliance,omitempty"`
   915  	// DetectedAdvertisers: Detected advertisers and brands.
   916  	DetectedAdvertisers []*AdvertiserAndBrand `json:"detectedAdvertisers,omitempty"`
   917  	// DetectedAttributes: Publisher-excludable attributes that were detected for
   918  	// this creative. Can be used to filter the response of the creatives.list
   919  	// method. If the `excluded_attribute` field of a bid request
   920  	// (https://developers.google.com/authorized-buyers/rtb/downloads/realtime-bidding-proto)
   921  	// contains one of the attributes that were declared or detected for a given
   922  	// creative, and a bid is submitted with that creative, the bid will be
   923  	// filtered before the auction.
   924  	//
   925  	// Possible values:
   926  	//   "ATTRIBUTE_UNSPECIFIED" - Do not use. This is a placeholder value only.
   927  	//   "IMAGE_RICH_MEDIA" - The creative is of type image/rich media. For
   928  	// pretargeting.
   929  	//   "ADOBE_FLASH_FLV" - The creative is of video type Adobe Flash FLV. For
   930  	// pretargeting.
   931  	//   "IS_TAGGED" - The creative is tagged.
   932  	//   "IS_COOKIE_TARGETED" - The creative is cookie targeted.
   933  	//   "IS_USER_INTEREST_TARGETED" - The creative is user interest targeted.
   934  	//   "EXPANDING_DIRECTION_NONE" - The creative does not expand.
   935  	//   "EXPANDING_DIRECTION_UP" - The creative expands up.
   936  	//   "EXPANDING_DIRECTION_DOWN" - The creative expands down.
   937  	//   "EXPANDING_DIRECTION_LEFT" - The creative expands left.
   938  	//   "EXPANDING_DIRECTION_RIGHT" - The creative expands right.
   939  	//   "EXPANDING_DIRECTION_UP_LEFT" - The creative expands up and left.
   940  	//   "EXPANDING_DIRECTION_UP_RIGHT" - The creative expands up and right.
   941  	//   "EXPANDING_DIRECTION_DOWN_LEFT" - The creative expands down and left.
   942  	//   "EXPANDING_DIRECTION_DOWN_RIGHT" - The creative expands down and right.
   943  	//   "CREATIVE_TYPE_HTML" - The creative type is HTML.
   944  	//   "CREATIVE_TYPE_VAST_VIDEO" - The creative type is VAST video.
   945  	//   "EXPANDING_DIRECTION_UP_OR_DOWN" - The creative expands up or down.
   946  	//   "EXPANDING_DIRECTION_LEFT_OR_RIGHT" - The creative expands left or right.
   947  	//   "EXPANDING_DIRECTION_ANY_DIAGONAL" - The creative expands on any diagonal.
   948  	//   "EXPANDING_ACTION_ROLLOVER_TO_EXPAND" - The creative expands when rolled
   949  	// over.
   950  	//   "INSTREAM_VAST_VIDEO_TYPE_VPAID_FLASH" - The instream vast video type is
   951  	// vpaid flash.
   952  	//   "RICH_MEDIA_CAPABILITY_TYPE_MRAID" - The creative is MRAID.
   953  	//   "RICH_MEDIA_CAPABILITY_TYPE_FLASH" - The creative is Flash.
   954  	//   "RICH_MEDIA_CAPABILITY_TYPE_HTML5" - The creative is HTML5.
   955  	//   "SKIPPABLE_INSTREAM_VIDEO" - The creative has an instream VAST video type
   956  	// of skippable instream video. For pretargeting.
   957  	//   "RICH_MEDIA_CAPABILITY_TYPE_SSL" - The creative is SSL.
   958  	//   "RICH_MEDIA_CAPABILITY_TYPE_NON_SSL" - The creative is non-SSL.
   959  	//   "RICH_MEDIA_CAPABILITY_TYPE_INTERSTITIAL" - The creative is an
   960  	// interstitial.
   961  	//   "NON_SKIPPABLE_INSTREAM_VIDEO" - The creative has an instream VAST video
   962  	// type of non-skippable instream video. For pretargeting.
   963  	//   "NATIVE_ELIGIBILITY_ELIGIBLE" - The creative is eligible for native.
   964  	//   "NON_VPAID" - The creative has an instream VAST video type of non-VPAID.
   965  	// For pretargeting.
   966  	//   "NATIVE_ELIGIBILITY_NOT_ELIGIBLE" - The creative is not eligible for
   967  	// native.
   968  	//   "ANY_INTERSTITIAL" - The creative has an interstitial size of any
   969  	// interstitial. For pretargeting.
   970  	//   "NON_INTERSTITIAL" - The creative has an interstitial size of non
   971  	// interstitial. For pretargeting.
   972  	//   "IN_BANNER_VIDEO" - The video type is in-banner video.
   973  	//   "RENDERING_SIZELESS_ADX" - The creative can dynamically resize to fill a
   974  	// variety of slot sizes.
   975  	//   "OMSDK_1_0" - The open measurement SDK is supported.
   976  	//   "RENDERING_PLAYABLE" - The creative is considered a playable display
   977  	// creative.
   978  	DetectedAttributes []string `json:"detectedAttributes,omitempty"`
   979  	// DetectedClickThroughUrls: The set of detected destination URLs for the
   980  	// creative. Can be used to filter the response of the creatives.list method.
   981  	DetectedClickThroughUrls []string `json:"detectedClickThroughUrls,omitempty"`
   982  	// DetectedDomains: The detected domains for this creative.
   983  	DetectedDomains []string `json:"detectedDomains,omitempty"`
   984  	// DetectedLanguages: The detected languages for this creative. The order is
   985  	// arbitrary. The codes are 2 or 5 characters and are documented at
   986  	// https://developers.google.com/adwords/api/docs/appendix/languagecodes. Can
   987  	// be used to filter the response of the creatives.list method.
   988  	DetectedLanguages []string `json:"detectedLanguages,omitempty"`
   989  	// DetectedProductCategories: Detected product categories, if any. See the
   990  	// ad-product-categories.txt file in the technical documentation for a list of
   991  	// IDs. Can be used to filter the response of the creatives.list method.
   992  	DetectedProductCategories []int64 `json:"detectedProductCategories,omitempty"`
   993  	// DetectedSensitiveCategories: Detected sensitive categories, if any. Can be
   994  	// used to filter the response of the creatives.list method. See the
   995  	// ad-sensitive-categories.txt file in the technical documentation for a list
   996  	// of IDs. You should use these IDs along with the excluded-sensitive-category
   997  	// field in the bid request to filter your bids.
   998  	DetectedSensitiveCategories []int64 `json:"detectedSensitiveCategories,omitempty"`
   999  	// DetectedVendorIds: IDs of the ad technology vendors that were detected to be
  1000  	// used by this creative. See
  1001  	// https://storage.googleapis.com/adx-rtb-dictionaries/vendors.txt for possible
  1002  	// values. Can be used to filter the response of the creatives.list method. If
  1003  	// the `allowed_vendor_type` field of a bid request
  1004  	// (https://developers.google.com/authorized-buyers/rtb/downloads/realtime-bidding-proto)
  1005  	// does not contain one of the vendor type IDs that were declared or detected
  1006  	// for a given creative, and a bid is submitted with that creative, the bid
  1007  	// will be filtered before the auction.
  1008  	DetectedVendorIds []int64 `json:"detectedVendorIds,omitempty"`
  1009  	// LastStatusUpdate: The last time the creative status was updated. Can be used
  1010  	// to filter the response of the creatives.list method.
  1011  	LastStatusUpdate string `json:"lastStatusUpdate,omitempty"`
  1012  	// NetworkPolicyCompliance: Policy compliance of this creative when bidding in
  1013  	// open auction, private auction, or auction packages (outside of Russia and
  1014  	// China).
  1015  	NetworkPolicyCompliance *PolicyCompliance `json:"networkPolicyCompliance,omitempty"`
  1016  	// PlatformPolicyCompliance: Policy compliance of this creative when bidding in
  1017  	// Open Bidding (outside of Russia and China). For the list of platform
  1018  	// policies, see: https://support.google.com/platformspolicy/answer/3013851.
  1019  	PlatformPolicyCompliance *PolicyCompliance `json:"platformPolicyCompliance,omitempty"`
  1020  	// RussiaPolicyCompliance: The policy compliance of this creative in Russia.
  1021  	// When approved or disapproved, this applies to both deals and open auction in
  1022  	// Russia. When pending review, this creative is allowed to serve for deals but
  1023  	// not for open auction.
  1024  	RussiaPolicyCompliance *PolicyCompliance `json:"russiaPolicyCompliance,omitempty"`
  1025  	// ForceSendFields is a list of field names (e.g. "AdTechnologyProviders") to
  1026  	// unconditionally include in API requests. By default, fields with empty or
  1027  	// default values are omitted from API requests. See
  1028  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1029  	// details.
  1030  	ForceSendFields []string `json:"-"`
  1031  	// NullFields is a list of field names (e.g. "AdTechnologyProviders") to
  1032  	// include in API requests with the JSON null value. By default, fields with
  1033  	// empty values are omitted from API requests. See
  1034  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1035  	NullFields []string `json:"-"`
  1036  }
  1037  
  1038  func (s *CreativeServingDecision) MarshalJSON() ([]byte, error) {
  1039  	type NoMethod CreativeServingDecision
  1040  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1041  }
  1042  
  1043  // Date: Represents a whole or partial calendar date, such as a birthday. The
  1044  // time of day and time zone are either specified elsewhere or are
  1045  // insignificant. The date is relative to the Gregorian Calendar. This can
  1046  // represent one of the following: * A full date, with non-zero year, month,
  1047  // and day values. * A month and day, with a zero year (for example, an
  1048  // anniversary). * A year on its own, with a zero month and a zero day. * A
  1049  // year and month, with a zero day (for example, a credit card expiration
  1050  // date). Related types: * google.type.TimeOfDay * google.type.DateTime *
  1051  // google.protobuf.Timestamp
  1052  type Date struct {
  1053  	// Day: Day of a month. Must be from 1 to 31 and valid for the year and month,
  1054  	// or 0 to specify a year by itself or a year and month where the day isn't
  1055  	// significant.
  1056  	Day int64 `json:"day,omitempty"`
  1057  	// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without
  1058  	// a month and day.
  1059  	Month int64 `json:"month,omitempty"`
  1060  	// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date
  1061  	// without a year.
  1062  	Year int64 `json:"year,omitempty"`
  1063  	// ForceSendFields is a list of field names (e.g. "Day") to unconditionally
  1064  	// include in API requests. By default, fields with empty or default values are
  1065  	// omitted from API requests. See
  1066  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1067  	// details.
  1068  	ForceSendFields []string `json:"-"`
  1069  	// NullFields is a list of field names (e.g. "Day") to include in API requests
  1070  	// with the JSON null value. By default, fields with empty values are omitted
  1071  	// from API requests. See
  1072  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1073  	NullFields []string `json:"-"`
  1074  }
  1075  
  1076  func (s *Date) MarshalJSON() ([]byte, error) {
  1077  	type NoMethod Date
  1078  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1079  }
  1080  
  1081  // DestinationNotCrawlableEvidence: Evidence that the creative's destination
  1082  // URL was not crawlable by Google.
  1083  type DestinationNotCrawlableEvidence struct {
  1084  	// CrawlTime: Approximate time of the crawl.
  1085  	CrawlTime string `json:"crawlTime,omitempty"`
  1086  	// CrawledUrl: Destination URL that was attempted to be crawled.
  1087  	CrawledUrl string `json:"crawledUrl,omitempty"`
  1088  	// Reason: Reason of destination not crawlable.
  1089  	//
  1090  	// Possible values:
  1091  	//   "REASON_UNSPECIFIED" - Default value that should never be used.
  1092  	//   "UNREACHABLE_ROBOTS" - Site's robots exclusion file (for example,
  1093  	// robots.txt) was unreachable.
  1094  	//   "TIMEOUT_ROBOTS" - Timed out reading site's robots exclusion file (for
  1095  	// example, robots.txt).
  1096  	//   "ROBOTED_DENIED" - Crawler was disallowed by the site's robots exclusion
  1097  	// file (for example, robots.txt).
  1098  	//   "UNKNOWN" - Unknown reason.
  1099  	Reason string `json:"reason,omitempty"`
  1100  	// ForceSendFields is a list of field names (e.g. "CrawlTime") to
  1101  	// unconditionally include in API requests. By default, fields with empty or
  1102  	// default values are omitted from API requests. See
  1103  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1104  	// details.
  1105  	ForceSendFields []string `json:"-"`
  1106  	// NullFields is a list of field names (e.g. "CrawlTime") to include in API
  1107  	// requests with the JSON null value. By default, fields with empty values are
  1108  	// omitted from API requests. See
  1109  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1110  	NullFields []string `json:"-"`
  1111  }
  1112  
  1113  func (s *DestinationNotCrawlableEvidence) MarshalJSON() ([]byte, error) {
  1114  	type NoMethod DestinationNotCrawlableEvidence
  1115  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1116  }
  1117  
  1118  // DestinationNotWorkingEvidence: Evidence of the creative's destination URL
  1119  // not functioning properly or having been incorrectly set up.
  1120  type DestinationNotWorkingEvidence struct {
  1121  	// DnsError: DNS lookup errors.
  1122  	//
  1123  	// Possible values:
  1124  	//   "DNS_ERROR_UNSPECIFIED" - Default value that should never be used.
  1125  	//   "ERROR_DNS" - DNS name was not found.
  1126  	//   "GOOGLE_CRAWLER_DNS_ISSUE" - An internal issue occurred when Google's
  1127  	// crawler tried to resolve the DNS entry. This is a Google-internal issue and
  1128  	// may not be the result of an issue with the landing page.
  1129  	DnsError string `json:"dnsError,omitempty"`
  1130  	// ExpandedUrl: The full non-working URL.
  1131  	ExpandedUrl string `json:"expandedUrl,omitempty"`
  1132  	// HttpError: HTTP error code (for example, 404 or 5xx)
  1133  	HttpError int64 `json:"httpError,omitempty"`
  1134  	// InvalidPage: Page was crawled successfully, but was detected as either a
  1135  	// page with no content or an error page.
  1136  	//
  1137  	// Possible values:
  1138  	//   "INVALID_PAGE_UNSPECIFIED" - Default value that should never be used.
  1139  	//   "EMPTY_OR_ERROR_PAGE" - Page was empty or had an error.
  1140  	InvalidPage string `json:"invalidPage,omitempty"`
  1141  	// LastCheckTime: Approximate time when the ad destination was last checked.
  1142  	LastCheckTime string `json:"lastCheckTime,omitempty"`
  1143  	// Platform: Platform of the non-working URL.
  1144  	//
  1145  	// Possible values:
  1146  	//   "PLATFORM_UNSPECIFIED" - Default value that should never be used.
  1147  	//   "PERSONAL_COMPUTER" - The personal computer platform.
  1148  	//   "ANDROID" - The Android platform.
  1149  	//   "IOS" - The iOS platform.
  1150  	Platform string `json:"platform,omitempty"`
  1151  	// RedirectionError: HTTP redirect chain error.
  1152  	//
  1153  	// Possible values:
  1154  	//   "REDIRECTION_ERROR_UNSPECIFIED" - Default value that should never be used.
  1155  	//   "TOO_MANY_REDIRECTS" - Too many redirect hops.
  1156  	//   "INVALID_REDIRECT" - Got a redirect but it was invalid.
  1157  	//   "EMPTY_REDIRECT" - Got a redirect but it was empty.
  1158  	//   "REDIRECT_ERROR_UNKNOWN" - Unknown redirect error.
  1159  	RedirectionError string `json:"redirectionError,omitempty"`
  1160  	// UrlRejected: Rejected because of malformed URLs or invalid requests.
  1161  	//
  1162  	// Possible values:
  1163  	//   "URL_REJECTED_UNSPECIFIED" - Default value that should never be used.
  1164  	//   "BAD_REQUEST" - URL rejected because of a malformed request.
  1165  	//   "MALFORMED_URL" - URL rejected because of a malformed URL.
  1166  	//   "URL_REJECTED_UNKNOWN" - URL rejected because of unknown reason.
  1167  	UrlRejected string `json:"urlRejected,omitempty"`
  1168  	// ForceSendFields is a list of field names (e.g. "DnsError") to
  1169  	// unconditionally include in API requests. By default, fields with empty or
  1170  	// default values are omitted from API requests. See
  1171  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1172  	// details.
  1173  	ForceSendFields []string `json:"-"`
  1174  	// NullFields is a list of field names (e.g. "DnsError") to include in API
  1175  	// requests with the JSON null value. By default, fields with empty values are
  1176  	// omitted from API requests. See
  1177  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1178  	NullFields []string `json:"-"`
  1179  }
  1180  
  1181  func (s *DestinationNotWorkingEvidence) MarshalJSON() ([]byte, error) {
  1182  	type NoMethod DestinationNotWorkingEvidence
  1183  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1184  }
  1185  
  1186  // DestinationUrlEvidence: The full landing page URL of the destination.
  1187  type DestinationUrlEvidence struct {
  1188  	// DestinationUrl: The full landing page URL of the destination.
  1189  	DestinationUrl string `json:"destinationUrl,omitempty"`
  1190  	// ForceSendFields is a list of field names (e.g. "DestinationUrl") to
  1191  	// unconditionally include in API requests. By default, fields with empty or
  1192  	// default values are omitted from API requests. See
  1193  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1194  	// details.
  1195  	ForceSendFields []string `json:"-"`
  1196  	// NullFields is a list of field names (e.g. "DestinationUrl") to include in
  1197  	// API requests with the JSON null value. By default, fields with empty values
  1198  	// are omitted from API requests. See
  1199  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1200  	NullFields []string `json:"-"`
  1201  }
  1202  
  1203  func (s *DestinationUrlEvidence) MarshalJSON() ([]byte, error) {
  1204  	type NoMethod DestinationUrlEvidence
  1205  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1206  }
  1207  
  1208  // DomainCallEvidence: Number of HTTP calls made by a creative, broken down by
  1209  // domain.
  1210  type DomainCallEvidence struct {
  1211  	// TopHttpCallDomains: Breakdown of the most frequent domains called through
  1212  	// HTTP by the creative.
  1213  	TopHttpCallDomains []*DomainCalls `json:"topHttpCallDomains,omitempty"`
  1214  	// TotalHttpCallCount: The total number of HTTP calls made by the creative,
  1215  	// including but not limited to the number of calls in the
  1216  	// top_http_call_domains.
  1217  	TotalHttpCallCount int64 `json:"totalHttpCallCount,omitempty"`
  1218  	// ForceSendFields is a list of field names (e.g. "TopHttpCallDomains") to
  1219  	// unconditionally include in API requests. By default, fields with empty or
  1220  	// default values are omitted from API requests. See
  1221  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1222  	// details.
  1223  	ForceSendFields []string `json:"-"`
  1224  	// NullFields is a list of field names (e.g. "TopHttpCallDomains") to include
  1225  	// in API requests with the JSON null value. By default, fields with empty
  1226  	// values are omitted from API requests. See
  1227  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1228  	NullFields []string `json:"-"`
  1229  }
  1230  
  1231  func (s *DomainCallEvidence) MarshalJSON() ([]byte, error) {
  1232  	type NoMethod DomainCallEvidence
  1233  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1234  }
  1235  
  1236  // DomainCalls: The number of HTTP calls made to the given domain.
  1237  type DomainCalls struct {
  1238  	// Domain: The domain name.
  1239  	Domain string `json:"domain,omitempty"`
  1240  	// HttpCallCount: Number of HTTP calls made to the domain.
  1241  	HttpCallCount int64 `json:"httpCallCount,omitempty"`
  1242  	// ForceSendFields is a list of field names (e.g. "Domain") to unconditionally
  1243  	// include in API requests. By default, fields with empty or default values are
  1244  	// omitted from API requests. See
  1245  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1246  	// details.
  1247  	ForceSendFields []string `json:"-"`
  1248  	// NullFields is a list of field names (e.g. "Domain") to include in API
  1249  	// requests with the JSON null value. By default, fields with empty values are
  1250  	// omitted from API requests. See
  1251  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1252  	NullFields []string `json:"-"`
  1253  }
  1254  
  1255  func (s *DomainCalls) MarshalJSON() ([]byte, error) {
  1256  	type NoMethod DomainCalls
  1257  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1258  }
  1259  
  1260  // DownloadSizeEvidence: Total download size and URL-level download size
  1261  // breakdown for resources in a creative.
  1262  type DownloadSizeEvidence struct {
  1263  	// TopUrlDownloadSizeBreakdowns: Download size broken down by URLs with the top
  1264  	// download size.
  1265  	TopUrlDownloadSizeBreakdowns []*UrlDownloadSize `json:"topUrlDownloadSizeBreakdowns,omitempty"`
  1266  	// TotalDownloadSizeKb: Total download size (in kilobytes) for all the
  1267  	// resources in the creative.
  1268  	TotalDownloadSizeKb int64 `json:"totalDownloadSizeKb,omitempty"`
  1269  	// ForceSendFields is a list of field names (e.g.
  1270  	// "TopUrlDownloadSizeBreakdowns") to unconditionally include in API requests.
  1271  	// By default, fields with empty or default values are omitted from API
  1272  	// requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
  1273  	// for more details.
  1274  	ForceSendFields []string `json:"-"`
  1275  	// NullFields is a list of field names (e.g. "TopUrlDownloadSizeBreakdowns") to
  1276  	// include in API requests with the JSON null value. By default, fields with
  1277  	// empty values are omitted from API requests. See
  1278  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1279  	NullFields []string `json:"-"`
  1280  }
  1281  
  1282  func (s *DownloadSizeEvidence) MarshalJSON() ([]byte, error) {
  1283  	type NoMethod DownloadSizeEvidence
  1284  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1285  }
  1286  
  1287  // Empty: A generic empty message that you can re-use to avoid defining
  1288  // duplicated empty messages in your APIs. A typical example is to use it as
  1289  // the request or the response type of an API method. For instance: service Foo
  1290  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
  1291  type Empty struct {
  1292  	// ServerResponse contains the HTTP response code and headers from the server.
  1293  	googleapi.ServerResponse `json:"-"`
  1294  }
  1295  
  1296  // Endpoint: Bidder endpoint that receives bid requests.
  1297  type Endpoint struct {
  1298  	// BidProtocol: The protocol that the bidder endpoint is using.
  1299  	//
  1300  	// Possible values:
  1301  	//   "BID_PROTOCOL_UNSPECIFIED" - Placeholder for undefined bid protocol. This
  1302  	// value should not be used.
  1303  	//   "GOOGLE_RTB" - Google RTB protocol / Protobuf encoding.
  1304  	//   "OPENRTB_JSON" - OpenRTB / JSON encoding (unversioned/latest).
  1305  	//   "OPENRTB_PROTOBUF" - OpenRTB / Protobuf encoding (unversioned/latest).
  1306  	BidProtocol string `json:"bidProtocol,omitempty"`
  1307  	// MaximumQps: The maximum number of queries per second allowed to be sent to
  1308  	// this server.
  1309  	MaximumQps int64 `json:"maximumQps,omitempty,string"`
  1310  	// Name: Output only. Name of the endpoint resource that must follow the
  1311  	// pattern `bidders/{bidderAccountId}/endpoints/{endpointId}`, where
  1312  	// {bidderAccountId} is the account ID of the bidder who operates this
  1313  	// endpoint, and {endpointId} is a unique ID assigned by the server.
  1314  	Name string `json:"name,omitempty"`
  1315  	// TradingLocation: The trading location that bid requests should be sent from.
  1316  	// See
  1317  	// https://developers.google.com/authorized-buyers/rtb/peer-guide#trading-locations
  1318  	// for further information.
  1319  	//
  1320  	// Possible values:
  1321  	//   "TRADING_LOCATION_UNSPECIFIED" - A placeholder for an undefined trading
  1322  	// region. This value should not be used.
  1323  	//   "US_WEST" - The Western US trading location.
  1324  	//   "US_EAST" - The Eastern US trading location.
  1325  	//   "EUROPE" - The European trading location.
  1326  	//   "ASIA" - The Asia trading location.
  1327  	TradingLocation string `json:"tradingLocation,omitempty"`
  1328  	// Url: Output only. The URL that bid requests should be sent to.
  1329  	Url string `json:"url,omitempty"`
  1330  
  1331  	// ServerResponse contains the HTTP response code and headers from the server.
  1332  	googleapi.ServerResponse `json:"-"`
  1333  	// ForceSendFields is a list of field names (e.g. "BidProtocol") to
  1334  	// unconditionally include in API requests. By default, fields with empty or
  1335  	// default values are omitted from API requests. See
  1336  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1337  	// details.
  1338  	ForceSendFields []string `json:"-"`
  1339  	// NullFields is a list of field names (e.g. "BidProtocol") to include in API
  1340  	// requests with the JSON null value. By default, fields with empty values are
  1341  	// omitted from API requests. See
  1342  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1343  	NullFields []string `json:"-"`
  1344  }
  1345  
  1346  func (s *Endpoint) MarshalJSON() ([]byte, error) {
  1347  	type NoMethod Endpoint
  1348  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1349  }
  1350  
  1351  // GetRemarketingTagResponse: This has been sunset as of October 2023, and will
  1352  // return an error response if called. For more information, see the release
  1353  // notes:
  1354  // https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api
  1355  // Response for a request to get remarketing tag.
  1356  type GetRemarketingTagResponse struct {
  1357  	// Snippet: An HTML tag that can be placed on the advertiser's page to add
  1358  	// users to a user list. For more information and code samples on using
  1359  	// snippets on your website, refer to Tag your site for remarketing
  1360  	// (https://support.google.com/google-ads/answer/2476688).
  1361  	Snippet string `json:"snippet,omitempty"`
  1362  
  1363  	// ServerResponse contains the HTTP response code and headers from the server.
  1364  	googleapi.ServerResponse `json:"-"`
  1365  	// ForceSendFields is a list of field names (e.g. "Snippet") to unconditionally
  1366  	// include in API requests. By default, fields with empty or default values are
  1367  	// omitted from API requests. See
  1368  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1369  	// details.
  1370  	ForceSendFields []string `json:"-"`
  1371  	// NullFields is a list of field names (e.g. "Snippet") to include in API
  1372  	// requests with the JSON null value. By default, fields with empty values are
  1373  	// omitted from API requests. See
  1374  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1375  	NullFields []string `json:"-"`
  1376  }
  1377  
  1378  func (s *GetRemarketingTagResponse) MarshalJSON() ([]byte, error) {
  1379  	type NoMethod GetRemarketingTagResponse
  1380  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1381  }
  1382  
  1383  // HtmlContent: HTML content for a creative.
  1384  type HtmlContent struct {
  1385  	// Height: The height of the HTML snippet in pixels. Can be used to filter the
  1386  	// response of the creatives.list method.
  1387  	Height int64 `json:"height,omitempty"`
  1388  	// Snippet: The HTML snippet that displays the ad when inserted in the web
  1389  	// page.
  1390  	Snippet string `json:"snippet,omitempty"`
  1391  	// Width: The width of the HTML snippet in pixels. Can be used to filter the
  1392  	// response of the creatives.list method.
  1393  	Width int64 `json:"width,omitempty"`
  1394  	// ForceSendFields is a list of field names (e.g. "Height") to unconditionally
  1395  	// include in API requests. By default, fields with empty or default values are
  1396  	// omitted from API requests. See
  1397  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1398  	// details.
  1399  	ForceSendFields []string `json:"-"`
  1400  	// NullFields is a list of field names (e.g. "Height") to include in API
  1401  	// requests with the JSON null value. By default, fields with empty values are
  1402  	// omitted from API requests. See
  1403  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1404  	NullFields []string `json:"-"`
  1405  }
  1406  
  1407  func (s *HtmlContent) MarshalJSON() ([]byte, error) {
  1408  	type NoMethod HtmlContent
  1409  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1410  }
  1411  
  1412  // HttpCallEvidence: HTTP calls made by a creative that resulted in policy
  1413  // violations.
  1414  type HttpCallEvidence struct {
  1415  	// Urls: URLs of HTTP calls made by the creative.
  1416  	Urls []string `json:"urls,omitempty"`
  1417  	// ForceSendFields is a list of field names (e.g. "Urls") to unconditionally
  1418  	// include in API requests. By default, fields with empty or default values are
  1419  	// omitted from API requests. See
  1420  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1421  	// details.
  1422  	ForceSendFields []string `json:"-"`
  1423  	// NullFields is a list of field names (e.g. "Urls") to include in API requests
  1424  	// with the JSON null value. By default, fields with empty values are omitted
  1425  	// from API requests. See
  1426  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1427  	NullFields []string `json:"-"`
  1428  }
  1429  
  1430  func (s *HttpCallEvidence) MarshalJSON() ([]byte, error) {
  1431  	type NoMethod HttpCallEvidence
  1432  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1433  }
  1434  
  1435  // HttpCookieEvidence: Evidence for HTTP cookie-related policy violations.
  1436  type HttpCookieEvidence struct {
  1437  	// CookieNames: Names of cookies that violate Google policies. For
  1438  	// TOO_MANY_COOKIES policy, this will be the cookie names of top domains with
  1439  	// the largest number of cookies. For other policies, this will be all the
  1440  	// cookie names that violate the policy.
  1441  	CookieNames []string `json:"cookieNames,omitempty"`
  1442  	// MaxCookieCount: The largest number of cookies set by a creative. If this
  1443  	// field is set, cookie_names above will be set to the cookie names of top
  1444  	// domains with the largest number of cookies. This field will only be set for
  1445  	// TOO_MANY_COOKIES policy.
  1446  	MaxCookieCount int64 `json:"maxCookieCount,omitempty"`
  1447  	// ForceSendFields is a list of field names (e.g. "CookieNames") to
  1448  	// unconditionally include in API requests. By default, fields with empty or
  1449  	// default values are omitted from API requests. See
  1450  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1451  	// details.
  1452  	ForceSendFields []string `json:"-"`
  1453  	// NullFields is a list of field names (e.g. "CookieNames") to include in API
  1454  	// requests with the JSON null value. By default, fields with empty values are
  1455  	// omitted from API requests. See
  1456  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1457  	NullFields []string `json:"-"`
  1458  }
  1459  
  1460  func (s *HttpCookieEvidence) MarshalJSON() ([]byte, error) {
  1461  	type NoMethod HttpCookieEvidence
  1462  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1463  }
  1464  
  1465  // Image: An image resource. You may provide a larger image than was requested,
  1466  // so long as the aspect ratio is preserved.
  1467  type Image struct {
  1468  	// Height: Image height in pixels.
  1469  	Height int64 `json:"height,omitempty"`
  1470  	// Url: The URL of the image.
  1471  	Url string `json:"url,omitempty"`
  1472  	// Width: Image width in pixels.
  1473  	Width int64 `json:"width,omitempty"`
  1474  	// ForceSendFields is a list of field names (e.g. "Height") to unconditionally
  1475  	// include in API requests. By default, fields with empty or default values are
  1476  	// omitted from API requests. See
  1477  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1478  	// details.
  1479  	ForceSendFields []string `json:"-"`
  1480  	// NullFields is a list of field names (e.g. "Height") to include in API
  1481  	// requests with the JSON null value. By default, fields with empty values are
  1482  	// omitted from API requests. See
  1483  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1484  	NullFields []string `json:"-"`
  1485  }
  1486  
  1487  func (s *Image) MarshalJSON() ([]byte, error) {
  1488  	type NoMethod Image
  1489  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1490  }
  1491  
  1492  // ListBiddersResponse: A response containing bidders.
  1493  type ListBiddersResponse struct {
  1494  	// Bidders: List of bidders.
  1495  	Bidders []*Bidder `json:"bidders,omitempty"`
  1496  	// NextPageToken: A token which can be passed to a subsequent call to the
  1497  	// `ListBidders` method to retrieve the next page of results in
  1498  	// ListBiddersRequest.pageToken.
  1499  	NextPageToken string `json:"nextPageToken,omitempty"`
  1500  
  1501  	// ServerResponse contains the HTTP response code and headers from the server.
  1502  	googleapi.ServerResponse `json:"-"`
  1503  	// ForceSendFields is a list of field names (e.g. "Bidders") to unconditionally
  1504  	// include in API requests. By default, fields with empty or default values are
  1505  	// omitted from API requests. See
  1506  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1507  	// details.
  1508  	ForceSendFields []string `json:"-"`
  1509  	// NullFields is a list of field names (e.g. "Bidders") to include in API
  1510  	// requests with the JSON null value. By default, fields with empty values are
  1511  	// omitted from API requests. See
  1512  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1513  	NullFields []string `json:"-"`
  1514  }
  1515  
  1516  func (s *ListBiddersResponse) MarshalJSON() ([]byte, error) {
  1517  	type NoMethod ListBiddersResponse
  1518  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1519  }
  1520  
  1521  // ListBuyersResponse: A response containing buyer account information.
  1522  type ListBuyersResponse struct {
  1523  	// Buyers: List of buyers.
  1524  	Buyers []*Buyer `json:"buyers,omitempty"`
  1525  	// NextPageToken: A token which can be passed to a subsequent call to the
  1526  	// `ListBuyers` method to retrieve the next page of results in
  1527  	// ListBuyersRequest.pageToken.
  1528  	NextPageToken string `json:"nextPageToken,omitempty"`
  1529  
  1530  	// ServerResponse contains the HTTP response code and headers from the server.
  1531  	googleapi.ServerResponse `json:"-"`
  1532  	// ForceSendFields is a list of field names (e.g. "Buyers") to unconditionally
  1533  	// include in API requests. By default, fields with empty or default values are
  1534  	// omitted from API requests. See
  1535  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1536  	// details.
  1537  	ForceSendFields []string `json:"-"`
  1538  	// NullFields is a list of field names (e.g. "Buyers") to include in API
  1539  	// requests with the JSON null value. By default, fields with empty values are
  1540  	// omitted from API requests. See
  1541  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1542  	NullFields []string `json:"-"`
  1543  }
  1544  
  1545  func (s *ListBuyersResponse) MarshalJSON() ([]byte, error) {
  1546  	type NoMethod ListBuyersResponse
  1547  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1548  }
  1549  
  1550  // ListCreativesResponse: A response for listing creatives.
  1551  type ListCreativesResponse struct {
  1552  	// Creatives: The list of creatives.
  1553  	Creatives []*Creative `json:"creatives,omitempty"`
  1554  	// NextPageToken: A token to retrieve the next page of results. Pass this value
  1555  	// in the ListCreativesRequest.pageToken field in the subsequent call to the
  1556  	// `ListCreatives` method to retrieve the next page of results.
  1557  	NextPageToken string `json:"nextPageToken,omitempty"`
  1558  
  1559  	// ServerResponse contains the HTTP response code and headers from the server.
  1560  	googleapi.ServerResponse `json:"-"`
  1561  	// ForceSendFields is a list of field names (e.g. "Creatives") to
  1562  	// unconditionally include in API requests. By default, fields with empty or
  1563  	// default values are omitted from API requests. See
  1564  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1565  	// details.
  1566  	ForceSendFields []string `json:"-"`
  1567  	// NullFields is a list of field names (e.g. "Creatives") to include in API
  1568  	// requests with the JSON null value. By default, fields with empty values are
  1569  	// omitted from API requests. See
  1570  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1571  	NullFields []string `json:"-"`
  1572  }
  1573  
  1574  func (s *ListCreativesResponse) MarshalJSON() ([]byte, error) {
  1575  	type NoMethod ListCreativesResponse
  1576  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1577  }
  1578  
  1579  // ListEndpointsResponse: A response containing bidder endpoints.
  1580  type ListEndpointsResponse struct {
  1581  	// Endpoints: List of bidder endpoints.
  1582  	Endpoints []*Endpoint `json:"endpoints,omitempty"`
  1583  	// NextPageToken: A token which can be passed to a subsequent call to the
  1584  	// `ListEndpoints` method to retrieve the next page of results in
  1585  	// ListEndpointsRequest.pageToken.
  1586  	NextPageToken string `json:"nextPageToken,omitempty"`
  1587  
  1588  	// ServerResponse contains the HTTP response code and headers from the server.
  1589  	googleapi.ServerResponse `json:"-"`
  1590  	// ForceSendFields is a list of field names (e.g. "Endpoints") to
  1591  	// unconditionally include in API requests. By default, fields with empty or
  1592  	// default values are omitted from API requests. See
  1593  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1594  	// details.
  1595  	ForceSendFields []string `json:"-"`
  1596  	// NullFields is a list of field names (e.g. "Endpoints") to include in API
  1597  	// requests with the JSON null value. By default, fields with empty values are
  1598  	// omitted from API requests. See
  1599  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1600  	NullFields []string `json:"-"`
  1601  }
  1602  
  1603  func (s *ListEndpointsResponse) MarshalJSON() ([]byte, error) {
  1604  	type NoMethod ListEndpointsResponse
  1605  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1606  }
  1607  
  1608  // ListPretargetingConfigsResponse: A response containing pretargeting
  1609  // configurations.
  1610  type ListPretargetingConfigsResponse struct {
  1611  	// NextPageToken: A token which can be passed to a subsequent call to the
  1612  	// `ListPretargetingConfigs` method to retrieve the next page of results in
  1613  	// ListPretargetingConfigsRequest.pageToken.
  1614  	NextPageToken string `json:"nextPageToken,omitempty"`
  1615  	// PretargetingConfigs: List of pretargeting configurations.
  1616  	PretargetingConfigs []*PretargetingConfig `json:"pretargetingConfigs,omitempty"`
  1617  
  1618  	// ServerResponse contains the HTTP response code and headers from the server.
  1619  	googleapi.ServerResponse `json:"-"`
  1620  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1621  	// unconditionally include in API requests. By default, fields with empty or
  1622  	// default values are omitted from API requests. See
  1623  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1624  	// details.
  1625  	ForceSendFields []string `json:"-"`
  1626  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1627  	// requests with the JSON null value. By default, fields with empty values are
  1628  	// omitted from API requests. See
  1629  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1630  	NullFields []string `json:"-"`
  1631  }
  1632  
  1633  func (s *ListPretargetingConfigsResponse) MarshalJSON() ([]byte, error) {
  1634  	type NoMethod ListPretargetingConfigsResponse
  1635  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1636  }
  1637  
  1638  // ListPublisherConnectionsResponse: A response to a request for listing
  1639  // publisher connections.
  1640  type ListPublisherConnectionsResponse struct {
  1641  	// NextPageToken: A token to retrieve the next page of results. Pass this value
  1642  	// in the ListPublisherConnectionsRequest.pageToken field in the subsequent
  1643  	// call to the `ListPublisherConnections` method to retrieve the next page of
  1644  	// results.
  1645  	NextPageToken string `json:"nextPageToken,omitempty"`
  1646  	// PublisherConnections: The list of publisher connections.
  1647  	PublisherConnections []*PublisherConnection `json:"publisherConnections,omitempty"`
  1648  
  1649  	// ServerResponse contains the HTTP response code and headers from the server.
  1650  	googleapi.ServerResponse `json:"-"`
  1651  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1652  	// unconditionally include in API requests. By default, fields with empty or
  1653  	// default values are omitted from API requests. See
  1654  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1655  	// details.
  1656  	ForceSendFields []string `json:"-"`
  1657  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1658  	// requests with the JSON null value. By default, fields with empty values are
  1659  	// omitted from API requests. See
  1660  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1661  	NullFields []string `json:"-"`
  1662  }
  1663  
  1664  func (s *ListPublisherConnectionsResponse) MarshalJSON() ([]byte, error) {
  1665  	type NoMethod ListPublisherConnectionsResponse
  1666  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1667  }
  1668  
  1669  // ListUserListsResponse: The list user list response.
  1670  type ListUserListsResponse struct {
  1671  	// NextPageToken: The continuation page token to send back to the server in a
  1672  	// subsequent request. Due to a currently known issue, it is recommended that
  1673  	// the caller keep invoking the list method until the time a next page token is
  1674  	// not returned, even if the result set is empty.
  1675  	NextPageToken string `json:"nextPageToken,omitempty"`
  1676  	// UserLists: List of user lists from the search.
  1677  	UserLists []*UserList `json:"userLists,omitempty"`
  1678  
  1679  	// ServerResponse contains the HTTP response code and headers from the server.
  1680  	googleapi.ServerResponse `json:"-"`
  1681  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1682  	// unconditionally include in API requests. By default, fields with empty or
  1683  	// default values are omitted from API requests. See
  1684  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1685  	// details.
  1686  	ForceSendFields []string `json:"-"`
  1687  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1688  	// requests with the JSON null value. By default, fields with empty values are
  1689  	// omitted from API requests. See
  1690  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1691  	NullFields []string `json:"-"`
  1692  }
  1693  
  1694  func (s *ListUserListsResponse) MarshalJSON() ([]byte, error) {
  1695  	type NoMethod ListUserListsResponse
  1696  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1697  }
  1698  
  1699  // MediaFile: Information about each media file in the VAST.
  1700  type MediaFile struct {
  1701  	// Bitrate: Bitrate of the video file, in Kbps. Can be used to filter the
  1702  	// response of the creatives.list method.
  1703  	Bitrate int64 `json:"bitrate,omitempty,string"`
  1704  	// MimeType: The MIME type of this media file. Can be used to filter the
  1705  	// response of the creatives.list method.
  1706  	//
  1707  	// Possible values:
  1708  	//   "VIDEO_MIME_TYPE_UNSPECIFIED" - Default value that should never be used.
  1709  	//   "MIME_VIDEO_XFLV" - Flash container.
  1710  	//   "MIME_VIDEO_WEBM" - WebM container assuming VP9 codec.
  1711  	//   "MIME_VIDEO_MP4" - MPEG-4 container typically with H.264 codec.
  1712  	//   "MIME_VIDEO_OGG" - Ogg container assuming Theora codec.
  1713  	//   "MIME_VIDEO_YT_HOSTED" - Video files hosted on YouTube.
  1714  	//   "MIME_VIDEO_X_MS_WMV" - Windows Media Video Codec.
  1715  	//   "MIME_VIDEO_3GPP" - 3GPP container format used on 3G phones.
  1716  	//   "MIME_VIDEO_MOV" - Quicktime container format.
  1717  	//   "MIME_APPLICATION_SWF" - Shockwave Flash (used for VPAID ads).
  1718  	//   "MIME_APPLICATION_SURVEY" - Properties of VAST served by consumer survey.
  1719  	//   "MIME_APPLICATION_JAVASCRIPT" - JavaScript (used for VPAID ads).
  1720  	//   "MIME_APPLICATION_SILVERLIGHT" - Silverlight (used for VPAID ads).
  1721  	//   "MIME_APPLICATION_MPEGURL" - HLS/M3U8.
  1722  	//   "MIME_APPLICATION_MPEGDASH" - DASH.
  1723  	//   "MIME_AUDIO_MP4A" - MPEG-4 audio format.
  1724  	//   "MIME_AUDIO_MP3" - MPEG-3 audio format.
  1725  	//   "MIME_AUDIO_OGG" - Ogg audio format
  1726  	MimeType string `json:"mimeType,omitempty"`
  1727  	// ForceSendFields is a list of field names (e.g. "Bitrate") to unconditionally
  1728  	// include in API requests. By default, fields with empty or default values are
  1729  	// omitted from API requests. See
  1730  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1731  	// details.
  1732  	ForceSendFields []string `json:"-"`
  1733  	// NullFields is a list of field names (e.g. "Bitrate") to include in API
  1734  	// requests with the JSON null value. By default, fields with empty values are
  1735  	// omitted from API requests. See
  1736  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1737  	NullFields []string `json:"-"`
  1738  }
  1739  
  1740  func (s *MediaFile) MarshalJSON() ([]byte, error) {
  1741  	type NoMethod MediaFile
  1742  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1743  }
  1744  
  1745  // NativeContent: Native content for a creative.
  1746  type NativeContent struct {
  1747  	// AdvertiserName: The name of the advertiser or sponsor, to be displayed in
  1748  	// the ad creative.
  1749  	AdvertiserName string `json:"advertiserName,omitempty"`
  1750  	// AppIcon: The app icon, for app download ads.
  1751  	AppIcon *Image `json:"appIcon,omitempty"`
  1752  	// Body: A long description of the ad.
  1753  	Body string `json:"body,omitempty"`
  1754  	// CallToAction: A label for the button that the user is supposed to click.
  1755  	CallToAction string `json:"callToAction,omitempty"`
  1756  	// ClickLinkUrl: The URL that the browser/SDK will load when the user clicks
  1757  	// the ad.
  1758  	ClickLinkUrl string `json:"clickLinkUrl,omitempty"`
  1759  	// ClickTrackingUrl: The URL to use for click tracking.
  1760  	ClickTrackingUrl string `json:"clickTrackingUrl,omitempty"`
  1761  	// Headline: A short title for the ad.
  1762  	Headline string `json:"headline,omitempty"`
  1763  	// Image: A large image.
  1764  	Image *Image `json:"image,omitempty"`
  1765  	// Logo: A smaller image, for the advertiser's logo.
  1766  	Logo *Image `json:"logo,omitempty"`
  1767  	// PriceDisplayText: The price of the promoted app including currency info.
  1768  	PriceDisplayText string `json:"priceDisplayText,omitempty"`
  1769  	// StarRating: The app rating in the app store. Must be in the range [0-5].
  1770  	StarRating float64 `json:"starRating,omitempty"`
  1771  	// VideoUrl: The URL to fetch a native video ad.
  1772  	VideoUrl string `json:"videoUrl,omitempty"`
  1773  	// VideoVastXml: The contents of a VAST document for a native video ad.
  1774  	VideoVastXml string `json:"videoVastXml,omitempty"`
  1775  	// ForceSendFields is a list of field names (e.g. "AdvertiserName") to
  1776  	// unconditionally include in API requests. By default, fields with empty or
  1777  	// default values are omitted from API requests. See
  1778  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1779  	// details.
  1780  	ForceSendFields []string `json:"-"`
  1781  	// NullFields is a list of field names (e.g. "AdvertiserName") to include in
  1782  	// API requests with the JSON null value. By default, fields with empty values
  1783  	// are omitted from API requests. See
  1784  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1785  	NullFields []string `json:"-"`
  1786  }
  1787  
  1788  func (s *NativeContent) MarshalJSON() ([]byte, error) {
  1789  	type NoMethod NativeContent
  1790  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1791  }
  1792  
  1793  func (s *NativeContent) UnmarshalJSON(data []byte) error {
  1794  	type NoMethod NativeContent
  1795  	var s1 struct {
  1796  		StarRating gensupport.JSONFloat64 `json:"starRating"`
  1797  		*NoMethod
  1798  	}
  1799  	s1.NoMethod = (*NoMethod)(s)
  1800  	if err := json.Unmarshal(data, &s1); err != nil {
  1801  		return err
  1802  	}
  1803  	s.StarRating = float64(s1.StarRating)
  1804  	return nil
  1805  }
  1806  
  1807  // NumericTargetingDimension: Generic targeting used for targeting dimensions
  1808  // that contain a list of included and excluded numeric IDs used in app, user
  1809  // list, geo, and vertical id targeting.
  1810  type NumericTargetingDimension struct {
  1811  	// ExcludedIds: The IDs excluded in a configuration.
  1812  	ExcludedIds googleapi.Int64s `json:"excludedIds,omitempty"`
  1813  	// IncludedIds: The IDs included in a configuration.
  1814  	IncludedIds googleapi.Int64s `json:"includedIds,omitempty"`
  1815  	// ForceSendFields is a list of field names (e.g. "ExcludedIds") to
  1816  	// unconditionally include in API requests. By default, fields with empty or
  1817  	// default values are omitted from API requests. See
  1818  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1819  	// details.
  1820  	ForceSendFields []string `json:"-"`
  1821  	// NullFields is a list of field names (e.g. "ExcludedIds") to include in API
  1822  	// requests with the JSON null value. By default, fields with empty values are
  1823  	// omitted from API requests. See
  1824  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1825  	NullFields []string `json:"-"`
  1826  }
  1827  
  1828  func (s *NumericTargetingDimension) MarshalJSON() ([]byte, error) {
  1829  	type NoMethod NumericTargetingDimension
  1830  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1831  }
  1832  
  1833  // OpenUserListRequest: A request to open a specified user list.
  1834  type OpenUserListRequest struct {
  1835  }
  1836  
  1837  // PolicyCompliance: Policy compliance of the creative for a transaction type
  1838  // or a region.
  1839  type PolicyCompliance struct {
  1840  	// Status: Serving status for the given transaction type (for example, open
  1841  	// auction, deals) or region (for example, China, Russia). Can be used to
  1842  	// filter the response of the creatives.list method.
  1843  	//
  1844  	// Possible values:
  1845  	//   "STATUS_UNSPECIFIED" - Default value that should never be used.
  1846  	//   "PENDING_REVIEW" - Creative is pending review.
  1847  	//   "DISAPPROVED" - Creative cannot serve.
  1848  	//   "APPROVED" - Creative is approved.
  1849  	//   "CERTIFICATE_REQUIRED" - Certificates are required for the creative to be
  1850  	// served in some regions. For more information about creative certification,
  1851  	// refer to: https://support.google.com/authorizedbuyers/answer/7450776
  1852  	Status string `json:"status,omitempty"`
  1853  	// Topics: Topics related to the policy compliance for this transaction type
  1854  	// (for example, open auction, deals) or region (for example, China, Russia).
  1855  	// Topics may be present only if status is DISAPPROVED.
  1856  	Topics []*PolicyTopicEntry `json:"topics,omitempty"`
  1857  	// ForceSendFields is a list of field names (e.g. "Status") to unconditionally
  1858  	// include in API requests. By default, fields with empty or default values are
  1859  	// omitted from API requests. See
  1860  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1861  	// details.
  1862  	ForceSendFields []string `json:"-"`
  1863  	// NullFields is a list of field names (e.g. "Status") to include in API
  1864  	// requests with the JSON null value. By default, fields with empty values are
  1865  	// omitted from API requests. See
  1866  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1867  	NullFields []string `json:"-"`
  1868  }
  1869  
  1870  func (s *PolicyCompliance) MarshalJSON() ([]byte, error) {
  1871  	type NoMethod PolicyCompliance
  1872  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1873  }
  1874  
  1875  // PolicyTopicEntry: Each policy topic entry will represent a violation of a
  1876  // policy topic for a creative, with the policy topic information and optional
  1877  // evidence for the policy violation.
  1878  type PolicyTopicEntry struct {
  1879  	// Evidences: Pieces of evidence associated with this policy topic entry.
  1880  	Evidences []*PolicyTopicEvidence `json:"evidences,omitempty"`
  1881  	// HelpCenterUrl: URL of the help center article describing this policy topic.
  1882  	HelpCenterUrl string `json:"helpCenterUrl,omitempty"`
  1883  	// MissingCertificate: Whether or not the policy topic is missing a
  1884  	// certificate. Some policy topics require a certificate to unblock serving in
  1885  	// some regions. For more information about creative certification, refer to:
  1886  	// https://support.google.com/authorizedbuyers/answer/7450776
  1887  	MissingCertificate bool `json:"missingCertificate,omitempty"`
  1888  	// PolicyTopic: Policy topic this entry refers to. For example, "ALCOHOL",
  1889  	// "TRADEMARKS_IN_AD_TEXT", or "DESTINATION_NOT_WORKING". The set of possible
  1890  	// policy topics is not fixed for a particular API version and may change at
  1891  	// any time. Can be used to filter the response of the creatives.list method
  1892  	PolicyTopic string `json:"policyTopic,omitempty"`
  1893  	// ForceSendFields is a list of field names (e.g. "Evidences") to
  1894  	// unconditionally include in API requests. By default, fields with empty or
  1895  	// default values are omitted from API requests. See
  1896  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1897  	// details.
  1898  	ForceSendFields []string `json:"-"`
  1899  	// NullFields is a list of field names (e.g. "Evidences") to include in API
  1900  	// requests with the JSON null value. By default, fields with empty values are
  1901  	// omitted from API requests. See
  1902  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1903  	NullFields []string `json:"-"`
  1904  }
  1905  
  1906  func (s *PolicyTopicEntry) MarshalJSON() ([]byte, error) {
  1907  	type NoMethod PolicyTopicEntry
  1908  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1909  }
  1910  
  1911  // PolicyTopicEvidence: Evidence associated with a policy topic entry.
  1912  type PolicyTopicEvidence struct {
  1913  	// DestinationNotCrawlable: The creative's destination URL was not crawlable by
  1914  	// Google.
  1915  	DestinationNotCrawlable *DestinationNotCrawlableEvidence `json:"destinationNotCrawlable,omitempty"`
  1916  	// DestinationNotWorking: The creative's destination URL did not function
  1917  	// properly or was incorrectly set up.
  1918  	DestinationNotWorking *DestinationNotWorkingEvidence `json:"destinationNotWorking,omitempty"`
  1919  	// DestinationUrl: URL of the actual landing page.
  1920  	DestinationUrl *DestinationUrlEvidence `json:"destinationUrl,omitempty"`
  1921  	// DomainCall: Number of HTTP calls made by the creative, broken down by
  1922  	// domain.
  1923  	DomainCall *DomainCallEvidence `json:"domainCall,omitempty"`
  1924  	// DownloadSize: Total download size and URL-level download size breakdown for
  1925  	// resources in a creative.
  1926  	DownloadSize *DownloadSizeEvidence `json:"downloadSize,omitempty"`
  1927  	// HttpCall: HTTP calls made by the creative that resulted in policy
  1928  	// violations.
  1929  	HttpCall *HttpCallEvidence `json:"httpCall,omitempty"`
  1930  	// HttpCookie: Evidence for HTTP cookie-related policy violations.
  1931  	HttpCookie *HttpCookieEvidence `json:"httpCookie,omitempty"`
  1932  	// ForceSendFields is a list of field names (e.g. "DestinationNotCrawlable") to
  1933  	// unconditionally include in API requests. By default, fields with empty or
  1934  	// default values are omitted from API requests. See
  1935  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1936  	// details.
  1937  	ForceSendFields []string `json:"-"`
  1938  	// NullFields is a list of field names (e.g. "DestinationNotCrawlable") to
  1939  	// include in API requests with the JSON null value. By default, fields with
  1940  	// empty values are omitted from API requests. See
  1941  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1942  	NullFields []string `json:"-"`
  1943  }
  1944  
  1945  func (s *PolicyTopicEvidence) MarshalJSON() ([]byte, error) {
  1946  	type NoMethod PolicyTopicEvidence
  1947  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1948  }
  1949  
  1950  // PretargetingConfig: Pretargeting configuration: a set of targeting
  1951  // dimensions applied at the pretargeting stage of the RTB funnel. These
  1952  // control which inventory a bidder will receive bid requests for.
  1953  type PretargetingConfig struct {
  1954  	// AllowedUserTargetingModes: Targeting modes included by this configuration. A
  1955  	// bid request must allow all the specified targeting modes. An unset value
  1956  	// allows all bid requests to be sent, regardless of which targeting modes they
  1957  	// allow.
  1958  	//
  1959  	// Possible values:
  1960  	//   "USER_TARGETING_MODE_UNSPECIFIED" - Placeholder for undefined user
  1961  	// targeting mode.
  1962  	//   "REMARKETING_ADS" - Remarketing ads are allowed to serve.
  1963  	//   "INTEREST_BASED_TARGETING" - Ads based on user interest category targeting
  1964  	// are allowed to serve.
  1965  	AllowedUserTargetingModes []string `json:"allowedUserTargetingModes,omitempty"`
  1966  	// AppTargeting: Targeting on a subset of app inventory. If APP is listed in
  1967  	// targeted_environments, the specified targeting is applied. A maximum of
  1968  	// 30,000 app IDs can be targeted. An unset value for targeting allows all
  1969  	// app-based bid requests to be sent. Apps can either be targeting positively
  1970  	// (bid requests will be sent only if the destination app is listed in the
  1971  	// targeting dimension) or negatively (bid requests will be sent only if the
  1972  	// destination app is not listed in the targeting dimension).
  1973  	AppTargeting *AppTargeting `json:"appTargeting,omitempty"`
  1974  	// BillingId: Output only. The identifier that corresponds to this pretargeting
  1975  	// configuration that helps buyers track and attribute their spend across their
  1976  	// own arbitrary divisions. If a bid request matches more than one
  1977  	// configuration, the buyer chooses which billing_id to attribute each of their
  1978  	// bids.
  1979  	BillingId int64 `json:"billingId,omitempty,string"`
  1980  	// DisplayName: The diplay name associated with this configuration. This name
  1981  	// must be unique among all the pretargeting configurations a bidder has.
  1982  	DisplayName string `json:"displayName,omitempty"`
  1983  	// ExcludedContentLabelIds: The sensitive content category label IDs excluded
  1984  	// in this configuration. Bid requests for inventory with any of the specified
  1985  	// content label IDs will not be sent. Refer to this file
  1986  	// https://storage.googleapis.com/adx-rtb-dictionaries/content-labels.txt for
  1987  	// category IDs.
  1988  	ExcludedContentLabelIds googleapi.Int64s `json:"excludedContentLabelIds,omitempty"`
  1989  	// GeoTargeting: The geos included or excluded in this configuration defined in
  1990  	// https://storage.googleapis.com/adx-rtb-dictionaries/geo-table.csv
  1991  	GeoTargeting *NumericTargetingDimension `json:"geoTargeting,omitempty"`
  1992  	// IncludedCreativeDimensions: Creative dimensions included by this
  1993  	// configuration. Only bid requests eligible for at least one of the specified
  1994  	// creative dimensions will be sent. An unset value allows all bid requests to
  1995  	// be sent, regardless of creative dimension.
  1996  	IncludedCreativeDimensions []*CreativeDimensions `json:"includedCreativeDimensions,omitempty"`
  1997  	// IncludedEnvironments: Environments that are being included. Bid requests
  1998  	// will not be sent for a given environment if it is not included. Further
  1999  	// restrictions can be applied to included environments to target only a subset
  2000  	// of its inventory. An unset value includes all environments.
  2001  	//
  2002  	// Possible values:
  2003  	//   "ENVIRONMENT_UNSPECIFIED" - Placeholder for unspecified environment. This
  2004  	// value should not be used.
  2005  	//   "APP" - App environment.
  2006  	//   "WEB" - Web environment.
  2007  	IncludedEnvironments []string `json:"includedEnvironments,omitempty"`
  2008  	// IncludedFormats: Creative formats included by this configuration. Only bid
  2009  	// requests eligible for at least one of the specified creative formats will be
  2010  	// sent. An unset value will allow all bid requests to be sent, regardless of
  2011  	// format.
  2012  	//
  2013  	// Possible values:
  2014  	//   "CREATIVE_FORMAT_UNSPECIFIED" - Placeholder for undefined creative format.
  2015  	// This value should not be used.
  2016  	//   "HTML" - HTML and AMPHTML creatives.
  2017  	//   "VAST" - VAST video or audio creative.
  2018  	//   "NATIVE" - Native creative, including standard and video native ads.
  2019  	IncludedFormats []string `json:"includedFormats,omitempty"`
  2020  	// IncludedLanguages: The languages included in this configuration, represented
  2021  	// by their language code. See
  2022  	// https://developers.google.com/adwords/api/docs/appendix/languagecodes.
  2023  	IncludedLanguages []string `json:"includedLanguages,omitempty"`
  2024  	// IncludedMobileOperatingSystemIds: The mobile operating systems included in
  2025  	// this configuration as defined in
  2026  	// https://storage.googleapis.com/adx-rtb-dictionaries/mobile-os.csv
  2027  	IncludedMobileOperatingSystemIds googleapi.Int64s `json:"includedMobileOperatingSystemIds,omitempty"`
  2028  	// IncludedPlatforms: The platforms included by this configration. Bid requests
  2029  	// for devices with the specified platform types will be sent. An unset value
  2030  	// allows all bid requests to be sent, regardless of platform.
  2031  	//
  2032  	// Possible values:
  2033  	//   "PLATFORM_UNSPECIFIED" - Placeholder for an undefined platform. This value
  2034  	// should not be used.
  2035  	//   "PERSONAL_COMPUTER" - The personal computer platform.
  2036  	//   "PHONE" - The mobile platform.
  2037  	//   "TABLET" - The tablet platform.
  2038  	//   "CONNECTED_TV" - The connected TV platform.
  2039  	IncludedPlatforms []string `json:"includedPlatforms,omitempty"`
  2040  	// IncludedUserIdTypes: User identifier types included in this configuration.
  2041  	// At least one of the user identifier types specified in this list must be
  2042  	// available for the bid request to be sent.
  2043  	//
  2044  	// Possible values:
  2045  	//   "USER_ID_TYPE_UNSPECIFIED" - Placeholder for unspecified user identifier.
  2046  	//   "HOSTED_MATCH_DATA" - Hosted match data, referring to hosted_match_data in
  2047  	// the bid request.
  2048  	//   "GOOGLE_COOKIE" - Google cookie, referring to google_user_id in the bid
  2049  	// request.
  2050  	//   "DEVICE_ID" - Mobile device advertising ID.
  2051  	//   "PUBLISHER_PROVIDED_ID" - The request has a publisher-provided ID
  2052  	// available to the bidder.
  2053  	IncludedUserIdTypes []string `json:"includedUserIdTypes,omitempty"`
  2054  	// InterstitialTargeting: The interstitial targeting specified for this
  2055  	// configuration. The unset value will allow bid requests to be sent regardless
  2056  	// of whether they are for interstitials or not.
  2057  	//
  2058  	// Possible values:
  2059  	//   "INTERSTITIAL_TARGETING_UNSPECIFIED" - Unspecified interstitial targeting.
  2060  	// Represents an interstitial-agnostic selection.
  2061  	//   "ONLY_INTERSTITIAL_REQUESTS" - Only bid requests for interstitial
  2062  	// inventory should be sent.
  2063  	//   "ONLY_NON_INTERSTITIAL_REQUESTS" - Only bid requests for non-interstitial
  2064  	// inventory should be sent.
  2065  	InterstitialTargeting string `json:"interstitialTargeting,omitempty"`
  2066  	// InvalidGeoIds: Output only. Existing included or excluded geos that are
  2067  	// invalid. Previously targeted geos may become invalid due to privacy
  2068  	// restrictions.
  2069  	InvalidGeoIds googleapi.Int64s `json:"invalidGeoIds,omitempty"`
  2070  	// MaximumQps: The maximum QPS threshold for this configuration. The bidder
  2071  	// should receive no more than this number of bid requests matching this
  2072  	// configuration per second across all their bidding endpoints among all
  2073  	// trading locations. Further information available at
  2074  	// https://developers.google.com/authorized-buyers/rtb/peer-guide
  2075  	MaximumQps int64 `json:"maximumQps,omitempty,string"`
  2076  	// MinimumViewabilityDecile: The targeted minimum viewability decile, ranging
  2077  	// in values [0, 10]. A value of 5 means that the configuration will only match
  2078  	// adslots for which we predict at least 50% viewability. Values > 10 will be
  2079  	// rounded down to 10. An unset value or a value of 0 indicates that bid
  2080  	// requests will be sent regardless of viewability.
  2081  	MinimumViewabilityDecile int64 `json:"minimumViewabilityDecile,omitempty"`
  2082  	// Name: Output only. Name of the pretargeting configuration that must follow
  2083  	// the pattern `bidders/{bidder_account_id}/pretargetingConfigs/{config_id}`
  2084  	Name string `json:"name,omitempty"`
  2085  	// PublisherTargeting: Targeting on a subset of publisher inventory. Publishers
  2086  	// can either be targeted positively (bid requests will be sent only if the
  2087  	// publisher is listed in the targeting dimension) or negatively (bid requests
  2088  	// will be sent only if the publisher is not listed in the targeting
  2089  	// dimension). A maximum of 10,000 publisher IDs can be targeted. Publisher IDs
  2090  	// are found in ads.txt (https://iabtechlab.com/ads-txt/) / app-ads.txt
  2091  	// (https://iabtechlab.com/app-ads-txt/) and in bid requests in the
  2092  	// `BidRequest.publisher_id` field on the Google RTB protocol
  2093  	// (https://developers.google.com/authorized-buyers/rtb/downloads/realtime-bidding-proto)
  2094  	// or the `BidRequest.site.publisher.id` / `BidRequest.app.publisher.id` field
  2095  	// on the OpenRTB protocol
  2096  	// (https://developers.google.com/authorized-buyers/rtb/downloads/openrtb-adx-proto).
  2097  	// Publisher IDs will be returned in the order that they were entered.
  2098  	PublisherTargeting *StringTargetingDimension `json:"publisherTargeting,omitempty"`
  2099  	// State: Output only. The state of this pretargeting configuration.
  2100  	//
  2101  	// Possible values:
  2102  	//   "STATE_UNSPECIFIED" - Placeholder for undefined state.
  2103  	//   "ACTIVE" - This pretargeting configuration is actively being used to
  2104  	// filter bid requests.
  2105  	//   "SUSPENDED" - This pretargeting configuration is suspended and not used in
  2106  	// serving.
  2107  	State string `json:"state,omitempty"`
  2108  	// UserListTargeting: The remarketing lists included or excluded in this
  2109  	// configuration as defined in UserList.
  2110  	UserListTargeting *NumericTargetingDimension `json:"userListTargeting,omitempty"`
  2111  	// VerticalTargeting: The verticals included or excluded in this configuration
  2112  	// as defined in
  2113  	// https://developers.google.com/authorized-buyers/rtb/downloads/publisher-verticals
  2114  	VerticalTargeting *NumericTargetingDimension `json:"verticalTargeting,omitempty"`
  2115  	// WebTargeting: Targeting on a subset of site inventory. If WEB is listed in
  2116  	// included_environments, the specified targeting is applied. A maximum of
  2117  	// 50,000 site URLs can be targeted. An unset value for targeting allows all
  2118  	// web-based bid requests to be sent. Sites can either be targeting positively
  2119  	// (bid requests will be sent only if the destination site is listed in the
  2120  	// targeting dimension) or negatively (bid requests will be sent only if the
  2121  	// destination site is not listed in the pretargeting configuration).
  2122  	WebTargeting *StringTargetingDimension `json:"webTargeting,omitempty"`
  2123  
  2124  	// ServerResponse contains the HTTP response code and headers from the server.
  2125  	googleapi.ServerResponse `json:"-"`
  2126  	// ForceSendFields is a list of field names (e.g. "AllowedUserTargetingModes")
  2127  	// to unconditionally include in API requests. By default, fields with empty or
  2128  	// default values are omitted from API requests. See
  2129  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2130  	// details.
  2131  	ForceSendFields []string `json:"-"`
  2132  	// NullFields is a list of field names (e.g. "AllowedUserTargetingModes") to
  2133  	// include in API requests with the JSON null value. By default, fields with
  2134  	// empty values are omitted from API requests. See
  2135  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2136  	NullFields []string `json:"-"`
  2137  }
  2138  
  2139  func (s *PretargetingConfig) MarshalJSON() ([]byte, error) {
  2140  	type NoMethod PretargetingConfig
  2141  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2142  }
  2143  
  2144  // PublisherConnection: An Open Bidding exchange's connection to a publisher.
  2145  // This is initiated by the publisher for the bidder to review. If approved by
  2146  // the bidder, this means that the bidder agrees to receive bid requests from
  2147  // the publisher.
  2148  type PublisherConnection struct {
  2149  	// BiddingState: Whether the publisher has been approved by the bidder.
  2150  	//
  2151  	// Possible values:
  2152  	//   "STATE_UNSPECIFIED" - An unspecified bidding status.
  2153  	//   "PENDING" - Indicates a request for connection from the publisher that the
  2154  	// bidder needs to review.
  2155  	//   "REJECTED" - Indicates that the publisher was rejected.
  2156  	//   "APPROVED" - Indicates that the publisher was approved.
  2157  	BiddingState string `json:"biddingState,omitempty"`
  2158  	// CreateTime: Output only. The time at which the publisher initiated a
  2159  	// connection with the bidder (irrespective of if or when the bidder approves
  2160  	// it). This is subsequently updated if the publisher revokes and re-initiates
  2161  	// the connection.
  2162  	CreateTime string `json:"createTime,omitempty"`
  2163  	// DisplayName: Output only. Publisher display name.
  2164  	DisplayName string `json:"displayName,omitempty"`
  2165  	// Name: Output only. Name of the publisher connection. This follows the
  2166  	// pattern `bidders/{bidder}/publisherConnections/{publisher}`, where
  2167  	// `{bidder}` represents the account ID of the bidder, and `{publisher}` is the
  2168  	// ads.txt/app-ads.txt publisher ID.
  2169  	Name string `json:"name,omitempty"`
  2170  	// PublisherPlatform: Output only. Whether the publisher is an Ad Manager or
  2171  	// AdMob publisher.
  2172  	//
  2173  	// Possible values:
  2174  	//   "PUBLISHER_PLATFORM_UNSPECIFIED" - An unspecified publisher platform.
  2175  	//   "GOOGLE_AD_MANAGER" - A Google Ad Manager publisher.
  2176  	//   "ADMOB" - An AdMob publisher.
  2177  	PublisherPlatform string `json:"publisherPlatform,omitempty"`
  2178  
  2179  	// ServerResponse contains the HTTP response code and headers from the server.
  2180  	googleapi.ServerResponse `json:"-"`
  2181  	// ForceSendFields is a list of field names (e.g. "BiddingState") to
  2182  	// unconditionally include in API requests. By default, fields with empty or
  2183  	// default values are omitted from API requests. See
  2184  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2185  	// details.
  2186  	ForceSendFields []string `json:"-"`
  2187  	// NullFields is a list of field names (e.g. "BiddingState") to include in API
  2188  	// requests with the JSON null value. By default, fields with empty values are
  2189  	// omitted from API requests. See
  2190  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2191  	NullFields []string `json:"-"`
  2192  }
  2193  
  2194  func (s *PublisherConnection) MarshalJSON() ([]byte, error) {
  2195  	type NoMethod PublisherConnection
  2196  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2197  }
  2198  
  2199  // RemoveTargetedAppsRequest: A request to stop targeting the provided apps in
  2200  // a specific pretargeting configuration. The pretargeting configuration itself
  2201  // specifies how these apps are targeted. in
  2202  // PretargetingConfig.appTargeting.mobileAppTargeting.
  2203  type RemoveTargetedAppsRequest struct {
  2204  	// AppIds: A list of app IDs to stop targeting in the pretargeting
  2205  	// configuration. These values will be removed from the list of targeted app
  2206  	// IDs in PretargetingConfig.appTargeting.mobileAppTargeting.values.
  2207  	AppIds []string `json:"appIds,omitempty"`
  2208  	// ForceSendFields is a list of field names (e.g. "AppIds") to unconditionally
  2209  	// include in API requests. By default, fields with empty or default values are
  2210  	// omitted from API requests. See
  2211  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2212  	// details.
  2213  	ForceSendFields []string `json:"-"`
  2214  	// NullFields is a list of field names (e.g. "AppIds") to include in API
  2215  	// requests with the JSON null value. By default, fields with empty values are
  2216  	// omitted from API requests. See
  2217  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2218  	NullFields []string `json:"-"`
  2219  }
  2220  
  2221  func (s *RemoveTargetedAppsRequest) MarshalJSON() ([]byte, error) {
  2222  	type NoMethod RemoveTargetedAppsRequest
  2223  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2224  }
  2225  
  2226  // RemoveTargetedPublishersRequest: A request to stop targeting publishers in a
  2227  // specific configuration. The pretargeting configuration itself specifies how
  2228  // these publishers are targeted in PretargetingConfig.publisherTargeting.
  2229  type RemoveTargetedPublishersRequest struct {
  2230  	// PublisherIds: A list of publisher IDs to stop targeting in the pretargeting
  2231  	// configuration. These values will be removed from the list of targeted
  2232  	// publisher IDs in PretargetingConfig.publisherTargeting.values. Publishers
  2233  	// are identified by their publisher ID from ads.txt / app-ads.txt. See
  2234  	// https://iabtechlab.com/ads-txt/ and https://iabtechlab.com/app-ads-txt/ for
  2235  	// more details.
  2236  	PublisherIds []string `json:"publisherIds,omitempty"`
  2237  	// ForceSendFields is a list of field names (e.g. "PublisherIds") to
  2238  	// unconditionally include in API requests. By default, fields with empty or
  2239  	// default values are omitted from API requests. See
  2240  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2241  	// details.
  2242  	ForceSendFields []string `json:"-"`
  2243  	// NullFields is a list of field names (e.g. "PublisherIds") to include in API
  2244  	// requests with the JSON null value. By default, fields with empty values are
  2245  	// omitted from API requests. See
  2246  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2247  	NullFields []string `json:"-"`
  2248  }
  2249  
  2250  func (s *RemoveTargetedPublishersRequest) MarshalJSON() ([]byte, error) {
  2251  	type NoMethod RemoveTargetedPublishersRequest
  2252  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2253  }
  2254  
  2255  // RemoveTargetedSitesRequest: A request to stop targeting sites in a specific
  2256  // pretargeting configuration. The pretargeting configuration itself specifies
  2257  // how these sites are targeted in PretargetingConfig.webTargeting.
  2258  type RemoveTargetedSitesRequest struct {
  2259  	// Sites: A list of site URLs to stop targeting in the pretargeting
  2260  	// configuration. These values will be removed from the list of targeted URLs
  2261  	// in PretargetingConfig.webTargeting.values.
  2262  	Sites []string `json:"sites,omitempty"`
  2263  	// ForceSendFields is a list of field names (e.g. "Sites") to unconditionally
  2264  	// include in API requests. By default, fields with empty or default values are
  2265  	// omitted from API requests. See
  2266  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2267  	// details.
  2268  	ForceSendFields []string `json:"-"`
  2269  	// NullFields is a list of field names (e.g. "Sites") to include in API
  2270  	// requests with the JSON null value. By default, fields with empty values are
  2271  	// omitted from API requests. See
  2272  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2273  	NullFields []string `json:"-"`
  2274  }
  2275  
  2276  func (s *RemoveTargetedSitesRequest) MarshalJSON() ([]byte, error) {
  2277  	type NoMethod RemoveTargetedSitesRequest
  2278  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2279  }
  2280  
  2281  // StringTargetingDimension: Generic targeting with string values used in app,
  2282  // website and publisher targeting.
  2283  type StringTargetingDimension struct {
  2284  	// TargetingMode: How the items in this list should be targeted.
  2285  	//
  2286  	// Possible values:
  2287  	//   "TARGETING_MODE_UNSPECIFIED" - Placeholder for undefined targeting mode.
  2288  	//   "INCLUSIVE" - The inclusive list type. Inventory must match an item in
  2289  	// this list to be targeted.
  2290  	//   "EXCLUSIVE" - The exclusive list type. Inventory must not match any item
  2291  	// in this list to be targeted.
  2292  	TargetingMode string `json:"targetingMode,omitempty"`
  2293  	// Values: The values specified.
  2294  	Values []string `json:"values,omitempty"`
  2295  	// ForceSendFields is a list of field names (e.g. "TargetingMode") to
  2296  	// unconditionally include in API requests. By default, fields with empty or
  2297  	// default values are omitted from API requests. See
  2298  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2299  	// details.
  2300  	ForceSendFields []string `json:"-"`
  2301  	// NullFields is a list of field names (e.g. "TargetingMode") to include in API
  2302  	// requests with the JSON null value. By default, fields with empty values are
  2303  	// omitted from API requests. See
  2304  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2305  	NullFields []string `json:"-"`
  2306  }
  2307  
  2308  func (s *StringTargetingDimension) MarshalJSON() ([]byte, error) {
  2309  	type NoMethod StringTargetingDimension
  2310  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2311  }
  2312  
  2313  // SuspendPretargetingConfigRequest: A request to suspend a pretargeting
  2314  // configuration. Sets the configuration's state to SUSPENDED.
  2315  type SuspendPretargetingConfigRequest struct {
  2316  }
  2317  
  2318  // UrlDownloadSize: The URL-level breakdown for the download size.
  2319  type UrlDownloadSize struct {
  2320  	// DownloadSizeKb: Download size of the URL in kilobytes.
  2321  	DownloadSizeKb int64 `json:"downloadSizeKb,omitempty"`
  2322  	// NormalizedUrl: The normalized URL with query parameters and fragment
  2323  	// removed.
  2324  	NormalizedUrl string `json:"normalizedUrl,omitempty"`
  2325  	// ForceSendFields is a list of field names (e.g. "DownloadSizeKb") to
  2326  	// unconditionally include in API requests. By default, fields with empty or
  2327  	// default values are omitted from API requests. See
  2328  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2329  	// details.
  2330  	ForceSendFields []string `json:"-"`
  2331  	// NullFields is a list of field names (e.g. "DownloadSizeKb") to include in
  2332  	// API requests with the JSON null value. By default, fields with empty values
  2333  	// are omitted from API requests. See
  2334  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2335  	NullFields []string `json:"-"`
  2336  }
  2337  
  2338  func (s *UrlDownloadSize) MarshalJSON() ([]byte, error) {
  2339  	type NoMethod UrlDownloadSize
  2340  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2341  }
  2342  
  2343  // UrlRestriction: Deprecated. This will be removed in October 2023. For more
  2344  // information, see the release notes:
  2345  // https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api
  2346  // Represents the URL restriction (for the URL captured by the pixel callback)
  2347  // for a user list.
  2348  type UrlRestriction struct {
  2349  	// EndDate: End date (if specified) of the URL restriction. End date should be
  2350  	// later than the start date for the date range to be valid.
  2351  	EndDate *Date `json:"endDate,omitempty"`
  2352  	// RestrictionType: The restriction type for the specified URL.
  2353  	//
  2354  	// Possible values:
  2355  	//   "RESTRICTION_TYPE_UNSPECIFIED" - Default value that should never be used.
  2356  	//   "CONTAINS" - The tag URL (as recorded by the pixel callback) contains the
  2357  	// specified URL.
  2358  	//   "EQUALS" - The tag URL (as recorded by the pixel callback) exactly matches
  2359  	// the specified URL.
  2360  	//   "STARTS_WITH" - The tag URL (as recorded by the pixel callback) starts
  2361  	// with the specified URL.
  2362  	//   "ENDS_WITH" - The tag URL (as recorded by the pixel callback) ends with
  2363  	// the specified URL.
  2364  	//   "DOES_NOT_EQUAL" - The tag URL (as recorded by the pixel callback) does
  2365  	// not equal the specified URL.
  2366  	//   "DOES_NOT_CONTAIN" - The tag URL (as recorded by the pixel callback) does
  2367  	// not contain the specified URL.
  2368  	//   "DOES_NOT_START_WITH" - The tag URL (as recorded by the pixel callback)
  2369  	// does not start with the specified URL.
  2370  	//   "DOES_NOT_END_WITH" - The tag URL (as recorded by the pixel callback) does
  2371  	// not end with the specified URL.
  2372  	RestrictionType string `json:"restrictionType,omitempty"`
  2373  	// StartDate: Start date (if specified) of the URL restriction.
  2374  	StartDate *Date `json:"startDate,omitempty"`
  2375  	// Url: Required. The URL to use for applying the restriction on the user list.
  2376  	Url string `json:"url,omitempty"`
  2377  	// ForceSendFields is a list of field names (e.g. "EndDate") to unconditionally
  2378  	// include in API requests. By default, fields with empty or default values are
  2379  	// omitted from API requests. See
  2380  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2381  	// details.
  2382  	ForceSendFields []string `json:"-"`
  2383  	// NullFields is a list of field names (e.g. "EndDate") to include in API
  2384  	// requests with the JSON null value. By default, fields with empty values are
  2385  	// omitted from API requests. See
  2386  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2387  	NullFields []string `json:"-"`
  2388  }
  2389  
  2390  func (s *UrlRestriction) MarshalJSON() ([]byte, error) {
  2391  	type NoMethod UrlRestriction
  2392  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2393  }
  2394  
  2395  // UserList: Represents an Authorized Buyers user list. Authorized Buyers can
  2396  // create/update/list user lists. Once a user list is created in the system,
  2397  // Authorized Buyers can add users to the user list using the bulk uploader
  2398  // API. Alternatively, users can be added by hosting a tag on the advertiser's
  2399  // page.
  2400  type UserList struct {
  2401  	// Description: The description for the user list.
  2402  	Description string `json:"description,omitempty"`
  2403  	// DisplayName: Required. Display name of the user list. This must be unique
  2404  	// across all user lists for a given account.
  2405  	DisplayName string `json:"displayName,omitempty"`
  2406  	// MembershipDurationDays: Required. The number of days a user's cookie stays
  2407  	// on the user list. The field must be between 0 and 540 inclusive.
  2408  	MembershipDurationDays int64 `json:"membershipDurationDays,omitempty,string"`
  2409  	// Name: Output only. Name of the user list that must follow the pattern
  2410  	// `buyers/{buyer}/userLists/{user_list}`, where `{buyer}` represents the
  2411  	// account ID of the buyer who owns the user list. For a bidder accessing user
  2412  	// lists on behalf of a child seat buyer, `{buyer}` represents the account ID
  2413  	// of the child seat buyer. `{user_list}` is an int64 identifier assigned by
  2414  	// Google to uniquely identify a user list.
  2415  	Name string `json:"name,omitempty"`
  2416  	// Status: Output only. The status of the user list. A new user list starts out
  2417  	// as open.
  2418  	//
  2419  	// Possible values:
  2420  	//   "STATUS_UNSPECIFIED" - Default value that should never be used.
  2421  	//   "OPEN" - New users can be added to the user list.
  2422  	//   "CLOSED" - New users cannot be added to the user list.
  2423  	Status string `json:"status,omitempty"`
  2424  	// UrlRestriction: Required. Deprecated. This will be removed in October 2023.
  2425  	// For more information, see the release notes:
  2426  	// https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api
  2427  	// The URL restriction for the user list.
  2428  	UrlRestriction *UrlRestriction `json:"urlRestriction,omitempty"`
  2429  
  2430  	// ServerResponse contains the HTTP response code and headers from the server.
  2431  	googleapi.ServerResponse `json:"-"`
  2432  	// ForceSendFields is a list of field names (e.g. "Description") to
  2433  	// unconditionally include in API requests. By default, fields with empty or
  2434  	// default values are omitted from API requests. See
  2435  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2436  	// details.
  2437  	ForceSendFields []string `json:"-"`
  2438  	// NullFields is a list of field names (e.g. "Description") to include in API
  2439  	// requests with the JSON null value. By default, fields with empty values are
  2440  	// omitted from API requests. See
  2441  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2442  	NullFields []string `json:"-"`
  2443  }
  2444  
  2445  func (s *UserList) MarshalJSON() ([]byte, error) {
  2446  	type NoMethod UserList
  2447  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2448  }
  2449  
  2450  // VideoContent: Video content for a creative.
  2451  type VideoContent struct {
  2452  	// VideoMetadata: Output only. Video metadata.
  2453  	VideoMetadata *VideoMetadata `json:"videoMetadata,omitempty"`
  2454  	// VideoUrl: The URL to fetch a video ad.
  2455  	VideoUrl string `json:"videoUrl,omitempty"`
  2456  	// VideoVastXml: The contents of a VAST document for a video ad. This document
  2457  	// should conform to the VAST 2.0 or 3.0 standard.
  2458  	VideoVastXml string `json:"videoVastXml,omitempty"`
  2459  	// ForceSendFields is a list of field names (e.g. "VideoMetadata") to
  2460  	// unconditionally include in API requests. By default, fields with empty or
  2461  	// default values are omitted from API requests. See
  2462  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2463  	// details.
  2464  	ForceSendFields []string `json:"-"`
  2465  	// NullFields is a list of field names (e.g. "VideoMetadata") to include in API
  2466  	// requests with the JSON null value. By default, fields with empty values are
  2467  	// omitted from API requests. See
  2468  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2469  	NullFields []string `json:"-"`
  2470  }
  2471  
  2472  func (s *VideoContent) MarshalJSON() ([]byte, error) {
  2473  	type NoMethod VideoContent
  2474  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2475  }
  2476  
  2477  // VideoMetadata: Video metadata for a creative.
  2478  type VideoMetadata struct {
  2479  	// Duration: The duration of the ad. Can be used to filter the response of the
  2480  	// creatives.list method.
  2481  	Duration string `json:"duration,omitempty"`
  2482  	// IsValidVast: Is this a valid VAST ad? Can be used to filter the response of
  2483  	// the creatives.list method.
  2484  	IsValidVast bool `json:"isValidVast,omitempty"`
  2485  	// IsVpaid: Is this a VPAID ad? Can be used to filter the response of the
  2486  	// creatives.list method.
  2487  	IsVpaid bool `json:"isVpaid,omitempty"`
  2488  	// MediaFiles: The list of all media files declared in the VAST. If there are
  2489  	// multiple VASTs in a wrapper chain, this includes the media files from the
  2490  	// deepest one in the chain.
  2491  	MediaFiles []*MediaFile `json:"mediaFiles,omitempty"`
  2492  	// SkipOffset: The minimum duration that the user has to watch before being
  2493  	// able to skip this ad. If the field is not set, the ad is not skippable. If
  2494  	// the field is set, the ad is skippable. Can be used to filter the response of
  2495  	// the creatives.list method.
  2496  	SkipOffset string `json:"skipOffset,omitempty"`
  2497  	// VastVersion: The maximum VAST version across all wrapped VAST documents. Can
  2498  	// be used to filter the response of the creatives.list method.
  2499  	//
  2500  	// Possible values:
  2501  	//   "VAST_VERSION_UNSPECIFIED" - Default value that should never be used.
  2502  	//   "VAST_VERSION_1_0" - VAST 1.0
  2503  	//   "VAST_VERSION_2_0" - VAST 2.0
  2504  	//   "VAST_VERSION_3_0" - VAST 3.0
  2505  	//   "VAST_VERSION_4_0" - VAST 4.0
  2506  	VastVersion string `json:"vastVersion,omitempty"`
  2507  	// ForceSendFields is a list of field names (e.g. "Duration") to
  2508  	// unconditionally include in API requests. By default, fields with empty or
  2509  	// default values are omitted from API requests. See
  2510  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2511  	// details.
  2512  	ForceSendFields []string `json:"-"`
  2513  	// NullFields is a list of field names (e.g. "Duration") to include in API
  2514  	// requests with the JSON null value. By default, fields with empty values are
  2515  	// omitted from API requests. See
  2516  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2517  	NullFields []string `json:"-"`
  2518  }
  2519  
  2520  func (s *VideoMetadata) MarshalJSON() ([]byte, error) {
  2521  	type NoMethod VideoMetadata
  2522  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2523  }
  2524  
  2525  // WatchCreativesRequest: A request to receive push notifications when any of
  2526  // the creatives belonging to the bidder changes status.
  2527  type WatchCreativesRequest struct {
  2528  }
  2529  
  2530  // WatchCreativesResponse: A response for the request to receive push
  2531  // notification when a bidder's creatives change status.
  2532  type WatchCreativesResponse struct {
  2533  	// Subscription: The Pub/Sub subscription that can be used to pull creative
  2534  	// status notifications. This would be of the format
  2535  	// `projects/{project_id}/subscriptions/{subscription_id}`. Subscription is
  2536  	// created with pull delivery. All service accounts belonging to the bidder
  2537  	// will have read access to this subscription. Subscriptions that are inactive
  2538  	// for more than 90 days will be disabled. Use watchCreatives to re-enable the
  2539  	// subscription.
  2540  	Subscription string `json:"subscription,omitempty"`
  2541  	// Topic: The Pub/Sub topic that will be used to publish creative serving
  2542  	// status notifications. This would be of the format
  2543  	// `projects/{project_id}/topics/{topic_id}`.
  2544  	Topic string `json:"topic,omitempty"`
  2545  
  2546  	// ServerResponse contains the HTTP response code and headers from the server.
  2547  	googleapi.ServerResponse `json:"-"`
  2548  	// ForceSendFields is a list of field names (e.g. "Subscription") to
  2549  	// unconditionally include in API requests. By default, fields with empty or
  2550  	// default values are omitted from API requests. See
  2551  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2552  	// details.
  2553  	ForceSendFields []string `json:"-"`
  2554  	// NullFields is a list of field names (e.g. "Subscription") to include in API
  2555  	// requests with the JSON null value. By default, fields with empty values are
  2556  	// omitted from API requests. See
  2557  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2558  	NullFields []string `json:"-"`
  2559  }
  2560  
  2561  func (s *WatchCreativesResponse) MarshalJSON() ([]byte, error) {
  2562  	type NoMethod WatchCreativesResponse
  2563  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2564  }
  2565  
  2566  type BiddersGetCall struct {
  2567  	s            *Service
  2568  	name         string
  2569  	urlParams_   gensupport.URLParams
  2570  	ifNoneMatch_ string
  2571  	ctx_         context.Context
  2572  	header_      http.Header
  2573  }
  2574  
  2575  // Get: Gets a bidder account by its name.
  2576  //
  2577  // - name: Name of the bidder to get. Format: `bidders/{bidderAccountId}`.
  2578  func (r *BiddersService) Get(name string) *BiddersGetCall {
  2579  	c := &BiddersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2580  	c.name = name
  2581  	return c
  2582  }
  2583  
  2584  // Fields allows partial responses to be retrieved. See
  2585  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2586  // details.
  2587  func (c *BiddersGetCall) Fields(s ...googleapi.Field) *BiddersGetCall {
  2588  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2589  	return c
  2590  }
  2591  
  2592  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2593  // object's ETag matches the given value. This is useful for getting updates
  2594  // only after the object has changed since the last request.
  2595  func (c *BiddersGetCall) IfNoneMatch(entityTag string) *BiddersGetCall {
  2596  	c.ifNoneMatch_ = entityTag
  2597  	return c
  2598  }
  2599  
  2600  // Context sets the context to be used in this call's Do method.
  2601  func (c *BiddersGetCall) Context(ctx context.Context) *BiddersGetCall {
  2602  	c.ctx_ = ctx
  2603  	return c
  2604  }
  2605  
  2606  // Header returns a http.Header that can be modified by the caller to add
  2607  // headers to the request.
  2608  func (c *BiddersGetCall) Header() http.Header {
  2609  	if c.header_ == nil {
  2610  		c.header_ = make(http.Header)
  2611  	}
  2612  	return c.header_
  2613  }
  2614  
  2615  func (c *BiddersGetCall) doRequest(alt string) (*http.Response, error) {
  2616  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2617  	if c.ifNoneMatch_ != "" {
  2618  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2619  	}
  2620  	var body io.Reader = nil
  2621  	c.urlParams_.Set("alt", alt)
  2622  	c.urlParams_.Set("prettyPrint", "false")
  2623  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2624  	urls += "?" + c.urlParams_.Encode()
  2625  	req, err := http.NewRequest("GET", urls, body)
  2626  	if err != nil {
  2627  		return nil, err
  2628  	}
  2629  	req.Header = reqHeaders
  2630  	googleapi.Expand(req.URL, map[string]string{
  2631  		"name": c.name,
  2632  	})
  2633  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2634  }
  2635  
  2636  // Do executes the "realtimebidding.bidders.get" call.
  2637  // Any non-2xx status code is an error. Response headers are in either
  2638  // *Bidder.ServerResponse.Header or (if a response was returned at all) in
  2639  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2640  // whether the returned error was because http.StatusNotModified was returned.
  2641  func (c *BiddersGetCall) Do(opts ...googleapi.CallOption) (*Bidder, error) {
  2642  	gensupport.SetOptions(c.urlParams_, opts...)
  2643  	res, err := c.doRequest("json")
  2644  	if res != nil && res.StatusCode == http.StatusNotModified {
  2645  		if res.Body != nil {
  2646  			res.Body.Close()
  2647  		}
  2648  		return nil, gensupport.WrapError(&googleapi.Error{
  2649  			Code:   res.StatusCode,
  2650  			Header: res.Header,
  2651  		})
  2652  	}
  2653  	if err != nil {
  2654  		return nil, err
  2655  	}
  2656  	defer googleapi.CloseBody(res)
  2657  	if err := googleapi.CheckResponse(res); err != nil {
  2658  		return nil, gensupport.WrapError(err)
  2659  	}
  2660  	ret := &Bidder{
  2661  		ServerResponse: googleapi.ServerResponse{
  2662  			Header:         res.Header,
  2663  			HTTPStatusCode: res.StatusCode,
  2664  		},
  2665  	}
  2666  	target := &ret
  2667  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2668  		return nil, err
  2669  	}
  2670  	return ret, nil
  2671  }
  2672  
  2673  type BiddersListCall struct {
  2674  	s            *Service
  2675  	urlParams_   gensupport.URLParams
  2676  	ifNoneMatch_ string
  2677  	ctx_         context.Context
  2678  	header_      http.Header
  2679  }
  2680  
  2681  // List: Lists all the bidder accounts that belong to the caller.
  2682  func (r *BiddersService) List() *BiddersListCall {
  2683  	c := &BiddersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2684  	return c
  2685  }
  2686  
  2687  // PageSize sets the optional parameter "pageSize": The maximum number of
  2688  // bidders to return. If unspecified, at most 100 bidders will be returned. The
  2689  // maximum value is 500; values above 500 will be coerced to 500.
  2690  func (c *BiddersListCall) PageSize(pageSize int64) *BiddersListCall {
  2691  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2692  	return c
  2693  }
  2694  
  2695  // PageToken sets the optional parameter "pageToken": A token identifying a
  2696  // page of results the server should return. This value is received from a
  2697  // previous `ListBidders` call in ListBiddersResponse.nextPageToken.
  2698  func (c *BiddersListCall) PageToken(pageToken string) *BiddersListCall {
  2699  	c.urlParams_.Set("pageToken", pageToken)
  2700  	return c
  2701  }
  2702  
  2703  // Fields allows partial responses to be retrieved. See
  2704  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2705  // details.
  2706  func (c *BiddersListCall) Fields(s ...googleapi.Field) *BiddersListCall {
  2707  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2708  	return c
  2709  }
  2710  
  2711  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2712  // object's ETag matches the given value. This is useful for getting updates
  2713  // only after the object has changed since the last request.
  2714  func (c *BiddersListCall) IfNoneMatch(entityTag string) *BiddersListCall {
  2715  	c.ifNoneMatch_ = entityTag
  2716  	return c
  2717  }
  2718  
  2719  // Context sets the context to be used in this call's Do method.
  2720  func (c *BiddersListCall) Context(ctx context.Context) *BiddersListCall {
  2721  	c.ctx_ = ctx
  2722  	return c
  2723  }
  2724  
  2725  // Header returns a http.Header that can be modified by the caller to add
  2726  // headers to the request.
  2727  func (c *BiddersListCall) Header() http.Header {
  2728  	if c.header_ == nil {
  2729  		c.header_ = make(http.Header)
  2730  	}
  2731  	return c.header_
  2732  }
  2733  
  2734  func (c *BiddersListCall) doRequest(alt string) (*http.Response, error) {
  2735  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2736  	if c.ifNoneMatch_ != "" {
  2737  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2738  	}
  2739  	var body io.Reader = nil
  2740  	c.urlParams_.Set("alt", alt)
  2741  	c.urlParams_.Set("prettyPrint", "false")
  2742  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/bidders")
  2743  	urls += "?" + c.urlParams_.Encode()
  2744  	req, err := http.NewRequest("GET", urls, body)
  2745  	if err != nil {
  2746  		return nil, err
  2747  	}
  2748  	req.Header = reqHeaders
  2749  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2750  }
  2751  
  2752  // Do executes the "realtimebidding.bidders.list" call.
  2753  // Any non-2xx status code is an error. Response headers are in either
  2754  // *ListBiddersResponse.ServerResponse.Header or (if a response was returned at
  2755  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2756  // check whether the returned error was because http.StatusNotModified was
  2757  // returned.
  2758  func (c *BiddersListCall) Do(opts ...googleapi.CallOption) (*ListBiddersResponse, error) {
  2759  	gensupport.SetOptions(c.urlParams_, opts...)
  2760  	res, err := c.doRequest("json")
  2761  	if res != nil && res.StatusCode == http.StatusNotModified {
  2762  		if res.Body != nil {
  2763  			res.Body.Close()
  2764  		}
  2765  		return nil, gensupport.WrapError(&googleapi.Error{
  2766  			Code:   res.StatusCode,
  2767  			Header: res.Header,
  2768  		})
  2769  	}
  2770  	if err != nil {
  2771  		return nil, err
  2772  	}
  2773  	defer googleapi.CloseBody(res)
  2774  	if err := googleapi.CheckResponse(res); err != nil {
  2775  		return nil, gensupport.WrapError(err)
  2776  	}
  2777  	ret := &ListBiddersResponse{
  2778  		ServerResponse: googleapi.ServerResponse{
  2779  			Header:         res.Header,
  2780  			HTTPStatusCode: res.StatusCode,
  2781  		},
  2782  	}
  2783  	target := &ret
  2784  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2785  		return nil, err
  2786  	}
  2787  	return ret, nil
  2788  }
  2789  
  2790  // Pages invokes f for each page of results.
  2791  // A non-nil error returned from f will halt the iteration.
  2792  // The provided context supersedes any context provided to the Context method.
  2793  func (c *BiddersListCall) Pages(ctx context.Context, f func(*ListBiddersResponse) error) error {
  2794  	c.ctx_ = ctx
  2795  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2796  	for {
  2797  		x, err := c.Do()
  2798  		if err != nil {
  2799  			return err
  2800  		}
  2801  		if err := f(x); err != nil {
  2802  			return err
  2803  		}
  2804  		if x.NextPageToken == "" {
  2805  			return nil
  2806  		}
  2807  		c.PageToken(x.NextPageToken)
  2808  	}
  2809  }
  2810  
  2811  type BiddersCreativesListCall struct {
  2812  	s            *Service
  2813  	parent       string
  2814  	urlParams_   gensupport.URLParams
  2815  	ifNoneMatch_ string
  2816  	ctx_         context.Context
  2817  	header_      http.Header
  2818  }
  2819  
  2820  // List: Lists creatives as they are at the time of the initial request. This
  2821  // call may take multiple hours to complete. For large, paginated requests,
  2822  // this method returns a snapshot of creatives at the time of request for the
  2823  // first page. `lastStatusUpdate` and `creativeServingDecision` may be outdated
  2824  // for creatives on sequential pages. We recommend Google Cloud Pub/Sub
  2825  // (//cloud.google.com/pubsub/docs/overview) to view the latest status.
  2826  //
  2827  //   - parent: Name of the parent buyer that owns the creatives. The pattern for
  2828  //     this resource is either `buyers/{buyerAccountId}` or
  2829  //     `bidders/{bidderAccountId}`. For `buyers/{buyerAccountId}`, the
  2830  //     `buyerAccountId` can be one of the following: 1. The ID of the buyer that
  2831  //     is accessing their own creatives. 2. The ID of the child seat buyer under
  2832  //     a bidder account. So for listing creatives pertaining to the child seat
  2833  //     buyer (`456`) under bidder account (`123`), you would use the pattern:
  2834  //     `buyers/456`. 3. The ID of the bidder itself. So for listing creatives
  2835  //     pertaining to bidder (`123`), you would use `buyers/123`. If you want to
  2836  //     access all creatives pertaining to both the bidder and all of its child
  2837  //     seat accounts, you would use `bidders/{bidderAccountId}`, for example, for
  2838  //     all creatives pertaining to bidder (`123`), use `bidders/123`.
  2839  func (r *BiddersCreativesService) List(parent string) *BiddersCreativesListCall {
  2840  	c := &BiddersCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2841  	c.parent = parent
  2842  	return c
  2843  }
  2844  
  2845  // Filter sets the optional parameter "filter": Query string to filter
  2846  // creatives. If no filter is specified, all active creatives will be returned.
  2847  // Example: 'accountId=12345 AND (dealsStatus:DISAPPROVED AND
  2848  // disapprovalReason:UNACCEPTABLE_CONTENT) OR
  2849  // declaredAttributes:IS_COOKIE_TARGETED'
  2850  func (c *BiddersCreativesListCall) Filter(filter string) *BiddersCreativesListCall {
  2851  	c.urlParams_.Set("filter", filter)
  2852  	return c
  2853  }
  2854  
  2855  // PageSize sets the optional parameter "pageSize": Requested page size. The
  2856  // server may return fewer creatives than requested (due to timeout constraint)
  2857  // even if more are available through another call. If unspecified, server will
  2858  // pick an appropriate default. Acceptable values are 1 to 1000, inclusive.
  2859  func (c *BiddersCreativesListCall) PageSize(pageSize int64) *BiddersCreativesListCall {
  2860  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2861  	return c
  2862  }
  2863  
  2864  // PageToken sets the optional parameter "pageToken": A token identifying a
  2865  // page of results the server should return. Typically, this is the value of
  2866  // ListCreativesResponse.nextPageToken returned from the previous call to the
  2867  // 'ListCreatives' method. Page tokens for continued pages are valid for up to
  2868  // five hours, counting from the call to 'ListCreatives' for the first page.
  2869  func (c *BiddersCreativesListCall) PageToken(pageToken string) *BiddersCreativesListCall {
  2870  	c.urlParams_.Set("pageToken", pageToken)
  2871  	return c
  2872  }
  2873  
  2874  // View sets the optional parameter "view": Controls the amount of information
  2875  // included in the response. By default only creativeServingDecision is
  2876  // included. To retrieve the entire creative resource (including the declared
  2877  // fields and the creative content) specify the view as "FULL".
  2878  //
  2879  // Possible values:
  2880  //
  2881  //	"CREATIVE_VIEW_UNSPECIFIED" - Not specified, equivalent to
  2882  //
  2883  // SERVING_DECISION_ONLY.
  2884  //
  2885  //	"SERVING_DECISION_ONLY" - Only creativeServingDecision is included in the
  2886  //
  2887  // response.
  2888  //
  2889  //	"FULL" - The entire creative resource (including the declared fields and
  2890  //
  2891  // the creative content) is included in the response.
  2892  func (c *BiddersCreativesListCall) View(view string) *BiddersCreativesListCall {
  2893  	c.urlParams_.Set("view", view)
  2894  	return c
  2895  }
  2896  
  2897  // Fields allows partial responses to be retrieved. See
  2898  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2899  // details.
  2900  func (c *BiddersCreativesListCall) Fields(s ...googleapi.Field) *BiddersCreativesListCall {
  2901  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2902  	return c
  2903  }
  2904  
  2905  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2906  // object's ETag matches the given value. This is useful for getting updates
  2907  // only after the object has changed since the last request.
  2908  func (c *BiddersCreativesListCall) IfNoneMatch(entityTag string) *BiddersCreativesListCall {
  2909  	c.ifNoneMatch_ = entityTag
  2910  	return c
  2911  }
  2912  
  2913  // Context sets the context to be used in this call's Do method.
  2914  func (c *BiddersCreativesListCall) Context(ctx context.Context) *BiddersCreativesListCall {
  2915  	c.ctx_ = ctx
  2916  	return c
  2917  }
  2918  
  2919  // Header returns a http.Header that can be modified by the caller to add
  2920  // headers to the request.
  2921  func (c *BiddersCreativesListCall) Header() http.Header {
  2922  	if c.header_ == nil {
  2923  		c.header_ = make(http.Header)
  2924  	}
  2925  	return c.header_
  2926  }
  2927  
  2928  func (c *BiddersCreativesListCall) doRequest(alt string) (*http.Response, error) {
  2929  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2930  	if c.ifNoneMatch_ != "" {
  2931  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2932  	}
  2933  	var body io.Reader = nil
  2934  	c.urlParams_.Set("alt", alt)
  2935  	c.urlParams_.Set("prettyPrint", "false")
  2936  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/creatives")
  2937  	urls += "?" + c.urlParams_.Encode()
  2938  	req, err := http.NewRequest("GET", urls, body)
  2939  	if err != nil {
  2940  		return nil, err
  2941  	}
  2942  	req.Header = reqHeaders
  2943  	googleapi.Expand(req.URL, map[string]string{
  2944  		"parent": c.parent,
  2945  	})
  2946  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2947  }
  2948  
  2949  // Do executes the "realtimebidding.bidders.creatives.list" call.
  2950  // Any non-2xx status code is an error. Response headers are in either
  2951  // *ListCreativesResponse.ServerResponse.Header or (if a response was returned
  2952  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2953  // check whether the returned error was because http.StatusNotModified was
  2954  // returned.
  2955  func (c *BiddersCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativesResponse, error) {
  2956  	gensupport.SetOptions(c.urlParams_, opts...)
  2957  	res, err := c.doRequest("json")
  2958  	if res != nil && res.StatusCode == http.StatusNotModified {
  2959  		if res.Body != nil {
  2960  			res.Body.Close()
  2961  		}
  2962  		return nil, gensupport.WrapError(&googleapi.Error{
  2963  			Code:   res.StatusCode,
  2964  			Header: res.Header,
  2965  		})
  2966  	}
  2967  	if err != nil {
  2968  		return nil, err
  2969  	}
  2970  	defer googleapi.CloseBody(res)
  2971  	if err := googleapi.CheckResponse(res); err != nil {
  2972  		return nil, gensupport.WrapError(err)
  2973  	}
  2974  	ret := &ListCreativesResponse{
  2975  		ServerResponse: googleapi.ServerResponse{
  2976  			Header:         res.Header,
  2977  			HTTPStatusCode: res.StatusCode,
  2978  		},
  2979  	}
  2980  	target := &ret
  2981  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2982  		return nil, err
  2983  	}
  2984  	return ret, nil
  2985  }
  2986  
  2987  // Pages invokes f for each page of results.
  2988  // A non-nil error returned from f will halt the iteration.
  2989  // The provided context supersedes any context provided to the Context method.
  2990  func (c *BiddersCreativesListCall) Pages(ctx context.Context, f func(*ListCreativesResponse) error) error {
  2991  	c.ctx_ = ctx
  2992  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2993  	for {
  2994  		x, err := c.Do()
  2995  		if err != nil {
  2996  			return err
  2997  		}
  2998  		if err := f(x); err != nil {
  2999  			return err
  3000  		}
  3001  		if x.NextPageToken == "" {
  3002  			return nil
  3003  		}
  3004  		c.PageToken(x.NextPageToken)
  3005  	}
  3006  }
  3007  
  3008  type BiddersCreativesWatchCall struct {
  3009  	s                     *Service
  3010  	parent                string
  3011  	watchcreativesrequest *WatchCreativesRequest
  3012  	urlParams_            gensupport.URLParams
  3013  	ctx_                  context.Context
  3014  	header_               http.Header
  3015  }
  3016  
  3017  // Watch: Watches all creatives pertaining to a bidder. It is sufficient to
  3018  // invoke this endpoint once per bidder. A Pub/Sub topic will be created and
  3019  // notifications will be pushed to the topic when any of the bidder's creatives
  3020  // change status. All of the bidder's service accounts will have access to read
  3021  // from the topic. Subsequent invocations of this method will return the
  3022  // existing Pub/Sub configuration.
  3023  //
  3024  //   - parent: To watch all creatives pertaining to the bidder and all its child
  3025  //     seat accounts, the bidder must follow the pattern
  3026  //     `bidders/{bidderAccountId}`.
  3027  func (r *BiddersCreativesService) Watch(parent string, watchcreativesrequest *WatchCreativesRequest) *BiddersCreativesWatchCall {
  3028  	c := &BiddersCreativesWatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3029  	c.parent = parent
  3030  	c.watchcreativesrequest = watchcreativesrequest
  3031  	return c
  3032  }
  3033  
  3034  // Fields allows partial responses to be retrieved. See
  3035  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3036  // details.
  3037  func (c *BiddersCreativesWatchCall) Fields(s ...googleapi.Field) *BiddersCreativesWatchCall {
  3038  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3039  	return c
  3040  }
  3041  
  3042  // Context sets the context to be used in this call's Do method.
  3043  func (c *BiddersCreativesWatchCall) Context(ctx context.Context) *BiddersCreativesWatchCall {
  3044  	c.ctx_ = ctx
  3045  	return c
  3046  }
  3047  
  3048  // Header returns a http.Header that can be modified by the caller to add
  3049  // headers to the request.
  3050  func (c *BiddersCreativesWatchCall) Header() http.Header {
  3051  	if c.header_ == nil {
  3052  		c.header_ = make(http.Header)
  3053  	}
  3054  	return c.header_
  3055  }
  3056  
  3057  func (c *BiddersCreativesWatchCall) doRequest(alt string) (*http.Response, error) {
  3058  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3059  	var body io.Reader = nil
  3060  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.watchcreativesrequest)
  3061  	if err != nil {
  3062  		return nil, err
  3063  	}
  3064  	c.urlParams_.Set("alt", alt)
  3065  	c.urlParams_.Set("prettyPrint", "false")
  3066  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/creatives:watch")
  3067  	urls += "?" + c.urlParams_.Encode()
  3068  	req, err := http.NewRequest("POST", urls, body)
  3069  	if err != nil {
  3070  		return nil, err
  3071  	}
  3072  	req.Header = reqHeaders
  3073  	googleapi.Expand(req.URL, map[string]string{
  3074  		"parent": c.parent,
  3075  	})
  3076  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3077  }
  3078  
  3079  // Do executes the "realtimebidding.bidders.creatives.watch" call.
  3080  // Any non-2xx status code is an error. Response headers are in either
  3081  // *WatchCreativesResponse.ServerResponse.Header or (if a response was returned
  3082  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3083  // check whether the returned error was because http.StatusNotModified was
  3084  // returned.
  3085  func (c *BiddersCreativesWatchCall) Do(opts ...googleapi.CallOption) (*WatchCreativesResponse, error) {
  3086  	gensupport.SetOptions(c.urlParams_, opts...)
  3087  	res, err := c.doRequest("json")
  3088  	if res != nil && res.StatusCode == http.StatusNotModified {
  3089  		if res.Body != nil {
  3090  			res.Body.Close()
  3091  		}
  3092  		return nil, gensupport.WrapError(&googleapi.Error{
  3093  			Code:   res.StatusCode,
  3094  			Header: res.Header,
  3095  		})
  3096  	}
  3097  	if err != nil {
  3098  		return nil, err
  3099  	}
  3100  	defer googleapi.CloseBody(res)
  3101  	if err := googleapi.CheckResponse(res); err != nil {
  3102  		return nil, gensupport.WrapError(err)
  3103  	}
  3104  	ret := &WatchCreativesResponse{
  3105  		ServerResponse: googleapi.ServerResponse{
  3106  			Header:         res.Header,
  3107  			HTTPStatusCode: res.StatusCode,
  3108  		},
  3109  	}
  3110  	target := &ret
  3111  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3112  		return nil, err
  3113  	}
  3114  	return ret, nil
  3115  }
  3116  
  3117  type BiddersEndpointsGetCall struct {
  3118  	s            *Service
  3119  	name         string
  3120  	urlParams_   gensupport.URLParams
  3121  	ifNoneMatch_ string
  3122  	ctx_         context.Context
  3123  	header_      http.Header
  3124  }
  3125  
  3126  // Get: Gets a bidder endpoint by its name.
  3127  //
  3128  //   - name: Name of the bidder endpoint to get. Format:
  3129  //     `bidders/{bidderAccountId}/endpoints/{endpointId}`.
  3130  func (r *BiddersEndpointsService) Get(name string) *BiddersEndpointsGetCall {
  3131  	c := &BiddersEndpointsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3132  	c.name = name
  3133  	return c
  3134  }
  3135  
  3136  // Fields allows partial responses to be retrieved. See
  3137  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3138  // details.
  3139  func (c *BiddersEndpointsGetCall) Fields(s ...googleapi.Field) *BiddersEndpointsGetCall {
  3140  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3141  	return c
  3142  }
  3143  
  3144  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3145  // object's ETag matches the given value. This is useful for getting updates
  3146  // only after the object has changed since the last request.
  3147  func (c *BiddersEndpointsGetCall) IfNoneMatch(entityTag string) *BiddersEndpointsGetCall {
  3148  	c.ifNoneMatch_ = entityTag
  3149  	return c
  3150  }
  3151  
  3152  // Context sets the context to be used in this call's Do method.
  3153  func (c *BiddersEndpointsGetCall) Context(ctx context.Context) *BiddersEndpointsGetCall {
  3154  	c.ctx_ = ctx
  3155  	return c
  3156  }
  3157  
  3158  // Header returns a http.Header that can be modified by the caller to add
  3159  // headers to the request.
  3160  func (c *BiddersEndpointsGetCall) Header() http.Header {
  3161  	if c.header_ == nil {
  3162  		c.header_ = make(http.Header)
  3163  	}
  3164  	return c.header_
  3165  }
  3166  
  3167  func (c *BiddersEndpointsGetCall) doRequest(alt string) (*http.Response, error) {
  3168  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3169  	if c.ifNoneMatch_ != "" {
  3170  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3171  	}
  3172  	var body io.Reader = nil
  3173  	c.urlParams_.Set("alt", alt)
  3174  	c.urlParams_.Set("prettyPrint", "false")
  3175  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3176  	urls += "?" + c.urlParams_.Encode()
  3177  	req, err := http.NewRequest("GET", urls, body)
  3178  	if err != nil {
  3179  		return nil, err
  3180  	}
  3181  	req.Header = reqHeaders
  3182  	googleapi.Expand(req.URL, map[string]string{
  3183  		"name": c.name,
  3184  	})
  3185  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3186  }
  3187  
  3188  // Do executes the "realtimebidding.bidders.endpoints.get" call.
  3189  // Any non-2xx status code is an error. Response headers are in either
  3190  // *Endpoint.ServerResponse.Header or (if a response was returned at all) in
  3191  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3192  // whether the returned error was because http.StatusNotModified was returned.
  3193  func (c *BiddersEndpointsGetCall) Do(opts ...googleapi.CallOption) (*Endpoint, error) {
  3194  	gensupport.SetOptions(c.urlParams_, opts...)
  3195  	res, err := c.doRequest("json")
  3196  	if res != nil && res.StatusCode == http.StatusNotModified {
  3197  		if res.Body != nil {
  3198  			res.Body.Close()
  3199  		}
  3200  		return nil, gensupport.WrapError(&googleapi.Error{
  3201  			Code:   res.StatusCode,
  3202  			Header: res.Header,
  3203  		})
  3204  	}
  3205  	if err != nil {
  3206  		return nil, err
  3207  	}
  3208  	defer googleapi.CloseBody(res)
  3209  	if err := googleapi.CheckResponse(res); err != nil {
  3210  		return nil, gensupport.WrapError(err)
  3211  	}
  3212  	ret := &Endpoint{
  3213  		ServerResponse: googleapi.ServerResponse{
  3214  			Header:         res.Header,
  3215  			HTTPStatusCode: res.StatusCode,
  3216  		},
  3217  	}
  3218  	target := &ret
  3219  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3220  		return nil, err
  3221  	}
  3222  	return ret, nil
  3223  }
  3224  
  3225  type BiddersEndpointsListCall struct {
  3226  	s            *Service
  3227  	parent       string
  3228  	urlParams_   gensupport.URLParams
  3229  	ifNoneMatch_ string
  3230  	ctx_         context.Context
  3231  	header_      http.Header
  3232  }
  3233  
  3234  // List: Lists all the bidder's endpoints.
  3235  //
  3236  //   - parent: Name of the bidder whose endpoints will be listed. Format:
  3237  //     `bidders/{bidderAccountId}`.
  3238  func (r *BiddersEndpointsService) List(parent string) *BiddersEndpointsListCall {
  3239  	c := &BiddersEndpointsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3240  	c.parent = parent
  3241  	return c
  3242  }
  3243  
  3244  // PageSize sets the optional parameter "pageSize": The maximum number of
  3245  // endpoints to return. If unspecified, at most 100 endpoints will be returned.
  3246  // The maximum value is 500; values above 500 will be coerced to 500.
  3247  func (c *BiddersEndpointsListCall) PageSize(pageSize int64) *BiddersEndpointsListCall {
  3248  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3249  	return c
  3250  }
  3251  
  3252  // PageToken sets the optional parameter "pageToken": A token identifying a
  3253  // page of results the server should return. This value is received from a
  3254  // previous `ListEndpoints` call in ListEndpointsResponse.nextPageToken.
  3255  func (c *BiddersEndpointsListCall) PageToken(pageToken string) *BiddersEndpointsListCall {
  3256  	c.urlParams_.Set("pageToken", pageToken)
  3257  	return c
  3258  }
  3259  
  3260  // Fields allows partial responses to be retrieved. See
  3261  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3262  // details.
  3263  func (c *BiddersEndpointsListCall) Fields(s ...googleapi.Field) *BiddersEndpointsListCall {
  3264  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3265  	return c
  3266  }
  3267  
  3268  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3269  // object's ETag matches the given value. This is useful for getting updates
  3270  // only after the object has changed since the last request.
  3271  func (c *BiddersEndpointsListCall) IfNoneMatch(entityTag string) *BiddersEndpointsListCall {
  3272  	c.ifNoneMatch_ = entityTag
  3273  	return c
  3274  }
  3275  
  3276  // Context sets the context to be used in this call's Do method.
  3277  func (c *BiddersEndpointsListCall) Context(ctx context.Context) *BiddersEndpointsListCall {
  3278  	c.ctx_ = ctx
  3279  	return c
  3280  }
  3281  
  3282  // Header returns a http.Header that can be modified by the caller to add
  3283  // headers to the request.
  3284  func (c *BiddersEndpointsListCall) Header() http.Header {
  3285  	if c.header_ == nil {
  3286  		c.header_ = make(http.Header)
  3287  	}
  3288  	return c.header_
  3289  }
  3290  
  3291  func (c *BiddersEndpointsListCall) doRequest(alt string) (*http.Response, error) {
  3292  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3293  	if c.ifNoneMatch_ != "" {
  3294  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3295  	}
  3296  	var body io.Reader = nil
  3297  	c.urlParams_.Set("alt", alt)
  3298  	c.urlParams_.Set("prettyPrint", "false")
  3299  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/endpoints")
  3300  	urls += "?" + c.urlParams_.Encode()
  3301  	req, err := http.NewRequest("GET", urls, body)
  3302  	if err != nil {
  3303  		return nil, err
  3304  	}
  3305  	req.Header = reqHeaders
  3306  	googleapi.Expand(req.URL, map[string]string{
  3307  		"parent": c.parent,
  3308  	})
  3309  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3310  }
  3311  
  3312  // Do executes the "realtimebidding.bidders.endpoints.list" call.
  3313  // Any non-2xx status code is an error. Response headers are in either
  3314  // *ListEndpointsResponse.ServerResponse.Header or (if a response was returned
  3315  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3316  // check whether the returned error was because http.StatusNotModified was
  3317  // returned.
  3318  func (c *BiddersEndpointsListCall) Do(opts ...googleapi.CallOption) (*ListEndpointsResponse, error) {
  3319  	gensupport.SetOptions(c.urlParams_, opts...)
  3320  	res, err := c.doRequest("json")
  3321  	if res != nil && res.StatusCode == http.StatusNotModified {
  3322  		if res.Body != nil {
  3323  			res.Body.Close()
  3324  		}
  3325  		return nil, gensupport.WrapError(&googleapi.Error{
  3326  			Code:   res.StatusCode,
  3327  			Header: res.Header,
  3328  		})
  3329  	}
  3330  	if err != nil {
  3331  		return nil, err
  3332  	}
  3333  	defer googleapi.CloseBody(res)
  3334  	if err := googleapi.CheckResponse(res); err != nil {
  3335  		return nil, gensupport.WrapError(err)
  3336  	}
  3337  	ret := &ListEndpointsResponse{
  3338  		ServerResponse: googleapi.ServerResponse{
  3339  			Header:         res.Header,
  3340  			HTTPStatusCode: res.StatusCode,
  3341  		},
  3342  	}
  3343  	target := &ret
  3344  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3345  		return nil, err
  3346  	}
  3347  	return ret, nil
  3348  }
  3349  
  3350  // Pages invokes f for each page of results.
  3351  // A non-nil error returned from f will halt the iteration.
  3352  // The provided context supersedes any context provided to the Context method.
  3353  func (c *BiddersEndpointsListCall) Pages(ctx context.Context, f func(*ListEndpointsResponse) error) error {
  3354  	c.ctx_ = ctx
  3355  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3356  	for {
  3357  		x, err := c.Do()
  3358  		if err != nil {
  3359  			return err
  3360  		}
  3361  		if err := f(x); err != nil {
  3362  			return err
  3363  		}
  3364  		if x.NextPageToken == "" {
  3365  			return nil
  3366  		}
  3367  		c.PageToken(x.NextPageToken)
  3368  	}
  3369  }
  3370  
  3371  type BiddersEndpointsPatchCall struct {
  3372  	s          *Service
  3373  	name       string
  3374  	endpoint   *Endpoint
  3375  	urlParams_ gensupport.URLParams
  3376  	ctx_       context.Context
  3377  	header_    http.Header
  3378  }
  3379  
  3380  // Patch: Updates a bidder's endpoint.
  3381  //
  3382  //   - name: Output only. Name of the endpoint resource that must follow the
  3383  //     pattern `bidders/{bidderAccountId}/endpoints/{endpointId}`, where
  3384  //     {bidderAccountId} is the account ID of the bidder who operates this
  3385  //     endpoint, and {endpointId} is a unique ID assigned by the server.
  3386  func (r *BiddersEndpointsService) Patch(name string, endpoint *Endpoint) *BiddersEndpointsPatchCall {
  3387  	c := &BiddersEndpointsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3388  	c.name = name
  3389  	c.endpoint = endpoint
  3390  	return c
  3391  }
  3392  
  3393  // UpdateMask sets the optional parameter "updateMask": Field mask to use for
  3394  // partial in-place updates.
  3395  func (c *BiddersEndpointsPatchCall) UpdateMask(updateMask string) *BiddersEndpointsPatchCall {
  3396  	c.urlParams_.Set("updateMask", updateMask)
  3397  	return c
  3398  }
  3399  
  3400  // Fields allows partial responses to be retrieved. See
  3401  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3402  // details.
  3403  func (c *BiddersEndpointsPatchCall) Fields(s ...googleapi.Field) *BiddersEndpointsPatchCall {
  3404  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3405  	return c
  3406  }
  3407  
  3408  // Context sets the context to be used in this call's Do method.
  3409  func (c *BiddersEndpointsPatchCall) Context(ctx context.Context) *BiddersEndpointsPatchCall {
  3410  	c.ctx_ = ctx
  3411  	return c
  3412  }
  3413  
  3414  // Header returns a http.Header that can be modified by the caller to add
  3415  // headers to the request.
  3416  func (c *BiddersEndpointsPatchCall) Header() http.Header {
  3417  	if c.header_ == nil {
  3418  		c.header_ = make(http.Header)
  3419  	}
  3420  	return c.header_
  3421  }
  3422  
  3423  func (c *BiddersEndpointsPatchCall) doRequest(alt string) (*http.Response, error) {
  3424  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3425  	var body io.Reader = nil
  3426  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.endpoint)
  3427  	if err != nil {
  3428  		return nil, err
  3429  	}
  3430  	c.urlParams_.Set("alt", alt)
  3431  	c.urlParams_.Set("prettyPrint", "false")
  3432  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3433  	urls += "?" + c.urlParams_.Encode()
  3434  	req, err := http.NewRequest("PATCH", urls, body)
  3435  	if err != nil {
  3436  		return nil, err
  3437  	}
  3438  	req.Header = reqHeaders
  3439  	googleapi.Expand(req.URL, map[string]string{
  3440  		"name": c.name,
  3441  	})
  3442  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3443  }
  3444  
  3445  // Do executes the "realtimebidding.bidders.endpoints.patch" call.
  3446  // Any non-2xx status code is an error. Response headers are in either
  3447  // *Endpoint.ServerResponse.Header or (if a response was returned at all) in
  3448  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3449  // whether the returned error was because http.StatusNotModified was returned.
  3450  func (c *BiddersEndpointsPatchCall) Do(opts ...googleapi.CallOption) (*Endpoint, error) {
  3451  	gensupport.SetOptions(c.urlParams_, opts...)
  3452  	res, err := c.doRequest("json")
  3453  	if res != nil && res.StatusCode == http.StatusNotModified {
  3454  		if res.Body != nil {
  3455  			res.Body.Close()
  3456  		}
  3457  		return nil, gensupport.WrapError(&googleapi.Error{
  3458  			Code:   res.StatusCode,
  3459  			Header: res.Header,
  3460  		})
  3461  	}
  3462  	if err != nil {
  3463  		return nil, err
  3464  	}
  3465  	defer googleapi.CloseBody(res)
  3466  	if err := googleapi.CheckResponse(res); err != nil {
  3467  		return nil, gensupport.WrapError(err)
  3468  	}
  3469  	ret := &Endpoint{
  3470  		ServerResponse: googleapi.ServerResponse{
  3471  			Header:         res.Header,
  3472  			HTTPStatusCode: res.StatusCode,
  3473  		},
  3474  	}
  3475  	target := &ret
  3476  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3477  		return nil, err
  3478  	}
  3479  	return ret, nil
  3480  }
  3481  
  3482  type BiddersPretargetingConfigsActivateCall struct {
  3483  	s                                 *Service
  3484  	name                              string
  3485  	activatepretargetingconfigrequest *ActivatePretargetingConfigRequest
  3486  	urlParams_                        gensupport.URLParams
  3487  	ctx_                              context.Context
  3488  	header_                           http.Header
  3489  }
  3490  
  3491  // Activate: Activates a pretargeting configuration.
  3492  //
  3493  //   - name: The name of the pretargeting configuration. Format:
  3494  //     bidders/{bidderAccountId}/pretargetingConfig/{configId}.
  3495  func (r *BiddersPretargetingConfigsService) Activate(name string, activatepretargetingconfigrequest *ActivatePretargetingConfigRequest) *BiddersPretargetingConfigsActivateCall {
  3496  	c := &BiddersPretargetingConfigsActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3497  	c.name = name
  3498  	c.activatepretargetingconfigrequest = activatepretargetingconfigrequest
  3499  	return c
  3500  }
  3501  
  3502  // Fields allows partial responses to be retrieved. See
  3503  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3504  // details.
  3505  func (c *BiddersPretargetingConfigsActivateCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsActivateCall {
  3506  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3507  	return c
  3508  }
  3509  
  3510  // Context sets the context to be used in this call's Do method.
  3511  func (c *BiddersPretargetingConfigsActivateCall) Context(ctx context.Context) *BiddersPretargetingConfigsActivateCall {
  3512  	c.ctx_ = ctx
  3513  	return c
  3514  }
  3515  
  3516  // Header returns a http.Header that can be modified by the caller to add
  3517  // headers to the request.
  3518  func (c *BiddersPretargetingConfigsActivateCall) Header() http.Header {
  3519  	if c.header_ == nil {
  3520  		c.header_ = make(http.Header)
  3521  	}
  3522  	return c.header_
  3523  }
  3524  
  3525  func (c *BiddersPretargetingConfigsActivateCall) doRequest(alt string) (*http.Response, error) {
  3526  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3527  	var body io.Reader = nil
  3528  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.activatepretargetingconfigrequest)
  3529  	if err != nil {
  3530  		return nil, err
  3531  	}
  3532  	c.urlParams_.Set("alt", alt)
  3533  	c.urlParams_.Set("prettyPrint", "false")
  3534  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:activate")
  3535  	urls += "?" + c.urlParams_.Encode()
  3536  	req, err := http.NewRequest("POST", urls, body)
  3537  	if err != nil {
  3538  		return nil, err
  3539  	}
  3540  	req.Header = reqHeaders
  3541  	googleapi.Expand(req.URL, map[string]string{
  3542  		"name": c.name,
  3543  	})
  3544  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3545  }
  3546  
  3547  // Do executes the "realtimebidding.bidders.pretargetingConfigs.activate" call.
  3548  // Any non-2xx status code is an error. Response headers are in either
  3549  // *PretargetingConfig.ServerResponse.Header or (if a response was returned at
  3550  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3551  // check whether the returned error was because http.StatusNotModified was
  3552  // returned.
  3553  func (c *BiddersPretargetingConfigsActivateCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
  3554  	gensupport.SetOptions(c.urlParams_, opts...)
  3555  	res, err := c.doRequest("json")
  3556  	if res != nil && res.StatusCode == http.StatusNotModified {
  3557  		if res.Body != nil {
  3558  			res.Body.Close()
  3559  		}
  3560  		return nil, gensupport.WrapError(&googleapi.Error{
  3561  			Code:   res.StatusCode,
  3562  			Header: res.Header,
  3563  		})
  3564  	}
  3565  	if err != nil {
  3566  		return nil, err
  3567  	}
  3568  	defer googleapi.CloseBody(res)
  3569  	if err := googleapi.CheckResponse(res); err != nil {
  3570  		return nil, gensupport.WrapError(err)
  3571  	}
  3572  	ret := &PretargetingConfig{
  3573  		ServerResponse: googleapi.ServerResponse{
  3574  			Header:         res.Header,
  3575  			HTTPStatusCode: res.StatusCode,
  3576  		},
  3577  	}
  3578  	target := &ret
  3579  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3580  		return nil, err
  3581  	}
  3582  	return ret, nil
  3583  }
  3584  
  3585  type BiddersPretargetingConfigsAddTargetedAppsCall struct {
  3586  	s                      *Service
  3587  	pretargetingConfig     string
  3588  	addtargetedappsrequest *AddTargetedAppsRequest
  3589  	urlParams_             gensupport.URLParams
  3590  	ctx_                   context.Context
  3591  	header_                http.Header
  3592  }
  3593  
  3594  // AddTargetedApps: Adds targeted apps to the pretargeting configuration.
  3595  //
  3596  //   - pretargetingConfig: The name of the pretargeting configuration. Format:
  3597  //     bidders/{bidderAccountId}/pretargetingConfig/{configId}.
  3598  func (r *BiddersPretargetingConfigsService) AddTargetedApps(pretargetingConfig string, addtargetedappsrequest *AddTargetedAppsRequest) *BiddersPretargetingConfigsAddTargetedAppsCall {
  3599  	c := &BiddersPretargetingConfigsAddTargetedAppsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3600  	c.pretargetingConfig = pretargetingConfig
  3601  	c.addtargetedappsrequest = addtargetedappsrequest
  3602  	return c
  3603  }
  3604  
  3605  // Fields allows partial responses to be retrieved. See
  3606  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3607  // details.
  3608  func (c *BiddersPretargetingConfigsAddTargetedAppsCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsAddTargetedAppsCall {
  3609  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3610  	return c
  3611  }
  3612  
  3613  // Context sets the context to be used in this call's Do method.
  3614  func (c *BiddersPretargetingConfigsAddTargetedAppsCall) Context(ctx context.Context) *BiddersPretargetingConfigsAddTargetedAppsCall {
  3615  	c.ctx_ = ctx
  3616  	return c
  3617  }
  3618  
  3619  // Header returns a http.Header that can be modified by the caller to add
  3620  // headers to the request.
  3621  func (c *BiddersPretargetingConfigsAddTargetedAppsCall) Header() http.Header {
  3622  	if c.header_ == nil {
  3623  		c.header_ = make(http.Header)
  3624  	}
  3625  	return c.header_
  3626  }
  3627  
  3628  func (c *BiddersPretargetingConfigsAddTargetedAppsCall) doRequest(alt string) (*http.Response, error) {
  3629  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3630  	var body io.Reader = nil
  3631  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.addtargetedappsrequest)
  3632  	if err != nil {
  3633  		return nil, err
  3634  	}
  3635  	c.urlParams_.Set("alt", alt)
  3636  	c.urlParams_.Set("prettyPrint", "false")
  3637  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+pretargetingConfig}:addTargetedApps")
  3638  	urls += "?" + c.urlParams_.Encode()
  3639  	req, err := http.NewRequest("POST", urls, body)
  3640  	if err != nil {
  3641  		return nil, err
  3642  	}
  3643  	req.Header = reqHeaders
  3644  	googleapi.Expand(req.URL, map[string]string{
  3645  		"pretargetingConfig": c.pretargetingConfig,
  3646  	})
  3647  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3648  }
  3649  
  3650  // Do executes the "realtimebidding.bidders.pretargetingConfigs.addTargetedApps" call.
  3651  // Any non-2xx status code is an error. Response headers are in either
  3652  // *PretargetingConfig.ServerResponse.Header or (if a response was returned at
  3653  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3654  // check whether the returned error was because http.StatusNotModified was
  3655  // returned.
  3656  func (c *BiddersPretargetingConfigsAddTargetedAppsCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
  3657  	gensupport.SetOptions(c.urlParams_, opts...)
  3658  	res, err := c.doRequest("json")
  3659  	if res != nil && res.StatusCode == http.StatusNotModified {
  3660  		if res.Body != nil {
  3661  			res.Body.Close()
  3662  		}
  3663  		return nil, gensupport.WrapError(&googleapi.Error{
  3664  			Code:   res.StatusCode,
  3665  			Header: res.Header,
  3666  		})
  3667  	}
  3668  	if err != nil {
  3669  		return nil, err
  3670  	}
  3671  	defer googleapi.CloseBody(res)
  3672  	if err := googleapi.CheckResponse(res); err != nil {
  3673  		return nil, gensupport.WrapError(err)
  3674  	}
  3675  	ret := &PretargetingConfig{
  3676  		ServerResponse: googleapi.ServerResponse{
  3677  			Header:         res.Header,
  3678  			HTTPStatusCode: res.StatusCode,
  3679  		},
  3680  	}
  3681  	target := &ret
  3682  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3683  		return nil, err
  3684  	}
  3685  	return ret, nil
  3686  }
  3687  
  3688  type BiddersPretargetingConfigsAddTargetedPublishersCall struct {
  3689  	s                            *Service
  3690  	pretargetingConfig           string
  3691  	addtargetedpublishersrequest *AddTargetedPublishersRequest
  3692  	urlParams_                   gensupport.URLParams
  3693  	ctx_                         context.Context
  3694  	header_                      http.Header
  3695  }
  3696  
  3697  // AddTargetedPublishers: Adds targeted publishers to the pretargeting config.
  3698  //
  3699  //   - pretargetingConfig: The name of the pretargeting configuration. Format:
  3700  //     bidders/{bidderAccountId}/pretargetingConfig/{configId}.
  3701  func (r *BiddersPretargetingConfigsService) AddTargetedPublishers(pretargetingConfig string, addtargetedpublishersrequest *AddTargetedPublishersRequest) *BiddersPretargetingConfigsAddTargetedPublishersCall {
  3702  	c := &BiddersPretargetingConfigsAddTargetedPublishersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3703  	c.pretargetingConfig = pretargetingConfig
  3704  	c.addtargetedpublishersrequest = addtargetedpublishersrequest
  3705  	return c
  3706  }
  3707  
  3708  // Fields allows partial responses to be retrieved. See
  3709  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3710  // details.
  3711  func (c *BiddersPretargetingConfigsAddTargetedPublishersCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsAddTargetedPublishersCall {
  3712  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3713  	return c
  3714  }
  3715  
  3716  // Context sets the context to be used in this call's Do method.
  3717  func (c *BiddersPretargetingConfigsAddTargetedPublishersCall) Context(ctx context.Context) *BiddersPretargetingConfigsAddTargetedPublishersCall {
  3718  	c.ctx_ = ctx
  3719  	return c
  3720  }
  3721  
  3722  // Header returns a http.Header that can be modified by the caller to add
  3723  // headers to the request.
  3724  func (c *BiddersPretargetingConfigsAddTargetedPublishersCall) Header() http.Header {
  3725  	if c.header_ == nil {
  3726  		c.header_ = make(http.Header)
  3727  	}
  3728  	return c.header_
  3729  }
  3730  
  3731  func (c *BiddersPretargetingConfigsAddTargetedPublishersCall) doRequest(alt string) (*http.Response, error) {
  3732  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3733  	var body io.Reader = nil
  3734  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.addtargetedpublishersrequest)
  3735  	if err != nil {
  3736  		return nil, err
  3737  	}
  3738  	c.urlParams_.Set("alt", alt)
  3739  	c.urlParams_.Set("prettyPrint", "false")
  3740  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+pretargetingConfig}:addTargetedPublishers")
  3741  	urls += "?" + c.urlParams_.Encode()
  3742  	req, err := http.NewRequest("POST", urls, body)
  3743  	if err != nil {
  3744  		return nil, err
  3745  	}
  3746  	req.Header = reqHeaders
  3747  	googleapi.Expand(req.URL, map[string]string{
  3748  		"pretargetingConfig": c.pretargetingConfig,
  3749  	})
  3750  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3751  }
  3752  
  3753  // Do executes the "realtimebidding.bidders.pretargetingConfigs.addTargetedPublishers" call.
  3754  // Any non-2xx status code is an error. Response headers are in either
  3755  // *PretargetingConfig.ServerResponse.Header or (if a response was returned at
  3756  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3757  // check whether the returned error was because http.StatusNotModified was
  3758  // returned.
  3759  func (c *BiddersPretargetingConfigsAddTargetedPublishersCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
  3760  	gensupport.SetOptions(c.urlParams_, opts...)
  3761  	res, err := c.doRequest("json")
  3762  	if res != nil && res.StatusCode == http.StatusNotModified {
  3763  		if res.Body != nil {
  3764  			res.Body.Close()
  3765  		}
  3766  		return nil, gensupport.WrapError(&googleapi.Error{
  3767  			Code:   res.StatusCode,
  3768  			Header: res.Header,
  3769  		})
  3770  	}
  3771  	if err != nil {
  3772  		return nil, err
  3773  	}
  3774  	defer googleapi.CloseBody(res)
  3775  	if err := googleapi.CheckResponse(res); err != nil {
  3776  		return nil, gensupport.WrapError(err)
  3777  	}
  3778  	ret := &PretargetingConfig{
  3779  		ServerResponse: googleapi.ServerResponse{
  3780  			Header:         res.Header,
  3781  			HTTPStatusCode: res.StatusCode,
  3782  		},
  3783  	}
  3784  	target := &ret
  3785  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3786  		return nil, err
  3787  	}
  3788  	return ret, nil
  3789  }
  3790  
  3791  type BiddersPretargetingConfigsAddTargetedSitesCall struct {
  3792  	s                       *Service
  3793  	pretargetingConfig      string
  3794  	addtargetedsitesrequest *AddTargetedSitesRequest
  3795  	urlParams_              gensupport.URLParams
  3796  	ctx_                    context.Context
  3797  	header_                 http.Header
  3798  }
  3799  
  3800  // AddTargetedSites: Adds targeted sites to the pretargeting configuration.
  3801  //
  3802  //   - pretargetingConfig: The name of the pretargeting configuration. Format:
  3803  //     bidders/{bidderAccountId}/pretargetingConfig/{configId}.
  3804  func (r *BiddersPretargetingConfigsService) AddTargetedSites(pretargetingConfig string, addtargetedsitesrequest *AddTargetedSitesRequest) *BiddersPretargetingConfigsAddTargetedSitesCall {
  3805  	c := &BiddersPretargetingConfigsAddTargetedSitesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3806  	c.pretargetingConfig = pretargetingConfig
  3807  	c.addtargetedsitesrequest = addtargetedsitesrequest
  3808  	return c
  3809  }
  3810  
  3811  // Fields allows partial responses to be retrieved. See
  3812  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3813  // details.
  3814  func (c *BiddersPretargetingConfigsAddTargetedSitesCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsAddTargetedSitesCall {
  3815  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3816  	return c
  3817  }
  3818  
  3819  // Context sets the context to be used in this call's Do method.
  3820  func (c *BiddersPretargetingConfigsAddTargetedSitesCall) Context(ctx context.Context) *BiddersPretargetingConfigsAddTargetedSitesCall {
  3821  	c.ctx_ = ctx
  3822  	return c
  3823  }
  3824  
  3825  // Header returns a http.Header that can be modified by the caller to add
  3826  // headers to the request.
  3827  func (c *BiddersPretargetingConfigsAddTargetedSitesCall) Header() http.Header {
  3828  	if c.header_ == nil {
  3829  		c.header_ = make(http.Header)
  3830  	}
  3831  	return c.header_
  3832  }
  3833  
  3834  func (c *BiddersPretargetingConfigsAddTargetedSitesCall) doRequest(alt string) (*http.Response, error) {
  3835  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3836  	var body io.Reader = nil
  3837  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.addtargetedsitesrequest)
  3838  	if err != nil {
  3839  		return nil, err
  3840  	}
  3841  	c.urlParams_.Set("alt", alt)
  3842  	c.urlParams_.Set("prettyPrint", "false")
  3843  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+pretargetingConfig}:addTargetedSites")
  3844  	urls += "?" + c.urlParams_.Encode()
  3845  	req, err := http.NewRequest("POST", urls, body)
  3846  	if err != nil {
  3847  		return nil, err
  3848  	}
  3849  	req.Header = reqHeaders
  3850  	googleapi.Expand(req.URL, map[string]string{
  3851  		"pretargetingConfig": c.pretargetingConfig,
  3852  	})
  3853  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3854  }
  3855  
  3856  // Do executes the "realtimebidding.bidders.pretargetingConfigs.addTargetedSites" call.
  3857  // Any non-2xx status code is an error. Response headers are in either
  3858  // *PretargetingConfig.ServerResponse.Header or (if a response was returned at
  3859  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3860  // check whether the returned error was because http.StatusNotModified was
  3861  // returned.
  3862  func (c *BiddersPretargetingConfigsAddTargetedSitesCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
  3863  	gensupport.SetOptions(c.urlParams_, opts...)
  3864  	res, err := c.doRequest("json")
  3865  	if res != nil && res.StatusCode == http.StatusNotModified {
  3866  		if res.Body != nil {
  3867  			res.Body.Close()
  3868  		}
  3869  		return nil, gensupport.WrapError(&googleapi.Error{
  3870  			Code:   res.StatusCode,
  3871  			Header: res.Header,
  3872  		})
  3873  	}
  3874  	if err != nil {
  3875  		return nil, err
  3876  	}
  3877  	defer googleapi.CloseBody(res)
  3878  	if err := googleapi.CheckResponse(res); err != nil {
  3879  		return nil, gensupport.WrapError(err)
  3880  	}
  3881  	ret := &PretargetingConfig{
  3882  		ServerResponse: googleapi.ServerResponse{
  3883  			Header:         res.Header,
  3884  			HTTPStatusCode: res.StatusCode,
  3885  		},
  3886  	}
  3887  	target := &ret
  3888  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3889  		return nil, err
  3890  	}
  3891  	return ret, nil
  3892  }
  3893  
  3894  type BiddersPretargetingConfigsCreateCall struct {
  3895  	s                  *Service
  3896  	parent             string
  3897  	pretargetingconfig *PretargetingConfig
  3898  	urlParams_         gensupport.URLParams
  3899  	ctx_               context.Context
  3900  	header_            http.Header
  3901  }
  3902  
  3903  // Create: Creates a pretargeting configuration. A pretargeting configuration's
  3904  // state (PretargetingConfig.state) is active upon creation, and it will start
  3905  // to affect traffic shortly after. A bidder may create a maximum of 10
  3906  // pretargeting configurations. Attempts to exceed this maximum results in a
  3907  // 400 bad request error.
  3908  //
  3909  //   - parent: Name of the bidder to create the pretargeting configuration for.
  3910  //     Format: bidders/{bidderAccountId}.
  3911  func (r *BiddersPretargetingConfigsService) Create(parent string, pretargetingconfig *PretargetingConfig) *BiddersPretargetingConfigsCreateCall {
  3912  	c := &BiddersPretargetingConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3913  	c.parent = parent
  3914  	c.pretargetingconfig = pretargetingconfig
  3915  	return c
  3916  }
  3917  
  3918  // Fields allows partial responses to be retrieved. See
  3919  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3920  // details.
  3921  func (c *BiddersPretargetingConfigsCreateCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsCreateCall {
  3922  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3923  	return c
  3924  }
  3925  
  3926  // Context sets the context to be used in this call's Do method.
  3927  func (c *BiddersPretargetingConfigsCreateCall) Context(ctx context.Context) *BiddersPretargetingConfigsCreateCall {
  3928  	c.ctx_ = ctx
  3929  	return c
  3930  }
  3931  
  3932  // Header returns a http.Header that can be modified by the caller to add
  3933  // headers to the request.
  3934  func (c *BiddersPretargetingConfigsCreateCall) Header() http.Header {
  3935  	if c.header_ == nil {
  3936  		c.header_ = make(http.Header)
  3937  	}
  3938  	return c.header_
  3939  }
  3940  
  3941  func (c *BiddersPretargetingConfigsCreateCall) doRequest(alt string) (*http.Response, error) {
  3942  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3943  	var body io.Reader = nil
  3944  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.pretargetingconfig)
  3945  	if err != nil {
  3946  		return nil, err
  3947  	}
  3948  	c.urlParams_.Set("alt", alt)
  3949  	c.urlParams_.Set("prettyPrint", "false")
  3950  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pretargetingConfigs")
  3951  	urls += "?" + c.urlParams_.Encode()
  3952  	req, err := http.NewRequest("POST", urls, body)
  3953  	if err != nil {
  3954  		return nil, err
  3955  	}
  3956  	req.Header = reqHeaders
  3957  	googleapi.Expand(req.URL, map[string]string{
  3958  		"parent": c.parent,
  3959  	})
  3960  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3961  }
  3962  
  3963  // Do executes the "realtimebidding.bidders.pretargetingConfigs.create" call.
  3964  // Any non-2xx status code is an error. Response headers are in either
  3965  // *PretargetingConfig.ServerResponse.Header or (if a response was returned at
  3966  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3967  // check whether the returned error was because http.StatusNotModified was
  3968  // returned.
  3969  func (c *BiddersPretargetingConfigsCreateCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
  3970  	gensupport.SetOptions(c.urlParams_, opts...)
  3971  	res, err := c.doRequest("json")
  3972  	if res != nil && res.StatusCode == http.StatusNotModified {
  3973  		if res.Body != nil {
  3974  			res.Body.Close()
  3975  		}
  3976  		return nil, gensupport.WrapError(&googleapi.Error{
  3977  			Code:   res.StatusCode,
  3978  			Header: res.Header,
  3979  		})
  3980  	}
  3981  	if err != nil {
  3982  		return nil, err
  3983  	}
  3984  	defer googleapi.CloseBody(res)
  3985  	if err := googleapi.CheckResponse(res); err != nil {
  3986  		return nil, gensupport.WrapError(err)
  3987  	}
  3988  	ret := &PretargetingConfig{
  3989  		ServerResponse: googleapi.ServerResponse{
  3990  			Header:         res.Header,
  3991  			HTTPStatusCode: res.StatusCode,
  3992  		},
  3993  	}
  3994  	target := &ret
  3995  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3996  		return nil, err
  3997  	}
  3998  	return ret, nil
  3999  }
  4000  
  4001  type BiddersPretargetingConfigsDeleteCall struct {
  4002  	s          *Service
  4003  	name       string
  4004  	urlParams_ gensupport.URLParams
  4005  	ctx_       context.Context
  4006  	header_    http.Header
  4007  }
  4008  
  4009  // Delete: Deletes a pretargeting configuration.
  4010  //
  4011  //   - name: The name of the pretargeting configuration to delete. Format:
  4012  //     bidders/{bidderAccountId}/pretargetingConfig/{configId}.
  4013  func (r *BiddersPretargetingConfigsService) Delete(name string) *BiddersPretargetingConfigsDeleteCall {
  4014  	c := &BiddersPretargetingConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4015  	c.name = name
  4016  	return c
  4017  }
  4018  
  4019  // Fields allows partial responses to be retrieved. See
  4020  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4021  // details.
  4022  func (c *BiddersPretargetingConfigsDeleteCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsDeleteCall {
  4023  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4024  	return c
  4025  }
  4026  
  4027  // Context sets the context to be used in this call's Do method.
  4028  func (c *BiddersPretargetingConfigsDeleteCall) Context(ctx context.Context) *BiddersPretargetingConfigsDeleteCall {
  4029  	c.ctx_ = ctx
  4030  	return c
  4031  }
  4032  
  4033  // Header returns a http.Header that can be modified by the caller to add
  4034  // headers to the request.
  4035  func (c *BiddersPretargetingConfigsDeleteCall) Header() http.Header {
  4036  	if c.header_ == nil {
  4037  		c.header_ = make(http.Header)
  4038  	}
  4039  	return c.header_
  4040  }
  4041  
  4042  func (c *BiddersPretargetingConfigsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4043  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4044  	var body io.Reader = nil
  4045  	c.urlParams_.Set("alt", alt)
  4046  	c.urlParams_.Set("prettyPrint", "false")
  4047  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4048  	urls += "?" + c.urlParams_.Encode()
  4049  	req, err := http.NewRequest("DELETE", urls, body)
  4050  	if err != nil {
  4051  		return nil, err
  4052  	}
  4053  	req.Header = reqHeaders
  4054  	googleapi.Expand(req.URL, map[string]string{
  4055  		"name": c.name,
  4056  	})
  4057  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4058  }
  4059  
  4060  // Do executes the "realtimebidding.bidders.pretargetingConfigs.delete" call.
  4061  // Any non-2xx status code is an error. Response headers are in either
  4062  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  4063  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4064  // whether the returned error was because http.StatusNotModified was returned.
  4065  func (c *BiddersPretargetingConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4066  	gensupport.SetOptions(c.urlParams_, opts...)
  4067  	res, err := c.doRequest("json")
  4068  	if res != nil && res.StatusCode == http.StatusNotModified {
  4069  		if res.Body != nil {
  4070  			res.Body.Close()
  4071  		}
  4072  		return nil, gensupport.WrapError(&googleapi.Error{
  4073  			Code:   res.StatusCode,
  4074  			Header: res.Header,
  4075  		})
  4076  	}
  4077  	if err != nil {
  4078  		return nil, err
  4079  	}
  4080  	defer googleapi.CloseBody(res)
  4081  	if err := googleapi.CheckResponse(res); err != nil {
  4082  		return nil, gensupport.WrapError(err)
  4083  	}
  4084  	ret := &Empty{
  4085  		ServerResponse: googleapi.ServerResponse{
  4086  			Header:         res.Header,
  4087  			HTTPStatusCode: res.StatusCode,
  4088  		},
  4089  	}
  4090  	target := &ret
  4091  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4092  		return nil, err
  4093  	}
  4094  	return ret, nil
  4095  }
  4096  
  4097  type BiddersPretargetingConfigsGetCall struct {
  4098  	s            *Service
  4099  	name         string
  4100  	urlParams_   gensupport.URLParams
  4101  	ifNoneMatch_ string
  4102  	ctx_         context.Context
  4103  	header_      http.Header
  4104  }
  4105  
  4106  // Get: Gets a pretargeting configuration.
  4107  //
  4108  //   - name: Name of the pretargeting configuration to get. Format:
  4109  //     bidders/{bidderAccountId}/pretargetingConfig/{configId}.
  4110  func (r *BiddersPretargetingConfigsService) Get(name string) *BiddersPretargetingConfigsGetCall {
  4111  	c := &BiddersPretargetingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4112  	c.name = name
  4113  	return c
  4114  }
  4115  
  4116  // Fields allows partial responses to be retrieved. See
  4117  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4118  // details.
  4119  func (c *BiddersPretargetingConfigsGetCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsGetCall {
  4120  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4121  	return c
  4122  }
  4123  
  4124  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4125  // object's ETag matches the given value. This is useful for getting updates
  4126  // only after the object has changed since the last request.
  4127  func (c *BiddersPretargetingConfigsGetCall) IfNoneMatch(entityTag string) *BiddersPretargetingConfigsGetCall {
  4128  	c.ifNoneMatch_ = entityTag
  4129  	return c
  4130  }
  4131  
  4132  // Context sets the context to be used in this call's Do method.
  4133  func (c *BiddersPretargetingConfigsGetCall) Context(ctx context.Context) *BiddersPretargetingConfigsGetCall {
  4134  	c.ctx_ = ctx
  4135  	return c
  4136  }
  4137  
  4138  // Header returns a http.Header that can be modified by the caller to add
  4139  // headers to the request.
  4140  func (c *BiddersPretargetingConfigsGetCall) Header() http.Header {
  4141  	if c.header_ == nil {
  4142  		c.header_ = make(http.Header)
  4143  	}
  4144  	return c.header_
  4145  }
  4146  
  4147  func (c *BiddersPretargetingConfigsGetCall) doRequest(alt string) (*http.Response, error) {
  4148  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4149  	if c.ifNoneMatch_ != "" {
  4150  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4151  	}
  4152  	var body io.Reader = nil
  4153  	c.urlParams_.Set("alt", alt)
  4154  	c.urlParams_.Set("prettyPrint", "false")
  4155  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4156  	urls += "?" + c.urlParams_.Encode()
  4157  	req, err := http.NewRequest("GET", urls, body)
  4158  	if err != nil {
  4159  		return nil, err
  4160  	}
  4161  	req.Header = reqHeaders
  4162  	googleapi.Expand(req.URL, map[string]string{
  4163  		"name": c.name,
  4164  	})
  4165  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4166  }
  4167  
  4168  // Do executes the "realtimebidding.bidders.pretargetingConfigs.get" call.
  4169  // Any non-2xx status code is an error. Response headers are in either
  4170  // *PretargetingConfig.ServerResponse.Header or (if a response was returned at
  4171  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4172  // check whether the returned error was because http.StatusNotModified was
  4173  // returned.
  4174  func (c *BiddersPretargetingConfigsGetCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
  4175  	gensupport.SetOptions(c.urlParams_, opts...)
  4176  	res, err := c.doRequest("json")
  4177  	if res != nil && res.StatusCode == http.StatusNotModified {
  4178  		if res.Body != nil {
  4179  			res.Body.Close()
  4180  		}
  4181  		return nil, gensupport.WrapError(&googleapi.Error{
  4182  			Code:   res.StatusCode,
  4183  			Header: res.Header,
  4184  		})
  4185  	}
  4186  	if err != nil {
  4187  		return nil, err
  4188  	}
  4189  	defer googleapi.CloseBody(res)
  4190  	if err := googleapi.CheckResponse(res); err != nil {
  4191  		return nil, gensupport.WrapError(err)
  4192  	}
  4193  	ret := &PretargetingConfig{
  4194  		ServerResponse: googleapi.ServerResponse{
  4195  			Header:         res.Header,
  4196  			HTTPStatusCode: res.StatusCode,
  4197  		},
  4198  	}
  4199  	target := &ret
  4200  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4201  		return nil, err
  4202  	}
  4203  	return ret, nil
  4204  }
  4205  
  4206  type BiddersPretargetingConfigsListCall struct {
  4207  	s            *Service
  4208  	parent       string
  4209  	urlParams_   gensupport.URLParams
  4210  	ifNoneMatch_ string
  4211  	ctx_         context.Context
  4212  	header_      http.Header
  4213  }
  4214  
  4215  // List: Lists all pretargeting configurations for a single bidder.
  4216  //
  4217  //   - parent: Name of the bidder whose pretargeting configurations will be
  4218  //     listed. Format: bidders/{bidderAccountId}.
  4219  func (r *BiddersPretargetingConfigsService) List(parent string) *BiddersPretargetingConfigsListCall {
  4220  	c := &BiddersPretargetingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4221  	c.parent = parent
  4222  	return c
  4223  }
  4224  
  4225  // PageSize sets the optional parameter "pageSize": The maximum number of
  4226  // pretargeting configurations to return. If unspecified, at most 10
  4227  // pretargeting configurations will be returned. The maximum value is 100;
  4228  // values above 100 will be coerced to 100.
  4229  func (c *BiddersPretargetingConfigsListCall) PageSize(pageSize int64) *BiddersPretargetingConfigsListCall {
  4230  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4231  	return c
  4232  }
  4233  
  4234  // PageToken sets the optional parameter "pageToken": A token identifying a
  4235  // page of results the server should return. This value is received from a
  4236  // previous `ListPretargetingConfigs` call in
  4237  // ListPretargetingConfigsResponse.nextPageToken.
  4238  func (c *BiddersPretargetingConfigsListCall) PageToken(pageToken string) *BiddersPretargetingConfigsListCall {
  4239  	c.urlParams_.Set("pageToken", pageToken)
  4240  	return c
  4241  }
  4242  
  4243  // Fields allows partial responses to be retrieved. See
  4244  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4245  // details.
  4246  func (c *BiddersPretargetingConfigsListCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsListCall {
  4247  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4248  	return c
  4249  }
  4250  
  4251  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4252  // object's ETag matches the given value. This is useful for getting updates
  4253  // only after the object has changed since the last request.
  4254  func (c *BiddersPretargetingConfigsListCall) IfNoneMatch(entityTag string) *BiddersPretargetingConfigsListCall {
  4255  	c.ifNoneMatch_ = entityTag
  4256  	return c
  4257  }
  4258  
  4259  // Context sets the context to be used in this call's Do method.
  4260  func (c *BiddersPretargetingConfigsListCall) Context(ctx context.Context) *BiddersPretargetingConfigsListCall {
  4261  	c.ctx_ = ctx
  4262  	return c
  4263  }
  4264  
  4265  // Header returns a http.Header that can be modified by the caller to add
  4266  // headers to the request.
  4267  func (c *BiddersPretargetingConfigsListCall) Header() http.Header {
  4268  	if c.header_ == nil {
  4269  		c.header_ = make(http.Header)
  4270  	}
  4271  	return c.header_
  4272  }
  4273  
  4274  func (c *BiddersPretargetingConfigsListCall) doRequest(alt string) (*http.Response, error) {
  4275  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4276  	if c.ifNoneMatch_ != "" {
  4277  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4278  	}
  4279  	var body io.Reader = nil
  4280  	c.urlParams_.Set("alt", alt)
  4281  	c.urlParams_.Set("prettyPrint", "false")
  4282  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pretargetingConfigs")
  4283  	urls += "?" + c.urlParams_.Encode()
  4284  	req, err := http.NewRequest("GET", urls, body)
  4285  	if err != nil {
  4286  		return nil, err
  4287  	}
  4288  	req.Header = reqHeaders
  4289  	googleapi.Expand(req.URL, map[string]string{
  4290  		"parent": c.parent,
  4291  	})
  4292  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4293  }
  4294  
  4295  // Do executes the "realtimebidding.bidders.pretargetingConfigs.list" call.
  4296  // Any non-2xx status code is an error. Response headers are in either
  4297  // *ListPretargetingConfigsResponse.ServerResponse.Header or (if a response was
  4298  // returned at all) in error.(*googleapi.Error).Header. Use
  4299  // googleapi.IsNotModified to check whether the returned error was because
  4300  // http.StatusNotModified was returned.
  4301  func (c *BiddersPretargetingConfigsListCall) Do(opts ...googleapi.CallOption) (*ListPretargetingConfigsResponse, error) {
  4302  	gensupport.SetOptions(c.urlParams_, opts...)
  4303  	res, err := c.doRequest("json")
  4304  	if res != nil && res.StatusCode == http.StatusNotModified {
  4305  		if res.Body != nil {
  4306  			res.Body.Close()
  4307  		}
  4308  		return nil, gensupport.WrapError(&googleapi.Error{
  4309  			Code:   res.StatusCode,
  4310  			Header: res.Header,
  4311  		})
  4312  	}
  4313  	if err != nil {
  4314  		return nil, err
  4315  	}
  4316  	defer googleapi.CloseBody(res)
  4317  	if err := googleapi.CheckResponse(res); err != nil {
  4318  		return nil, gensupport.WrapError(err)
  4319  	}
  4320  	ret := &ListPretargetingConfigsResponse{
  4321  		ServerResponse: googleapi.ServerResponse{
  4322  			Header:         res.Header,
  4323  			HTTPStatusCode: res.StatusCode,
  4324  		},
  4325  	}
  4326  	target := &ret
  4327  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4328  		return nil, err
  4329  	}
  4330  	return ret, nil
  4331  }
  4332  
  4333  // Pages invokes f for each page of results.
  4334  // A non-nil error returned from f will halt the iteration.
  4335  // The provided context supersedes any context provided to the Context method.
  4336  func (c *BiddersPretargetingConfigsListCall) Pages(ctx context.Context, f func(*ListPretargetingConfigsResponse) error) error {
  4337  	c.ctx_ = ctx
  4338  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4339  	for {
  4340  		x, err := c.Do()
  4341  		if err != nil {
  4342  			return err
  4343  		}
  4344  		if err := f(x); err != nil {
  4345  			return err
  4346  		}
  4347  		if x.NextPageToken == "" {
  4348  			return nil
  4349  		}
  4350  		c.PageToken(x.NextPageToken)
  4351  	}
  4352  }
  4353  
  4354  type BiddersPretargetingConfigsPatchCall struct {
  4355  	s                  *Service
  4356  	name               string
  4357  	pretargetingconfig *PretargetingConfig
  4358  	urlParams_         gensupport.URLParams
  4359  	ctx_               context.Context
  4360  	header_            http.Header
  4361  }
  4362  
  4363  // Patch: Updates a pretargeting configuration.
  4364  //
  4365  //   - name: Output only. Name of the pretargeting configuration that must follow
  4366  //     the pattern `bidders/{bidder_account_id}/pretargetingConfigs/{config_id}`.
  4367  func (r *BiddersPretargetingConfigsService) Patch(name string, pretargetingconfig *PretargetingConfig) *BiddersPretargetingConfigsPatchCall {
  4368  	c := &BiddersPretargetingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4369  	c.name = name
  4370  	c.pretargetingconfig = pretargetingconfig
  4371  	return c
  4372  }
  4373  
  4374  // UpdateMask sets the optional parameter "updateMask": Field mask to use for
  4375  // partial in-place updates.
  4376  func (c *BiddersPretargetingConfigsPatchCall) UpdateMask(updateMask string) *BiddersPretargetingConfigsPatchCall {
  4377  	c.urlParams_.Set("updateMask", updateMask)
  4378  	return c
  4379  }
  4380  
  4381  // Fields allows partial responses to be retrieved. See
  4382  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4383  // details.
  4384  func (c *BiddersPretargetingConfigsPatchCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsPatchCall {
  4385  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4386  	return c
  4387  }
  4388  
  4389  // Context sets the context to be used in this call's Do method.
  4390  func (c *BiddersPretargetingConfigsPatchCall) Context(ctx context.Context) *BiddersPretargetingConfigsPatchCall {
  4391  	c.ctx_ = ctx
  4392  	return c
  4393  }
  4394  
  4395  // Header returns a http.Header that can be modified by the caller to add
  4396  // headers to the request.
  4397  func (c *BiddersPretargetingConfigsPatchCall) Header() http.Header {
  4398  	if c.header_ == nil {
  4399  		c.header_ = make(http.Header)
  4400  	}
  4401  	return c.header_
  4402  }
  4403  
  4404  func (c *BiddersPretargetingConfigsPatchCall) doRequest(alt string) (*http.Response, error) {
  4405  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4406  	var body io.Reader = nil
  4407  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.pretargetingconfig)
  4408  	if err != nil {
  4409  		return nil, err
  4410  	}
  4411  	c.urlParams_.Set("alt", alt)
  4412  	c.urlParams_.Set("prettyPrint", "false")
  4413  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4414  	urls += "?" + c.urlParams_.Encode()
  4415  	req, err := http.NewRequest("PATCH", urls, body)
  4416  	if err != nil {
  4417  		return nil, err
  4418  	}
  4419  	req.Header = reqHeaders
  4420  	googleapi.Expand(req.URL, map[string]string{
  4421  		"name": c.name,
  4422  	})
  4423  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4424  }
  4425  
  4426  // Do executes the "realtimebidding.bidders.pretargetingConfigs.patch" call.
  4427  // Any non-2xx status code is an error. Response headers are in either
  4428  // *PretargetingConfig.ServerResponse.Header or (if a response was returned at
  4429  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4430  // check whether the returned error was because http.StatusNotModified was
  4431  // returned.
  4432  func (c *BiddersPretargetingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
  4433  	gensupport.SetOptions(c.urlParams_, opts...)
  4434  	res, err := c.doRequest("json")
  4435  	if res != nil && res.StatusCode == http.StatusNotModified {
  4436  		if res.Body != nil {
  4437  			res.Body.Close()
  4438  		}
  4439  		return nil, gensupport.WrapError(&googleapi.Error{
  4440  			Code:   res.StatusCode,
  4441  			Header: res.Header,
  4442  		})
  4443  	}
  4444  	if err != nil {
  4445  		return nil, err
  4446  	}
  4447  	defer googleapi.CloseBody(res)
  4448  	if err := googleapi.CheckResponse(res); err != nil {
  4449  		return nil, gensupport.WrapError(err)
  4450  	}
  4451  	ret := &PretargetingConfig{
  4452  		ServerResponse: googleapi.ServerResponse{
  4453  			Header:         res.Header,
  4454  			HTTPStatusCode: res.StatusCode,
  4455  		},
  4456  	}
  4457  	target := &ret
  4458  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4459  		return nil, err
  4460  	}
  4461  	return ret, nil
  4462  }
  4463  
  4464  type BiddersPretargetingConfigsRemoveTargetedAppsCall struct {
  4465  	s                         *Service
  4466  	pretargetingConfig        string
  4467  	removetargetedappsrequest *RemoveTargetedAppsRequest
  4468  	urlParams_                gensupport.URLParams
  4469  	ctx_                      context.Context
  4470  	header_                   http.Header
  4471  }
  4472  
  4473  // RemoveTargetedApps: Removes targeted apps from the pretargeting
  4474  // configuration.
  4475  //
  4476  //   - pretargetingConfig: The name of the pretargeting configuration. Format:
  4477  //     bidders/{bidderAccountId}/pretargetingConfig/{configId}.
  4478  func (r *BiddersPretargetingConfigsService) RemoveTargetedApps(pretargetingConfig string, removetargetedappsrequest *RemoveTargetedAppsRequest) *BiddersPretargetingConfigsRemoveTargetedAppsCall {
  4479  	c := &BiddersPretargetingConfigsRemoveTargetedAppsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4480  	c.pretargetingConfig = pretargetingConfig
  4481  	c.removetargetedappsrequest = removetargetedappsrequest
  4482  	return c
  4483  }
  4484  
  4485  // Fields allows partial responses to be retrieved. See
  4486  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4487  // details.
  4488  func (c *BiddersPretargetingConfigsRemoveTargetedAppsCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsRemoveTargetedAppsCall {
  4489  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4490  	return c
  4491  }
  4492  
  4493  // Context sets the context to be used in this call's Do method.
  4494  func (c *BiddersPretargetingConfigsRemoveTargetedAppsCall) Context(ctx context.Context) *BiddersPretargetingConfigsRemoveTargetedAppsCall {
  4495  	c.ctx_ = ctx
  4496  	return c
  4497  }
  4498  
  4499  // Header returns a http.Header that can be modified by the caller to add
  4500  // headers to the request.
  4501  func (c *BiddersPretargetingConfigsRemoveTargetedAppsCall) Header() http.Header {
  4502  	if c.header_ == nil {
  4503  		c.header_ = make(http.Header)
  4504  	}
  4505  	return c.header_
  4506  }
  4507  
  4508  func (c *BiddersPretargetingConfigsRemoveTargetedAppsCall) doRequest(alt string) (*http.Response, error) {
  4509  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4510  	var body io.Reader = nil
  4511  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.removetargetedappsrequest)
  4512  	if err != nil {
  4513  		return nil, err
  4514  	}
  4515  	c.urlParams_.Set("alt", alt)
  4516  	c.urlParams_.Set("prettyPrint", "false")
  4517  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+pretargetingConfig}:removeTargetedApps")
  4518  	urls += "?" + c.urlParams_.Encode()
  4519  	req, err := http.NewRequest("POST", urls, body)
  4520  	if err != nil {
  4521  		return nil, err
  4522  	}
  4523  	req.Header = reqHeaders
  4524  	googleapi.Expand(req.URL, map[string]string{
  4525  		"pretargetingConfig": c.pretargetingConfig,
  4526  	})
  4527  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4528  }
  4529  
  4530  // Do executes the "realtimebidding.bidders.pretargetingConfigs.removeTargetedApps" call.
  4531  // Any non-2xx status code is an error. Response headers are in either
  4532  // *PretargetingConfig.ServerResponse.Header or (if a response was returned at
  4533  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4534  // check whether the returned error was because http.StatusNotModified was
  4535  // returned.
  4536  func (c *BiddersPretargetingConfigsRemoveTargetedAppsCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
  4537  	gensupport.SetOptions(c.urlParams_, opts...)
  4538  	res, err := c.doRequest("json")
  4539  	if res != nil && res.StatusCode == http.StatusNotModified {
  4540  		if res.Body != nil {
  4541  			res.Body.Close()
  4542  		}
  4543  		return nil, gensupport.WrapError(&googleapi.Error{
  4544  			Code:   res.StatusCode,
  4545  			Header: res.Header,
  4546  		})
  4547  	}
  4548  	if err != nil {
  4549  		return nil, err
  4550  	}
  4551  	defer googleapi.CloseBody(res)
  4552  	if err := googleapi.CheckResponse(res); err != nil {
  4553  		return nil, gensupport.WrapError(err)
  4554  	}
  4555  	ret := &PretargetingConfig{
  4556  		ServerResponse: googleapi.ServerResponse{
  4557  			Header:         res.Header,
  4558  			HTTPStatusCode: res.StatusCode,
  4559  		},
  4560  	}
  4561  	target := &ret
  4562  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4563  		return nil, err
  4564  	}
  4565  	return ret, nil
  4566  }
  4567  
  4568  type BiddersPretargetingConfigsRemoveTargetedPublishersCall struct {
  4569  	s                               *Service
  4570  	pretargetingConfig              string
  4571  	removetargetedpublishersrequest *RemoveTargetedPublishersRequest
  4572  	urlParams_                      gensupport.URLParams
  4573  	ctx_                            context.Context
  4574  	header_                         http.Header
  4575  }
  4576  
  4577  // RemoveTargetedPublishers: Removes targeted publishers from the pretargeting
  4578  // config.
  4579  //
  4580  //   - pretargetingConfig: The name of the pretargeting configuration. Format:
  4581  //     bidders/{bidderAccountId}/pretargetingConfig/{configId}.
  4582  func (r *BiddersPretargetingConfigsService) RemoveTargetedPublishers(pretargetingConfig string, removetargetedpublishersrequest *RemoveTargetedPublishersRequest) *BiddersPretargetingConfigsRemoveTargetedPublishersCall {
  4583  	c := &BiddersPretargetingConfigsRemoveTargetedPublishersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4584  	c.pretargetingConfig = pretargetingConfig
  4585  	c.removetargetedpublishersrequest = removetargetedpublishersrequest
  4586  	return c
  4587  }
  4588  
  4589  // Fields allows partial responses to be retrieved. See
  4590  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4591  // details.
  4592  func (c *BiddersPretargetingConfigsRemoveTargetedPublishersCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsRemoveTargetedPublishersCall {
  4593  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4594  	return c
  4595  }
  4596  
  4597  // Context sets the context to be used in this call's Do method.
  4598  func (c *BiddersPretargetingConfigsRemoveTargetedPublishersCall) Context(ctx context.Context) *BiddersPretargetingConfigsRemoveTargetedPublishersCall {
  4599  	c.ctx_ = ctx
  4600  	return c
  4601  }
  4602  
  4603  // Header returns a http.Header that can be modified by the caller to add
  4604  // headers to the request.
  4605  func (c *BiddersPretargetingConfigsRemoveTargetedPublishersCall) Header() http.Header {
  4606  	if c.header_ == nil {
  4607  		c.header_ = make(http.Header)
  4608  	}
  4609  	return c.header_
  4610  }
  4611  
  4612  func (c *BiddersPretargetingConfigsRemoveTargetedPublishersCall) doRequest(alt string) (*http.Response, error) {
  4613  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4614  	var body io.Reader = nil
  4615  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.removetargetedpublishersrequest)
  4616  	if err != nil {
  4617  		return nil, err
  4618  	}
  4619  	c.urlParams_.Set("alt", alt)
  4620  	c.urlParams_.Set("prettyPrint", "false")
  4621  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+pretargetingConfig}:removeTargetedPublishers")
  4622  	urls += "?" + c.urlParams_.Encode()
  4623  	req, err := http.NewRequest("POST", urls, body)
  4624  	if err != nil {
  4625  		return nil, err
  4626  	}
  4627  	req.Header = reqHeaders
  4628  	googleapi.Expand(req.URL, map[string]string{
  4629  		"pretargetingConfig": c.pretargetingConfig,
  4630  	})
  4631  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4632  }
  4633  
  4634  // Do executes the "realtimebidding.bidders.pretargetingConfigs.removeTargetedPublishers" call.
  4635  // Any non-2xx status code is an error. Response headers are in either
  4636  // *PretargetingConfig.ServerResponse.Header or (if a response was returned at
  4637  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4638  // check whether the returned error was because http.StatusNotModified was
  4639  // returned.
  4640  func (c *BiddersPretargetingConfigsRemoveTargetedPublishersCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
  4641  	gensupport.SetOptions(c.urlParams_, opts...)
  4642  	res, err := c.doRequest("json")
  4643  	if res != nil && res.StatusCode == http.StatusNotModified {
  4644  		if res.Body != nil {
  4645  			res.Body.Close()
  4646  		}
  4647  		return nil, gensupport.WrapError(&googleapi.Error{
  4648  			Code:   res.StatusCode,
  4649  			Header: res.Header,
  4650  		})
  4651  	}
  4652  	if err != nil {
  4653  		return nil, err
  4654  	}
  4655  	defer googleapi.CloseBody(res)
  4656  	if err := googleapi.CheckResponse(res); err != nil {
  4657  		return nil, gensupport.WrapError(err)
  4658  	}
  4659  	ret := &PretargetingConfig{
  4660  		ServerResponse: googleapi.ServerResponse{
  4661  			Header:         res.Header,
  4662  			HTTPStatusCode: res.StatusCode,
  4663  		},
  4664  	}
  4665  	target := &ret
  4666  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4667  		return nil, err
  4668  	}
  4669  	return ret, nil
  4670  }
  4671  
  4672  type BiddersPretargetingConfigsRemoveTargetedSitesCall struct {
  4673  	s                          *Service
  4674  	pretargetingConfig         string
  4675  	removetargetedsitesrequest *RemoveTargetedSitesRequest
  4676  	urlParams_                 gensupport.URLParams
  4677  	ctx_                       context.Context
  4678  	header_                    http.Header
  4679  }
  4680  
  4681  // RemoveTargetedSites: Removes targeted sites from the pretargeting
  4682  // configuration.
  4683  //
  4684  //   - pretargetingConfig: The name of the pretargeting configuration. Format:
  4685  //     bidders/{bidderAccountId}/pretargetingConfig/{configId}.
  4686  func (r *BiddersPretargetingConfigsService) RemoveTargetedSites(pretargetingConfig string, removetargetedsitesrequest *RemoveTargetedSitesRequest) *BiddersPretargetingConfigsRemoveTargetedSitesCall {
  4687  	c := &BiddersPretargetingConfigsRemoveTargetedSitesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4688  	c.pretargetingConfig = pretargetingConfig
  4689  	c.removetargetedsitesrequest = removetargetedsitesrequest
  4690  	return c
  4691  }
  4692  
  4693  // Fields allows partial responses to be retrieved. See
  4694  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4695  // details.
  4696  func (c *BiddersPretargetingConfigsRemoveTargetedSitesCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsRemoveTargetedSitesCall {
  4697  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4698  	return c
  4699  }
  4700  
  4701  // Context sets the context to be used in this call's Do method.
  4702  func (c *BiddersPretargetingConfigsRemoveTargetedSitesCall) Context(ctx context.Context) *BiddersPretargetingConfigsRemoveTargetedSitesCall {
  4703  	c.ctx_ = ctx
  4704  	return c
  4705  }
  4706  
  4707  // Header returns a http.Header that can be modified by the caller to add
  4708  // headers to the request.
  4709  func (c *BiddersPretargetingConfigsRemoveTargetedSitesCall) Header() http.Header {
  4710  	if c.header_ == nil {
  4711  		c.header_ = make(http.Header)
  4712  	}
  4713  	return c.header_
  4714  }
  4715  
  4716  func (c *BiddersPretargetingConfigsRemoveTargetedSitesCall) doRequest(alt string) (*http.Response, error) {
  4717  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4718  	var body io.Reader = nil
  4719  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.removetargetedsitesrequest)
  4720  	if err != nil {
  4721  		return nil, err
  4722  	}
  4723  	c.urlParams_.Set("alt", alt)
  4724  	c.urlParams_.Set("prettyPrint", "false")
  4725  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+pretargetingConfig}:removeTargetedSites")
  4726  	urls += "?" + c.urlParams_.Encode()
  4727  	req, err := http.NewRequest("POST", urls, body)
  4728  	if err != nil {
  4729  		return nil, err
  4730  	}
  4731  	req.Header = reqHeaders
  4732  	googleapi.Expand(req.URL, map[string]string{
  4733  		"pretargetingConfig": c.pretargetingConfig,
  4734  	})
  4735  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4736  }
  4737  
  4738  // Do executes the "realtimebidding.bidders.pretargetingConfigs.removeTargetedSites" call.
  4739  // Any non-2xx status code is an error. Response headers are in either
  4740  // *PretargetingConfig.ServerResponse.Header or (if a response was returned at
  4741  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4742  // check whether the returned error was because http.StatusNotModified was
  4743  // returned.
  4744  func (c *BiddersPretargetingConfigsRemoveTargetedSitesCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
  4745  	gensupport.SetOptions(c.urlParams_, opts...)
  4746  	res, err := c.doRequest("json")
  4747  	if res != nil && res.StatusCode == http.StatusNotModified {
  4748  		if res.Body != nil {
  4749  			res.Body.Close()
  4750  		}
  4751  		return nil, gensupport.WrapError(&googleapi.Error{
  4752  			Code:   res.StatusCode,
  4753  			Header: res.Header,
  4754  		})
  4755  	}
  4756  	if err != nil {
  4757  		return nil, err
  4758  	}
  4759  	defer googleapi.CloseBody(res)
  4760  	if err := googleapi.CheckResponse(res); err != nil {
  4761  		return nil, gensupport.WrapError(err)
  4762  	}
  4763  	ret := &PretargetingConfig{
  4764  		ServerResponse: googleapi.ServerResponse{
  4765  			Header:         res.Header,
  4766  			HTTPStatusCode: res.StatusCode,
  4767  		},
  4768  	}
  4769  	target := &ret
  4770  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4771  		return nil, err
  4772  	}
  4773  	return ret, nil
  4774  }
  4775  
  4776  type BiddersPretargetingConfigsSuspendCall struct {
  4777  	s                                *Service
  4778  	name                             string
  4779  	suspendpretargetingconfigrequest *SuspendPretargetingConfigRequest
  4780  	urlParams_                       gensupport.URLParams
  4781  	ctx_                             context.Context
  4782  	header_                          http.Header
  4783  }
  4784  
  4785  // Suspend: Suspends a pretargeting configuration.
  4786  //
  4787  //   - name: The name of the pretargeting configuration. Format:
  4788  //     bidders/{bidderAccountId}/pretargetingConfig/{configId}.
  4789  func (r *BiddersPretargetingConfigsService) Suspend(name string, suspendpretargetingconfigrequest *SuspendPretargetingConfigRequest) *BiddersPretargetingConfigsSuspendCall {
  4790  	c := &BiddersPretargetingConfigsSuspendCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4791  	c.name = name
  4792  	c.suspendpretargetingconfigrequest = suspendpretargetingconfigrequest
  4793  	return c
  4794  }
  4795  
  4796  // Fields allows partial responses to be retrieved. See
  4797  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4798  // details.
  4799  func (c *BiddersPretargetingConfigsSuspendCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsSuspendCall {
  4800  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4801  	return c
  4802  }
  4803  
  4804  // Context sets the context to be used in this call's Do method.
  4805  func (c *BiddersPretargetingConfigsSuspendCall) Context(ctx context.Context) *BiddersPretargetingConfigsSuspendCall {
  4806  	c.ctx_ = ctx
  4807  	return c
  4808  }
  4809  
  4810  // Header returns a http.Header that can be modified by the caller to add
  4811  // headers to the request.
  4812  func (c *BiddersPretargetingConfigsSuspendCall) Header() http.Header {
  4813  	if c.header_ == nil {
  4814  		c.header_ = make(http.Header)
  4815  	}
  4816  	return c.header_
  4817  }
  4818  
  4819  func (c *BiddersPretargetingConfigsSuspendCall) doRequest(alt string) (*http.Response, error) {
  4820  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4821  	var body io.Reader = nil
  4822  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.suspendpretargetingconfigrequest)
  4823  	if err != nil {
  4824  		return nil, err
  4825  	}
  4826  	c.urlParams_.Set("alt", alt)
  4827  	c.urlParams_.Set("prettyPrint", "false")
  4828  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:suspend")
  4829  	urls += "?" + c.urlParams_.Encode()
  4830  	req, err := http.NewRequest("POST", urls, body)
  4831  	if err != nil {
  4832  		return nil, err
  4833  	}
  4834  	req.Header = reqHeaders
  4835  	googleapi.Expand(req.URL, map[string]string{
  4836  		"name": c.name,
  4837  	})
  4838  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4839  }
  4840  
  4841  // Do executes the "realtimebidding.bidders.pretargetingConfigs.suspend" call.
  4842  // Any non-2xx status code is an error. Response headers are in either
  4843  // *PretargetingConfig.ServerResponse.Header or (if a response was returned at
  4844  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4845  // check whether the returned error was because http.StatusNotModified was
  4846  // returned.
  4847  func (c *BiddersPretargetingConfigsSuspendCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
  4848  	gensupport.SetOptions(c.urlParams_, opts...)
  4849  	res, err := c.doRequest("json")
  4850  	if res != nil && res.StatusCode == http.StatusNotModified {
  4851  		if res.Body != nil {
  4852  			res.Body.Close()
  4853  		}
  4854  		return nil, gensupport.WrapError(&googleapi.Error{
  4855  			Code:   res.StatusCode,
  4856  			Header: res.Header,
  4857  		})
  4858  	}
  4859  	if err != nil {
  4860  		return nil, err
  4861  	}
  4862  	defer googleapi.CloseBody(res)
  4863  	if err := googleapi.CheckResponse(res); err != nil {
  4864  		return nil, gensupport.WrapError(err)
  4865  	}
  4866  	ret := &PretargetingConfig{
  4867  		ServerResponse: googleapi.ServerResponse{
  4868  			Header:         res.Header,
  4869  			HTTPStatusCode: res.StatusCode,
  4870  		},
  4871  	}
  4872  	target := &ret
  4873  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4874  		return nil, err
  4875  	}
  4876  	return ret, nil
  4877  }
  4878  
  4879  type BiddersPublisherConnectionsBatchApproveCall struct {
  4880  	s                                       *Service
  4881  	parent                                  string
  4882  	batchapprovepublisherconnectionsrequest *BatchApprovePublisherConnectionsRequest
  4883  	urlParams_                              gensupport.URLParams
  4884  	ctx_                                    context.Context
  4885  	header_                                 http.Header
  4886  }
  4887  
  4888  // BatchApprove: Batch approves multiple publisher connections.
  4889  //
  4890  //   - parent: The bidder for whom publisher connections will be approved.
  4891  //     Format: `bidders/{bidder}` where `{bidder}` is the account ID of the
  4892  //     bidder.
  4893  func (r *BiddersPublisherConnectionsService) BatchApprove(parent string, batchapprovepublisherconnectionsrequest *BatchApprovePublisherConnectionsRequest) *BiddersPublisherConnectionsBatchApproveCall {
  4894  	c := &BiddersPublisherConnectionsBatchApproveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4895  	c.parent = parent
  4896  	c.batchapprovepublisherconnectionsrequest = batchapprovepublisherconnectionsrequest
  4897  	return c
  4898  }
  4899  
  4900  // Fields allows partial responses to be retrieved. See
  4901  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4902  // details.
  4903  func (c *BiddersPublisherConnectionsBatchApproveCall) Fields(s ...googleapi.Field) *BiddersPublisherConnectionsBatchApproveCall {
  4904  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4905  	return c
  4906  }
  4907  
  4908  // Context sets the context to be used in this call's Do method.
  4909  func (c *BiddersPublisherConnectionsBatchApproveCall) Context(ctx context.Context) *BiddersPublisherConnectionsBatchApproveCall {
  4910  	c.ctx_ = ctx
  4911  	return c
  4912  }
  4913  
  4914  // Header returns a http.Header that can be modified by the caller to add
  4915  // headers to the request.
  4916  func (c *BiddersPublisherConnectionsBatchApproveCall) Header() http.Header {
  4917  	if c.header_ == nil {
  4918  		c.header_ = make(http.Header)
  4919  	}
  4920  	return c.header_
  4921  }
  4922  
  4923  func (c *BiddersPublisherConnectionsBatchApproveCall) doRequest(alt string) (*http.Response, error) {
  4924  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4925  	var body io.Reader = nil
  4926  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchapprovepublisherconnectionsrequest)
  4927  	if err != nil {
  4928  		return nil, err
  4929  	}
  4930  	c.urlParams_.Set("alt", alt)
  4931  	c.urlParams_.Set("prettyPrint", "false")
  4932  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/publisherConnections:batchApprove")
  4933  	urls += "?" + c.urlParams_.Encode()
  4934  	req, err := http.NewRequest("POST", urls, body)
  4935  	if err != nil {
  4936  		return nil, err
  4937  	}
  4938  	req.Header = reqHeaders
  4939  	googleapi.Expand(req.URL, map[string]string{
  4940  		"parent": c.parent,
  4941  	})
  4942  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4943  }
  4944  
  4945  // Do executes the "realtimebidding.bidders.publisherConnections.batchApprove" call.
  4946  // Any non-2xx status code is an error. Response headers are in either
  4947  // *BatchApprovePublisherConnectionsResponse.ServerResponse.Header or (if a
  4948  // response was returned at all) in error.(*googleapi.Error).Header. Use
  4949  // googleapi.IsNotModified to check whether the returned error was because
  4950  // http.StatusNotModified was returned.
  4951  func (c *BiddersPublisherConnectionsBatchApproveCall) Do(opts ...googleapi.CallOption) (*BatchApprovePublisherConnectionsResponse, error) {
  4952  	gensupport.SetOptions(c.urlParams_, opts...)
  4953  	res, err := c.doRequest("json")
  4954  	if res != nil && res.StatusCode == http.StatusNotModified {
  4955  		if res.Body != nil {
  4956  			res.Body.Close()
  4957  		}
  4958  		return nil, gensupport.WrapError(&googleapi.Error{
  4959  			Code:   res.StatusCode,
  4960  			Header: res.Header,
  4961  		})
  4962  	}
  4963  	if err != nil {
  4964  		return nil, err
  4965  	}
  4966  	defer googleapi.CloseBody(res)
  4967  	if err := googleapi.CheckResponse(res); err != nil {
  4968  		return nil, gensupport.WrapError(err)
  4969  	}
  4970  	ret := &BatchApprovePublisherConnectionsResponse{
  4971  		ServerResponse: googleapi.ServerResponse{
  4972  			Header:         res.Header,
  4973  			HTTPStatusCode: res.StatusCode,
  4974  		},
  4975  	}
  4976  	target := &ret
  4977  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4978  		return nil, err
  4979  	}
  4980  	return ret, nil
  4981  }
  4982  
  4983  type BiddersPublisherConnectionsBatchRejectCall struct {
  4984  	s                                      *Service
  4985  	parent                                 string
  4986  	batchrejectpublisherconnectionsrequest *BatchRejectPublisherConnectionsRequest
  4987  	urlParams_                             gensupport.URLParams
  4988  	ctx_                                   context.Context
  4989  	header_                                http.Header
  4990  }
  4991  
  4992  // BatchReject: Batch rejects multiple publisher connections.
  4993  //
  4994  //   - parent: The bidder for whom publisher connections will be rejected.
  4995  //     Format: `bidders/{bidder}` where `{bidder}` is the account ID of the
  4996  //     bidder.
  4997  func (r *BiddersPublisherConnectionsService) BatchReject(parent string, batchrejectpublisherconnectionsrequest *BatchRejectPublisherConnectionsRequest) *BiddersPublisherConnectionsBatchRejectCall {
  4998  	c := &BiddersPublisherConnectionsBatchRejectCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4999  	c.parent = parent
  5000  	c.batchrejectpublisherconnectionsrequest = batchrejectpublisherconnectionsrequest
  5001  	return c
  5002  }
  5003  
  5004  // Fields allows partial responses to be retrieved. See
  5005  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5006  // details.
  5007  func (c *BiddersPublisherConnectionsBatchRejectCall) Fields(s ...googleapi.Field) *BiddersPublisherConnectionsBatchRejectCall {
  5008  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5009  	return c
  5010  }
  5011  
  5012  // Context sets the context to be used in this call's Do method.
  5013  func (c *BiddersPublisherConnectionsBatchRejectCall) Context(ctx context.Context) *BiddersPublisherConnectionsBatchRejectCall {
  5014  	c.ctx_ = ctx
  5015  	return c
  5016  }
  5017  
  5018  // Header returns a http.Header that can be modified by the caller to add
  5019  // headers to the request.
  5020  func (c *BiddersPublisherConnectionsBatchRejectCall) Header() http.Header {
  5021  	if c.header_ == nil {
  5022  		c.header_ = make(http.Header)
  5023  	}
  5024  	return c.header_
  5025  }
  5026  
  5027  func (c *BiddersPublisherConnectionsBatchRejectCall) doRequest(alt string) (*http.Response, error) {
  5028  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5029  	var body io.Reader = nil
  5030  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchrejectpublisherconnectionsrequest)
  5031  	if err != nil {
  5032  		return nil, err
  5033  	}
  5034  	c.urlParams_.Set("alt", alt)
  5035  	c.urlParams_.Set("prettyPrint", "false")
  5036  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/publisherConnections:batchReject")
  5037  	urls += "?" + c.urlParams_.Encode()
  5038  	req, err := http.NewRequest("POST", urls, body)
  5039  	if err != nil {
  5040  		return nil, err
  5041  	}
  5042  	req.Header = reqHeaders
  5043  	googleapi.Expand(req.URL, map[string]string{
  5044  		"parent": c.parent,
  5045  	})
  5046  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5047  }
  5048  
  5049  // Do executes the "realtimebidding.bidders.publisherConnections.batchReject" call.
  5050  // Any non-2xx status code is an error. Response headers are in either
  5051  // *BatchRejectPublisherConnectionsResponse.ServerResponse.Header or (if a
  5052  // response was returned at all) in error.(*googleapi.Error).Header. Use
  5053  // googleapi.IsNotModified to check whether the returned error was because
  5054  // http.StatusNotModified was returned.
  5055  func (c *BiddersPublisherConnectionsBatchRejectCall) Do(opts ...googleapi.CallOption) (*BatchRejectPublisherConnectionsResponse, error) {
  5056  	gensupport.SetOptions(c.urlParams_, opts...)
  5057  	res, err := c.doRequest("json")
  5058  	if res != nil && res.StatusCode == http.StatusNotModified {
  5059  		if res.Body != nil {
  5060  			res.Body.Close()
  5061  		}
  5062  		return nil, gensupport.WrapError(&googleapi.Error{
  5063  			Code:   res.StatusCode,
  5064  			Header: res.Header,
  5065  		})
  5066  	}
  5067  	if err != nil {
  5068  		return nil, err
  5069  	}
  5070  	defer googleapi.CloseBody(res)
  5071  	if err := googleapi.CheckResponse(res); err != nil {
  5072  		return nil, gensupport.WrapError(err)
  5073  	}
  5074  	ret := &BatchRejectPublisherConnectionsResponse{
  5075  		ServerResponse: googleapi.ServerResponse{
  5076  			Header:         res.Header,
  5077  			HTTPStatusCode: res.StatusCode,
  5078  		},
  5079  	}
  5080  	target := &ret
  5081  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5082  		return nil, err
  5083  	}
  5084  	return ret, nil
  5085  }
  5086  
  5087  type BiddersPublisherConnectionsGetCall struct {
  5088  	s            *Service
  5089  	name         string
  5090  	urlParams_   gensupport.URLParams
  5091  	ifNoneMatch_ string
  5092  	ctx_         context.Context
  5093  	header_      http.Header
  5094  }
  5095  
  5096  // Get: Gets a publisher connection.
  5097  //
  5098  //   - name: Name of the publisher whose connection information is to be
  5099  //     retrieved. In the pattern
  5100  //     `bidders/{bidder}/publisherConnections/{publisher}` where `{bidder}` is
  5101  //     the account ID of the bidder, and `{publisher}` is the ads.txt/app-ads.txt
  5102  //     publisher ID. See publisherConnection.name.
  5103  func (r *BiddersPublisherConnectionsService) Get(name string) *BiddersPublisherConnectionsGetCall {
  5104  	c := &BiddersPublisherConnectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5105  	c.name = name
  5106  	return c
  5107  }
  5108  
  5109  // Fields allows partial responses to be retrieved. See
  5110  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5111  // details.
  5112  func (c *BiddersPublisherConnectionsGetCall) Fields(s ...googleapi.Field) *BiddersPublisherConnectionsGetCall {
  5113  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5114  	return c
  5115  }
  5116  
  5117  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5118  // object's ETag matches the given value. This is useful for getting updates
  5119  // only after the object has changed since the last request.
  5120  func (c *BiddersPublisherConnectionsGetCall) IfNoneMatch(entityTag string) *BiddersPublisherConnectionsGetCall {
  5121  	c.ifNoneMatch_ = entityTag
  5122  	return c
  5123  }
  5124  
  5125  // Context sets the context to be used in this call's Do method.
  5126  func (c *BiddersPublisherConnectionsGetCall) Context(ctx context.Context) *BiddersPublisherConnectionsGetCall {
  5127  	c.ctx_ = ctx
  5128  	return c
  5129  }
  5130  
  5131  // Header returns a http.Header that can be modified by the caller to add
  5132  // headers to the request.
  5133  func (c *BiddersPublisherConnectionsGetCall) Header() http.Header {
  5134  	if c.header_ == nil {
  5135  		c.header_ = make(http.Header)
  5136  	}
  5137  	return c.header_
  5138  }
  5139  
  5140  func (c *BiddersPublisherConnectionsGetCall) doRequest(alt string) (*http.Response, error) {
  5141  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5142  	if c.ifNoneMatch_ != "" {
  5143  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5144  	}
  5145  	var body io.Reader = nil
  5146  	c.urlParams_.Set("alt", alt)
  5147  	c.urlParams_.Set("prettyPrint", "false")
  5148  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5149  	urls += "?" + c.urlParams_.Encode()
  5150  	req, err := http.NewRequest("GET", urls, body)
  5151  	if err != nil {
  5152  		return nil, err
  5153  	}
  5154  	req.Header = reqHeaders
  5155  	googleapi.Expand(req.URL, map[string]string{
  5156  		"name": c.name,
  5157  	})
  5158  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5159  }
  5160  
  5161  // Do executes the "realtimebidding.bidders.publisherConnections.get" call.
  5162  // Any non-2xx status code is an error. Response headers are in either
  5163  // *PublisherConnection.ServerResponse.Header or (if a response was returned at
  5164  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5165  // check whether the returned error was because http.StatusNotModified was
  5166  // returned.
  5167  func (c *BiddersPublisherConnectionsGetCall) Do(opts ...googleapi.CallOption) (*PublisherConnection, error) {
  5168  	gensupport.SetOptions(c.urlParams_, opts...)
  5169  	res, err := c.doRequest("json")
  5170  	if res != nil && res.StatusCode == http.StatusNotModified {
  5171  		if res.Body != nil {
  5172  			res.Body.Close()
  5173  		}
  5174  		return nil, gensupport.WrapError(&googleapi.Error{
  5175  			Code:   res.StatusCode,
  5176  			Header: res.Header,
  5177  		})
  5178  	}
  5179  	if err != nil {
  5180  		return nil, err
  5181  	}
  5182  	defer googleapi.CloseBody(res)
  5183  	if err := googleapi.CheckResponse(res); err != nil {
  5184  		return nil, gensupport.WrapError(err)
  5185  	}
  5186  	ret := &PublisherConnection{
  5187  		ServerResponse: googleapi.ServerResponse{
  5188  			Header:         res.Header,
  5189  			HTTPStatusCode: res.StatusCode,
  5190  		},
  5191  	}
  5192  	target := &ret
  5193  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5194  		return nil, err
  5195  	}
  5196  	return ret, nil
  5197  }
  5198  
  5199  type BiddersPublisherConnectionsListCall struct {
  5200  	s            *Service
  5201  	parent       string
  5202  	urlParams_   gensupport.URLParams
  5203  	ifNoneMatch_ string
  5204  	ctx_         context.Context
  5205  	header_      http.Header
  5206  }
  5207  
  5208  // List: Lists publisher connections for a given bidder.
  5209  //
  5210  //   - parent: Name of the bidder for which publishers have initiated
  5211  //     connections. The pattern for this resource is `bidders/{bidder}` where
  5212  //     `{bidder}` represents the account ID of the bidder.
  5213  func (r *BiddersPublisherConnectionsService) List(parent string) *BiddersPublisherConnectionsListCall {
  5214  	c := &BiddersPublisherConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5215  	c.parent = parent
  5216  	return c
  5217  }
  5218  
  5219  // Filter sets the optional parameter "filter": Query string to filter
  5220  // publisher connections. Connections can be filtered by `displayName`,
  5221  // `publisherPlatform`, and `biddingState`. If no filter is specified, all
  5222  // publisher connections will be returned. Example: 'displayName="Great
  5223  // Publisher*" AND publisherPlatform=ADMOB AND biddingState != PENDING' See
  5224  // https://google.aip.dev/160 for more information about filtering syntax.
  5225  func (c *BiddersPublisherConnectionsListCall) Filter(filter string) *BiddersPublisherConnectionsListCall {
  5226  	c.urlParams_.Set("filter", filter)
  5227  	return c
  5228  }
  5229  
  5230  // OrderBy sets the optional parameter "orderBy": Order specification by which
  5231  // results should be sorted. If no sort order is specified, the results will be
  5232  // returned in alphabetic order based on the publisher's publisher code.
  5233  // Results can be sorted by `createTime`. Example: 'createTime DESC'.
  5234  func (c *BiddersPublisherConnectionsListCall) OrderBy(orderBy string) *BiddersPublisherConnectionsListCall {
  5235  	c.urlParams_.Set("orderBy", orderBy)
  5236  	return c
  5237  }
  5238  
  5239  // PageSize sets the optional parameter "pageSize": Requested page size. The
  5240  // server may return fewer results than requested (due to timeout constraint)
  5241  // even if more are available through another call. If unspecified, the server
  5242  // will pick an appropriate default. Acceptable values are 1 to 5000,
  5243  // inclusive.
  5244  func (c *BiddersPublisherConnectionsListCall) PageSize(pageSize int64) *BiddersPublisherConnectionsListCall {
  5245  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5246  	return c
  5247  }
  5248  
  5249  // PageToken sets the optional parameter "pageToken": A token identifying a
  5250  // page of results the server should return. Typically, this is the value of
  5251  // ListPublisherConnectionsResponse.nextPageToken returned from the previous
  5252  // call to the 'ListPublisherConnections' method.
  5253  func (c *BiddersPublisherConnectionsListCall) PageToken(pageToken string) *BiddersPublisherConnectionsListCall {
  5254  	c.urlParams_.Set("pageToken", pageToken)
  5255  	return c
  5256  }
  5257  
  5258  // Fields allows partial responses to be retrieved. See
  5259  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5260  // details.
  5261  func (c *BiddersPublisherConnectionsListCall) Fields(s ...googleapi.Field) *BiddersPublisherConnectionsListCall {
  5262  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5263  	return c
  5264  }
  5265  
  5266  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5267  // object's ETag matches the given value. This is useful for getting updates
  5268  // only after the object has changed since the last request.
  5269  func (c *BiddersPublisherConnectionsListCall) IfNoneMatch(entityTag string) *BiddersPublisherConnectionsListCall {
  5270  	c.ifNoneMatch_ = entityTag
  5271  	return c
  5272  }
  5273  
  5274  // Context sets the context to be used in this call's Do method.
  5275  func (c *BiddersPublisherConnectionsListCall) Context(ctx context.Context) *BiddersPublisherConnectionsListCall {
  5276  	c.ctx_ = ctx
  5277  	return c
  5278  }
  5279  
  5280  // Header returns a http.Header that can be modified by the caller to add
  5281  // headers to the request.
  5282  func (c *BiddersPublisherConnectionsListCall) Header() http.Header {
  5283  	if c.header_ == nil {
  5284  		c.header_ = make(http.Header)
  5285  	}
  5286  	return c.header_
  5287  }
  5288  
  5289  func (c *BiddersPublisherConnectionsListCall) doRequest(alt string) (*http.Response, error) {
  5290  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5291  	if c.ifNoneMatch_ != "" {
  5292  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5293  	}
  5294  	var body io.Reader = nil
  5295  	c.urlParams_.Set("alt", alt)
  5296  	c.urlParams_.Set("prettyPrint", "false")
  5297  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/publisherConnections")
  5298  	urls += "?" + c.urlParams_.Encode()
  5299  	req, err := http.NewRequest("GET", urls, body)
  5300  	if err != nil {
  5301  		return nil, err
  5302  	}
  5303  	req.Header = reqHeaders
  5304  	googleapi.Expand(req.URL, map[string]string{
  5305  		"parent": c.parent,
  5306  	})
  5307  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5308  }
  5309  
  5310  // Do executes the "realtimebidding.bidders.publisherConnections.list" call.
  5311  // Any non-2xx status code is an error. Response headers are in either
  5312  // *ListPublisherConnectionsResponse.ServerResponse.Header or (if a response
  5313  // was returned at all) in error.(*googleapi.Error).Header. Use
  5314  // googleapi.IsNotModified to check whether the returned error was because
  5315  // http.StatusNotModified was returned.
  5316  func (c *BiddersPublisherConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListPublisherConnectionsResponse, error) {
  5317  	gensupport.SetOptions(c.urlParams_, opts...)
  5318  	res, err := c.doRequest("json")
  5319  	if res != nil && res.StatusCode == http.StatusNotModified {
  5320  		if res.Body != nil {
  5321  			res.Body.Close()
  5322  		}
  5323  		return nil, gensupport.WrapError(&googleapi.Error{
  5324  			Code:   res.StatusCode,
  5325  			Header: res.Header,
  5326  		})
  5327  	}
  5328  	if err != nil {
  5329  		return nil, err
  5330  	}
  5331  	defer googleapi.CloseBody(res)
  5332  	if err := googleapi.CheckResponse(res); err != nil {
  5333  		return nil, gensupport.WrapError(err)
  5334  	}
  5335  	ret := &ListPublisherConnectionsResponse{
  5336  		ServerResponse: googleapi.ServerResponse{
  5337  			Header:         res.Header,
  5338  			HTTPStatusCode: res.StatusCode,
  5339  		},
  5340  	}
  5341  	target := &ret
  5342  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5343  		return nil, err
  5344  	}
  5345  	return ret, nil
  5346  }
  5347  
  5348  // Pages invokes f for each page of results.
  5349  // A non-nil error returned from f will halt the iteration.
  5350  // The provided context supersedes any context provided to the Context method.
  5351  func (c *BiddersPublisherConnectionsListCall) Pages(ctx context.Context, f func(*ListPublisherConnectionsResponse) error) error {
  5352  	c.ctx_ = ctx
  5353  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5354  	for {
  5355  		x, err := c.Do()
  5356  		if err != nil {
  5357  			return err
  5358  		}
  5359  		if err := f(x); err != nil {
  5360  			return err
  5361  		}
  5362  		if x.NextPageToken == "" {
  5363  			return nil
  5364  		}
  5365  		c.PageToken(x.NextPageToken)
  5366  	}
  5367  }
  5368  
  5369  type BuyersGetCall struct {
  5370  	s            *Service
  5371  	name         string
  5372  	urlParams_   gensupport.URLParams
  5373  	ifNoneMatch_ string
  5374  	ctx_         context.Context
  5375  	header_      http.Header
  5376  }
  5377  
  5378  // Get: Gets a buyer account by its name.
  5379  //
  5380  // - name: Name of the buyer to get. Format: `buyers/{buyerId}`.
  5381  func (r *BuyersService) Get(name string) *BuyersGetCall {
  5382  	c := &BuyersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5383  	c.name = name
  5384  	return c
  5385  }
  5386  
  5387  // Fields allows partial responses to be retrieved. See
  5388  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5389  // details.
  5390  func (c *BuyersGetCall) Fields(s ...googleapi.Field) *BuyersGetCall {
  5391  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5392  	return c
  5393  }
  5394  
  5395  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5396  // object's ETag matches the given value. This is useful for getting updates
  5397  // only after the object has changed since the last request.
  5398  func (c *BuyersGetCall) IfNoneMatch(entityTag string) *BuyersGetCall {
  5399  	c.ifNoneMatch_ = entityTag
  5400  	return c
  5401  }
  5402  
  5403  // Context sets the context to be used in this call's Do method.
  5404  func (c *BuyersGetCall) Context(ctx context.Context) *BuyersGetCall {
  5405  	c.ctx_ = ctx
  5406  	return c
  5407  }
  5408  
  5409  // Header returns a http.Header that can be modified by the caller to add
  5410  // headers to the request.
  5411  func (c *BuyersGetCall) Header() http.Header {
  5412  	if c.header_ == nil {
  5413  		c.header_ = make(http.Header)
  5414  	}
  5415  	return c.header_
  5416  }
  5417  
  5418  func (c *BuyersGetCall) doRequest(alt string) (*http.Response, error) {
  5419  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5420  	if c.ifNoneMatch_ != "" {
  5421  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5422  	}
  5423  	var body io.Reader = nil
  5424  	c.urlParams_.Set("alt", alt)
  5425  	c.urlParams_.Set("prettyPrint", "false")
  5426  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5427  	urls += "?" + c.urlParams_.Encode()
  5428  	req, err := http.NewRequest("GET", urls, body)
  5429  	if err != nil {
  5430  		return nil, err
  5431  	}
  5432  	req.Header = reqHeaders
  5433  	googleapi.Expand(req.URL, map[string]string{
  5434  		"name": c.name,
  5435  	})
  5436  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5437  }
  5438  
  5439  // Do executes the "realtimebidding.buyers.get" call.
  5440  // Any non-2xx status code is an error. Response headers are in either
  5441  // *Buyer.ServerResponse.Header or (if a response was returned at all) in
  5442  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5443  // whether the returned error was because http.StatusNotModified was returned.
  5444  func (c *BuyersGetCall) Do(opts ...googleapi.CallOption) (*Buyer, error) {
  5445  	gensupport.SetOptions(c.urlParams_, opts...)
  5446  	res, err := c.doRequest("json")
  5447  	if res != nil && res.StatusCode == http.StatusNotModified {
  5448  		if res.Body != nil {
  5449  			res.Body.Close()
  5450  		}
  5451  		return nil, gensupport.WrapError(&googleapi.Error{
  5452  			Code:   res.StatusCode,
  5453  			Header: res.Header,
  5454  		})
  5455  	}
  5456  	if err != nil {
  5457  		return nil, err
  5458  	}
  5459  	defer googleapi.CloseBody(res)
  5460  	if err := googleapi.CheckResponse(res); err != nil {
  5461  		return nil, gensupport.WrapError(err)
  5462  	}
  5463  	ret := &Buyer{
  5464  		ServerResponse: googleapi.ServerResponse{
  5465  			Header:         res.Header,
  5466  			HTTPStatusCode: res.StatusCode,
  5467  		},
  5468  	}
  5469  	target := &ret
  5470  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5471  		return nil, err
  5472  	}
  5473  	return ret, nil
  5474  }
  5475  
  5476  type BuyersGetRemarketingTagCall struct {
  5477  	s            *Service
  5478  	name         string
  5479  	urlParams_   gensupport.URLParams
  5480  	ifNoneMatch_ string
  5481  	ctx_         context.Context
  5482  	header_      http.Header
  5483  }
  5484  
  5485  // GetRemarketingTag: This has been sunset as of October 2023, and will return
  5486  // an error response if called. For more information, see the release notes:
  5487  // https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api
  5488  // Gets remarketing tag for a buyer. A remarketing tag is a piece of JavaScript
  5489  // code that can be placed on a web page. When a user visits a page containing
  5490  // a remarketing tag, Google adds the user to a user list.
  5491  //
  5492  //   - name: To fetch the remarketing tag for an account, the name must follow
  5493  //     the pattern `buyers/{accountId}`, where `{accountId}` represents the ID of
  5494  //     the buyer that owns the remarketing tag. For a bidder accessing the
  5495  //     remarketing tag on behalf of a child seat buyer, `{accountId}` should
  5496  //     represent the ID of the child seat buyer. To fetch the remarketing tag for
  5497  //     a specific user list, the name must follow the pattern
  5498  //     `buyers/{accountId}/userLists/{userListId}`. See UserList.name.
  5499  func (r *BuyersService) GetRemarketingTag(name string) *BuyersGetRemarketingTagCall {
  5500  	c := &BuyersGetRemarketingTagCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5501  	c.name = name
  5502  	return c
  5503  }
  5504  
  5505  // Fields allows partial responses to be retrieved. See
  5506  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5507  // details.
  5508  func (c *BuyersGetRemarketingTagCall) Fields(s ...googleapi.Field) *BuyersGetRemarketingTagCall {
  5509  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5510  	return c
  5511  }
  5512  
  5513  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5514  // object's ETag matches the given value. This is useful for getting updates
  5515  // only after the object has changed since the last request.
  5516  func (c *BuyersGetRemarketingTagCall) IfNoneMatch(entityTag string) *BuyersGetRemarketingTagCall {
  5517  	c.ifNoneMatch_ = entityTag
  5518  	return c
  5519  }
  5520  
  5521  // Context sets the context to be used in this call's Do method.
  5522  func (c *BuyersGetRemarketingTagCall) Context(ctx context.Context) *BuyersGetRemarketingTagCall {
  5523  	c.ctx_ = ctx
  5524  	return c
  5525  }
  5526  
  5527  // Header returns a http.Header that can be modified by the caller to add
  5528  // headers to the request.
  5529  func (c *BuyersGetRemarketingTagCall) Header() http.Header {
  5530  	if c.header_ == nil {
  5531  		c.header_ = make(http.Header)
  5532  	}
  5533  	return c.header_
  5534  }
  5535  
  5536  func (c *BuyersGetRemarketingTagCall) doRequest(alt string) (*http.Response, error) {
  5537  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5538  	if c.ifNoneMatch_ != "" {
  5539  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5540  	}
  5541  	var body io.Reader = nil
  5542  	c.urlParams_.Set("alt", alt)
  5543  	c.urlParams_.Set("prettyPrint", "false")
  5544  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:getRemarketingTag")
  5545  	urls += "?" + c.urlParams_.Encode()
  5546  	req, err := http.NewRequest("GET", urls, body)
  5547  	if err != nil {
  5548  		return nil, err
  5549  	}
  5550  	req.Header = reqHeaders
  5551  	googleapi.Expand(req.URL, map[string]string{
  5552  		"name": c.name,
  5553  	})
  5554  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5555  }
  5556  
  5557  // Do executes the "realtimebidding.buyers.getRemarketingTag" call.
  5558  // Any non-2xx status code is an error. Response headers are in either
  5559  // *GetRemarketingTagResponse.ServerResponse.Header or (if a response was
  5560  // returned at all) in error.(*googleapi.Error).Header. Use
  5561  // googleapi.IsNotModified to check whether the returned error was because
  5562  // http.StatusNotModified was returned.
  5563  func (c *BuyersGetRemarketingTagCall) Do(opts ...googleapi.CallOption) (*GetRemarketingTagResponse, error) {
  5564  	gensupport.SetOptions(c.urlParams_, opts...)
  5565  	res, err := c.doRequest("json")
  5566  	if res != nil && res.StatusCode == http.StatusNotModified {
  5567  		if res.Body != nil {
  5568  			res.Body.Close()
  5569  		}
  5570  		return nil, gensupport.WrapError(&googleapi.Error{
  5571  			Code:   res.StatusCode,
  5572  			Header: res.Header,
  5573  		})
  5574  	}
  5575  	if err != nil {
  5576  		return nil, err
  5577  	}
  5578  	defer googleapi.CloseBody(res)
  5579  	if err := googleapi.CheckResponse(res); err != nil {
  5580  		return nil, gensupport.WrapError(err)
  5581  	}
  5582  	ret := &GetRemarketingTagResponse{
  5583  		ServerResponse: googleapi.ServerResponse{
  5584  			Header:         res.Header,
  5585  			HTTPStatusCode: res.StatusCode,
  5586  		},
  5587  	}
  5588  	target := &ret
  5589  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5590  		return nil, err
  5591  	}
  5592  	return ret, nil
  5593  }
  5594  
  5595  type BuyersListCall struct {
  5596  	s            *Service
  5597  	urlParams_   gensupport.URLParams
  5598  	ifNoneMatch_ string
  5599  	ctx_         context.Context
  5600  	header_      http.Header
  5601  }
  5602  
  5603  // List: Lists all buyer account information the calling buyer user or service
  5604  // account is permissioned to manage.
  5605  func (r *BuyersService) List() *BuyersListCall {
  5606  	c := &BuyersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5607  	return c
  5608  }
  5609  
  5610  // PageSize sets the optional parameter "pageSize": The maximum number of
  5611  // buyers to return. If unspecified, at most 100 buyers will be returned. The
  5612  // maximum value is 500; values above 500 will be coerced to 500.
  5613  func (c *BuyersListCall) PageSize(pageSize int64) *BuyersListCall {
  5614  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5615  	return c
  5616  }
  5617  
  5618  // PageToken sets the optional parameter "pageToken": A token identifying a
  5619  // page of results the server should return. This value is received from a
  5620  // previous `ListBuyers` call in ListBuyersResponse.nextPageToken.
  5621  func (c *BuyersListCall) PageToken(pageToken string) *BuyersListCall {
  5622  	c.urlParams_.Set("pageToken", pageToken)
  5623  	return c
  5624  }
  5625  
  5626  // Fields allows partial responses to be retrieved. See
  5627  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5628  // details.
  5629  func (c *BuyersListCall) Fields(s ...googleapi.Field) *BuyersListCall {
  5630  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5631  	return c
  5632  }
  5633  
  5634  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5635  // object's ETag matches the given value. This is useful for getting updates
  5636  // only after the object has changed since the last request.
  5637  func (c *BuyersListCall) IfNoneMatch(entityTag string) *BuyersListCall {
  5638  	c.ifNoneMatch_ = entityTag
  5639  	return c
  5640  }
  5641  
  5642  // Context sets the context to be used in this call's Do method.
  5643  func (c *BuyersListCall) Context(ctx context.Context) *BuyersListCall {
  5644  	c.ctx_ = ctx
  5645  	return c
  5646  }
  5647  
  5648  // Header returns a http.Header that can be modified by the caller to add
  5649  // headers to the request.
  5650  func (c *BuyersListCall) Header() http.Header {
  5651  	if c.header_ == nil {
  5652  		c.header_ = make(http.Header)
  5653  	}
  5654  	return c.header_
  5655  }
  5656  
  5657  func (c *BuyersListCall) doRequest(alt string) (*http.Response, error) {
  5658  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5659  	if c.ifNoneMatch_ != "" {
  5660  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5661  	}
  5662  	var body io.Reader = nil
  5663  	c.urlParams_.Set("alt", alt)
  5664  	c.urlParams_.Set("prettyPrint", "false")
  5665  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/buyers")
  5666  	urls += "?" + c.urlParams_.Encode()
  5667  	req, err := http.NewRequest("GET", urls, body)
  5668  	if err != nil {
  5669  		return nil, err
  5670  	}
  5671  	req.Header = reqHeaders
  5672  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5673  }
  5674  
  5675  // Do executes the "realtimebidding.buyers.list" call.
  5676  // Any non-2xx status code is an error. Response headers are in either
  5677  // *ListBuyersResponse.ServerResponse.Header or (if a response was returned at
  5678  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5679  // check whether the returned error was because http.StatusNotModified was
  5680  // returned.
  5681  func (c *BuyersListCall) Do(opts ...googleapi.CallOption) (*ListBuyersResponse, error) {
  5682  	gensupport.SetOptions(c.urlParams_, opts...)
  5683  	res, err := c.doRequest("json")
  5684  	if res != nil && res.StatusCode == http.StatusNotModified {
  5685  		if res.Body != nil {
  5686  			res.Body.Close()
  5687  		}
  5688  		return nil, gensupport.WrapError(&googleapi.Error{
  5689  			Code:   res.StatusCode,
  5690  			Header: res.Header,
  5691  		})
  5692  	}
  5693  	if err != nil {
  5694  		return nil, err
  5695  	}
  5696  	defer googleapi.CloseBody(res)
  5697  	if err := googleapi.CheckResponse(res); err != nil {
  5698  		return nil, gensupport.WrapError(err)
  5699  	}
  5700  	ret := &ListBuyersResponse{
  5701  		ServerResponse: googleapi.ServerResponse{
  5702  			Header:         res.Header,
  5703  			HTTPStatusCode: res.StatusCode,
  5704  		},
  5705  	}
  5706  	target := &ret
  5707  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5708  		return nil, err
  5709  	}
  5710  	return ret, nil
  5711  }
  5712  
  5713  // Pages invokes f for each page of results.
  5714  // A non-nil error returned from f will halt the iteration.
  5715  // The provided context supersedes any context provided to the Context method.
  5716  func (c *BuyersListCall) Pages(ctx context.Context, f func(*ListBuyersResponse) error) error {
  5717  	c.ctx_ = ctx
  5718  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5719  	for {
  5720  		x, err := c.Do()
  5721  		if err != nil {
  5722  			return err
  5723  		}
  5724  		if err := f(x); err != nil {
  5725  			return err
  5726  		}
  5727  		if x.NextPageToken == "" {
  5728  			return nil
  5729  		}
  5730  		c.PageToken(x.NextPageToken)
  5731  	}
  5732  }
  5733  
  5734  type BuyersCreativesCreateCall struct {
  5735  	s          *Service
  5736  	parent     string
  5737  	creative   *Creative
  5738  	urlParams_ gensupport.URLParams
  5739  	ctx_       context.Context
  5740  	header_    http.Header
  5741  }
  5742  
  5743  // Create: Creates a creative.
  5744  //
  5745  //   - parent: The name of the parent buyer that the new creative belongs to that
  5746  //     must follow the pattern `buyers/{buyerAccountId}`, where
  5747  //     `{buyerAccountId}` represents the account ID of the buyer who owns a
  5748  //     creative. For a bidder accessing creatives on behalf of a child seat
  5749  //     buyer, `{buyerAccountId}` should represent the account ID of the child
  5750  //     seat buyer.
  5751  func (r *BuyersCreativesService) Create(parent string, creative *Creative) *BuyersCreativesCreateCall {
  5752  	c := &BuyersCreativesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5753  	c.parent = parent
  5754  	c.creative = creative
  5755  	return c
  5756  }
  5757  
  5758  // Fields allows partial responses to be retrieved. See
  5759  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5760  // details.
  5761  func (c *BuyersCreativesCreateCall) Fields(s ...googleapi.Field) *BuyersCreativesCreateCall {
  5762  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5763  	return c
  5764  }
  5765  
  5766  // Context sets the context to be used in this call's Do method.
  5767  func (c *BuyersCreativesCreateCall) Context(ctx context.Context) *BuyersCreativesCreateCall {
  5768  	c.ctx_ = ctx
  5769  	return c
  5770  }
  5771  
  5772  // Header returns a http.Header that can be modified by the caller to add
  5773  // headers to the request.
  5774  func (c *BuyersCreativesCreateCall) Header() http.Header {
  5775  	if c.header_ == nil {
  5776  		c.header_ = make(http.Header)
  5777  	}
  5778  	return c.header_
  5779  }
  5780  
  5781  func (c *BuyersCreativesCreateCall) doRequest(alt string) (*http.Response, error) {
  5782  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5783  	var body io.Reader = nil
  5784  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
  5785  	if err != nil {
  5786  		return nil, err
  5787  	}
  5788  	c.urlParams_.Set("alt", alt)
  5789  	c.urlParams_.Set("prettyPrint", "false")
  5790  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/creatives")
  5791  	urls += "?" + c.urlParams_.Encode()
  5792  	req, err := http.NewRequest("POST", urls, body)
  5793  	if err != nil {
  5794  		return nil, err
  5795  	}
  5796  	req.Header = reqHeaders
  5797  	googleapi.Expand(req.URL, map[string]string{
  5798  		"parent": c.parent,
  5799  	})
  5800  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5801  }
  5802  
  5803  // Do executes the "realtimebidding.buyers.creatives.create" call.
  5804  // Any non-2xx status code is an error. Response headers are in either
  5805  // *Creative.ServerResponse.Header or (if a response was returned at all) in
  5806  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5807  // whether the returned error was because http.StatusNotModified was returned.
  5808  func (c *BuyersCreativesCreateCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
  5809  	gensupport.SetOptions(c.urlParams_, opts...)
  5810  	res, err := c.doRequest("json")
  5811  	if res != nil && res.StatusCode == http.StatusNotModified {
  5812  		if res.Body != nil {
  5813  			res.Body.Close()
  5814  		}
  5815  		return nil, gensupport.WrapError(&googleapi.Error{
  5816  			Code:   res.StatusCode,
  5817  			Header: res.Header,
  5818  		})
  5819  	}
  5820  	if err != nil {
  5821  		return nil, err
  5822  	}
  5823  	defer googleapi.CloseBody(res)
  5824  	if err := googleapi.CheckResponse(res); err != nil {
  5825  		return nil, gensupport.WrapError(err)
  5826  	}
  5827  	ret := &Creative{
  5828  		ServerResponse: googleapi.ServerResponse{
  5829  			Header:         res.Header,
  5830  			HTTPStatusCode: res.StatusCode,
  5831  		},
  5832  	}
  5833  	target := &ret
  5834  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5835  		return nil, err
  5836  	}
  5837  	return ret, nil
  5838  }
  5839  
  5840  type BuyersCreativesGetCall struct {
  5841  	s            *Service
  5842  	name         string
  5843  	urlParams_   gensupport.URLParams
  5844  	ifNoneMatch_ string
  5845  	ctx_         context.Context
  5846  	header_      http.Header
  5847  }
  5848  
  5849  // Get: Gets a creative.
  5850  //
  5851  // - name: Name of the creative to retrieve. See creative.name.
  5852  func (r *BuyersCreativesService) Get(name string) *BuyersCreativesGetCall {
  5853  	c := &BuyersCreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5854  	c.name = name
  5855  	return c
  5856  }
  5857  
  5858  // View sets the optional parameter "view": Controls the amount of information
  5859  // included in the response. By default only creativeServingDecision is
  5860  // included. To retrieve the entire creative resource (including the declared
  5861  // fields and the creative content) specify the view as "FULL".
  5862  //
  5863  // Possible values:
  5864  //
  5865  //	"CREATIVE_VIEW_UNSPECIFIED" - Not specified, equivalent to
  5866  //
  5867  // SERVING_DECISION_ONLY.
  5868  //
  5869  //	"SERVING_DECISION_ONLY" - Only creativeServingDecision is included in the
  5870  //
  5871  // response.
  5872  //
  5873  //	"FULL" - The entire creative resource (including the declared fields and
  5874  //
  5875  // the creative content) is included in the response.
  5876  func (c *BuyersCreativesGetCall) View(view string) *BuyersCreativesGetCall {
  5877  	c.urlParams_.Set("view", view)
  5878  	return c
  5879  }
  5880  
  5881  // Fields allows partial responses to be retrieved. See
  5882  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5883  // details.
  5884  func (c *BuyersCreativesGetCall) Fields(s ...googleapi.Field) *BuyersCreativesGetCall {
  5885  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5886  	return c
  5887  }
  5888  
  5889  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5890  // object's ETag matches the given value. This is useful for getting updates
  5891  // only after the object has changed since the last request.
  5892  func (c *BuyersCreativesGetCall) IfNoneMatch(entityTag string) *BuyersCreativesGetCall {
  5893  	c.ifNoneMatch_ = entityTag
  5894  	return c
  5895  }
  5896  
  5897  // Context sets the context to be used in this call's Do method.
  5898  func (c *BuyersCreativesGetCall) Context(ctx context.Context) *BuyersCreativesGetCall {
  5899  	c.ctx_ = ctx
  5900  	return c
  5901  }
  5902  
  5903  // Header returns a http.Header that can be modified by the caller to add
  5904  // headers to the request.
  5905  func (c *BuyersCreativesGetCall) Header() http.Header {
  5906  	if c.header_ == nil {
  5907  		c.header_ = make(http.Header)
  5908  	}
  5909  	return c.header_
  5910  }
  5911  
  5912  func (c *BuyersCreativesGetCall) doRequest(alt string) (*http.Response, error) {
  5913  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5914  	if c.ifNoneMatch_ != "" {
  5915  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5916  	}
  5917  	var body io.Reader = nil
  5918  	c.urlParams_.Set("alt", alt)
  5919  	c.urlParams_.Set("prettyPrint", "false")
  5920  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5921  	urls += "?" + c.urlParams_.Encode()
  5922  	req, err := http.NewRequest("GET", urls, body)
  5923  	if err != nil {
  5924  		return nil, err
  5925  	}
  5926  	req.Header = reqHeaders
  5927  	googleapi.Expand(req.URL, map[string]string{
  5928  		"name": c.name,
  5929  	})
  5930  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5931  }
  5932  
  5933  // Do executes the "realtimebidding.buyers.creatives.get" call.
  5934  // Any non-2xx status code is an error. Response headers are in either
  5935  // *Creative.ServerResponse.Header or (if a response was returned at all) in
  5936  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5937  // whether the returned error was because http.StatusNotModified was returned.
  5938  func (c *BuyersCreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
  5939  	gensupport.SetOptions(c.urlParams_, opts...)
  5940  	res, err := c.doRequest("json")
  5941  	if res != nil && res.StatusCode == http.StatusNotModified {
  5942  		if res.Body != nil {
  5943  			res.Body.Close()
  5944  		}
  5945  		return nil, gensupport.WrapError(&googleapi.Error{
  5946  			Code:   res.StatusCode,
  5947  			Header: res.Header,
  5948  		})
  5949  	}
  5950  	if err != nil {
  5951  		return nil, err
  5952  	}
  5953  	defer googleapi.CloseBody(res)
  5954  	if err := googleapi.CheckResponse(res); err != nil {
  5955  		return nil, gensupport.WrapError(err)
  5956  	}
  5957  	ret := &Creative{
  5958  		ServerResponse: googleapi.ServerResponse{
  5959  			Header:         res.Header,
  5960  			HTTPStatusCode: res.StatusCode,
  5961  		},
  5962  	}
  5963  	target := &ret
  5964  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5965  		return nil, err
  5966  	}
  5967  	return ret, nil
  5968  }
  5969  
  5970  type BuyersCreativesListCall struct {
  5971  	s            *Service
  5972  	parent       string
  5973  	urlParams_   gensupport.URLParams
  5974  	ifNoneMatch_ string
  5975  	ctx_         context.Context
  5976  	header_      http.Header
  5977  }
  5978  
  5979  // List: Lists creatives as they are at the time of the initial request. This
  5980  // call may take multiple hours to complete. For large, paginated requests,
  5981  // this method returns a snapshot of creatives at the time of request for the
  5982  // first page. `lastStatusUpdate` and `creativeServingDecision` may be outdated
  5983  // for creatives on sequential pages. We recommend Google Cloud Pub/Sub
  5984  // (//cloud.google.com/pubsub/docs/overview) to view the latest status.
  5985  //
  5986  //   - parent: Name of the parent buyer that owns the creatives. The pattern for
  5987  //     this resource is either `buyers/{buyerAccountId}` or
  5988  //     `bidders/{bidderAccountId}`. For `buyers/{buyerAccountId}`, the
  5989  //     `buyerAccountId` can be one of the following: 1. The ID of the buyer that
  5990  //     is accessing their own creatives. 2. The ID of the child seat buyer under
  5991  //     a bidder account. So for listing creatives pertaining to the child seat
  5992  //     buyer (`456`) under bidder account (`123`), you would use the pattern:
  5993  //     `buyers/456`. 3. The ID of the bidder itself. So for listing creatives
  5994  //     pertaining to bidder (`123`), you would use `buyers/123`. If you want to
  5995  //     access all creatives pertaining to both the bidder and all of its child
  5996  //     seat accounts, you would use `bidders/{bidderAccountId}`, for example, for
  5997  //     all creatives pertaining to bidder (`123`), use `bidders/123`.
  5998  func (r *BuyersCreativesService) List(parent string) *BuyersCreativesListCall {
  5999  	c := &BuyersCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6000  	c.parent = parent
  6001  	return c
  6002  }
  6003  
  6004  // Filter sets the optional parameter "filter": Query string to filter
  6005  // creatives. If no filter is specified, all active creatives will be returned.
  6006  // Example: 'accountId=12345 AND (dealsStatus:DISAPPROVED AND
  6007  // disapprovalReason:UNACCEPTABLE_CONTENT) OR
  6008  // declaredAttributes:IS_COOKIE_TARGETED'
  6009  func (c *BuyersCreativesListCall) Filter(filter string) *BuyersCreativesListCall {
  6010  	c.urlParams_.Set("filter", filter)
  6011  	return c
  6012  }
  6013  
  6014  // PageSize sets the optional parameter "pageSize": Requested page size. The
  6015  // server may return fewer creatives than requested (due to timeout constraint)
  6016  // even if more are available through another call. If unspecified, server will
  6017  // pick an appropriate default. Acceptable values are 1 to 1000, inclusive.
  6018  func (c *BuyersCreativesListCall) PageSize(pageSize int64) *BuyersCreativesListCall {
  6019  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6020  	return c
  6021  }
  6022  
  6023  // PageToken sets the optional parameter "pageToken": A token identifying a
  6024  // page of results the server should return. Typically, this is the value of
  6025  // ListCreativesResponse.nextPageToken returned from the previous call to the
  6026  // 'ListCreatives' method. Page tokens for continued pages are valid for up to
  6027  // five hours, counting from the call to 'ListCreatives' for the first page.
  6028  func (c *BuyersCreativesListCall) PageToken(pageToken string) *BuyersCreativesListCall {
  6029  	c.urlParams_.Set("pageToken", pageToken)
  6030  	return c
  6031  }
  6032  
  6033  // View sets the optional parameter "view": Controls the amount of information
  6034  // included in the response. By default only creativeServingDecision is
  6035  // included. To retrieve the entire creative resource (including the declared
  6036  // fields and the creative content) specify the view as "FULL".
  6037  //
  6038  // Possible values:
  6039  //
  6040  //	"CREATIVE_VIEW_UNSPECIFIED" - Not specified, equivalent to
  6041  //
  6042  // SERVING_DECISION_ONLY.
  6043  //
  6044  //	"SERVING_DECISION_ONLY" - Only creativeServingDecision is included in the
  6045  //
  6046  // response.
  6047  //
  6048  //	"FULL" - The entire creative resource (including the declared fields and
  6049  //
  6050  // the creative content) is included in the response.
  6051  func (c *BuyersCreativesListCall) View(view string) *BuyersCreativesListCall {
  6052  	c.urlParams_.Set("view", view)
  6053  	return c
  6054  }
  6055  
  6056  // Fields allows partial responses to be retrieved. See
  6057  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6058  // details.
  6059  func (c *BuyersCreativesListCall) Fields(s ...googleapi.Field) *BuyersCreativesListCall {
  6060  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6061  	return c
  6062  }
  6063  
  6064  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6065  // object's ETag matches the given value. This is useful for getting updates
  6066  // only after the object has changed since the last request.
  6067  func (c *BuyersCreativesListCall) IfNoneMatch(entityTag string) *BuyersCreativesListCall {
  6068  	c.ifNoneMatch_ = entityTag
  6069  	return c
  6070  }
  6071  
  6072  // Context sets the context to be used in this call's Do method.
  6073  func (c *BuyersCreativesListCall) Context(ctx context.Context) *BuyersCreativesListCall {
  6074  	c.ctx_ = ctx
  6075  	return c
  6076  }
  6077  
  6078  // Header returns a http.Header that can be modified by the caller to add
  6079  // headers to the request.
  6080  func (c *BuyersCreativesListCall) Header() http.Header {
  6081  	if c.header_ == nil {
  6082  		c.header_ = make(http.Header)
  6083  	}
  6084  	return c.header_
  6085  }
  6086  
  6087  func (c *BuyersCreativesListCall) doRequest(alt string) (*http.Response, error) {
  6088  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6089  	if c.ifNoneMatch_ != "" {
  6090  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6091  	}
  6092  	var body io.Reader = nil
  6093  	c.urlParams_.Set("alt", alt)
  6094  	c.urlParams_.Set("prettyPrint", "false")
  6095  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/creatives")
  6096  	urls += "?" + c.urlParams_.Encode()
  6097  	req, err := http.NewRequest("GET", urls, body)
  6098  	if err != nil {
  6099  		return nil, err
  6100  	}
  6101  	req.Header = reqHeaders
  6102  	googleapi.Expand(req.URL, map[string]string{
  6103  		"parent": c.parent,
  6104  	})
  6105  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6106  }
  6107  
  6108  // Do executes the "realtimebidding.buyers.creatives.list" call.
  6109  // Any non-2xx status code is an error. Response headers are in either
  6110  // *ListCreativesResponse.ServerResponse.Header or (if a response was returned
  6111  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6112  // check whether the returned error was because http.StatusNotModified was
  6113  // returned.
  6114  func (c *BuyersCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativesResponse, error) {
  6115  	gensupport.SetOptions(c.urlParams_, opts...)
  6116  	res, err := c.doRequest("json")
  6117  	if res != nil && res.StatusCode == http.StatusNotModified {
  6118  		if res.Body != nil {
  6119  			res.Body.Close()
  6120  		}
  6121  		return nil, gensupport.WrapError(&googleapi.Error{
  6122  			Code:   res.StatusCode,
  6123  			Header: res.Header,
  6124  		})
  6125  	}
  6126  	if err != nil {
  6127  		return nil, err
  6128  	}
  6129  	defer googleapi.CloseBody(res)
  6130  	if err := googleapi.CheckResponse(res); err != nil {
  6131  		return nil, gensupport.WrapError(err)
  6132  	}
  6133  	ret := &ListCreativesResponse{
  6134  		ServerResponse: googleapi.ServerResponse{
  6135  			Header:         res.Header,
  6136  			HTTPStatusCode: res.StatusCode,
  6137  		},
  6138  	}
  6139  	target := &ret
  6140  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6141  		return nil, err
  6142  	}
  6143  	return ret, nil
  6144  }
  6145  
  6146  // Pages invokes f for each page of results.
  6147  // A non-nil error returned from f will halt the iteration.
  6148  // The provided context supersedes any context provided to the Context method.
  6149  func (c *BuyersCreativesListCall) Pages(ctx context.Context, f func(*ListCreativesResponse) error) error {
  6150  	c.ctx_ = ctx
  6151  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6152  	for {
  6153  		x, err := c.Do()
  6154  		if err != nil {
  6155  			return err
  6156  		}
  6157  		if err := f(x); err != nil {
  6158  			return err
  6159  		}
  6160  		if x.NextPageToken == "" {
  6161  			return nil
  6162  		}
  6163  		c.PageToken(x.NextPageToken)
  6164  	}
  6165  }
  6166  
  6167  type BuyersCreativesPatchCall struct {
  6168  	s          *Service
  6169  	name       string
  6170  	creative   *Creative
  6171  	urlParams_ gensupport.URLParams
  6172  	ctx_       context.Context
  6173  	header_    http.Header
  6174  }
  6175  
  6176  // Patch: Updates a creative.
  6177  //
  6178  //   - name: Output only. Name of the creative. Follows the pattern
  6179  //     `buyers/{buyer}/creatives/{creative}`, where `{buyer}` represents the
  6180  //     account ID of the buyer who owns the creative, and `{creative}` is the
  6181  //     buyer-specific creative ID that references this creative in the bid
  6182  //     response.
  6183  func (r *BuyersCreativesService) Patch(name string, creative *Creative) *BuyersCreativesPatchCall {
  6184  	c := &BuyersCreativesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6185  	c.name = name
  6186  	c.creative = creative
  6187  	return c
  6188  }
  6189  
  6190  // UpdateMask sets the optional parameter "updateMask": Field mask to use for
  6191  // partial in-place updates.
  6192  func (c *BuyersCreativesPatchCall) UpdateMask(updateMask string) *BuyersCreativesPatchCall {
  6193  	c.urlParams_.Set("updateMask", updateMask)
  6194  	return c
  6195  }
  6196  
  6197  // Fields allows partial responses to be retrieved. See
  6198  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6199  // details.
  6200  func (c *BuyersCreativesPatchCall) Fields(s ...googleapi.Field) *BuyersCreativesPatchCall {
  6201  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6202  	return c
  6203  }
  6204  
  6205  // Context sets the context to be used in this call's Do method.
  6206  func (c *BuyersCreativesPatchCall) Context(ctx context.Context) *BuyersCreativesPatchCall {
  6207  	c.ctx_ = ctx
  6208  	return c
  6209  }
  6210  
  6211  // Header returns a http.Header that can be modified by the caller to add
  6212  // headers to the request.
  6213  func (c *BuyersCreativesPatchCall) Header() http.Header {
  6214  	if c.header_ == nil {
  6215  		c.header_ = make(http.Header)
  6216  	}
  6217  	return c.header_
  6218  }
  6219  
  6220  func (c *BuyersCreativesPatchCall) doRequest(alt string) (*http.Response, error) {
  6221  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6222  	var body io.Reader = nil
  6223  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
  6224  	if err != nil {
  6225  		return nil, err
  6226  	}
  6227  	c.urlParams_.Set("alt", alt)
  6228  	c.urlParams_.Set("prettyPrint", "false")
  6229  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6230  	urls += "?" + c.urlParams_.Encode()
  6231  	req, err := http.NewRequest("PATCH", urls, body)
  6232  	if err != nil {
  6233  		return nil, err
  6234  	}
  6235  	req.Header = reqHeaders
  6236  	googleapi.Expand(req.URL, map[string]string{
  6237  		"name": c.name,
  6238  	})
  6239  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6240  }
  6241  
  6242  // Do executes the "realtimebidding.buyers.creatives.patch" call.
  6243  // Any non-2xx status code is an error. Response headers are in either
  6244  // *Creative.ServerResponse.Header or (if a response was returned at all) in
  6245  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6246  // whether the returned error was because http.StatusNotModified was returned.
  6247  func (c *BuyersCreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
  6248  	gensupport.SetOptions(c.urlParams_, opts...)
  6249  	res, err := c.doRequest("json")
  6250  	if res != nil && res.StatusCode == http.StatusNotModified {
  6251  		if res.Body != nil {
  6252  			res.Body.Close()
  6253  		}
  6254  		return nil, gensupport.WrapError(&googleapi.Error{
  6255  			Code:   res.StatusCode,
  6256  			Header: res.Header,
  6257  		})
  6258  	}
  6259  	if err != nil {
  6260  		return nil, err
  6261  	}
  6262  	defer googleapi.CloseBody(res)
  6263  	if err := googleapi.CheckResponse(res); err != nil {
  6264  		return nil, gensupport.WrapError(err)
  6265  	}
  6266  	ret := &Creative{
  6267  		ServerResponse: googleapi.ServerResponse{
  6268  			Header:         res.Header,
  6269  			HTTPStatusCode: res.StatusCode,
  6270  		},
  6271  	}
  6272  	target := &ret
  6273  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6274  		return nil, err
  6275  	}
  6276  	return ret, nil
  6277  }
  6278  
  6279  type BuyersUserListsCloseCall struct {
  6280  	s                    *Service
  6281  	name                 string
  6282  	closeuserlistrequest *CloseUserListRequest
  6283  	urlParams_           gensupport.URLParams
  6284  	ctx_                 context.Context
  6285  	header_              http.Header
  6286  }
  6287  
  6288  // Close: Changes the status of a user list to CLOSED. This prevents new users
  6289  // from being added to the user list.
  6290  //
  6291  // - name: The name of the user list to close. See UserList.name.
  6292  func (r *BuyersUserListsService) Close(name string, closeuserlistrequest *CloseUserListRequest) *BuyersUserListsCloseCall {
  6293  	c := &BuyersUserListsCloseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6294  	c.name = name
  6295  	c.closeuserlistrequest = closeuserlistrequest
  6296  	return c
  6297  }
  6298  
  6299  // Fields allows partial responses to be retrieved. See
  6300  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6301  // details.
  6302  func (c *BuyersUserListsCloseCall) Fields(s ...googleapi.Field) *BuyersUserListsCloseCall {
  6303  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6304  	return c
  6305  }
  6306  
  6307  // Context sets the context to be used in this call's Do method.
  6308  func (c *BuyersUserListsCloseCall) Context(ctx context.Context) *BuyersUserListsCloseCall {
  6309  	c.ctx_ = ctx
  6310  	return c
  6311  }
  6312  
  6313  // Header returns a http.Header that can be modified by the caller to add
  6314  // headers to the request.
  6315  func (c *BuyersUserListsCloseCall) Header() http.Header {
  6316  	if c.header_ == nil {
  6317  		c.header_ = make(http.Header)
  6318  	}
  6319  	return c.header_
  6320  }
  6321  
  6322  func (c *BuyersUserListsCloseCall) doRequest(alt string) (*http.Response, error) {
  6323  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6324  	var body io.Reader = nil
  6325  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.closeuserlistrequest)
  6326  	if err != nil {
  6327  		return nil, err
  6328  	}
  6329  	c.urlParams_.Set("alt", alt)
  6330  	c.urlParams_.Set("prettyPrint", "false")
  6331  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:close")
  6332  	urls += "?" + c.urlParams_.Encode()
  6333  	req, err := http.NewRequest("POST", urls, body)
  6334  	if err != nil {
  6335  		return nil, err
  6336  	}
  6337  	req.Header = reqHeaders
  6338  	googleapi.Expand(req.URL, map[string]string{
  6339  		"name": c.name,
  6340  	})
  6341  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6342  }
  6343  
  6344  // Do executes the "realtimebidding.buyers.userLists.close" call.
  6345  // Any non-2xx status code is an error. Response headers are in either
  6346  // *UserList.ServerResponse.Header or (if a response was returned at all) in
  6347  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6348  // whether the returned error was because http.StatusNotModified was returned.
  6349  func (c *BuyersUserListsCloseCall) Do(opts ...googleapi.CallOption) (*UserList, error) {
  6350  	gensupport.SetOptions(c.urlParams_, opts...)
  6351  	res, err := c.doRequest("json")
  6352  	if res != nil && res.StatusCode == http.StatusNotModified {
  6353  		if res.Body != nil {
  6354  			res.Body.Close()
  6355  		}
  6356  		return nil, gensupport.WrapError(&googleapi.Error{
  6357  			Code:   res.StatusCode,
  6358  			Header: res.Header,
  6359  		})
  6360  	}
  6361  	if err != nil {
  6362  		return nil, err
  6363  	}
  6364  	defer googleapi.CloseBody(res)
  6365  	if err := googleapi.CheckResponse(res); err != nil {
  6366  		return nil, gensupport.WrapError(err)
  6367  	}
  6368  	ret := &UserList{
  6369  		ServerResponse: googleapi.ServerResponse{
  6370  			Header:         res.Header,
  6371  			HTTPStatusCode: res.StatusCode,
  6372  		},
  6373  	}
  6374  	target := &ret
  6375  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6376  		return nil, err
  6377  	}
  6378  	return ret, nil
  6379  }
  6380  
  6381  type BuyersUserListsCreateCall struct {
  6382  	s          *Service
  6383  	parent     string
  6384  	userlist   *UserList
  6385  	urlParams_ gensupport.URLParams
  6386  	ctx_       context.Context
  6387  	header_    http.Header
  6388  }
  6389  
  6390  // Create: Creates a new user list.
  6391  //
  6392  //   - parent: The name of the parent buyer of the user list to be retrieved,
  6393  //     which must follow the pattern `buyers/{buyerAccountId}`, where
  6394  //     `{buyerAccountId}` represents the account ID of the buyer who owns the
  6395  //     user list. For a bidder accessing user lists on behalf of a child seat
  6396  //     buyer, `{buyerAccountId}` should represent the account ID of the child
  6397  //     seat buyer.
  6398  func (r *BuyersUserListsService) Create(parent string, userlist *UserList) *BuyersUserListsCreateCall {
  6399  	c := &BuyersUserListsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6400  	c.parent = parent
  6401  	c.userlist = userlist
  6402  	return c
  6403  }
  6404  
  6405  // Fields allows partial responses to be retrieved. See
  6406  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6407  // details.
  6408  func (c *BuyersUserListsCreateCall) Fields(s ...googleapi.Field) *BuyersUserListsCreateCall {
  6409  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6410  	return c
  6411  }
  6412  
  6413  // Context sets the context to be used in this call's Do method.
  6414  func (c *BuyersUserListsCreateCall) Context(ctx context.Context) *BuyersUserListsCreateCall {
  6415  	c.ctx_ = ctx
  6416  	return c
  6417  }
  6418  
  6419  // Header returns a http.Header that can be modified by the caller to add
  6420  // headers to the request.
  6421  func (c *BuyersUserListsCreateCall) Header() http.Header {
  6422  	if c.header_ == nil {
  6423  		c.header_ = make(http.Header)
  6424  	}
  6425  	return c.header_
  6426  }
  6427  
  6428  func (c *BuyersUserListsCreateCall) doRequest(alt string) (*http.Response, error) {
  6429  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6430  	var body io.Reader = nil
  6431  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userlist)
  6432  	if err != nil {
  6433  		return nil, err
  6434  	}
  6435  	c.urlParams_.Set("alt", alt)
  6436  	c.urlParams_.Set("prettyPrint", "false")
  6437  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/userLists")
  6438  	urls += "?" + c.urlParams_.Encode()
  6439  	req, err := http.NewRequest("POST", urls, body)
  6440  	if err != nil {
  6441  		return nil, err
  6442  	}
  6443  	req.Header = reqHeaders
  6444  	googleapi.Expand(req.URL, map[string]string{
  6445  		"parent": c.parent,
  6446  	})
  6447  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6448  }
  6449  
  6450  // Do executes the "realtimebidding.buyers.userLists.create" call.
  6451  // Any non-2xx status code is an error. Response headers are in either
  6452  // *UserList.ServerResponse.Header or (if a response was returned at all) in
  6453  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6454  // whether the returned error was because http.StatusNotModified was returned.
  6455  func (c *BuyersUserListsCreateCall) Do(opts ...googleapi.CallOption) (*UserList, error) {
  6456  	gensupport.SetOptions(c.urlParams_, opts...)
  6457  	res, err := c.doRequest("json")
  6458  	if res != nil && res.StatusCode == http.StatusNotModified {
  6459  		if res.Body != nil {
  6460  			res.Body.Close()
  6461  		}
  6462  		return nil, gensupport.WrapError(&googleapi.Error{
  6463  			Code:   res.StatusCode,
  6464  			Header: res.Header,
  6465  		})
  6466  	}
  6467  	if err != nil {
  6468  		return nil, err
  6469  	}
  6470  	defer googleapi.CloseBody(res)
  6471  	if err := googleapi.CheckResponse(res); err != nil {
  6472  		return nil, gensupport.WrapError(err)
  6473  	}
  6474  	ret := &UserList{
  6475  		ServerResponse: googleapi.ServerResponse{
  6476  			Header:         res.Header,
  6477  			HTTPStatusCode: res.StatusCode,
  6478  		},
  6479  	}
  6480  	target := &ret
  6481  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6482  		return nil, err
  6483  	}
  6484  	return ret, nil
  6485  }
  6486  
  6487  type BuyersUserListsGetCall struct {
  6488  	s            *Service
  6489  	name         string
  6490  	urlParams_   gensupport.URLParams
  6491  	ifNoneMatch_ string
  6492  	ctx_         context.Context
  6493  	header_      http.Header
  6494  }
  6495  
  6496  // Get: Gets a user list by its name.
  6497  //
  6498  // - name: The name of the user list to be retrieved. See UserList.name.
  6499  func (r *BuyersUserListsService) Get(name string) *BuyersUserListsGetCall {
  6500  	c := &BuyersUserListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6501  	c.name = name
  6502  	return c
  6503  }
  6504  
  6505  // Fields allows partial responses to be retrieved. See
  6506  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6507  // details.
  6508  func (c *BuyersUserListsGetCall) Fields(s ...googleapi.Field) *BuyersUserListsGetCall {
  6509  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6510  	return c
  6511  }
  6512  
  6513  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6514  // object's ETag matches the given value. This is useful for getting updates
  6515  // only after the object has changed since the last request.
  6516  func (c *BuyersUserListsGetCall) IfNoneMatch(entityTag string) *BuyersUserListsGetCall {
  6517  	c.ifNoneMatch_ = entityTag
  6518  	return c
  6519  }
  6520  
  6521  // Context sets the context to be used in this call's Do method.
  6522  func (c *BuyersUserListsGetCall) Context(ctx context.Context) *BuyersUserListsGetCall {
  6523  	c.ctx_ = ctx
  6524  	return c
  6525  }
  6526  
  6527  // Header returns a http.Header that can be modified by the caller to add
  6528  // headers to the request.
  6529  func (c *BuyersUserListsGetCall) Header() http.Header {
  6530  	if c.header_ == nil {
  6531  		c.header_ = make(http.Header)
  6532  	}
  6533  	return c.header_
  6534  }
  6535  
  6536  func (c *BuyersUserListsGetCall) doRequest(alt string) (*http.Response, error) {
  6537  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6538  	if c.ifNoneMatch_ != "" {
  6539  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6540  	}
  6541  	var body io.Reader = nil
  6542  	c.urlParams_.Set("alt", alt)
  6543  	c.urlParams_.Set("prettyPrint", "false")
  6544  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6545  	urls += "?" + c.urlParams_.Encode()
  6546  	req, err := http.NewRequest("GET", urls, body)
  6547  	if err != nil {
  6548  		return nil, err
  6549  	}
  6550  	req.Header = reqHeaders
  6551  	googleapi.Expand(req.URL, map[string]string{
  6552  		"name": c.name,
  6553  	})
  6554  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6555  }
  6556  
  6557  // Do executes the "realtimebidding.buyers.userLists.get" call.
  6558  // Any non-2xx status code is an error. Response headers are in either
  6559  // *UserList.ServerResponse.Header or (if a response was returned at all) in
  6560  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6561  // whether the returned error was because http.StatusNotModified was returned.
  6562  func (c *BuyersUserListsGetCall) Do(opts ...googleapi.CallOption) (*UserList, error) {
  6563  	gensupport.SetOptions(c.urlParams_, opts...)
  6564  	res, err := c.doRequest("json")
  6565  	if res != nil && res.StatusCode == http.StatusNotModified {
  6566  		if res.Body != nil {
  6567  			res.Body.Close()
  6568  		}
  6569  		return nil, gensupport.WrapError(&googleapi.Error{
  6570  			Code:   res.StatusCode,
  6571  			Header: res.Header,
  6572  		})
  6573  	}
  6574  	if err != nil {
  6575  		return nil, err
  6576  	}
  6577  	defer googleapi.CloseBody(res)
  6578  	if err := googleapi.CheckResponse(res); err != nil {
  6579  		return nil, gensupport.WrapError(err)
  6580  	}
  6581  	ret := &UserList{
  6582  		ServerResponse: googleapi.ServerResponse{
  6583  			Header:         res.Header,
  6584  			HTTPStatusCode: res.StatusCode,
  6585  		},
  6586  	}
  6587  	target := &ret
  6588  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6589  		return nil, err
  6590  	}
  6591  	return ret, nil
  6592  }
  6593  
  6594  type BuyersUserListsGetRemarketingTagCall struct {
  6595  	s            *Service
  6596  	name         string
  6597  	urlParams_   gensupport.URLParams
  6598  	ifNoneMatch_ string
  6599  	ctx_         context.Context
  6600  	header_      http.Header
  6601  }
  6602  
  6603  // GetRemarketingTag: This has been sunset as of October 2023, and will return
  6604  // an error response if called. For more information, see the release notes:
  6605  // https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api
  6606  // Gets remarketing tag for a buyer. A remarketing tag is a piece of JavaScript
  6607  // code that can be placed on a web page. When a user visits a page containing
  6608  // a remarketing tag, Google adds the user to a user list.
  6609  //
  6610  //   - name: To fetch the remarketing tag for an account, the name must follow
  6611  //     the pattern `buyers/{accountId}`, where `{accountId}` represents the ID of
  6612  //     the buyer that owns the remarketing tag. For a bidder accessing the
  6613  //     remarketing tag on behalf of a child seat buyer, `{accountId}` should
  6614  //     represent the ID of the child seat buyer. To fetch the remarketing tag for
  6615  //     a specific user list, the name must follow the pattern
  6616  //     `buyers/{accountId}/userLists/{userListId}`. See UserList.name.
  6617  func (r *BuyersUserListsService) GetRemarketingTag(name string) *BuyersUserListsGetRemarketingTagCall {
  6618  	c := &BuyersUserListsGetRemarketingTagCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6619  	c.name = name
  6620  	return c
  6621  }
  6622  
  6623  // Fields allows partial responses to be retrieved. See
  6624  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6625  // details.
  6626  func (c *BuyersUserListsGetRemarketingTagCall) Fields(s ...googleapi.Field) *BuyersUserListsGetRemarketingTagCall {
  6627  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6628  	return c
  6629  }
  6630  
  6631  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6632  // object's ETag matches the given value. This is useful for getting updates
  6633  // only after the object has changed since the last request.
  6634  func (c *BuyersUserListsGetRemarketingTagCall) IfNoneMatch(entityTag string) *BuyersUserListsGetRemarketingTagCall {
  6635  	c.ifNoneMatch_ = entityTag
  6636  	return c
  6637  }
  6638  
  6639  // Context sets the context to be used in this call's Do method.
  6640  func (c *BuyersUserListsGetRemarketingTagCall) Context(ctx context.Context) *BuyersUserListsGetRemarketingTagCall {
  6641  	c.ctx_ = ctx
  6642  	return c
  6643  }
  6644  
  6645  // Header returns a http.Header that can be modified by the caller to add
  6646  // headers to the request.
  6647  func (c *BuyersUserListsGetRemarketingTagCall) Header() http.Header {
  6648  	if c.header_ == nil {
  6649  		c.header_ = make(http.Header)
  6650  	}
  6651  	return c.header_
  6652  }
  6653  
  6654  func (c *BuyersUserListsGetRemarketingTagCall) doRequest(alt string) (*http.Response, error) {
  6655  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6656  	if c.ifNoneMatch_ != "" {
  6657  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6658  	}
  6659  	var body io.Reader = nil
  6660  	c.urlParams_.Set("alt", alt)
  6661  	c.urlParams_.Set("prettyPrint", "false")
  6662  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:getRemarketingTag")
  6663  	urls += "?" + c.urlParams_.Encode()
  6664  	req, err := http.NewRequest("GET", urls, body)
  6665  	if err != nil {
  6666  		return nil, err
  6667  	}
  6668  	req.Header = reqHeaders
  6669  	googleapi.Expand(req.URL, map[string]string{
  6670  		"name": c.name,
  6671  	})
  6672  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6673  }
  6674  
  6675  // Do executes the "realtimebidding.buyers.userLists.getRemarketingTag" call.
  6676  // Any non-2xx status code is an error. Response headers are in either
  6677  // *GetRemarketingTagResponse.ServerResponse.Header or (if a response was
  6678  // returned at all) in error.(*googleapi.Error).Header. Use
  6679  // googleapi.IsNotModified to check whether the returned error was because
  6680  // http.StatusNotModified was returned.
  6681  func (c *BuyersUserListsGetRemarketingTagCall) Do(opts ...googleapi.CallOption) (*GetRemarketingTagResponse, error) {
  6682  	gensupport.SetOptions(c.urlParams_, opts...)
  6683  	res, err := c.doRequest("json")
  6684  	if res != nil && res.StatusCode == http.StatusNotModified {
  6685  		if res.Body != nil {
  6686  			res.Body.Close()
  6687  		}
  6688  		return nil, gensupport.WrapError(&googleapi.Error{
  6689  			Code:   res.StatusCode,
  6690  			Header: res.Header,
  6691  		})
  6692  	}
  6693  	if err != nil {
  6694  		return nil, err
  6695  	}
  6696  	defer googleapi.CloseBody(res)
  6697  	if err := googleapi.CheckResponse(res); err != nil {
  6698  		return nil, gensupport.WrapError(err)
  6699  	}
  6700  	ret := &GetRemarketingTagResponse{
  6701  		ServerResponse: googleapi.ServerResponse{
  6702  			Header:         res.Header,
  6703  			HTTPStatusCode: res.StatusCode,
  6704  		},
  6705  	}
  6706  	target := &ret
  6707  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6708  		return nil, err
  6709  	}
  6710  	return ret, nil
  6711  }
  6712  
  6713  type BuyersUserListsListCall struct {
  6714  	s            *Service
  6715  	parent       string
  6716  	urlParams_   gensupport.URLParams
  6717  	ifNoneMatch_ string
  6718  	ctx_         context.Context
  6719  	header_      http.Header
  6720  }
  6721  
  6722  // List: Lists the user lists visible to the current user.
  6723  //
  6724  //   - parent: The name of the parent buyer for the user lists to be returned
  6725  //     that must follow the pattern `buyers/{buyerAccountId}`, where
  6726  //     `{buyerAccountId}` represents the account ID of the buyer who owns user
  6727  //     lists. For a bidder accessing user lists on behalf of a child seat buyer ,
  6728  //     `{buyerAccountId}` should represent the account ID of the child seat
  6729  //     buyer.
  6730  func (r *BuyersUserListsService) List(parent string) *BuyersUserListsListCall {
  6731  	c := &BuyersUserListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6732  	c.parent = parent
  6733  	return c
  6734  }
  6735  
  6736  // PageSize sets the optional parameter "pageSize": The number of results to
  6737  // return per page.
  6738  func (c *BuyersUserListsListCall) PageSize(pageSize int64) *BuyersUserListsListCall {
  6739  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6740  	return c
  6741  }
  6742  
  6743  // PageToken sets the optional parameter "pageToken": Continuation page token
  6744  // as received from a previous response.
  6745  func (c *BuyersUserListsListCall) PageToken(pageToken string) *BuyersUserListsListCall {
  6746  	c.urlParams_.Set("pageToken", pageToken)
  6747  	return c
  6748  }
  6749  
  6750  // Fields allows partial responses to be retrieved. See
  6751  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6752  // details.
  6753  func (c *BuyersUserListsListCall) Fields(s ...googleapi.Field) *BuyersUserListsListCall {
  6754  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6755  	return c
  6756  }
  6757  
  6758  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6759  // object's ETag matches the given value. This is useful for getting updates
  6760  // only after the object has changed since the last request.
  6761  func (c *BuyersUserListsListCall) IfNoneMatch(entityTag string) *BuyersUserListsListCall {
  6762  	c.ifNoneMatch_ = entityTag
  6763  	return c
  6764  }
  6765  
  6766  // Context sets the context to be used in this call's Do method.
  6767  func (c *BuyersUserListsListCall) Context(ctx context.Context) *BuyersUserListsListCall {
  6768  	c.ctx_ = ctx
  6769  	return c
  6770  }
  6771  
  6772  // Header returns a http.Header that can be modified by the caller to add
  6773  // headers to the request.
  6774  func (c *BuyersUserListsListCall) Header() http.Header {
  6775  	if c.header_ == nil {
  6776  		c.header_ = make(http.Header)
  6777  	}
  6778  	return c.header_
  6779  }
  6780  
  6781  func (c *BuyersUserListsListCall) doRequest(alt string) (*http.Response, error) {
  6782  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6783  	if c.ifNoneMatch_ != "" {
  6784  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6785  	}
  6786  	var body io.Reader = nil
  6787  	c.urlParams_.Set("alt", alt)
  6788  	c.urlParams_.Set("prettyPrint", "false")
  6789  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/userLists")
  6790  	urls += "?" + c.urlParams_.Encode()
  6791  	req, err := http.NewRequest("GET", urls, body)
  6792  	if err != nil {
  6793  		return nil, err
  6794  	}
  6795  	req.Header = reqHeaders
  6796  	googleapi.Expand(req.URL, map[string]string{
  6797  		"parent": c.parent,
  6798  	})
  6799  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6800  }
  6801  
  6802  // Do executes the "realtimebidding.buyers.userLists.list" call.
  6803  // Any non-2xx status code is an error. Response headers are in either
  6804  // *ListUserListsResponse.ServerResponse.Header or (if a response was returned
  6805  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6806  // check whether the returned error was because http.StatusNotModified was
  6807  // returned.
  6808  func (c *BuyersUserListsListCall) Do(opts ...googleapi.CallOption) (*ListUserListsResponse, error) {
  6809  	gensupport.SetOptions(c.urlParams_, opts...)
  6810  	res, err := c.doRequest("json")
  6811  	if res != nil && res.StatusCode == http.StatusNotModified {
  6812  		if res.Body != nil {
  6813  			res.Body.Close()
  6814  		}
  6815  		return nil, gensupport.WrapError(&googleapi.Error{
  6816  			Code:   res.StatusCode,
  6817  			Header: res.Header,
  6818  		})
  6819  	}
  6820  	if err != nil {
  6821  		return nil, err
  6822  	}
  6823  	defer googleapi.CloseBody(res)
  6824  	if err := googleapi.CheckResponse(res); err != nil {
  6825  		return nil, gensupport.WrapError(err)
  6826  	}
  6827  	ret := &ListUserListsResponse{
  6828  		ServerResponse: googleapi.ServerResponse{
  6829  			Header:         res.Header,
  6830  			HTTPStatusCode: res.StatusCode,
  6831  		},
  6832  	}
  6833  	target := &ret
  6834  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6835  		return nil, err
  6836  	}
  6837  	return ret, nil
  6838  }
  6839  
  6840  // Pages invokes f for each page of results.
  6841  // A non-nil error returned from f will halt the iteration.
  6842  // The provided context supersedes any context provided to the Context method.
  6843  func (c *BuyersUserListsListCall) Pages(ctx context.Context, f func(*ListUserListsResponse) error) error {
  6844  	c.ctx_ = ctx
  6845  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6846  	for {
  6847  		x, err := c.Do()
  6848  		if err != nil {
  6849  			return err
  6850  		}
  6851  		if err := f(x); err != nil {
  6852  			return err
  6853  		}
  6854  		if x.NextPageToken == "" {
  6855  			return nil
  6856  		}
  6857  		c.PageToken(x.NextPageToken)
  6858  	}
  6859  }
  6860  
  6861  type BuyersUserListsOpenCall struct {
  6862  	s                   *Service
  6863  	name                string
  6864  	openuserlistrequest *OpenUserListRequest
  6865  	urlParams_          gensupport.URLParams
  6866  	ctx_                context.Context
  6867  	header_             http.Header
  6868  }
  6869  
  6870  // Open: Changes the status of a user list to OPEN. This allows new users to be
  6871  // added to the user list.
  6872  //
  6873  // - name: The name of the user list to open. See UserList.name.
  6874  func (r *BuyersUserListsService) Open(name string, openuserlistrequest *OpenUserListRequest) *BuyersUserListsOpenCall {
  6875  	c := &BuyersUserListsOpenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6876  	c.name = name
  6877  	c.openuserlistrequest = openuserlistrequest
  6878  	return c
  6879  }
  6880  
  6881  // Fields allows partial responses to be retrieved. See
  6882  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6883  // details.
  6884  func (c *BuyersUserListsOpenCall) Fields(s ...googleapi.Field) *BuyersUserListsOpenCall {
  6885  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6886  	return c
  6887  }
  6888  
  6889  // Context sets the context to be used in this call's Do method.
  6890  func (c *BuyersUserListsOpenCall) Context(ctx context.Context) *BuyersUserListsOpenCall {
  6891  	c.ctx_ = ctx
  6892  	return c
  6893  }
  6894  
  6895  // Header returns a http.Header that can be modified by the caller to add
  6896  // headers to the request.
  6897  func (c *BuyersUserListsOpenCall) Header() http.Header {
  6898  	if c.header_ == nil {
  6899  		c.header_ = make(http.Header)
  6900  	}
  6901  	return c.header_
  6902  }
  6903  
  6904  func (c *BuyersUserListsOpenCall) doRequest(alt string) (*http.Response, error) {
  6905  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6906  	var body io.Reader = nil
  6907  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.openuserlistrequest)
  6908  	if err != nil {
  6909  		return nil, err
  6910  	}
  6911  	c.urlParams_.Set("alt", alt)
  6912  	c.urlParams_.Set("prettyPrint", "false")
  6913  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:open")
  6914  	urls += "?" + c.urlParams_.Encode()
  6915  	req, err := http.NewRequest("POST", urls, body)
  6916  	if err != nil {
  6917  		return nil, err
  6918  	}
  6919  	req.Header = reqHeaders
  6920  	googleapi.Expand(req.URL, map[string]string{
  6921  		"name": c.name,
  6922  	})
  6923  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6924  }
  6925  
  6926  // Do executes the "realtimebidding.buyers.userLists.open" call.
  6927  // Any non-2xx status code is an error. Response headers are in either
  6928  // *UserList.ServerResponse.Header or (if a response was returned at all) in
  6929  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6930  // whether the returned error was because http.StatusNotModified was returned.
  6931  func (c *BuyersUserListsOpenCall) Do(opts ...googleapi.CallOption) (*UserList, error) {
  6932  	gensupport.SetOptions(c.urlParams_, opts...)
  6933  	res, err := c.doRequest("json")
  6934  	if res != nil && res.StatusCode == http.StatusNotModified {
  6935  		if res.Body != nil {
  6936  			res.Body.Close()
  6937  		}
  6938  		return nil, gensupport.WrapError(&googleapi.Error{
  6939  			Code:   res.StatusCode,
  6940  			Header: res.Header,
  6941  		})
  6942  	}
  6943  	if err != nil {
  6944  		return nil, err
  6945  	}
  6946  	defer googleapi.CloseBody(res)
  6947  	if err := googleapi.CheckResponse(res); err != nil {
  6948  		return nil, gensupport.WrapError(err)
  6949  	}
  6950  	ret := &UserList{
  6951  		ServerResponse: googleapi.ServerResponse{
  6952  			Header:         res.Header,
  6953  			HTTPStatusCode: res.StatusCode,
  6954  		},
  6955  	}
  6956  	target := &ret
  6957  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6958  		return nil, err
  6959  	}
  6960  	return ret, nil
  6961  }
  6962  
  6963  type BuyersUserListsUpdateCall struct {
  6964  	s          *Service
  6965  	nameid     string
  6966  	userlist   *UserList
  6967  	urlParams_ gensupport.URLParams
  6968  	ctx_       context.Context
  6969  	header_    http.Header
  6970  }
  6971  
  6972  // Update: Updates the given user list. Only user lists with URLRestrictions
  6973  // can be updated.
  6974  //
  6975  //   - name: Output only. Name of the user list that must follow the pattern
  6976  //     `buyers/{buyer}/userLists/{user_list}`, where `{buyer}` represents the
  6977  //     account ID of the buyer who owns the user list. For a bidder accessing
  6978  //     user lists on behalf of a child seat buyer, `{buyer}` represents the
  6979  //     account ID of the child seat buyer. `{user_list}` is an int64 identifier
  6980  //     assigned by Google to uniquely identify a user list.
  6981  func (r *BuyersUserListsService) Update(nameid string, userlist *UserList) *BuyersUserListsUpdateCall {
  6982  	c := &BuyersUserListsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6983  	c.nameid = nameid
  6984  	c.userlist = userlist
  6985  	return c
  6986  }
  6987  
  6988  // Fields allows partial responses to be retrieved. See
  6989  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6990  // details.
  6991  func (c *BuyersUserListsUpdateCall) Fields(s ...googleapi.Field) *BuyersUserListsUpdateCall {
  6992  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6993  	return c
  6994  }
  6995  
  6996  // Context sets the context to be used in this call's Do method.
  6997  func (c *BuyersUserListsUpdateCall) Context(ctx context.Context) *BuyersUserListsUpdateCall {
  6998  	c.ctx_ = ctx
  6999  	return c
  7000  }
  7001  
  7002  // Header returns a http.Header that can be modified by the caller to add
  7003  // headers to the request.
  7004  func (c *BuyersUserListsUpdateCall) Header() http.Header {
  7005  	if c.header_ == nil {
  7006  		c.header_ = make(http.Header)
  7007  	}
  7008  	return c.header_
  7009  }
  7010  
  7011  func (c *BuyersUserListsUpdateCall) doRequest(alt string) (*http.Response, error) {
  7012  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7013  	var body io.Reader = nil
  7014  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userlist)
  7015  	if err != nil {
  7016  		return nil, err
  7017  	}
  7018  	c.urlParams_.Set("alt", alt)
  7019  	c.urlParams_.Set("prettyPrint", "false")
  7020  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7021  	urls += "?" + c.urlParams_.Encode()
  7022  	req, err := http.NewRequest("PUT", urls, body)
  7023  	if err != nil {
  7024  		return nil, err
  7025  	}
  7026  	req.Header = reqHeaders
  7027  	googleapi.Expand(req.URL, map[string]string{
  7028  		"name": c.nameid,
  7029  	})
  7030  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7031  }
  7032  
  7033  // Do executes the "realtimebidding.buyers.userLists.update" call.
  7034  // Any non-2xx status code is an error. Response headers are in either
  7035  // *UserList.ServerResponse.Header or (if a response was returned at all) in
  7036  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7037  // whether the returned error was because http.StatusNotModified was returned.
  7038  func (c *BuyersUserListsUpdateCall) Do(opts ...googleapi.CallOption) (*UserList, error) {
  7039  	gensupport.SetOptions(c.urlParams_, opts...)
  7040  	res, err := c.doRequest("json")
  7041  	if res != nil && res.StatusCode == http.StatusNotModified {
  7042  		if res.Body != nil {
  7043  			res.Body.Close()
  7044  		}
  7045  		return nil, gensupport.WrapError(&googleapi.Error{
  7046  			Code:   res.StatusCode,
  7047  			Header: res.Header,
  7048  		})
  7049  	}
  7050  	if err != nil {
  7051  		return nil, err
  7052  	}
  7053  	defer googleapi.CloseBody(res)
  7054  	if err := googleapi.CheckResponse(res); err != nil {
  7055  		return nil, gensupport.WrapError(err)
  7056  	}
  7057  	ret := &UserList{
  7058  		ServerResponse: googleapi.ServerResponse{
  7059  			Header:         res.Header,
  7060  			HTTPStatusCode: res.StatusCode,
  7061  		},
  7062  	}
  7063  	target := &ret
  7064  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7065  		return nil, err
  7066  	}
  7067  	return ret, nil
  7068  }
  7069  

View as plain text