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