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 adexchangebuyer2 provides access to the Ad Exchange Buyer API II. 8// 9// For product documentation, see: https://developers.google.com/authorized-buyers/apis/reference/rest/ 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/adexchangebuyer2/v2beta1" 16// ... 17// ctx := context.Background() 18// adexchangebuyer2Service, err := adexchangebuyer2.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// adexchangebuyer2Service, err := adexchangebuyer2.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// adexchangebuyer2Service, err := adexchangebuyer2.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 36// 37// See https://godoc.org/google.golang.org/api/option/ for details on options. 38package adexchangebuyer2 // import "google.golang.org/api/adexchangebuyer2/v2beta1" 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 = "adexchangebuyer2:v2beta1" 75const apiName = "adexchangebuyer2" 76const apiVersion = "v2beta1" 77const basePath = "https://adexchangebuyer.googleapis.com/" 78const mtlsBasePath = "https://adexchangebuyer.mtls.googleapis.com/" 79 80// OAuth2 scopes used by this API. 81const ( 82 // Manage your Ad Exchange buyer account configuration 83 AdexchangeBuyerScope = "https://www.googleapis.com/auth/adexchange.buyer" 84) 85 86// NewService creates a new Service. 87func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 88 scopesOption := option.WithScopes( 89 "https://www.googleapis.com/auth/adexchange.buyer", 90 ) 91 // NOTE: prepend, so we don't override user-specified scopes. 92 opts = append([]option.ClientOption{scopesOption}, opts...) 93 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 94 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 95 client, endpoint, err := htransport.NewClient(ctx, opts...) 96 if err != nil { 97 return nil, err 98 } 99 s, err := New(client) 100 if err != nil { 101 return nil, err 102 } 103 if endpoint != "" { 104 s.BasePath = endpoint 105 } 106 return s, nil 107} 108 109// New creates a new Service. It uses the provided http.Client for requests. 110// 111// Deprecated: please use NewService instead. 112// To provide a custom HTTP client, use option.WithHTTPClient. 113// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 114func New(client *http.Client) (*Service, error) { 115 if client == nil { 116 return nil, errors.New("client is nil") 117 } 118 s := &Service{client: client, BasePath: basePath} 119 s.Accounts = NewAccountsService(s) 120 s.Bidders = NewBiddersService(s) 121 return s, nil 122} 123 124type Service struct { 125 client *http.Client 126 BasePath string // API endpoint base URL 127 UserAgent string // optional additional User-Agent fragment 128 129 Accounts *AccountsService 130 131 Bidders *BiddersService 132} 133 134func (s *Service) userAgent() string { 135 if s.UserAgent == "" { 136 return googleapi.UserAgent 137 } 138 return googleapi.UserAgent + " " + s.UserAgent 139} 140 141func NewAccountsService(s *Service) *AccountsService { 142 rs := &AccountsService{s: s} 143 rs.Clients = NewAccountsClientsService(s) 144 rs.Creatives = NewAccountsCreativesService(s) 145 rs.FinalizedProposals = NewAccountsFinalizedProposalsService(s) 146 rs.Products = NewAccountsProductsService(s) 147 rs.Proposals = NewAccountsProposalsService(s) 148 rs.PublisherProfiles = NewAccountsPublisherProfilesService(s) 149 return rs 150} 151 152type AccountsService struct { 153 s *Service 154 155 Clients *AccountsClientsService 156 157 Creatives *AccountsCreativesService 158 159 FinalizedProposals *AccountsFinalizedProposalsService 160 161 Products *AccountsProductsService 162 163 Proposals *AccountsProposalsService 164 165 PublisherProfiles *AccountsPublisherProfilesService 166} 167 168func NewAccountsClientsService(s *Service) *AccountsClientsService { 169 rs := &AccountsClientsService{s: s} 170 rs.Invitations = NewAccountsClientsInvitationsService(s) 171 rs.Users = NewAccountsClientsUsersService(s) 172 return rs 173} 174 175type AccountsClientsService struct { 176 s *Service 177 178 Invitations *AccountsClientsInvitationsService 179 180 Users *AccountsClientsUsersService 181} 182 183func NewAccountsClientsInvitationsService(s *Service) *AccountsClientsInvitationsService { 184 rs := &AccountsClientsInvitationsService{s: s} 185 return rs 186} 187 188type AccountsClientsInvitationsService struct { 189 s *Service 190} 191 192func NewAccountsClientsUsersService(s *Service) *AccountsClientsUsersService { 193 rs := &AccountsClientsUsersService{s: s} 194 return rs 195} 196 197type AccountsClientsUsersService struct { 198 s *Service 199} 200 201func NewAccountsCreativesService(s *Service) *AccountsCreativesService { 202 rs := &AccountsCreativesService{s: s} 203 rs.DealAssociations = NewAccountsCreativesDealAssociationsService(s) 204 return rs 205} 206 207type AccountsCreativesService struct { 208 s *Service 209 210 DealAssociations *AccountsCreativesDealAssociationsService 211} 212 213func NewAccountsCreativesDealAssociationsService(s *Service) *AccountsCreativesDealAssociationsService { 214 rs := &AccountsCreativesDealAssociationsService{s: s} 215 return rs 216} 217 218type AccountsCreativesDealAssociationsService struct { 219 s *Service 220} 221 222func NewAccountsFinalizedProposalsService(s *Service) *AccountsFinalizedProposalsService { 223 rs := &AccountsFinalizedProposalsService{s: s} 224 return rs 225} 226 227type AccountsFinalizedProposalsService struct { 228 s *Service 229} 230 231func NewAccountsProductsService(s *Service) *AccountsProductsService { 232 rs := &AccountsProductsService{s: s} 233 return rs 234} 235 236type AccountsProductsService struct { 237 s *Service 238} 239 240func NewAccountsProposalsService(s *Service) *AccountsProposalsService { 241 rs := &AccountsProposalsService{s: s} 242 return rs 243} 244 245type AccountsProposalsService struct { 246 s *Service 247} 248 249func NewAccountsPublisherProfilesService(s *Service) *AccountsPublisherProfilesService { 250 rs := &AccountsPublisherProfilesService{s: s} 251 return rs 252} 253 254type AccountsPublisherProfilesService struct { 255 s *Service 256} 257 258func NewBiddersService(s *Service) *BiddersService { 259 rs := &BiddersService{s: s} 260 rs.Accounts = NewBiddersAccountsService(s) 261 rs.FilterSets = NewBiddersFilterSetsService(s) 262 return rs 263} 264 265type BiddersService struct { 266 s *Service 267 268 Accounts *BiddersAccountsService 269 270 FilterSets *BiddersFilterSetsService 271} 272 273func NewBiddersAccountsService(s *Service) *BiddersAccountsService { 274 rs := &BiddersAccountsService{s: s} 275 rs.FilterSets = NewBiddersAccountsFilterSetsService(s) 276 return rs 277} 278 279type BiddersAccountsService struct { 280 s *Service 281 282 FilterSets *BiddersAccountsFilterSetsService 283} 284 285func NewBiddersAccountsFilterSetsService(s *Service) *BiddersAccountsFilterSetsService { 286 rs := &BiddersAccountsFilterSetsService{s: s} 287 rs.BidMetrics = NewBiddersAccountsFilterSetsBidMetricsService(s) 288 rs.BidResponseErrors = NewBiddersAccountsFilterSetsBidResponseErrorsService(s) 289 rs.BidResponsesWithoutBids = NewBiddersAccountsFilterSetsBidResponsesWithoutBidsService(s) 290 rs.FilteredBidRequests = NewBiddersAccountsFilterSetsFilteredBidRequestsService(s) 291 rs.FilteredBids = NewBiddersAccountsFilterSetsFilteredBidsService(s) 292 rs.ImpressionMetrics = NewBiddersAccountsFilterSetsImpressionMetricsService(s) 293 rs.LosingBids = NewBiddersAccountsFilterSetsLosingBidsService(s) 294 rs.NonBillableWinningBids = NewBiddersAccountsFilterSetsNonBillableWinningBidsService(s) 295 return rs 296} 297 298type BiddersAccountsFilterSetsService struct { 299 s *Service 300 301 BidMetrics *BiddersAccountsFilterSetsBidMetricsService 302 303 BidResponseErrors *BiddersAccountsFilterSetsBidResponseErrorsService 304 305 BidResponsesWithoutBids *BiddersAccountsFilterSetsBidResponsesWithoutBidsService 306 307 FilteredBidRequests *BiddersAccountsFilterSetsFilteredBidRequestsService 308 309 FilteredBids *BiddersAccountsFilterSetsFilteredBidsService 310 311 ImpressionMetrics *BiddersAccountsFilterSetsImpressionMetricsService 312 313 LosingBids *BiddersAccountsFilterSetsLosingBidsService 314 315 NonBillableWinningBids *BiddersAccountsFilterSetsNonBillableWinningBidsService 316} 317 318func NewBiddersAccountsFilterSetsBidMetricsService(s *Service) *BiddersAccountsFilterSetsBidMetricsService { 319 rs := &BiddersAccountsFilterSetsBidMetricsService{s: s} 320 return rs 321} 322 323type BiddersAccountsFilterSetsBidMetricsService struct { 324 s *Service 325} 326 327func NewBiddersAccountsFilterSetsBidResponseErrorsService(s *Service) *BiddersAccountsFilterSetsBidResponseErrorsService { 328 rs := &BiddersAccountsFilterSetsBidResponseErrorsService{s: s} 329 return rs 330} 331 332type BiddersAccountsFilterSetsBidResponseErrorsService struct { 333 s *Service 334} 335 336func NewBiddersAccountsFilterSetsBidResponsesWithoutBidsService(s *Service) *BiddersAccountsFilterSetsBidResponsesWithoutBidsService { 337 rs := &BiddersAccountsFilterSetsBidResponsesWithoutBidsService{s: s} 338 return rs 339} 340 341type BiddersAccountsFilterSetsBidResponsesWithoutBidsService struct { 342 s *Service 343} 344 345func NewBiddersAccountsFilterSetsFilteredBidRequestsService(s *Service) *BiddersAccountsFilterSetsFilteredBidRequestsService { 346 rs := &BiddersAccountsFilterSetsFilteredBidRequestsService{s: s} 347 return rs 348} 349 350type BiddersAccountsFilterSetsFilteredBidRequestsService struct { 351 s *Service 352} 353 354func NewBiddersAccountsFilterSetsFilteredBidsService(s *Service) *BiddersAccountsFilterSetsFilteredBidsService { 355 rs := &BiddersAccountsFilterSetsFilteredBidsService{s: s} 356 rs.Creatives = NewBiddersAccountsFilterSetsFilteredBidsCreativesService(s) 357 rs.Details = NewBiddersAccountsFilterSetsFilteredBidsDetailsService(s) 358 return rs 359} 360 361type BiddersAccountsFilterSetsFilteredBidsService struct { 362 s *Service 363 364 Creatives *BiddersAccountsFilterSetsFilteredBidsCreativesService 365 366 Details *BiddersAccountsFilterSetsFilteredBidsDetailsService 367} 368 369func NewBiddersAccountsFilterSetsFilteredBidsCreativesService(s *Service) *BiddersAccountsFilterSetsFilteredBidsCreativesService { 370 rs := &BiddersAccountsFilterSetsFilteredBidsCreativesService{s: s} 371 return rs 372} 373 374type BiddersAccountsFilterSetsFilteredBidsCreativesService struct { 375 s *Service 376} 377 378func NewBiddersAccountsFilterSetsFilteredBidsDetailsService(s *Service) *BiddersAccountsFilterSetsFilteredBidsDetailsService { 379 rs := &BiddersAccountsFilterSetsFilteredBidsDetailsService{s: s} 380 return rs 381} 382 383type BiddersAccountsFilterSetsFilteredBidsDetailsService struct { 384 s *Service 385} 386 387func NewBiddersAccountsFilterSetsImpressionMetricsService(s *Service) *BiddersAccountsFilterSetsImpressionMetricsService { 388 rs := &BiddersAccountsFilterSetsImpressionMetricsService{s: s} 389 return rs 390} 391 392type BiddersAccountsFilterSetsImpressionMetricsService struct { 393 s *Service 394} 395 396func NewBiddersAccountsFilterSetsLosingBidsService(s *Service) *BiddersAccountsFilterSetsLosingBidsService { 397 rs := &BiddersAccountsFilterSetsLosingBidsService{s: s} 398 return rs 399} 400 401type BiddersAccountsFilterSetsLosingBidsService struct { 402 s *Service 403} 404 405func NewBiddersAccountsFilterSetsNonBillableWinningBidsService(s *Service) *BiddersAccountsFilterSetsNonBillableWinningBidsService { 406 rs := &BiddersAccountsFilterSetsNonBillableWinningBidsService{s: s} 407 return rs 408} 409 410type BiddersAccountsFilterSetsNonBillableWinningBidsService struct { 411 s *Service 412} 413 414func NewBiddersFilterSetsService(s *Service) *BiddersFilterSetsService { 415 rs := &BiddersFilterSetsService{s: s} 416 rs.BidMetrics = NewBiddersFilterSetsBidMetricsService(s) 417 rs.BidResponseErrors = NewBiddersFilterSetsBidResponseErrorsService(s) 418 rs.BidResponsesWithoutBids = NewBiddersFilterSetsBidResponsesWithoutBidsService(s) 419 rs.FilteredBidRequests = NewBiddersFilterSetsFilteredBidRequestsService(s) 420 rs.FilteredBids = NewBiddersFilterSetsFilteredBidsService(s) 421 rs.ImpressionMetrics = NewBiddersFilterSetsImpressionMetricsService(s) 422 rs.LosingBids = NewBiddersFilterSetsLosingBidsService(s) 423 rs.NonBillableWinningBids = NewBiddersFilterSetsNonBillableWinningBidsService(s) 424 return rs 425} 426 427type BiddersFilterSetsService struct { 428 s *Service 429 430 BidMetrics *BiddersFilterSetsBidMetricsService 431 432 BidResponseErrors *BiddersFilterSetsBidResponseErrorsService 433 434 BidResponsesWithoutBids *BiddersFilterSetsBidResponsesWithoutBidsService 435 436 FilteredBidRequests *BiddersFilterSetsFilteredBidRequestsService 437 438 FilteredBids *BiddersFilterSetsFilteredBidsService 439 440 ImpressionMetrics *BiddersFilterSetsImpressionMetricsService 441 442 LosingBids *BiddersFilterSetsLosingBidsService 443 444 NonBillableWinningBids *BiddersFilterSetsNonBillableWinningBidsService 445} 446 447func NewBiddersFilterSetsBidMetricsService(s *Service) *BiddersFilterSetsBidMetricsService { 448 rs := &BiddersFilterSetsBidMetricsService{s: s} 449 return rs 450} 451 452type BiddersFilterSetsBidMetricsService struct { 453 s *Service 454} 455 456func NewBiddersFilterSetsBidResponseErrorsService(s *Service) *BiddersFilterSetsBidResponseErrorsService { 457 rs := &BiddersFilterSetsBidResponseErrorsService{s: s} 458 return rs 459} 460 461type BiddersFilterSetsBidResponseErrorsService struct { 462 s *Service 463} 464 465func NewBiddersFilterSetsBidResponsesWithoutBidsService(s *Service) *BiddersFilterSetsBidResponsesWithoutBidsService { 466 rs := &BiddersFilterSetsBidResponsesWithoutBidsService{s: s} 467 return rs 468} 469 470type BiddersFilterSetsBidResponsesWithoutBidsService struct { 471 s *Service 472} 473 474func NewBiddersFilterSetsFilteredBidRequestsService(s *Service) *BiddersFilterSetsFilteredBidRequestsService { 475 rs := &BiddersFilterSetsFilteredBidRequestsService{s: s} 476 return rs 477} 478 479type BiddersFilterSetsFilteredBidRequestsService struct { 480 s *Service 481} 482 483func NewBiddersFilterSetsFilteredBidsService(s *Service) *BiddersFilterSetsFilteredBidsService { 484 rs := &BiddersFilterSetsFilteredBidsService{s: s} 485 rs.Creatives = NewBiddersFilterSetsFilteredBidsCreativesService(s) 486 rs.Details = NewBiddersFilterSetsFilteredBidsDetailsService(s) 487 return rs 488} 489 490type BiddersFilterSetsFilteredBidsService struct { 491 s *Service 492 493 Creatives *BiddersFilterSetsFilteredBidsCreativesService 494 495 Details *BiddersFilterSetsFilteredBidsDetailsService 496} 497 498func NewBiddersFilterSetsFilteredBidsCreativesService(s *Service) *BiddersFilterSetsFilteredBidsCreativesService { 499 rs := &BiddersFilterSetsFilteredBidsCreativesService{s: s} 500 return rs 501} 502 503type BiddersFilterSetsFilteredBidsCreativesService struct { 504 s *Service 505} 506 507func NewBiddersFilterSetsFilteredBidsDetailsService(s *Service) *BiddersFilterSetsFilteredBidsDetailsService { 508 rs := &BiddersFilterSetsFilteredBidsDetailsService{s: s} 509 return rs 510} 511 512type BiddersFilterSetsFilteredBidsDetailsService struct { 513 s *Service 514} 515 516func NewBiddersFilterSetsImpressionMetricsService(s *Service) *BiddersFilterSetsImpressionMetricsService { 517 rs := &BiddersFilterSetsImpressionMetricsService{s: s} 518 return rs 519} 520 521type BiddersFilterSetsImpressionMetricsService struct { 522 s *Service 523} 524 525func NewBiddersFilterSetsLosingBidsService(s *Service) *BiddersFilterSetsLosingBidsService { 526 rs := &BiddersFilterSetsLosingBidsService{s: s} 527 return rs 528} 529 530type BiddersFilterSetsLosingBidsService struct { 531 s *Service 532} 533 534func NewBiddersFilterSetsNonBillableWinningBidsService(s *Service) *BiddersFilterSetsNonBillableWinningBidsService { 535 rs := &BiddersFilterSetsNonBillableWinningBidsService{s: s} 536 return rs 537} 538 539type BiddersFilterSetsNonBillableWinningBidsService struct { 540 s *Service 541} 542 543// AbsoluteDateRange: An absolute date range, specified by its start 544// date and end date. The supported range of dates begins 30 days before 545// today and ends today. Validity checked upon filter set creation. If a 546// filter set with an absolute date range is run at a later date more 547// than 30 days after start_date, it will fail. 548type AbsoluteDateRange struct { 549 // EndDate: The end date of the range (inclusive). Must be within the 30 550 // days leading up to current date, and must be equal to or after 551 // start_date. 552 EndDate *Date `json:"endDate,omitempty"` 553 554 // StartDate: The start date of the range (inclusive). Must be within 555 // the 30 days leading up to current date, and must be equal to or 556 // before end_date. 557 StartDate *Date `json:"startDate,omitempty"` 558 559 // ForceSendFields is a list of field names (e.g. "EndDate") to 560 // unconditionally include in API requests. By default, fields with 561 // empty values are omitted from API requests. However, any non-pointer, 562 // non-interface field appearing in ForceSendFields will be sent to the 563 // server regardless of whether the field is empty or not. This may be 564 // used to include empty fields in Patch requests. 565 ForceSendFields []string `json:"-"` 566 567 // NullFields is a list of field names (e.g. "EndDate") to include in 568 // API requests with the JSON null value. By default, fields with empty 569 // values are omitted from API requests. However, any field with an 570 // empty value appearing in NullFields will be sent to the server as 571 // null. It is an error if a field in this list has a non-empty value. 572 // This may be used to include null fields in Patch requests. 573 NullFields []string `json:"-"` 574} 575 576func (s *AbsoluteDateRange) MarshalJSON() ([]byte, error) { 577 type NoMethod AbsoluteDateRange 578 raw := NoMethod(*s) 579 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 580} 581 582// AcceptProposalRequest: Request to accept a proposal. 583type AcceptProposalRequest struct { 584 // ProposalRevision: The last known client revision number of the 585 // proposal. 586 ProposalRevision int64 `json:"proposalRevision,omitempty,string"` 587 588 // ForceSendFields is a list of field names (e.g. "ProposalRevision") to 589 // unconditionally include in API requests. By default, fields with 590 // empty values are omitted from API requests. However, any non-pointer, 591 // non-interface field appearing in ForceSendFields will be sent to the 592 // server regardless of whether the field is empty or not. This may be 593 // used to include empty fields in Patch requests. 594 ForceSendFields []string `json:"-"` 595 596 // NullFields is a list of field names (e.g. "ProposalRevision") to 597 // include in API requests with the JSON null value. By default, fields 598 // with empty values are omitted from API requests. However, any field 599 // with an empty value appearing in NullFields will be sent to the 600 // server as null. It is an error if a field in this list has a 601 // non-empty value. This may be used to include null fields in Patch 602 // requests. 603 NullFields []string `json:"-"` 604} 605 606func (s *AcceptProposalRequest) MarshalJSON() ([]byte, error) { 607 type NoMethod AcceptProposalRequest 608 raw := NoMethod(*s) 609 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 610} 611 612// AdSize: Represents size of a single ad slot, or a creative. 613type AdSize struct { 614 // Height: The height of the ad slot in pixels. This field will be 615 // present only when size type is `PIXEL`. 616 Height int64 `json:"height,omitempty,string"` 617 618 // SizeType: The size type of the ad slot. 619 // 620 // Possible values: 621 // "SIZE_TYPE_UNSPECIFIED" - A placeholder for an undefined size type. 622 // "PIXEL" - Ad slot with size specified by height and width in 623 // pixels. 624 // "INTERSTITIAL" - Special size to describe an interstitial ad slot. 625 // "NATIVE" - Native (mobile) ads rendered by the publisher. 626 // "FLUID" - Fluid size (i.e., responsive size) can be resized 627 // automatically with the change of outside environment. 628 SizeType string `json:"sizeType,omitempty"` 629 630 // Width: The width of the ad slot in pixels. This field will be present 631 // only when size type is `PIXEL`. 632 Width int64 `json:"width,omitempty,string"` 633 634 // ForceSendFields is a list of field names (e.g. "Height") to 635 // unconditionally include in API requests. By default, fields with 636 // empty values are omitted from API requests. However, any non-pointer, 637 // non-interface field appearing in ForceSendFields will be sent to the 638 // server regardless of whether the field is empty or not. This may be 639 // used to include empty fields in Patch requests. 640 ForceSendFields []string `json:"-"` 641 642 // NullFields is a list of field names (e.g. "Height") to include in API 643 // requests with the JSON null value. By default, fields with empty 644 // values are omitted from API requests. However, any field with an 645 // empty value appearing in NullFields will be sent to the server as 646 // null. It is an error if a field in this list has a non-empty value. 647 // This may be used to include null fields in Patch requests. 648 NullFields []string `json:"-"` 649} 650 651func (s *AdSize) MarshalJSON() ([]byte, error) { 652 type NoMethod AdSize 653 raw := NoMethod(*s) 654 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 655} 656 657// AdTechnologyProviders: Detected ad technology provider information. 658type AdTechnologyProviders struct { 659 // DetectedProviderIds: The detected ad technology provider IDs for this 660 // creative. See 661 // https://storage.googleapis.com/adx-rtb-dictionaries/providers.csv for 662 // mapping of provider ID to provided name, a privacy policy URL, and a 663 // list of domains which can be attributed to the provider. If the 664 // creative contains provider IDs that are outside of those listed in 665 // the 666 // `BidRequest.adslot.consented_providers_settings.consented_providers` 667 // field on the (Google bid 668 // protocol)[https://developers.google.com/authorized-buyers/rtb/download 669 // s/realtime-bidding-proto] and the 670 // `BidRequest.user.ext.consented_providers_settings.consented_providers` 671 // field on the (OpenRTB 672 // protocol)[https://developers.google.com/authorized-buyers/rtb/download 673 // s/openrtb-adx-proto], and a bid is submitted with that creative for 674 // an impression that will serve to an EEA user, the bid will be 675 // filtered before the auction. 676 DetectedProviderIds googleapi.Int64s `json:"detectedProviderIds,omitempty"` 677 678 // HasUnidentifiedProvider: Whether the creative contains an 679 // unidentified ad technology provider. If true for a given creative, 680 // any bid submitted with that creative for an impression that will 681 // serve to an EEA user will be filtered before the auction. 682 HasUnidentifiedProvider bool `json:"hasUnidentifiedProvider,omitempty"` 683 684 // ForceSendFields is a list of field names (e.g. "DetectedProviderIds") 685 // to unconditionally include in API requests. By default, fields with 686 // empty values are omitted from API requests. However, any non-pointer, 687 // non-interface field appearing in ForceSendFields will be sent to the 688 // server regardless of whether the field is empty or not. This may be 689 // used to include empty fields in Patch requests. 690 ForceSendFields []string `json:"-"` 691 692 // NullFields is a list of field names (e.g. "DetectedProviderIds") to 693 // include in API requests with the JSON null value. By default, fields 694 // with empty values are omitted from API requests. However, any field 695 // with an empty value appearing in NullFields will be sent to the 696 // server as null. It is an error if a field in this list has a 697 // non-empty value. This may be used to include null fields in Patch 698 // requests. 699 NullFields []string `json:"-"` 700} 701 702func (s *AdTechnologyProviders) MarshalJSON() ([]byte, error) { 703 type NoMethod AdTechnologyProviders 704 raw := NoMethod(*s) 705 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 706} 707 708// AddDealAssociationRequest: A request for associating a deal and a 709// creative. 710type AddDealAssociationRequest struct { 711 // Association: The association between a creative and a deal that 712 // should be added. 713 Association *CreativeDealAssociation `json:"association,omitempty"` 714 715 // ForceSendFields is a list of field names (e.g. "Association") to 716 // unconditionally include in API requests. By default, fields with 717 // empty values are omitted from API requests. However, any non-pointer, 718 // non-interface field appearing in ForceSendFields will be sent to the 719 // server regardless of whether the field is empty or not. This may be 720 // used to include empty fields in Patch requests. 721 ForceSendFields []string `json:"-"` 722 723 // NullFields is a list of field names (e.g. "Association") to include 724 // in API requests with the JSON null value. By default, fields with 725 // empty values are omitted from API requests. However, any field with 726 // an empty value appearing in NullFields will be sent to the server as 727 // null. It is an error if a field in this list has a non-empty value. 728 // This may be used to include null fields in Patch requests. 729 NullFields []string `json:"-"` 730} 731 732func (s *AddDealAssociationRequest) MarshalJSON() ([]byte, error) { 733 type NoMethod AddDealAssociationRequest 734 raw := NoMethod(*s) 735 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 736} 737 738// AddNoteRequest: Request message for adding a note to a given 739// proposal. 740type AddNoteRequest struct { 741 // Note: Details of the note to add. 742 Note *Note `json:"note,omitempty"` 743 744 // ForceSendFields is a list of field names (e.g. "Note") to 745 // unconditionally include in API requests. By default, fields with 746 // empty values are omitted from API requests. However, any non-pointer, 747 // non-interface field appearing in ForceSendFields will be sent to the 748 // server regardless of whether the field is empty or not. This may be 749 // used to include empty fields in Patch requests. 750 ForceSendFields []string `json:"-"` 751 752 // NullFields is a list of field names (e.g. "Note") to include in API 753 // requests with the JSON null value. By default, fields with empty 754 // values are omitted from API requests. However, any field with an 755 // empty value appearing in NullFields will be sent to the server as 756 // null. It is an error if a field in this list has a non-empty value. 757 // This may be used to include null fields in Patch requests. 758 NullFields []string `json:"-"` 759} 760 761func (s *AddNoteRequest) MarshalJSON() ([]byte, error) { 762 type NoMethod AddNoteRequest 763 raw := NoMethod(*s) 764 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 765} 766 767// AppContext: Output only. The app type the restriction applies to for 768// mobile device. 769type AppContext struct { 770 // AppTypes: The app types this restriction applies to. 771 // 772 // Possible values: 773 // "NATIVE" - Native app context. 774 // "WEB" - Mobile web app context. 775 AppTypes []string `json:"appTypes,omitempty"` 776 777 // ForceSendFields is a list of field names (e.g. "AppTypes") to 778 // unconditionally include in API requests. By default, fields with 779 // empty values are omitted from API requests. However, any non-pointer, 780 // non-interface field appearing in ForceSendFields will be sent to the 781 // server regardless of whether the field is empty or not. This may be 782 // used to include empty fields in Patch requests. 783 ForceSendFields []string `json:"-"` 784 785 // NullFields is a list of field names (e.g. "AppTypes") to include in 786 // API requests with the JSON null value. By default, fields with empty 787 // values are omitted from API requests. However, any field with an 788 // empty value appearing in NullFields will be sent to the server as 789 // null. It is an error if a field in this list has a non-empty value. 790 // This may be used to include null fields in Patch requests. 791 NullFields []string `json:"-"` 792} 793 794func (s *AppContext) MarshalJSON() ([]byte, error) { 795 type NoMethod AppContext 796 raw := NoMethod(*s) 797 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 798} 799 800// AuctionContext: Output only. The auction type the restriction applies 801// to. 802type AuctionContext struct { 803 // AuctionTypes: The auction types this restriction applies to. 804 // 805 // Possible values: 806 // "OPEN_AUCTION" - The restriction applies to open auction. 807 // "DIRECT_DEALS" - The restriction applies to direct deals. 808 AuctionTypes []string `json:"auctionTypes,omitempty"` 809 810 // ForceSendFields is a list of field names (e.g. "AuctionTypes") to 811 // unconditionally include in API requests. By default, fields with 812 // empty values are omitted from API requests. However, any non-pointer, 813 // non-interface field appearing in ForceSendFields will be sent to the 814 // server regardless of whether the field is empty or not. This may be 815 // used to include empty fields in Patch requests. 816 ForceSendFields []string `json:"-"` 817 818 // NullFields is a list of field names (e.g. "AuctionTypes") to include 819 // in API requests with the JSON null value. By default, fields with 820 // empty values are omitted from API requests. However, any field with 821 // an empty value appearing in NullFields will be sent to the server as 822 // null. It is an error if a field in this list has a non-empty value. 823 // This may be used to include null fields in Patch requests. 824 NullFields []string `json:"-"` 825} 826 827func (s *AuctionContext) MarshalJSON() ([]byte, error) { 828 type NoMethod AuctionContext 829 raw := NoMethod(*s) 830 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 831} 832 833// BidMetricsRow: The set of metrics that are measured in numbers of 834// bids, representing how many bids with the specified dimension values 835// were considered eligible at each stage of the bidding funnel; 836type BidMetricsRow struct { 837 // Bids: The number of bids that Ad Exchange received from the buyer. 838 Bids *MetricValue `json:"bids,omitempty"` 839 840 // BidsInAuction: The number of bids that were permitted to compete in 841 // the auction. 842 BidsInAuction *MetricValue `json:"bidsInAuction,omitempty"` 843 844 // BilledImpressions: The number of bids for which the buyer was billed. 845 BilledImpressions *MetricValue `json:"billedImpressions,omitempty"` 846 847 // ImpressionsWon: The number of bids that won the auction. 848 ImpressionsWon *MetricValue `json:"impressionsWon,omitempty"` 849 850 // MeasurableImpressions: The number of bids for which the corresponding 851 // impression was measurable for viewability (as defined by Active 852 // View). 853 MeasurableImpressions *MetricValue `json:"measurableImpressions,omitempty"` 854 855 // ReachedQueries: The number of bids that won the auction and also won 856 // the mediation waterfall (if any). 857 ReachedQueries *MetricValue `json:"reachedQueries,omitempty"` 858 859 // RowDimensions: The values of all dimensions associated with metric 860 // values in this row. 861 RowDimensions *RowDimensions `json:"rowDimensions,omitempty"` 862 863 // ViewableImpressions: The number of bids for which the corresponding 864 // impression was viewable (as defined by Active View). 865 ViewableImpressions *MetricValue `json:"viewableImpressions,omitempty"` 866 867 // ForceSendFields is a list of field names (e.g. "Bids") to 868 // unconditionally include in API requests. By default, fields with 869 // empty values are omitted from API requests. However, any non-pointer, 870 // non-interface field appearing in ForceSendFields will be sent to the 871 // server regardless of whether the field is empty or not. This may be 872 // used to include empty fields in Patch requests. 873 ForceSendFields []string `json:"-"` 874 875 // NullFields is a list of field names (e.g. "Bids") to include in API 876 // requests with the JSON null value. By default, fields with empty 877 // values are omitted from API requests. However, any field with an 878 // empty value appearing in NullFields will be sent to the server as 879 // null. It is an error if a field in this list has a non-empty value. 880 // This may be used to include null fields in Patch requests. 881 NullFields []string `json:"-"` 882} 883 884func (s *BidMetricsRow) MarshalJSON() ([]byte, error) { 885 type NoMethod BidMetricsRow 886 raw := NoMethod(*s) 887 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 888} 889 890// BidResponseWithoutBidsStatusRow: The number of impressions with the 891// specified dimension values that were considered to have no applicable 892// bids, as described by the specified status. 893type BidResponseWithoutBidsStatusRow struct { 894 // ImpressionCount: The number of impressions for which there was a bid 895 // response with the specified status. 896 ImpressionCount *MetricValue `json:"impressionCount,omitempty"` 897 898 // RowDimensions: The values of all dimensions associated with metric 899 // values in this row. 900 RowDimensions *RowDimensions `json:"rowDimensions,omitempty"` 901 902 // Status: The status specifying why the bid responses were considered 903 // to have no applicable bids. 904 // 905 // Possible values: 906 // "STATUS_UNSPECIFIED" - A placeholder for an undefined status. This 907 // value will never be returned in responses. 908 // "RESPONSES_WITHOUT_BIDS" - The response had no bids. 909 // "RESPONSES_WITHOUT_BIDS_FOR_ACCOUNT" - The response had no bids for 910 // the specified account, though it may have included bids on behalf of 911 // other accounts. Applies if: 1. Request is on behalf of a bidder and 912 // an account filter is present. 2. Request is on behalf of a child 913 // seat. 914 // "RESPONSES_WITHOUT_BIDS_FOR_DEAL" - The response had no bids for 915 // the specified deal, though it may have included bids on other deals 916 // on behalf of the account to which the deal belongs. If request is on 917 // behalf of a bidder and an account filter is not present, this also 918 // includes responses that have bids on behalf of accounts other than 919 // the account to which the deal belongs. 920 Status string `json:"status,omitempty"` 921 922 // ForceSendFields is a list of field names (e.g. "ImpressionCount") to 923 // unconditionally include in API requests. By default, fields with 924 // empty values are omitted from API requests. However, any non-pointer, 925 // non-interface field appearing in ForceSendFields will be sent to the 926 // server regardless of whether the field is empty or not. This may be 927 // used to include empty fields in Patch requests. 928 ForceSendFields []string `json:"-"` 929 930 // NullFields is a list of field names (e.g. "ImpressionCount") to 931 // include in API requests with the JSON null value. By default, fields 932 // with empty values are omitted from API requests. However, any field 933 // with an empty value appearing in NullFields will be sent to the 934 // server as null. It is an error if a field in this list has a 935 // non-empty value. This may be used to include null fields in Patch 936 // requests. 937 NullFields []string `json:"-"` 938} 939 940func (s *BidResponseWithoutBidsStatusRow) MarshalJSON() ([]byte, error) { 941 type NoMethod BidResponseWithoutBidsStatusRow 942 raw := NoMethod(*s) 943 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 944} 945 946// Buyer: Represents a buyer of inventory. Each buyer is identified by a 947// unique Authorized Buyers account ID. 948type Buyer struct { 949 // AccountId: Authorized Buyers account ID of the buyer. 950 AccountId string `json:"accountId,omitempty"` 951 952 // ForceSendFields is a list of field names (e.g. "AccountId") to 953 // unconditionally include in API requests. By default, fields with 954 // empty values are omitted from API requests. However, any non-pointer, 955 // non-interface field appearing in ForceSendFields will be sent to the 956 // server regardless of whether the field is empty or not. This may be 957 // used to include empty fields in Patch requests. 958 ForceSendFields []string `json:"-"` 959 960 // NullFields is a list of field names (e.g. "AccountId") to include in 961 // API requests with the JSON null value. By default, fields with empty 962 // values are omitted from API requests. However, any field with an 963 // empty value appearing in NullFields will be sent to the server as 964 // null. It is an error if a field in this list has a non-empty value. 965 // This may be used to include null fields in Patch requests. 966 NullFields []string `json:"-"` 967} 968 969func (s *Buyer) MarshalJSON() ([]byte, error) { 970 type NoMethod Buyer 971 raw := NoMethod(*s) 972 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 973} 974 975// CalloutStatusRow: The number of impressions with the specified 976// dimension values where the corresponding bid request or bid response 977// was not successful, as described by the specified callout status. 978type CalloutStatusRow struct { 979 // CalloutStatusId: The ID of the callout status. See 980 // callout-status-codes 981 // (https://developers.google.com/authorized-buyers/rtb/downloads/callout-status-codes). 982 CalloutStatusId int64 `json:"calloutStatusId,omitempty"` 983 984 // ImpressionCount: The number of impressions for which there was a bid 985 // request or bid response with the specified callout status. 986 ImpressionCount *MetricValue `json:"impressionCount,omitempty"` 987 988 // RowDimensions: The values of all dimensions associated with metric 989 // values in this row. 990 RowDimensions *RowDimensions `json:"rowDimensions,omitempty"` 991 992 // ForceSendFields is a list of field names (e.g. "CalloutStatusId") to 993 // unconditionally include in API requests. By default, fields with 994 // empty values are omitted from API requests. However, any non-pointer, 995 // non-interface field appearing in ForceSendFields will be sent to the 996 // server regardless of whether the field is empty or not. This may be 997 // used to include empty fields in Patch requests. 998 ForceSendFields []string `json:"-"` 999 1000 // NullFields is a list of field names (e.g. "CalloutStatusId") to 1001 // include in API requests with the JSON null value. By default, fields 1002 // with empty values are omitted from API requests. However, any field 1003 // with an empty value appearing in NullFields will be sent to the 1004 // server as null. It is an error if a field in this list has a 1005 // non-empty value. This may be used to include null fields in Patch 1006 // requests. 1007 NullFields []string `json:"-"` 1008} 1009 1010func (s *CalloutStatusRow) MarshalJSON() ([]byte, error) { 1011 type NoMethod CalloutStatusRow 1012 raw := NoMethod(*s) 1013 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1014} 1015 1016// CancelNegotiationRequest: Request to cancel an ongoing negotiation. 1017type CancelNegotiationRequest struct { 1018} 1019 1020// Client: A client resource represents a client buyer—an agency, a 1021// brand, or an advertiser customer of the sponsor buyer. Users 1022// associated with the client buyer have restricted access to the 1023// Marketplace and certain other sections of the Authorized Buyers UI 1024// based on the role granted to the client buyer. All fields are 1025// required unless otherwise specified. 1026type Client struct { 1027 // ClientAccountId: The globally-unique numerical ID of the client. The 1028 // value of this field is ignored in create and update operations. 1029 ClientAccountId int64 `json:"clientAccountId,omitempty,string"` 1030 1031 // ClientName: Name used to represent this client to publishers. You may 1032 // have multiple clients that map to the same entity, but for each 1033 // client the combination of `clientName` and entity must be unique. You 1034 // can specify this field as empty. 1035 ClientName string `json:"clientName,omitempty"` 1036 1037 // EntityId: Numerical identifier of the client entity. The entity can 1038 // be an advertiser, a brand, or an agency. This identifier is unique 1039 // among all the entities with the same type. The value of this field is 1040 // ignored if the entity type is not provided. A list of all known 1041 // advertisers with their identifiers is available in the 1042 // advertisers.txt 1043 // (https://storage.googleapis.com/adx-rtb-dictionaries/advertisers.txt) 1044 // file. A list of all known brands with their identifiers is available 1045 // in the brands.txt 1046 // (https://storage.googleapis.com/adx-rtb-dictionaries/brands.txt) 1047 // file. A list of all known agencies with their identifiers is 1048 // available in the agencies.txt 1049 // (https://storage.googleapis.com/adx-rtb-dictionaries/agencies.txt) 1050 // file. 1051 EntityId int64 `json:"entityId,omitempty,string"` 1052 1053 // EntityName: The name of the entity. This field is automatically 1054 // fetched based on the type and ID. The value of this field is ignored 1055 // in create and update operations. 1056 EntityName string `json:"entityName,omitempty"` 1057 1058 // EntityType: An optional field for specifying the type of the client 1059 // entity: `ADVERTISER`, `BRAND`, or `AGENCY`. 1060 // 1061 // Possible values: 1062 // "ENTITY_TYPE_UNSPECIFIED" - A placeholder for an undefined client 1063 // entity type. Should not be used. 1064 // "ADVERTISER" - An advertiser. 1065 // "BRAND" - A brand. 1066 // "AGENCY" - An advertising agency. 1067 // "ENTITY_TYPE_UNCLASSIFIED" - An explicit value for a client that 1068 // was not yet classified as any particular entity. 1069 EntityType string `json:"entityType,omitempty"` 1070 1071 // PartnerClientId: Optional arbitrary unique identifier of this client 1072 // buyer from the standpoint of its Ad Exchange sponsor buyer. This 1073 // field can be used to associate a client buyer with the identifier in 1074 // the namespace of its sponsor buyer, lookup client buyers by that 1075 // identifier and verify whether an Ad Exchange counterpart of a given 1076 // client buyer already exists. If present, must be unique among all the 1077 // client buyers for its Ad Exchange sponsor buyer. 1078 PartnerClientId string `json:"partnerClientId,omitempty"` 1079 1080 // Role: The role which is assigned to the client buyer. Each role 1081 // implies a set of permissions granted to the client. Must be one of 1082 // `CLIENT_DEAL_VIEWER`, `CLIENT_DEAL_NEGOTIATOR` or 1083 // `CLIENT_DEAL_APPROVER`. 1084 // 1085 // Possible values: 1086 // "CLIENT_ROLE_UNSPECIFIED" - A placeholder for an undefined client 1087 // role. 1088 // "CLIENT_DEAL_VIEWER" - Users associated with this client can see 1089 // publisher deal offers in the Marketplace. They can neither negotiate 1090 // proposals nor approve deals. If this client is visible to publishers, 1091 // they can send deal proposals to this client. 1092 // "CLIENT_DEAL_NEGOTIATOR" - Users associated with this client can 1093 // respond to deal proposals sent to them by publishers. They can also 1094 // initiate deal proposals of their own. 1095 // "CLIENT_DEAL_APPROVER" - Users associated with this client can 1096 // approve eligible deals on your behalf. Some deals may still 1097 // explicitly require publisher finalization. If this role is not 1098 // selected, the sponsor buyer will need to manually approve each of 1099 // their deals. 1100 Role string `json:"role,omitempty"` 1101 1102 // Status: The status of the client buyer. 1103 // 1104 // Possible values: 1105 // "CLIENT_STATUS_UNSPECIFIED" - A placeholder for an undefined client 1106 // status. 1107 // "DISABLED" - A client that is currently disabled. 1108 // "ACTIVE" - A client that is currently active. 1109 Status string `json:"status,omitempty"` 1110 1111 // VisibleToSeller: Whether the client buyer will be visible to sellers. 1112 VisibleToSeller bool `json:"visibleToSeller,omitempty"` 1113 1114 // ServerResponse contains the HTTP response code and headers from the 1115 // server. 1116 googleapi.ServerResponse `json:"-"` 1117 1118 // ForceSendFields is a list of field names (e.g. "ClientAccountId") to 1119 // unconditionally include in API requests. By default, fields with 1120 // empty values are omitted from API requests. However, any non-pointer, 1121 // non-interface field appearing in ForceSendFields will be sent to the 1122 // server regardless of whether the field is empty or not. This may be 1123 // used to include empty fields in Patch requests. 1124 ForceSendFields []string `json:"-"` 1125 1126 // NullFields is a list of field names (e.g. "ClientAccountId") to 1127 // include in API requests with the JSON null value. By default, fields 1128 // with empty values are omitted from API requests. However, any field 1129 // with an empty value appearing in NullFields will be sent to the 1130 // server as null. It is an error if a field in this list has a 1131 // non-empty value. This may be used to include null fields in Patch 1132 // requests. 1133 NullFields []string `json:"-"` 1134} 1135 1136func (s *Client) MarshalJSON() ([]byte, error) { 1137 type NoMethod Client 1138 raw := NoMethod(*s) 1139 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1140} 1141 1142// ClientUser: A client user is created under a client buyer and has 1143// restricted access to the Marketplace and certain other sections of 1144// the Authorized Buyers UI based on the role granted to the associated 1145// client buyer. The only way a new client user can be created is via 1146// accepting an email invitation (see the 1147// accounts.clients.invitations.create method). All fields are required 1148// unless otherwise specified. 1149type ClientUser struct { 1150 // ClientAccountId: Numerical account ID of the client buyer with which 1151 // the user is associated; the buyer must be a client of the current 1152 // sponsor buyer. The value of this field is ignored in an update 1153 // operation. 1154 ClientAccountId int64 `json:"clientAccountId,omitempty,string"` 1155 1156 // Email: User's email address. The value of this field is ignored in an 1157 // update operation. 1158 Email string `json:"email,omitempty"` 1159 1160 // Status: The status of the client user. 1161 // 1162 // Possible values: 1163 // "USER_STATUS_UNSPECIFIED" - A placeholder for an undefined user 1164 // status. 1165 // "PENDING" - A user who was already created but hasn't accepted the 1166 // invitation yet. 1167 // "ACTIVE" - A user that is currently active. 1168 // "DISABLED" - A user that is currently disabled. 1169 Status string `json:"status,omitempty"` 1170 1171 // UserId: The unique numerical ID of the client user that has accepted 1172 // an invitation. The value of this field is ignored in an update 1173 // operation. 1174 UserId int64 `json:"userId,omitempty,string"` 1175 1176 // ServerResponse contains the HTTP response code and headers from the 1177 // server. 1178 googleapi.ServerResponse `json:"-"` 1179 1180 // ForceSendFields is a list of field names (e.g. "ClientAccountId") to 1181 // unconditionally include in API requests. By default, fields with 1182 // empty values are omitted from API requests. However, any non-pointer, 1183 // non-interface field appearing in ForceSendFields will be sent to the 1184 // server regardless of whether the field is empty or not. This may be 1185 // used to include empty fields in Patch requests. 1186 ForceSendFields []string `json:"-"` 1187 1188 // NullFields is a list of field names (e.g. "ClientAccountId") to 1189 // include in API requests with the JSON null value. By default, fields 1190 // with empty values are omitted from API requests. However, any field 1191 // with an empty value appearing in NullFields will be sent to the 1192 // server as null. It is an error if a field in this list has a 1193 // non-empty value. This may be used to include null fields in Patch 1194 // requests. 1195 NullFields []string `json:"-"` 1196} 1197 1198func (s *ClientUser) MarshalJSON() ([]byte, error) { 1199 type NoMethod ClientUser 1200 raw := NoMethod(*s) 1201 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1202} 1203 1204// ClientUserInvitation: An invitation for a new client user to get 1205// access to the Authorized Buyers UI. All fields are required unless 1206// otherwise specified. 1207type ClientUserInvitation struct { 1208 // ClientAccountId: Numerical account ID of the client buyer that the 1209 // invited user is associated with. The value of this field is ignored 1210 // in create operations. 1211 ClientAccountId int64 `json:"clientAccountId,omitempty,string"` 1212 1213 // Email: The email address to which the invitation is sent. Email 1214 // addresses should be unique among all client users under each sponsor 1215 // buyer. 1216 Email string `json:"email,omitempty"` 1217 1218 // InvitationId: The unique numerical ID of the invitation that is sent 1219 // to the user. The value of this field is ignored in create operations. 1220 InvitationId int64 `json:"invitationId,omitempty,string"` 1221 1222 // ServerResponse contains the HTTP response code and headers from the 1223 // server. 1224 googleapi.ServerResponse `json:"-"` 1225 1226 // ForceSendFields is a list of field names (e.g. "ClientAccountId") to 1227 // unconditionally include in API requests. By default, fields with 1228 // empty values are omitted from API requests. However, any non-pointer, 1229 // non-interface field appearing in ForceSendFields will be sent to the 1230 // server regardless of whether the field is empty or not. This may be 1231 // used to include empty fields in Patch requests. 1232 ForceSendFields []string `json:"-"` 1233 1234 // NullFields is a list of field names (e.g. "ClientAccountId") to 1235 // include in API requests with the JSON null value. By default, fields 1236 // with empty values are omitted from API requests. However, any field 1237 // with an empty value appearing in NullFields will be sent to the 1238 // server as null. It is an error if a field in this list has a 1239 // non-empty value. This may be used to include null fields in Patch 1240 // requests. 1241 NullFields []string `json:"-"` 1242} 1243 1244func (s *ClientUserInvitation) MarshalJSON() ([]byte, error) { 1245 type NoMethod ClientUserInvitation 1246 raw := NoMethod(*s) 1247 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1248} 1249 1250// CompleteSetupRequest: Request message for indicating that the 1251// proposal's setup step is complete. 1252type CompleteSetupRequest struct { 1253} 1254 1255// ContactInformation: Contains information on how a buyer or seller can 1256// be reached. 1257type ContactInformation struct { 1258 // Email: Email address for the contact. 1259 Email string `json:"email,omitempty"` 1260 1261 // Name: The name of the contact. 1262 Name string `json:"name,omitempty"` 1263 1264 // ForceSendFields is a list of field names (e.g. "Email") to 1265 // unconditionally include in API requests. By default, fields with 1266 // empty values are omitted from API requests. However, any non-pointer, 1267 // non-interface field appearing in ForceSendFields will be sent to the 1268 // server regardless of whether the field is empty or not. This may be 1269 // used to include empty fields in Patch requests. 1270 ForceSendFields []string `json:"-"` 1271 1272 // NullFields is a list of field names (e.g. "Email") to include in API 1273 // requests with the JSON null value. By default, fields with empty 1274 // values are omitted from API requests. However, any field with an 1275 // empty value appearing in NullFields will be sent to the server as 1276 // null. It is an error if a field in this list has a non-empty value. 1277 // This may be used to include null fields in Patch requests. 1278 NullFields []string `json:"-"` 1279} 1280 1281func (s *ContactInformation) MarshalJSON() ([]byte, error) { 1282 type NoMethod ContactInformation 1283 raw := NoMethod(*s) 1284 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1285} 1286 1287// Correction: Output only. Shows any corrections that were applied to 1288// this creative. 1289type Correction struct { 1290 // Contexts: The contexts for the correction. 1291 Contexts []*ServingContext `json:"contexts,omitempty"` 1292 1293 // Details: Additional details about what was corrected. 1294 Details []string `json:"details,omitempty"` 1295 1296 // Type: The type of correction that was applied to the creative. 1297 // 1298 // Possible values: 1299 // "CORRECTION_TYPE_UNSPECIFIED" - The correction type is unknown. 1300 // Refer to the details for more information. 1301 // "VENDOR_IDS_ADDED" - The ad's declared vendors did not match the 1302 // vendors that were detected. The detected vendors were added. 1303 // "SSL_ATTRIBUTE_REMOVED" - The ad had the SSL attribute declared but 1304 // was not SSL-compliant. The SSL attribute was removed. 1305 // "FLASH_FREE_ATTRIBUTE_REMOVED" - The ad was declared as Flash-free 1306 // but contained Flash, so the Flash-free attribute was removed. 1307 // "FLASH_FREE_ATTRIBUTE_ADDED" - The ad was not declared as 1308 // Flash-free but it did not reference any flash content, so the 1309 // Flash-free attribute was added. 1310 // "REQUIRED_ATTRIBUTE_ADDED" - The ad did not declare a required 1311 // creative attribute. The attribute was added. 1312 // "REQUIRED_VENDOR_ADDED" - The ad did not declare a required 1313 // technology vendor. The technology vendor was added. 1314 // "SSL_ATTRIBUTE_ADDED" - The ad did not declare the SSL attribute 1315 // but was SSL-compliant, so the SSL attribute was added. 1316 // "IN_BANNER_VIDEO_ATTRIBUTE_ADDED" - Properties consistent with 1317 // In-banner video were found, so an In-Banner Video attribute was 1318 // added. 1319 // "MRAID_ATTRIBUTE_ADDED" - The ad makes calls to the MRAID API so 1320 // the MRAID attribute was added. 1321 // "FLASH_ATTRIBUTE_REMOVED" - The ad unnecessarily declared the Flash 1322 // attribute, so the Flash attribute was removed. 1323 // "VIDEO_IN_SNIPPET_ATTRIBUTE_ADDED" - The ad contains video content. 1324 Type string `json:"type,omitempty"` 1325 1326 // ForceSendFields is a list of field names (e.g. "Contexts") to 1327 // unconditionally include in API requests. By default, fields with 1328 // empty values are omitted from API requests. However, any non-pointer, 1329 // non-interface field appearing in ForceSendFields will be sent to the 1330 // server regardless of whether the field is empty or not. This may be 1331 // used to include empty fields in Patch requests. 1332 ForceSendFields []string `json:"-"` 1333 1334 // NullFields is a list of field names (e.g. "Contexts") to include in 1335 // API requests with the JSON null value. By default, fields with empty 1336 // values are omitted from API requests. However, any field with an 1337 // empty value appearing in NullFields will be sent to the server as 1338 // null. It is an error if a field in this list has a non-empty value. 1339 // This may be used to include null fields in Patch requests. 1340 NullFields []string `json:"-"` 1341} 1342 1343func (s *Correction) MarshalJSON() ([]byte, error) { 1344 type NoMethod Correction 1345 raw := NoMethod(*s) 1346 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1347} 1348 1349// Creative: A creative and its classification data. 1350type Creative struct { 1351 // AccountId: The account that this creative belongs to. Can be used to 1352 // filter the response of the creatives.list method. 1353 AccountId string `json:"accountId,omitempty"` 1354 1355 // AdChoicesDestinationUrl: The link to AdChoices destination page. 1356 AdChoicesDestinationUrl string `json:"adChoicesDestinationUrl,omitempty"` 1357 1358 // AdTechnologyProviders: Output only. The detected ad technology 1359 // providers. 1360 AdTechnologyProviders *AdTechnologyProviders `json:"adTechnologyProviders,omitempty"` 1361 1362 // AdvertiserName: The name of the company being advertised in the 1363 // creative. 1364 AdvertiserName string `json:"advertiserName,omitempty"` 1365 1366 // AgencyId: The agency ID for this creative. 1367 AgencyId int64 `json:"agencyId,omitempty,string"` 1368 1369 // ApiUpdateTime: Output only. The last update timestamp of the creative 1370 // via API. 1371 ApiUpdateTime string `json:"apiUpdateTime,omitempty"` 1372 1373 // Attributes: All attributes for the ads that may be shown from this 1374 // creative. Can be used to filter the response of the creatives.list 1375 // method. 1376 // 1377 // Possible values: 1378 // "ATTRIBUTE_UNSPECIFIED" - Do not use. This is a placeholder value 1379 // only. 1380 // "IMAGE_RICH_MEDIA" - The creative is of type image/rich media. For 1381 // pretargeting. 1382 // "ADOBE_FLASH_FLV" - The creative is of video type Adobe Flash FLV. 1383 // For pretargeting. 1384 // "IS_TAGGED" - The creative is tagged. 1385 // "IS_COOKIE_TARGETED" - The creative is cookie targeted. 1386 // "IS_USER_INTEREST_TARGETED" - The creative is user interest 1387 // targeted. 1388 // "EXPANDING_DIRECTION_NONE" - The creative does not expand. 1389 // "EXPANDING_DIRECTION_UP" - The creative expands up. 1390 // "EXPANDING_DIRECTION_DOWN" - The creative expands down. 1391 // "EXPANDING_DIRECTION_LEFT" - The creative expands left. 1392 // "EXPANDING_DIRECTION_RIGHT" - The creative expands right. 1393 // "EXPANDING_DIRECTION_UP_LEFT" - The creative expands up and left. 1394 // "EXPANDING_DIRECTION_UP_RIGHT" - The creative expands up and right. 1395 // "EXPANDING_DIRECTION_DOWN_LEFT" - The creative expands down and 1396 // left. 1397 // "EXPANDING_DIRECTION_DOWN_RIGHT" - The creative expands down and 1398 // right. 1399 // "CREATIVE_TYPE_HTML" - The creative type is HTML. 1400 // "CREATIVE_TYPE_VAST_VIDEO" - The creative type is VAST video. 1401 // "EXPANDING_DIRECTION_UP_OR_DOWN" - The creative expands up or down. 1402 // "EXPANDING_DIRECTION_LEFT_OR_RIGHT" - The creative expands left or 1403 // right. 1404 // "EXPANDING_DIRECTION_ANY_DIAGONAL" - The creative expands on any 1405 // diagonal. 1406 // "EXPANDING_ACTION_ROLLOVER_TO_EXPAND" - The creative expands when 1407 // rolled over. 1408 // "INSTREAM_VAST_VIDEO_TYPE_VPAID_FLASH" - The instream vast video 1409 // type is vpaid flash. 1410 // "RICH_MEDIA_CAPABILITY_TYPE_MRAID" - The creative is MRAID. 1411 // "RICH_MEDIA_CAPABILITY_TYPE_FLASH" - The creative is Flash. 1412 // "RICH_MEDIA_CAPABILITY_TYPE_HTML5" - The creative is HTML5. 1413 // "SKIPPABLE_INSTREAM_VIDEO" - The creative has an instream VAST 1414 // video type of skippable instream video. For pretargeting. 1415 // "RICH_MEDIA_CAPABILITY_TYPE_SSL" - The creative is SSL. 1416 // "RICH_MEDIA_CAPABILITY_TYPE_NON_SSL" - The creative is non-SSL. 1417 // "RICH_MEDIA_CAPABILITY_TYPE_INTERSTITIAL" - The creative is an 1418 // interstitial. 1419 // "NON_SKIPPABLE_INSTREAM_VIDEO" - The creative has an instream VAST 1420 // video type of non-skippable instream video. For pretargeting. 1421 // "NATIVE_ELIGIBILITY_ELIGIBLE" - The creative is eligible for 1422 // native. 1423 // "NON_VPAID" - The creative has an instream VAST video type of 1424 // non-VPAID. For pretargeting. 1425 // "NATIVE_ELIGIBILITY_NOT_ELIGIBLE" - The creative is not eligible 1426 // for native. 1427 // "ANY_INTERSTITIAL" - The creative has an interstitial size of any 1428 // interstitial. For pretargeting. 1429 // "NON_INTERSTITIAL" - The creative has an interstitial size of non 1430 // interstitial. For pretargeting. 1431 // "IN_BANNER_VIDEO" - The video type is in-banner video. 1432 // "RENDERING_SIZELESS_ADX" - The creative can dynamically resize to 1433 // fill a variety of slot sizes. 1434 // "OMSDK_1_0" - The open measurement SDK is supported. 1435 Attributes []string `json:"attributes,omitempty"` 1436 1437 // ClickThroughUrls: The set of destination URLs for the creative. 1438 ClickThroughUrls []string `json:"clickThroughUrls,omitempty"` 1439 1440 // Corrections: Output only. Shows any corrections that were applied to 1441 // this creative. 1442 Corrections []*Correction `json:"corrections,omitempty"` 1443 1444 // CreativeId: The buyer-defined creative ID of this creative. Can be 1445 // used to filter the response of the creatives.list method. 1446 CreativeId string `json:"creativeId,omitempty"` 1447 1448 // DealsStatus: Output only. The top-level deals status of this 1449 // creative. If disapproved, an entry for 'auctionType=DIRECT_DEALS' (or 1450 // 'ALL') in serving_restrictions will also exist. Note that this may be 1451 // nuanced with other contextual restrictions, in which case, it may be 1452 // preferable to read from serving_restrictions directly. Can be used to 1453 // filter the response of the creatives.list method. 1454 // 1455 // Possible values: 1456 // "STATUS_UNSPECIFIED" - The status is unknown. 1457 // "NOT_CHECKED" - The creative has not been checked. 1458 // "CONDITIONALLY_APPROVED" - The creative has been conditionally 1459 // approved. See serving_restrictions for details. 1460 // "APPROVED" - The creative has been approved. 1461 // "DISAPPROVED" - The creative has been disapproved. 1462 // "PENDING_REVIEW" - Placeholder for transition to v1beta1. Currently 1463 // not used. 1464 // "STATUS_TYPE_UNSPECIFIED" - Placeholder for transition to v1beta1. 1465 // Currently not used. 1466 DealsStatus string `json:"dealsStatus,omitempty"` 1467 1468 // DeclaredClickThroughUrls: The set of declared destination URLs for 1469 // the creative. 1470 DeclaredClickThroughUrls []string `json:"declaredClickThroughUrls,omitempty"` 1471 1472 // DetectedAdvertiserIds: Output only. Detected advertiser IDs, if any. 1473 DetectedAdvertiserIds googleapi.Int64s `json:"detectedAdvertiserIds,omitempty"` 1474 1475 // DetectedDomains: Output only. The detected domains for this creative. 1476 DetectedDomains []string `json:"detectedDomains,omitempty"` 1477 1478 // DetectedLanguages: Output only. The detected languages for this 1479 // creative. The order is arbitrary. The codes are 2 or 5 characters and 1480 // are documented at 1481 // https://developers.google.com/adwords/api/docs/appendix/languagecodes. 1482 DetectedLanguages []string `json:"detectedLanguages,omitempty"` 1483 1484 // DetectedProductCategories: Output only. Detected product categories, 1485 // if any. See the ad-product-categories.txt file in the technical 1486 // documentation for a list of IDs. 1487 DetectedProductCategories []int64 `json:"detectedProductCategories,omitempty"` 1488 1489 // DetectedSensitiveCategories: Output only. Detected sensitive 1490 // categories, if any. See the ad-sensitive-categories.txt file in the 1491 // technical documentation for a list of IDs. You should use these IDs 1492 // along with the excluded-sensitive-category field in the bid request 1493 // to filter your bids. 1494 DetectedSensitiveCategories []int64 `json:"detectedSensitiveCategories,omitempty"` 1495 1496 // Html: An HTML creative. 1497 Html *HtmlContent `json:"html,omitempty"` 1498 1499 // ImpressionTrackingUrls: The set of URLs to be called to record an 1500 // impression. 1501 ImpressionTrackingUrls []string `json:"impressionTrackingUrls,omitempty"` 1502 1503 // Native: A native creative. 1504 Native *NativeContent `json:"native,omitempty"` 1505 1506 // OpenAuctionStatus: Output only. The top-level open auction status of 1507 // this creative. If disapproved, an entry for 'auctionType = 1508 // OPEN_AUCTION' (or 'ALL') in serving_restrictions will also exist. 1509 // Note that this may be nuanced with other contextual restrictions, in 1510 // which case, it may be preferable to read from serving_restrictions 1511 // directly. Can be used to filter the response of the creatives.list 1512 // method. 1513 // 1514 // Possible values: 1515 // "STATUS_UNSPECIFIED" - The status is unknown. 1516 // "NOT_CHECKED" - The creative has not been checked. 1517 // "CONDITIONALLY_APPROVED" - The creative has been conditionally 1518 // approved. See serving_restrictions for details. 1519 // "APPROVED" - The creative has been approved. 1520 // "DISAPPROVED" - The creative has been disapproved. 1521 // "PENDING_REVIEW" - Placeholder for transition to v1beta1. Currently 1522 // not used. 1523 // "STATUS_TYPE_UNSPECIFIED" - Placeholder for transition to v1beta1. 1524 // Currently not used. 1525 OpenAuctionStatus string `json:"openAuctionStatus,omitempty"` 1526 1527 // RestrictedCategories: All restricted categories for the ads that may 1528 // be shown from this creative. 1529 // 1530 // Possible values: 1531 // "NO_RESTRICTED_CATEGORIES" - The ad has no restricted categories 1532 // "ALCOHOL" - The alcohol restricted category. 1533 RestrictedCategories []string `json:"restrictedCategories,omitempty"` 1534 1535 // ServingRestrictions: Output only. The granular status of this ad in 1536 // specific contexts. A context here relates to where something 1537 // ultimately serves (for example, a physical location, a platform, an 1538 // HTTPS vs HTTP request, or the type of auction). 1539 ServingRestrictions []*ServingRestriction `json:"servingRestrictions,omitempty"` 1540 1541 // VendorIds: All vendor IDs for the ads that may be shown from this 1542 // creative. See 1543 // https://storage.googleapis.com/adx-rtb-dictionaries/vendors.txt for 1544 // possible values. 1545 VendorIds []int64 `json:"vendorIds,omitempty"` 1546 1547 // Version: Output only. The version of this creative. 1548 Version int64 `json:"version,omitempty"` 1549 1550 // Video: A video creative. 1551 Video *VideoContent `json:"video,omitempty"` 1552 1553 // ServerResponse contains the HTTP response code and headers from the 1554 // server. 1555 googleapi.ServerResponse `json:"-"` 1556 1557 // ForceSendFields is a list of field names (e.g. "AccountId") to 1558 // unconditionally include in API requests. By default, fields with 1559 // empty values are omitted from API requests. However, any non-pointer, 1560 // non-interface field appearing in ForceSendFields will be sent to the 1561 // server regardless of whether the field is empty or not. This may be 1562 // used to include empty fields in Patch requests. 1563 ForceSendFields []string `json:"-"` 1564 1565 // NullFields is a list of field names (e.g. "AccountId") to include in 1566 // API requests with the JSON null value. By default, fields with empty 1567 // values are omitted from API requests. However, any field with an 1568 // empty value appearing in NullFields will be sent to the server as 1569 // null. It is an error if a field in this list has a non-empty value. 1570 // This may be used to include null fields in Patch requests. 1571 NullFields []string `json:"-"` 1572} 1573 1574func (s *Creative) MarshalJSON() ([]byte, error) { 1575 type NoMethod Creative 1576 raw := NoMethod(*s) 1577 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1578} 1579 1580// CreativeDealAssociation: The association between a creative and a 1581// deal. 1582type CreativeDealAssociation struct { 1583 // AccountId: The account the creative belongs to. 1584 AccountId string `json:"accountId,omitempty"` 1585 1586 // CreativeId: The ID of the creative associated with the deal. 1587 CreativeId string `json:"creativeId,omitempty"` 1588 1589 // DealsId: The externalDealId for the deal associated with the 1590 // creative. 1591 DealsId string `json:"dealsId,omitempty"` 1592 1593 // ForceSendFields is a list of field names (e.g. "AccountId") to 1594 // unconditionally include in API requests. By default, fields with 1595 // empty values are omitted from API requests. However, any non-pointer, 1596 // non-interface field appearing in ForceSendFields will be sent to the 1597 // server regardless of whether the field is empty or not. This may be 1598 // used to include empty fields in Patch requests. 1599 ForceSendFields []string `json:"-"` 1600 1601 // NullFields is a list of field names (e.g. "AccountId") to include in 1602 // API requests with the JSON null value. By default, fields with empty 1603 // values are omitted from API requests. However, any field with an 1604 // empty value appearing in NullFields will be sent to the server as 1605 // null. It is an error if a field in this list has a non-empty value. 1606 // This may be used to include null fields in Patch requests. 1607 NullFields []string `json:"-"` 1608} 1609 1610func (s *CreativeDealAssociation) MarshalJSON() ([]byte, error) { 1611 type NoMethod CreativeDealAssociation 1612 raw := NoMethod(*s) 1613 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1614} 1615 1616// CreativeRestrictions: Represents creative restrictions associated to 1617// Programmatic Guaranteed/ Preferred Deal in Ad Manager. This doesn't 1618// apply to Private Auction and AdX Preferred Deals. 1619type CreativeRestrictions struct { 1620 // CreativeFormat: The format of the environment that the creatives will 1621 // be displayed in. 1622 // 1623 // Possible values: 1624 // "CREATIVE_FORMAT_UNSPECIFIED" - A placeholder for an undefined 1625 // creative format. 1626 // "DISPLAY" - A creative that will be displayed in environments such 1627 // as a browser. 1628 // "VIDEO" - A video creative that will be displayed in environments 1629 // such as a video player. 1630 CreativeFormat string `json:"creativeFormat,omitempty"` 1631 1632 CreativeSpecifications []*CreativeSpecification `json:"creativeSpecifications,omitempty"` 1633 1634 // SkippableAdType: Skippable video ads allow viewers to skip ads after 1635 // 5 seconds. 1636 // 1637 // Possible values: 1638 // "SKIPPABLE_AD_TYPE_UNSPECIFIED" - A placeholder for an undefined 1639 // skippable ad type. 1640 // "SKIPPABLE" - This video ad can be skipped after 5 seconds. 1641 // "INSTREAM_SELECT" - This video ad can be skipped after 5 seconds, 1642 // and is counted as engaged view after 30 seconds. The creative is 1643 // hosted on YouTube only, and viewcount of the YouTube video increments 1644 // after the engaged view. 1645 // "NOT_SKIPPABLE" - This video ad is not skippable. 1646 SkippableAdType string `json:"skippableAdType,omitempty"` 1647 1648 // ForceSendFields is a list of field names (e.g. "CreativeFormat") to 1649 // unconditionally include in API requests. By default, fields with 1650 // empty values are omitted from API requests. However, any non-pointer, 1651 // non-interface field appearing in ForceSendFields will be sent to the 1652 // server regardless of whether the field is empty or not. This may be 1653 // used to include empty fields in Patch requests. 1654 ForceSendFields []string `json:"-"` 1655 1656 // NullFields is a list of field names (e.g. "CreativeFormat") to 1657 // include in API requests with the JSON null value. By default, fields 1658 // with empty values are omitted from API requests. However, any field 1659 // with an empty value appearing in NullFields will be sent to the 1660 // server as null. It is an error if a field in this list has a 1661 // non-empty value. This may be used to include null fields in Patch 1662 // requests. 1663 NullFields []string `json:"-"` 1664} 1665 1666func (s *CreativeRestrictions) MarshalJSON() ([]byte, error) { 1667 type NoMethod CreativeRestrictions 1668 raw := NoMethod(*s) 1669 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1670} 1671 1672// CreativeSize: Specifies the size of the creative. 1673type CreativeSize struct { 1674 // AllowedFormats: What formats are allowed by the publisher. If this 1675 // repeated field is empty then all formats are allowed. For example, if 1676 // this field contains AllowedFormatType.AUDIO then the publisher only 1677 // allows an audio ad (without any video). 1678 // 1679 // Possible values: 1680 // "UNKNOWN" - A placeholder for an undefined allowed format. 1681 // "AUDIO" - An audio-only ad (without any video). 1682 AllowedFormats []string `json:"allowedFormats,omitempty"` 1683 1684 // CompanionSizes: For video creatives specifies the sizes of companion 1685 // ads (if present). Companion sizes may be filled in only when 1686 // creative_size_type = VIDEO 1687 CompanionSizes []*Size `json:"companionSizes,omitempty"` 1688 1689 // CreativeSizeType: The creative size type. 1690 // 1691 // Possible values: 1692 // "CREATIVE_SIZE_TYPE_UNSPECIFIED" - A placeholder for an undefined 1693 // creative size type. 1694 // "REGULAR" - The creative is a regular desktop creative. 1695 // "INTERSTITIAL" - The creative is an interstitial creative. 1696 // "VIDEO" - The creative is a video creative. 1697 // "NATIVE" - The creative is a native (mobile) creative. 1698 CreativeSizeType string `json:"creativeSizeType,omitempty"` 1699 1700 // NativeTemplate: Output only. The native template for this creative. 1701 // It will have a value only if creative_size_type = 1702 // CreativeSizeType.NATIVE. 1703 // 1704 // Possible values: 1705 // "UNKNOWN_NATIVE_TEMPLATE" - A placeholder for an undefined native 1706 // template. 1707 // "NATIVE_CONTENT_AD" - The creative is linked to native content ad. 1708 // "NATIVE_APP_INSTALL_AD" - The creative is linked to native app 1709 // install ad. 1710 // "NATIVE_VIDEO_CONTENT_AD" - The creative is linked to native video 1711 // content ad. 1712 // "NATIVE_VIDEO_APP_INSTALL_AD" - The creative is linked to native 1713 // video app install ad. 1714 NativeTemplate string `json:"nativeTemplate,omitempty"` 1715 1716 // Size: For regular or video creative size type, specifies the size of 1717 // the creative 1718 Size *Size `json:"size,omitempty"` 1719 1720 // SkippableAdType: The type of skippable ad for this creative. It will 1721 // have a value only if creative_size_type = CreativeSizeType.VIDEO. 1722 // 1723 // Possible values: 1724 // "SKIPPABLE_AD_TYPE_UNSPECIFIED" - A placeholder for an undefined 1725 // skippable ad type. 1726 // "GENERIC" - This video ad can be skipped after 5 seconds. 1727 // "INSTREAM_SELECT" - This video ad can be skipped after 5 seconds, 1728 // and count as engaged view after 30 seconds. The creative is hosted on 1729 // YouTube only, and viewcount of the YouTube video increments after the 1730 // engaged view. 1731 // "NOT_SKIPPABLE" - This video ad is not skippable. 1732 SkippableAdType string `json:"skippableAdType,omitempty"` 1733 1734 // ForceSendFields is a list of field names (e.g. "AllowedFormats") to 1735 // unconditionally include in API requests. By default, fields with 1736 // empty values are omitted from API requests. However, any non-pointer, 1737 // non-interface field appearing in ForceSendFields will be sent to the 1738 // server regardless of whether the field is empty or not. This may be 1739 // used to include empty fields in Patch requests. 1740 ForceSendFields []string `json:"-"` 1741 1742 // NullFields is a list of field names (e.g. "AllowedFormats") to 1743 // include in API requests with the JSON null value. By default, fields 1744 // with empty values are omitted from API requests. However, any field 1745 // with an empty value appearing in NullFields will be sent to the 1746 // server as null. It is an error if a field in this list has a 1747 // non-empty value. This may be used to include null fields in Patch 1748 // requests. 1749 NullFields []string `json:"-"` 1750} 1751 1752func (s *CreativeSize) MarshalJSON() ([]byte, error) { 1753 type NoMethod CreativeSize 1754 raw := NoMethod(*s) 1755 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1756} 1757 1758// CreativeSpecification: Represents information for a creative that is 1759// associated with a Programmatic Guaranteed/Preferred Deal in Ad 1760// Manager. 1761type CreativeSpecification struct { 1762 // CreativeCompanionSizes: Companion sizes may be filled in only when 1763 // this is a video creative. 1764 CreativeCompanionSizes []*AdSize `json:"creativeCompanionSizes,omitempty"` 1765 1766 // CreativeSize: The size of the creative. 1767 CreativeSize *AdSize `json:"creativeSize,omitempty"` 1768 1769 // ForceSendFields is a list of field names (e.g. 1770 // "CreativeCompanionSizes") to unconditionally include in API requests. 1771 // By default, fields with empty values are omitted from API requests. 1772 // However, any non-pointer, non-interface field appearing in 1773 // ForceSendFields will be sent to the server regardless of whether the 1774 // field is empty or not. This may be used to include empty fields in 1775 // Patch requests. 1776 ForceSendFields []string `json:"-"` 1777 1778 // NullFields is a list of field names (e.g. "CreativeCompanionSizes") 1779 // to include in API requests with the JSON null value. By default, 1780 // fields with empty values are omitted from API requests. However, any 1781 // field with an empty value appearing in NullFields will be sent to the 1782 // server as null. It is an error if a field in this list has a 1783 // non-empty value. This may be used to include null fields in Patch 1784 // requests. 1785 NullFields []string `json:"-"` 1786} 1787 1788func (s *CreativeSpecification) MarshalJSON() ([]byte, error) { 1789 type NoMethod CreativeSpecification 1790 raw := NoMethod(*s) 1791 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1792} 1793 1794// CreativeStatusRow: The number of bids with the specified dimension 1795// values that did not win the auction (either were filtered pre-auction 1796// or lost the auction), as described by the specified creative status. 1797type CreativeStatusRow struct { 1798 // BidCount: The number of bids with the specified status. 1799 BidCount *MetricValue `json:"bidCount,omitempty"` 1800 1801 // CreativeStatusId: The ID of the creative status. See 1802 // creative-status-codes 1803 // (https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). 1804 CreativeStatusId int64 `json:"creativeStatusId,omitempty"` 1805 1806 // RowDimensions: The values of all dimensions associated with metric 1807 // values in this row. 1808 RowDimensions *RowDimensions `json:"rowDimensions,omitempty"` 1809 1810 // ForceSendFields is a list of field names (e.g. "BidCount") to 1811 // unconditionally include in API requests. By default, fields with 1812 // empty values are omitted from API requests. However, any non-pointer, 1813 // non-interface field appearing in ForceSendFields will be sent to the 1814 // server regardless of whether the field is empty or not. This may be 1815 // used to include empty fields in Patch requests. 1816 ForceSendFields []string `json:"-"` 1817 1818 // NullFields is a list of field names (e.g. "BidCount") to include in 1819 // API requests with the JSON null value. By default, fields with empty 1820 // values are omitted from API requests. However, any field with an 1821 // empty value appearing in NullFields will be sent to the server as 1822 // null. It is an error if a field in this list has a non-empty value. 1823 // This may be used to include null fields in Patch requests. 1824 NullFields []string `json:"-"` 1825} 1826 1827func (s *CreativeStatusRow) MarshalJSON() ([]byte, error) { 1828 type NoMethod CreativeStatusRow 1829 raw := NoMethod(*s) 1830 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1831} 1832 1833// CriteriaTargeting: Generic targeting used for targeting dimensions 1834// that contains a list of included and excluded numeric IDs. 1835type CriteriaTargeting struct { 1836 // ExcludedCriteriaIds: A list of numeric IDs to be excluded. 1837 ExcludedCriteriaIds googleapi.Int64s `json:"excludedCriteriaIds,omitempty"` 1838 1839 // TargetedCriteriaIds: A list of numeric IDs to be included. 1840 TargetedCriteriaIds googleapi.Int64s `json:"targetedCriteriaIds,omitempty"` 1841 1842 // ForceSendFields is a list of field names (e.g. "ExcludedCriteriaIds") 1843 // to unconditionally include in API requests. By default, fields with 1844 // empty values are omitted from API requests. However, any non-pointer, 1845 // non-interface field appearing in ForceSendFields will be sent to the 1846 // server regardless of whether the field is empty or not. This may be 1847 // used to include empty fields in Patch requests. 1848 ForceSendFields []string `json:"-"` 1849 1850 // NullFields is a list of field names (e.g. "ExcludedCriteriaIds") to 1851 // include in API requests with the JSON null value. By default, fields 1852 // with empty values are omitted from API requests. However, any field 1853 // with an empty value appearing in NullFields will be sent to the 1854 // server as null. It is an error if a field in this list has a 1855 // non-empty value. This may be used to include null fields in Patch 1856 // requests. 1857 NullFields []string `json:"-"` 1858} 1859 1860func (s *CriteriaTargeting) MarshalJSON() ([]byte, error) { 1861 type NoMethod CriteriaTargeting 1862 raw := NoMethod(*s) 1863 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1864} 1865 1866// Date: Represents a whole or partial calendar date, such as a 1867// birthday. The time of day and time zone are either specified 1868// elsewhere or are insignificant. The date is relative to the Gregorian 1869// Calendar. This can represent one of the following: * A full date, 1870// with non-zero year, month, and day values * A month and day value, 1871// with a zero year, such as an anniversary * A year on its own, with 1872// zero month and day values * A year and month value, with a zero day, 1873// such as a credit card expiration date Related types are 1874// google.type.TimeOfDay and `google.protobuf.Timestamp`. 1875type Date struct { 1876 // Day: Day of a month. Must be from 1 to 31 and valid for the year and 1877 // month, or 0 to specify a year by itself or a year and month where the 1878 // day isn't significant. 1879 Day int64 `json:"day,omitempty"` 1880 1881 // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year 1882 // without a month and day. 1883 Month int64 `json:"month,omitempty"` 1884 1885 // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a 1886 // date without a year. 1887 Year int64 `json:"year,omitempty"` 1888 1889 // ForceSendFields is a list of field names (e.g. "Day") 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. "Day") to include in API 1898 // 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 *Date) MarshalJSON() ([]byte, error) { 1907 type NoMethod Date 1908 raw := NoMethod(*s) 1909 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1910} 1911 1912// DayPart: Daypart targeting message that specifies if the ad can be 1913// shown only during certain parts of a day/week. 1914type DayPart struct { 1915 // DayOfWeek: The day of the week to target. If unspecified, applicable 1916 // to all days. 1917 // 1918 // Possible values: 1919 // "DAY_OF_WEEK_UNSPECIFIED" - A placeholder for when the day of the 1920 // week is not specified. 1921 // "MONDAY" - Monday 1922 // "TUESDAY" - Tuesday 1923 // "WEDNESDAY" - Wednesday 1924 // "THURSDAY" - Thursday 1925 // "FRIDAY" - Friday 1926 // "SATURDAY" - Saturday 1927 // "SUNDAY" - Sunday 1928 DayOfWeek string `json:"dayOfWeek,omitempty"` 1929 1930 // EndTime: The ending time of the day for the ad to show (minute level 1931 // granularity). The end time is exclusive. This field is not available 1932 // for filtering in PQL queries. 1933 EndTime *TimeOfDay `json:"endTime,omitempty"` 1934 1935 // StartTime: The starting time of day for the ad to show (minute level 1936 // granularity). The start time is inclusive. This field is not 1937 // available for filtering in PQL queries. 1938 StartTime *TimeOfDay `json:"startTime,omitempty"` 1939 1940 // ForceSendFields is a list of field names (e.g. "DayOfWeek") to 1941 // unconditionally include in API requests. By default, fields with 1942 // empty values are omitted from API requests. However, any non-pointer, 1943 // non-interface field appearing in ForceSendFields will be sent to the 1944 // server regardless of whether the field is empty or not. This may be 1945 // used to include empty fields in Patch requests. 1946 ForceSendFields []string `json:"-"` 1947 1948 // NullFields is a list of field names (e.g. "DayOfWeek") to include in 1949 // API requests with the JSON null value. By default, fields with empty 1950 // values are omitted from API requests. However, any field with an 1951 // empty value appearing in NullFields will be sent to the server as 1952 // null. It is an error if a field in this list has a non-empty value. 1953 // This may be used to include null fields in Patch requests. 1954 NullFields []string `json:"-"` 1955} 1956 1957func (s *DayPart) MarshalJSON() ([]byte, error) { 1958 type NoMethod DayPart 1959 raw := NoMethod(*s) 1960 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1961} 1962 1963// DayPartTargeting: Specifies the day part targeting criteria. 1964type DayPartTargeting struct { 1965 // DayParts: A list of day part targeting criterion. 1966 DayParts []*DayPart `json:"dayParts,omitempty"` 1967 1968 // TimeZoneType: The timezone to use for interpreting the day part 1969 // targeting. 1970 // 1971 // Possible values: 1972 // "TIME_ZONE_SOURCE_UNSPECIFIED" - A placeholder for an undefined 1973 // time zone source. 1974 // "PUBLISHER" - Use publisher's time zone setting. 1975 // "USER" - Use the user's time zone setting. 1976 TimeZoneType string `json:"timeZoneType,omitempty"` 1977 1978 // ForceSendFields is a list of field names (e.g. "DayParts") to 1979 // unconditionally include in API requests. By default, fields with 1980 // empty values are omitted from API requests. However, any non-pointer, 1981 // non-interface field appearing in ForceSendFields will be sent to the 1982 // server regardless of whether the field is empty or not. This may be 1983 // used to include empty fields in Patch requests. 1984 ForceSendFields []string `json:"-"` 1985 1986 // NullFields is a list of field names (e.g. "DayParts") to include in 1987 // API requests with the JSON null value. By default, fields with empty 1988 // values are omitted from API requests. However, any field with an 1989 // empty value appearing in NullFields will be sent to the server as 1990 // null. It is an error if a field in this list has a non-empty value. 1991 // This may be used to include null fields in Patch requests. 1992 NullFields []string `json:"-"` 1993} 1994 1995func (s *DayPartTargeting) MarshalJSON() ([]byte, error) { 1996 type NoMethod DayPartTargeting 1997 raw := NoMethod(*s) 1998 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1999} 2000 2001// Deal: A deal represents a segment of inventory for displaying ads on. 2002// A proposal can contain multiple deals. A deal contains the terms and 2003// targeting information that is used for serving. 2004type Deal struct { 2005 // AvailableEndTime: Proposed flight end time of the deal. This will 2006 // generally be stored in a granularity of a second. A value is not 2007 // required for Private Auction deals or Preferred Deals. 2008 AvailableEndTime string `json:"availableEndTime,omitempty"` 2009 2010 // AvailableStartTime: Optional. Proposed flight start time of the deal. 2011 // This will generally be stored in the granularity of one second since 2012 // deal serving starts at seconds boundary. Any time specified with more 2013 // granularity (e.g., in milliseconds) will be truncated towards the 2014 // start of time in seconds. 2015 AvailableStartTime string `json:"availableStartTime,omitempty"` 2016 2017 // BuyerPrivateData: Buyer private data (hidden from seller). 2018 BuyerPrivateData *PrivateData `json:"buyerPrivateData,omitempty"` 2019 2020 // CreateProductId: The product ID from which this deal was created. 2021 // Note: This field may be set only when creating the resource. 2022 // Modifying this field while updating the resource will result in an 2023 // error. 2024 CreateProductId string `json:"createProductId,omitempty"` 2025 2026 // CreateProductRevision: Optional. Revision number of the product that 2027 // the deal was created from. If present on create, and the server 2028 // `product_revision` has advanced since the passed-in 2029 // `create_product_revision`, an `ABORTED` error will be returned. Note: 2030 // This field may be set only when creating the resource. Modifying this 2031 // field while updating the resource will result in an error. 2032 CreateProductRevision int64 `json:"createProductRevision,omitempty,string"` 2033 2034 // CreateTime: Output only. The time of the deal creation. 2035 CreateTime string `json:"createTime,omitempty"` 2036 2037 // CreativePreApprovalPolicy: Output only. Specifies the creative 2038 // pre-approval policy. 2039 // 2040 // Possible values: 2041 // "CREATIVE_PRE_APPROVAL_POLICY_UNSPECIFIED" - A placeholder for an 2042 // undefined creative pre-approval policy. 2043 // "SELLER_PRE_APPROVAL_REQUIRED" - The seller needs to approve each 2044 // creative before it can serve. 2045 // "SELLER_PRE_APPROVAL_NOT_REQUIRED" - The seller does not need to 2046 // approve each creative before it can serve. 2047 CreativePreApprovalPolicy string `json:"creativePreApprovalPolicy,omitempty"` 2048 2049 // CreativeRestrictions: Output only. Restricitions about the creatives 2050 // associated with the deal (i.e., size) This is available for 2051 // Programmatic Guaranteed/Preferred Deals in Ad Manager. 2052 CreativeRestrictions *CreativeRestrictions `json:"creativeRestrictions,omitempty"` 2053 2054 // CreativeSafeFrameCompatibility: Output only. Specifies whether the 2055 // creative is safeFrame compatible. 2056 // 2057 // Possible values: 2058 // "CREATIVE_SAFE_FRAME_COMPATIBILITY_UNSPECIFIED" - A placeholder for 2059 // an undefined creative safe-frame compatibility. 2060 // "COMPATIBLE" - The creatives need to be compatible with the safe 2061 // frame option. 2062 // "INCOMPATIBLE" - The creatives can be incompatible with the safe 2063 // frame option. 2064 CreativeSafeFrameCompatibility string `json:"creativeSafeFrameCompatibility,omitempty"` 2065 2066 // DealId: Output only. A unique deal ID for the deal (server-assigned). 2067 DealId string `json:"dealId,omitempty"` 2068 2069 // DealServingMetadata: Output only. Metadata about the serving status 2070 // of this deal. 2071 DealServingMetadata *DealServingMetadata `json:"dealServingMetadata,omitempty"` 2072 2073 // DealTerms: The negotiable terms of the deal. 2074 DealTerms *DealTerms `json:"dealTerms,omitempty"` 2075 2076 // DeliveryControl: The set of fields around delivery control that are 2077 // interesting for a buyer to see but are non-negotiable. These are set 2078 // by the publisher. 2079 DeliveryControl *DeliveryControl `json:"deliveryControl,omitempty"` 2080 2081 // Description: Description for the deal terms. 2082 Description string `json:"description,omitempty"` 2083 2084 // DisplayName: The name of the deal. 2085 DisplayName string `json:"displayName,omitempty"` 2086 2087 // ExternalDealId: Output only. The external deal ID assigned to this 2088 // deal once the deal is finalized. This is the deal ID that shows up in 2089 // serving/reporting etc. 2090 ExternalDealId string `json:"externalDealId,omitempty"` 2091 2092 // IsSetupComplete: Output only. True, if the buyside inventory setup is 2093 // complete for this deal. 2094 IsSetupComplete bool `json:"isSetupComplete,omitempty"` 2095 2096 // ProgrammaticCreativeSource: Output only. Specifies the creative 2097 // source for programmatic deals. PUBLISHER means creative is provided 2098 // by seller and ADVERTISER means creative is provided by buyer. 2099 // 2100 // Possible values: 2101 // "PROGRAMMATIC_CREATIVE_SOURCE_UNSPECIFIED" - A placeholder for an 2102 // undefined programmatic creative source. 2103 // "ADVERTISER" - The advertiser provides the creatives. 2104 // "PUBLISHER" - The publisher provides the creatives to be served. 2105 ProgrammaticCreativeSource string `json:"programmaticCreativeSource,omitempty"` 2106 2107 // ProposalId: Output only. ID of the proposal that this deal is part 2108 // of. 2109 ProposalId string `json:"proposalId,omitempty"` 2110 2111 // SellerContacts: Output only. Seller contact information for the deal. 2112 SellerContacts []*ContactInformation `json:"sellerContacts,omitempty"` 2113 2114 // SyndicationProduct: The syndication product associated with the deal. 2115 // Note: This field may be set only when creating the resource. 2116 // Modifying this field while updating the resource will result in an 2117 // error. 2118 // 2119 // Possible values: 2120 // "SYNDICATION_PRODUCT_UNSPECIFIED" - A placeholder for an undefined 2121 // syndication product. 2122 // "CONTENT" - This typically represents a web page. 2123 // "MOBILE" - This represents a mobile property. 2124 // "VIDEO" - This represents video ad formats. 2125 // "GAMES" - This represents ads shown within games. 2126 SyndicationProduct string `json:"syndicationProduct,omitempty"` 2127 2128 // Targeting: Output only. Specifies the subset of inventory targeted by 2129 // the deal. 2130 Targeting *MarketplaceTargeting `json:"targeting,omitempty"` 2131 2132 // TargetingCriterion: The shared targeting visible to buyers and 2133 // sellers. Each shared targeting entity is AND'd together. 2134 TargetingCriterion []*TargetingCriteria `json:"targetingCriterion,omitempty"` 2135 2136 // UpdateTime: Output only. The time when the deal was last updated. 2137 UpdateTime string `json:"updateTime,omitempty"` 2138 2139 // WebPropertyCode: The web property code for the seller copied over 2140 // from the product. 2141 WebPropertyCode string `json:"webPropertyCode,omitempty"` 2142 2143 // ForceSendFields is a list of field names (e.g. "AvailableEndTime") to 2144 // unconditionally include in API requests. By default, fields with 2145 // empty values are omitted from API requests. However, any non-pointer, 2146 // non-interface field appearing in ForceSendFields will be sent to the 2147 // server regardless of whether the field is empty or not. This may be 2148 // used to include empty fields in Patch requests. 2149 ForceSendFields []string `json:"-"` 2150 2151 // NullFields is a list of field names (e.g. "AvailableEndTime") to 2152 // include in API requests with the JSON null value. By default, fields 2153 // with empty values are omitted from API requests. However, any field 2154 // with an empty value appearing in NullFields will be sent to the 2155 // server as null. It is an error if a field in this list has a 2156 // non-empty value. This may be used to include null fields in Patch 2157 // requests. 2158 NullFields []string `json:"-"` 2159} 2160 2161func (s *Deal) MarshalJSON() ([]byte, error) { 2162 type NoMethod Deal 2163 raw := NoMethod(*s) 2164 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2165} 2166 2167// DealPauseStatus: Tracks which parties (if any) have paused a deal. 2168// The deal is considered paused if either hasBuyerPaused or 2169// hasSellPaused is true. 2170type DealPauseStatus struct { 2171 // BuyerPauseReason: The buyer's reason for pausing, if the buyer paused 2172 // the deal. 2173 BuyerPauseReason string `json:"buyerPauseReason,omitempty"` 2174 2175 // FirstPausedBy: The role of the person who first paused this deal. 2176 // 2177 // Possible values: 2178 // "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined 2179 // buyer/seller role. 2180 // "BUYER" - Specifies the role as buyer. 2181 // "SELLER" - Specifies the role as seller. 2182 FirstPausedBy string `json:"firstPausedBy,omitempty"` 2183 2184 // HasBuyerPaused: True, if the buyer has paused the deal unilaterally. 2185 HasBuyerPaused bool `json:"hasBuyerPaused,omitempty"` 2186 2187 // HasSellerPaused: True, if the seller has paused the deal 2188 // unilaterally. 2189 HasSellerPaused bool `json:"hasSellerPaused,omitempty"` 2190 2191 // SellerPauseReason: The seller's reason for pausing, if the seller 2192 // paused the deal. 2193 SellerPauseReason string `json:"sellerPauseReason,omitempty"` 2194 2195 // ForceSendFields is a list of field names (e.g. "BuyerPauseReason") to 2196 // unconditionally include in API requests. By default, fields with 2197 // empty values are omitted from API requests. However, any non-pointer, 2198 // non-interface field appearing in ForceSendFields will be sent to the 2199 // server regardless of whether the field is empty or not. This may be 2200 // used to include empty fields in Patch requests. 2201 ForceSendFields []string `json:"-"` 2202 2203 // NullFields is a list of field names (e.g. "BuyerPauseReason") to 2204 // include in API requests with the JSON null value. By default, fields 2205 // with empty values are omitted from API requests. However, any field 2206 // with an empty value appearing in NullFields will be sent to the 2207 // server as null. It is an error if a field in this list has a 2208 // non-empty value. This may be used to include null fields in Patch 2209 // requests. 2210 NullFields []string `json:"-"` 2211} 2212 2213func (s *DealPauseStatus) MarshalJSON() ([]byte, error) { 2214 type NoMethod DealPauseStatus 2215 raw := NoMethod(*s) 2216 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2217} 2218 2219// DealServingMetadata: Message captures metadata about the serving 2220// status of a deal. 2221type DealServingMetadata struct { 2222 // DealPauseStatus: Output only. Tracks which parties (if any) have 2223 // paused a deal. 2224 DealPauseStatus *DealPauseStatus `json:"dealPauseStatus,omitempty"` 2225 2226 // ForceSendFields is a list of field names (e.g. "DealPauseStatus") to 2227 // unconditionally include in API requests. By default, fields with 2228 // empty values are omitted from API requests. However, any non-pointer, 2229 // non-interface field appearing in ForceSendFields will be sent to the 2230 // server regardless of whether the field is empty or not. This may be 2231 // used to include empty fields in Patch requests. 2232 ForceSendFields []string `json:"-"` 2233 2234 // NullFields is a list of field names (e.g. "DealPauseStatus") to 2235 // include in API requests with the JSON null value. By default, fields 2236 // with empty values are omitted from API requests. However, any field 2237 // with an empty value appearing in NullFields will be sent to the 2238 // server as null. It is an error if a field in this list has a 2239 // non-empty value. This may be used to include null fields in Patch 2240 // requests. 2241 NullFields []string `json:"-"` 2242} 2243 2244func (s *DealServingMetadata) MarshalJSON() ([]byte, error) { 2245 type NoMethod DealServingMetadata 2246 raw := NoMethod(*s) 2247 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2248} 2249 2250// DealTerms: The deal terms specify the details of a Product/deal. They 2251// specify things like price per buyer, the type of pricing model (e.g., 2252// fixed price, auction) and expected impressions from the publisher. 2253type DealTerms struct { 2254 // BrandingType: Visibility of the URL in bid requests. (default: 2255 // BRANDED) 2256 // 2257 // Possible values: 2258 // "BRANDING_TYPE_UNSPECIFIED" - A placeholder for an undefined 2259 // branding type. 2260 // "BRANDED" - Full URL is included in bid requests. 2261 // "SEMI_TRANSPARENT" - A TopLevelDomain or masked URL is sent in bid 2262 // requests rather than the full one. 2263 BrandingType string `json:"brandingType,omitempty"` 2264 2265 // Description: Publisher provided description for the terms. 2266 Description string `json:"description,omitempty"` 2267 2268 // EstimatedGrossSpend: Non-binding estimate of the estimated gross 2269 // spend for this deal. Can be set by buyer or seller. 2270 EstimatedGrossSpend *Price `json:"estimatedGrossSpend,omitempty"` 2271 2272 // EstimatedImpressionsPerDay: Non-binding estimate of the impressions 2273 // served per day. Can be set by buyer or seller. 2274 EstimatedImpressionsPerDay int64 `json:"estimatedImpressionsPerDay,omitempty,string"` 2275 2276 // GuaranteedFixedPriceTerms: The terms for guaranteed fixed price 2277 // deals. 2278 GuaranteedFixedPriceTerms *GuaranteedFixedPriceTerms `json:"guaranteedFixedPriceTerms,omitempty"` 2279 2280 // NonGuaranteedAuctionTerms: The terms for non-guaranteed auction 2281 // deals. 2282 NonGuaranteedAuctionTerms *NonGuaranteedAuctionTerms `json:"nonGuaranteedAuctionTerms,omitempty"` 2283 2284 // NonGuaranteedFixedPriceTerms: The terms for non-guaranteed fixed 2285 // price deals. 2286 NonGuaranteedFixedPriceTerms *NonGuaranteedFixedPriceTerms `json:"nonGuaranteedFixedPriceTerms,omitempty"` 2287 2288 // SellerTimeZone: The time zone name. For deals with Cost Per Day 2289 // billing, defines the time zone used to mark the boundaries of a day. 2290 // It should be an IANA TZ name, such as "America/Los_Angeles". For more 2291 // information, see 2292 // https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. 2293 SellerTimeZone string `json:"sellerTimeZone,omitempty"` 2294 2295 // ForceSendFields is a list of field names (e.g. "BrandingType") to 2296 // unconditionally include in API requests. By default, fields with 2297 // empty values are omitted from API requests. However, any non-pointer, 2298 // non-interface field appearing in ForceSendFields will be sent to the 2299 // server regardless of whether the field is empty or not. This may be 2300 // used to include empty fields in Patch requests. 2301 ForceSendFields []string `json:"-"` 2302 2303 // NullFields is a list of field names (e.g. "BrandingType") to include 2304 // in API requests with the JSON null value. By default, fields with 2305 // empty values are omitted from API requests. However, any field with 2306 // an empty value appearing in NullFields will be sent to the server as 2307 // null. It is an error if a field in this list has a non-empty value. 2308 // This may be used to include null fields in Patch requests. 2309 NullFields []string `json:"-"` 2310} 2311 2312func (s *DealTerms) MarshalJSON() ([]byte, error) { 2313 type NoMethod DealTerms 2314 raw := NoMethod(*s) 2315 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2316} 2317 2318// DeliveryControl: Message contains details about how the deals will be 2319// paced. 2320type DeliveryControl struct { 2321 // CreativeBlockingLevel: Output only. Specified the creative blocking 2322 // levels to be applied. 2323 // 2324 // Possible values: 2325 // "CREATIVE_BLOCKING_LEVEL_UNSPECIFIED" - A placeholder for an 2326 // undefined creative blocking level. 2327 // "PUBLISHER_BLOCKING_RULES" - Publisher blocking rules will be 2328 // applied. 2329 // "ADX_POLICY_BLOCKING_ONLY" - The Ad Exchange policy blocking rules 2330 // will be applied. 2331 CreativeBlockingLevel string `json:"creativeBlockingLevel,omitempty"` 2332 2333 // DeliveryRateType: Output only. Specifies how the impression delivery 2334 // will be paced. 2335 // 2336 // Possible values: 2337 // "DELIVERY_RATE_TYPE_UNSPECIFIED" - A placeholder for an undefined 2338 // delivery rate type. 2339 // "EVENLY" - Impressions are served uniformly over the life of the 2340 // deal. 2341 // "FRONT_LOADED" - Impressions are served front-loaded. 2342 // "AS_FAST_AS_POSSIBLE" - Impressions are served as fast as possible. 2343 DeliveryRateType string `json:"deliveryRateType,omitempty"` 2344 2345 // FrequencyCaps: Output only. Specifies any frequency caps. 2346 FrequencyCaps []*FrequencyCap `json:"frequencyCaps,omitempty"` 2347 2348 // ForceSendFields is a list of field names (e.g. 2349 // "CreativeBlockingLevel") to unconditionally include in API requests. 2350 // By default, fields with empty values are omitted from API requests. 2351 // However, any non-pointer, non-interface field appearing in 2352 // ForceSendFields will be sent to the server regardless of whether the 2353 // field is empty or not. This may be used to include empty fields in 2354 // Patch requests. 2355 ForceSendFields []string `json:"-"` 2356 2357 // NullFields is a list of field names (e.g. "CreativeBlockingLevel") to 2358 // include in API requests with the JSON null value. By default, fields 2359 // with empty values are omitted from API requests. However, any field 2360 // with an empty value appearing in NullFields will be sent to the 2361 // server as null. It is an error if a field in this list has a 2362 // non-empty value. This may be used to include null fields in Patch 2363 // requests. 2364 NullFields []string `json:"-"` 2365} 2366 2367func (s *DeliveryControl) MarshalJSON() ([]byte, error) { 2368 type NoMethod DeliveryControl 2369 raw := NoMethod(*s) 2370 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2371} 2372 2373// Disapproval: Output only. The reason and details for a disapproval. 2374type Disapproval struct { 2375 // Details: Additional details about the reason for disapproval. 2376 Details []string `json:"details,omitempty"` 2377 2378 // Reason: The categorized reason for disapproval. 2379 // 2380 // Possible values: 2381 // "LENGTH_OF_IMAGE_ANIMATION" - The length of the image animation is 2382 // longer than allowed. 2383 // "BROKEN_URL" - The click through URL doesn't work properly. 2384 // "MEDIA_NOT_FUNCTIONAL" - Something is wrong with the creative 2385 // itself. 2386 // "INVALID_FOURTH_PARTY_CALL" - The ad makes a fourth party call to 2387 // an unapproved vendor. 2388 // "INCORRECT_REMARKETING_DECLARATION" - The ad targets consumers 2389 // using remarketing lists and/or collects data for subsequent use in 2390 // retargeting, but does not correctly declare that use. 2391 // "LANDING_PAGE_ERROR" - Clicking on the ad leads to an error page. 2392 // "AD_SIZE_DOES_NOT_MATCH_AD_SLOT" - The ad size when rendered does 2393 // not match the declaration. 2394 // "NO_BORDER" - Ads with a white background require a border, which 2395 // was missing. 2396 // "FOURTH_PARTY_BROWSER_COOKIES" - The creative attempts to set 2397 // cookies from a fourth party that is not certified. 2398 // "LSO_OBJECTS" - The creative sets an LSO object. 2399 // "BLANK_CREATIVE" - The ad serves a blank. 2400 // "DESTINATION_URLS_UNDECLARED" - The ad uses rotation, but not all 2401 // destination URLs were declared. 2402 // "PROBLEM_WITH_CLICK_MACRO" - There is a problem with the way the 2403 // click macro is used. 2404 // "INCORRECT_AD_TECHNOLOGY_DECLARATION" - The ad technology 2405 // declaration is not accurate. 2406 // "INCORRECT_DESTINATION_URL_DECLARATION" - The actual destination 2407 // URL does not match the declared destination URL. 2408 // "EXPANDABLE_INCORRECT_DIRECTION" - The declared expanding direction 2409 // does not match the actual direction. 2410 // "EXPANDABLE_DIRECTION_NOT_SUPPORTED" - The ad does not expand in a 2411 // supported direction. 2412 // "EXPANDABLE_INVALID_VENDOR" - The ad uses an expandable vendor that 2413 // is not supported. 2414 // "EXPANDABLE_FUNCTIONALITY" - There was an issue with the expandable 2415 // ad. 2416 // "VIDEO_INVALID_VENDOR" - The ad uses a video vendor that is not 2417 // supported. 2418 // "VIDEO_UNSUPPORTED_LENGTH" - The length of the video ad is not 2419 // supported. 2420 // "VIDEO_UNSUPPORTED_FORMAT" - The format of the video ad is not 2421 // supported. 2422 // "VIDEO_FUNCTIONALITY" - There was an issue with the video ad. 2423 // "LANDING_PAGE_DISABLED" - The landing page does not conform to Ad 2424 // Exchange policy. 2425 // "MALWARE_SUSPECTED" - The ad or the landing page may contain 2426 // malware. 2427 // "ADULT_IMAGE_OR_VIDEO" - The ad contains adult images or video 2428 // content. 2429 // "INACCURATE_AD_TEXT" - The ad contains text that is unclear or 2430 // inaccurate. 2431 // "COUNTERFEIT_DESIGNER_GOODS" - The ad promotes counterfeit designer 2432 // goods. 2433 // "POP_UP" - The ad causes a popup window to appear. 2434 // "INVALID_RTB_PROTOCOL_USAGE" - The creative does not follow 2435 // policies set for the RTB protocol. 2436 // "RAW_IP_ADDRESS_IN_SNIPPET" - The ad contains a URL that uses a 2437 // numeric IP address for the domain. 2438 // "UNACCEPTABLE_CONTENT_SOFTWARE" - The ad or landing page contains 2439 // unacceptable content because it initiated a software or executable 2440 // download. 2441 // "UNAUTHORIZED_COOKIE_ON_GOOGLE_DOMAIN" - The ad set an unauthorized 2442 // cookie on a Google domain. 2443 // "UNDECLARED_FLASH_OBJECTS" - Flash content found when no flash was 2444 // declared. 2445 // "INVALID_SSL_DECLARATION" - SSL support declared but not working 2446 // correctly. 2447 // "DIRECT_DOWNLOAD_IN_AD" - Rich Media - Direct Download in Ad (ex. 2448 // PDF download). 2449 // "MAXIMUM_DOWNLOAD_SIZE_EXCEEDED" - Maximum download size exceeded. 2450 // "DESTINATION_URL_SITE_NOT_CRAWLABLE" - Bad Destination URL: Site 2451 // Not Crawlable. 2452 // "BAD_URL_LEGAL_DISAPPROVAL" - Bad URL: Legal disapproval. 2453 // "PHARMA_GAMBLING_ALCOHOL_NOT_ALLOWED" - Pharmaceuticals, Gambling, 2454 // Alcohol not allowed and at least one was detected. 2455 // "DYNAMIC_DNS_AT_DESTINATION_URL" - Dynamic DNS at Destination URL. 2456 // "POOR_IMAGE_OR_VIDEO_QUALITY" - Poor Image / Video Quality. 2457 // "UNACCEPTABLE_IMAGE_CONTENT" - For example, Image Trick to Click. 2458 // "INCORRECT_IMAGE_LAYOUT" - Incorrect Image Layout. 2459 // "IRRELEVANT_IMAGE_OR_VIDEO" - Irrelevant Image / Video. 2460 // "DESTINATION_SITE_DOES_NOT_ALLOW_GOING_BACK" - Broken back button. 2461 // "MISLEADING_CLAIMS_IN_AD" - Misleading/Inaccurate claims in ads. 2462 // "RESTRICTED_PRODUCTS" - Restricted Products. 2463 // "UNACCEPTABLE_CONTENT" - Unacceptable content. For example, 2464 // malware. 2465 // "AUTOMATED_AD_CLICKING" - The ad automatically redirects to the 2466 // destination site without a click, or reports a click when none were 2467 // made. 2468 // "INVALID_URL_PROTOCOL" - The ad uses URL protocols that do not 2469 // exist or are not allowed on AdX. 2470 // "UNDECLARED_RESTRICTED_CONTENT" - Restricted content (for example, 2471 // alcohol) was found in the ad but not declared. 2472 // "INVALID_REMARKETING_LIST_USAGE" - Violation of the remarketing 2473 // list policy. 2474 // "DESTINATION_SITE_NOT_CRAWLABLE_ROBOTS_TXT" - The destination 2475 // site's robot.txt file prevents it from being crawled. 2476 // "CLICK_TO_DOWNLOAD_NOT_AN_APP" - Click to download must link to an 2477 // app. 2478 // "INACCURATE_REVIEW_EXTENSION" - A review extension must be an 2479 // accurate review. 2480 // "SEXUALLY_EXPLICIT_CONTENT" - Sexually explicit content. 2481 // "GAINING_AN_UNFAIR_ADVANTAGE" - The ad tries to gain an unfair 2482 // traffic advantage. 2483 // "GAMING_THE_GOOGLE_NETWORK" - The ad tries to circumvent Google's 2484 // advertising systems. 2485 // "DANGEROUS_PRODUCTS_KNIVES" - The ad promotes dangerous knives. 2486 // "DANGEROUS_PRODUCTS_EXPLOSIVES" - The ad promotes explosives. 2487 // "DANGEROUS_PRODUCTS_GUNS" - The ad promotes guns & parts. 2488 // "DANGEROUS_PRODUCTS_DRUGS" - The ad promotes recreational 2489 // drugs/services & related equipment. 2490 // "DANGEROUS_PRODUCTS_TOBACCO" - The ad promotes tobacco 2491 // products/services & related equipment. 2492 // "DANGEROUS_PRODUCTS_WEAPONS" - The ad promotes weapons. 2493 // "UNCLEAR_OR_IRRELEVANT_AD" - The ad is unclear or irrelevant to the 2494 // destination site. 2495 // "PROFESSIONAL_STANDARDS" - The ad does not meet professional 2496 // standards. 2497 // "DYSFUNCTIONAL_PROMOTION" - The promotion is unnecessarily 2498 // difficult to navigate. 2499 // "INVALID_INTEREST_BASED_AD" - Violation of Google's policy for 2500 // interest-based ads. 2501 // "MISUSE_OF_PERSONAL_INFORMATION" - Misuse of personal information. 2502 // "OMISSION_OF_RELEVANT_INFORMATION" - Omission of relevant 2503 // information. 2504 // "UNAVAILABLE_PROMOTIONS" - Unavailable promotions. 2505 // "MISLEADING_PROMOTIONS" - Misleading or unrealistic promotions. 2506 // "INAPPROPRIATE_CONTENT" - Offensive or inappropriate content. 2507 // "SENSITIVE_EVENTS" - Capitalizing on sensitive events. 2508 // "SHOCKING_CONTENT" - Shocking content. 2509 // "ENABLING_DISHONEST_BEHAVIOR" - Products & Services that enable 2510 // dishonest behavior. 2511 // "TECHNICAL_REQUIREMENTS" - The ad does not meet technical 2512 // requirements. 2513 // "RESTRICTED_POLITICAL_CONTENT" - Restricted political content. 2514 // "UNSUPPORTED_CONTENT" - Unsupported content. 2515 // "INVALID_BIDDING_METHOD" - Invalid bidding method. 2516 // "VIDEO_TOO_LONG" - Video length exceeds limits. 2517 // "VIOLATES_JAPANESE_PHARMACY_LAW" - Unacceptable content: Japanese 2518 // healthcare. 2519 // "UNACCREDITED_PET_PHARMACY" - Online pharmacy ID required. 2520 // "ABORTION" - Unacceptable content: Abortion. 2521 // "CONTRACEPTIVES" - Unacceptable content: Birth control. 2522 // "NEED_CERTIFICATES_TO_ADVERTISE_IN_CHINA" - Restricted in China. 2523 // "KCDSP_REGISTRATION" - Unacceptable content: Korean healthcare. 2524 // "NOT_FAMILY_SAFE" - Non-family safe or adult content. 2525 // "CLINICAL_TRIAL_RECRUITMENT" - Clinical trial recruitment. 2526 // "MAXIMUM_NUMBER_OF_HTTP_CALLS_EXCEEDED" - Maximum number of HTTP 2527 // calls exceeded. 2528 // "MAXIMUM_NUMBER_OF_COOKIES_EXCEEDED" - Maximum number of cookies 2529 // exceeded. 2530 // "PERSONAL_LOANS" - Financial service ad does not adhere to 2531 // specifications. 2532 // "UNSUPPORTED_FLASH_CONTENT" - Flash content was found in an 2533 // unsupported context. 2534 // "MISUSE_BY_OMID_SCRIPT" - Misuse by an Open Measurement SDK script. 2535 // "NON_WHITELISTED_OMID_VENDOR" - Use of an Open Measurement SDK 2536 // vendor not on approved whitelist. 2537 // "DESTINATION_EXPERIENCE" - Unacceptable landing page. 2538 // "UNSUPPORTED_LANGUAGE" - Unsupported language. 2539 // "NON_SSL_COMPLIANT" - Non-SSL compliant. 2540 // "TEMPORARY_PAUSE" - Temporary pausing of creative. 2541 // "BAIL_BONDS" - Promotes services related to bail bonds. 2542 // "EXPERIMENTAL_MEDICAL_TREATMENT" - Promotes speculative and/or 2543 // experimental medical treatments. 2544 Reason string `json:"reason,omitempty"` 2545 2546 // ForceSendFields is a list of field names (e.g. "Details") to 2547 // unconditionally include in API requests. By default, fields with 2548 // empty values are omitted from API requests. However, any non-pointer, 2549 // non-interface field appearing in ForceSendFields will be sent to the 2550 // server regardless of whether the field is empty or not. This may be 2551 // used to include empty fields in Patch requests. 2552 ForceSendFields []string `json:"-"` 2553 2554 // NullFields is a list of field names (e.g. "Details") to include in 2555 // API requests with the JSON null value. By default, fields with empty 2556 // values are omitted from API requests. However, any field with an 2557 // empty value appearing in NullFields will be sent to the server as 2558 // null. It is an error if a field in this list has a non-empty value. 2559 // This may be used to include null fields in Patch requests. 2560 NullFields []string `json:"-"` 2561} 2562 2563func (s *Disapproval) MarshalJSON() ([]byte, error) { 2564 type NoMethod Disapproval 2565 raw := NoMethod(*s) 2566 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2567} 2568 2569// Empty: A generic empty message that you can re-use to avoid defining 2570// duplicated empty messages in your APIs. A typical example is to use 2571// it as the request or the response type of an API method. For 2572// instance: service Foo { rpc Bar(google.protobuf.Empty) returns 2573// (google.protobuf.Empty); } The JSON representation for `Empty` is 2574// empty JSON object `{}`. 2575type Empty struct { 2576 // ServerResponse contains the HTTP response code and headers from the 2577 // server. 2578 googleapi.ServerResponse `json:"-"` 2579} 2580 2581// FilterSet: A set of filters that is applied to a request for data. 2582// Within a filter set, an AND operation is performed across the filters 2583// represented by each field. An OR operation is performed across the 2584// filters represented by the multiple values of a repeated field, e.g., 2585// "format=VIDEO AND deal_id=12 AND (seller_network_id=34 OR 2586// seller_network_id=56)". 2587type FilterSet struct { 2588 // AbsoluteDateRange: An absolute date range, defined by a start date 2589 // and an end date. Interpreted relative to Pacific time zone. 2590 AbsoluteDateRange *AbsoluteDateRange `json:"absoluteDateRange,omitempty"` 2591 2592 // BreakdownDimensions: The set of dimensions along which to break down 2593 // the response; may be empty. If multiple dimensions are requested, the 2594 // breakdown is along the Cartesian product of the requested dimensions. 2595 // 2596 // Possible values: 2597 // "BREAKDOWN_DIMENSION_UNSPECIFIED" - A placeholder for an 2598 // unspecified dimension; should not be used. 2599 // "PUBLISHER_IDENTIFIER" - The response should be broken down by 2600 // publisher identifier. This option is available only for Open Bidding 2601 // buyers. 2602 BreakdownDimensions []string `json:"breakdownDimensions,omitempty"` 2603 2604 // CreativeId: The ID of the creative on which to filter; optional. This 2605 // field may be set only for a filter set that accesses account-level 2606 // troubleshooting data, i.e., one whose name matches the 2607 // `bidders/*/accounts/*/filterSets/*` pattern. 2608 CreativeId string `json:"creativeId,omitempty"` 2609 2610 // DealId: The ID of the deal on which to filter; optional. This field 2611 // may be set only for a filter set that accesses account-level 2612 // troubleshooting data, i.e., one whose name matches the 2613 // `bidders/*/accounts/*/filterSets/*` pattern. 2614 DealId int64 `json:"dealId,omitempty,string"` 2615 2616 // Environment: The environment on which to filter; optional. 2617 // 2618 // Possible values: 2619 // "ENVIRONMENT_UNSPECIFIED" - A placeholder for an undefined 2620 // environment; indicates that no environment filter will be applied. 2621 // "WEB" - The ad impression appears on the web. 2622 // "APP" - The ad impression appears in an app. 2623 Environment string `json:"environment,omitempty"` 2624 2625 // Format: Creative format bidded on or allowed to bid on, can be empty. 2626 // 2627 // Possible values: 2628 // "FORMAT_UNSPECIFIED" - A placeholder for an undefined format; 2629 // indicates that no format filter will be applied. 2630 // "NATIVE_DISPLAY" - The ad impression is a native ad, and display 2631 // (i.e., image) format. 2632 // "NATIVE_VIDEO" - The ad impression is a native ad, and video 2633 // format. 2634 // "NON_NATIVE_DISPLAY" - The ad impression is not a native ad, and 2635 // display (i.e., image) format. 2636 // "NON_NATIVE_VIDEO" - The ad impression is not a native ad, and 2637 // video format. 2638 Format string `json:"format,omitempty"` 2639 2640 // Formats: Creative formats bidded on or allowed to bid on, can be 2641 // empty. Although this field is a list, it can only be populated with a 2642 // single item. A HTTP 400 bad request error will be returned in the 2643 // response if you specify multiple items. 2644 // 2645 // Possible values: 2646 // "FORMAT_UNSPECIFIED" - A placeholder for an undefined format; 2647 // indicates that no format filter will be applied. 2648 // "NATIVE_DISPLAY" - The ad impression is a native ad, and display 2649 // (i.e., image) format. 2650 // "NATIVE_VIDEO" - The ad impression is a native ad, and video 2651 // format. 2652 // "NON_NATIVE_DISPLAY" - The ad impression is not a native ad, and 2653 // display (i.e., image) format. 2654 // "NON_NATIVE_VIDEO" - The ad impression is not a native ad, and 2655 // video format. 2656 Formats []string `json:"formats,omitempty"` 2657 2658 // Name: A user-defined name of the filter set. Filter set names must be 2659 // unique globally and match one of the patterns: - 2660 // `bidders/*/filterSets/*` (for accessing bidder-level troubleshooting 2661 // data) - `bidders/*/accounts/*/filterSets/*` (for accessing 2662 // account-level troubleshooting data) This field is required in create 2663 // operations. 2664 Name string `json:"name,omitempty"` 2665 2666 // Platforms: The list of platforms on which to filter; may be empty. 2667 // The filters represented by multiple platforms are ORed together 2668 // (i.e., if non-empty, results must match any one of the platforms). 2669 // 2670 // Possible values: 2671 // "PLATFORM_UNSPECIFIED" - A placeholder for an undefined platform; 2672 // indicates that no platform filter will be applied. 2673 // "DESKTOP" - The ad impression appears on a desktop. 2674 // "TABLET" - The ad impression appears on a tablet. 2675 // "MOBILE" - The ad impression appears on a mobile device. 2676 Platforms []string `json:"platforms,omitempty"` 2677 2678 // PublisherIdentifiers: For Open Bidding partners only. The list of 2679 // publisher identifiers on which to filter; may be empty. The filters 2680 // represented by multiple publisher identifiers are ORed together. 2681 PublisherIdentifiers []string `json:"publisherIdentifiers,omitempty"` 2682 2683 // RealtimeTimeRange: An open-ended realtime time range, defined by the 2684 // aggregation start timestamp. 2685 RealtimeTimeRange *RealtimeTimeRange `json:"realtimeTimeRange,omitempty"` 2686 2687 // RelativeDateRange: A relative date range, defined by an offset from 2688 // today and a duration. Interpreted relative to Pacific time zone. 2689 RelativeDateRange *RelativeDateRange `json:"relativeDateRange,omitempty"` 2690 2691 // SellerNetworkIds: For Authorized Buyers only. The list of IDs of the 2692 // seller (publisher) networks on which to filter; may be empty. The 2693 // filters represented by multiple seller network IDs are ORed together 2694 // (i.e., if non-empty, results must match any one of the publisher 2695 // networks). See seller-network-ids 2696 // (https://developers.google.com/authorized-buyers/rtb/downloads/seller-network-ids) 2697 // file for the set of existing seller network IDs. 2698 SellerNetworkIds []int64 `json:"sellerNetworkIds,omitempty"` 2699 2700 // TimeSeriesGranularity: The granularity of time intervals if a time 2701 // series breakdown is desired; optional. 2702 // 2703 // Possible values: 2704 // "TIME_SERIES_GRANULARITY_UNSPECIFIED" - A placeholder for an 2705 // unspecified interval; no time series is applied. All rows in response 2706 // will contain data for the entire requested time range. 2707 // "HOURLY" - Indicates that data will be broken down by the hour. 2708 // "DAILY" - Indicates that data will be broken down by the day. 2709 TimeSeriesGranularity string `json:"timeSeriesGranularity,omitempty"` 2710 2711 // ServerResponse contains the HTTP response code and headers from the 2712 // server. 2713 googleapi.ServerResponse `json:"-"` 2714 2715 // ForceSendFields is a list of field names (e.g. "AbsoluteDateRange") 2716 // to unconditionally include in API requests. By default, fields with 2717 // empty values are omitted from API requests. However, any non-pointer, 2718 // non-interface field appearing in ForceSendFields will be sent to the 2719 // server regardless of whether the field is empty or not. This may be 2720 // used to include empty fields in Patch requests. 2721 ForceSendFields []string `json:"-"` 2722 2723 // NullFields is a list of field names (e.g. "AbsoluteDateRange") to 2724 // include in API requests with the JSON null value. By default, fields 2725 // with empty values are omitted from API requests. However, any field 2726 // with an empty value appearing in NullFields will be sent to the 2727 // server as null. It is an error if a field in this list has a 2728 // non-empty value. This may be used to include null fields in Patch 2729 // requests. 2730 NullFields []string `json:"-"` 2731} 2732 2733func (s *FilterSet) MarshalJSON() ([]byte, error) { 2734 type NoMethod FilterSet 2735 raw := NoMethod(*s) 2736 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2737} 2738 2739// FilteredBidCreativeRow: The number of filtered bids with the 2740// specified dimension values that have the specified creative. 2741type FilteredBidCreativeRow struct { 2742 // BidCount: The number of bids with the specified creative. 2743 BidCount *MetricValue `json:"bidCount,omitempty"` 2744 2745 // CreativeId: The ID of the creative. 2746 CreativeId string `json:"creativeId,omitempty"` 2747 2748 // RowDimensions: The values of all dimensions associated with metric 2749 // values in this row. 2750 RowDimensions *RowDimensions `json:"rowDimensions,omitempty"` 2751 2752 // ForceSendFields is a list of field names (e.g. "BidCount") to 2753 // unconditionally include in API requests. By default, fields with 2754 // empty values are omitted from API requests. However, any non-pointer, 2755 // non-interface field appearing in ForceSendFields will be sent to the 2756 // server regardless of whether the field is empty or not. This may be 2757 // used to include empty fields in Patch requests. 2758 ForceSendFields []string `json:"-"` 2759 2760 // NullFields is a list of field names (e.g. "BidCount") to include in 2761 // API requests with the JSON null value. By default, fields with empty 2762 // values are omitted from API requests. However, any field with an 2763 // empty value appearing in NullFields will be sent to the server as 2764 // null. It is an error if a field in this list has a non-empty value. 2765 // This may be used to include null fields in Patch requests. 2766 NullFields []string `json:"-"` 2767} 2768 2769func (s *FilteredBidCreativeRow) MarshalJSON() ([]byte, error) { 2770 type NoMethod FilteredBidCreativeRow 2771 raw := NoMethod(*s) 2772 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2773} 2774 2775// FilteredBidDetailRow: The number of filtered bids with the specified 2776// dimension values, among those filtered due to the requested filtering 2777// reason (i.e. creative status), that have the specified detail. 2778type FilteredBidDetailRow struct { 2779 // BidCount: The number of bids with the specified detail. 2780 BidCount *MetricValue `json:"bidCount,omitempty"` 2781 2782 // Detail: The ID of the detail, can be numeric or text. The associated 2783 // value can be looked up in the dictionary file corresponding to the 2784 // DetailType in the response message. 2785 Detail string `json:"detail,omitempty"` 2786 2787 // DetailId: Note: this field will be deprecated, use "detail" field 2788 // instead. When "detail" field represents an integer value, this field 2789 // is populated as the same integer value "detail" field represents, 2790 // otherwise this field will be 0. The ID of the detail. The associated 2791 // value can be looked up in the dictionary file corresponding to the 2792 // DetailType in the response message. 2793 DetailId int64 `json:"detailId,omitempty"` 2794 2795 // RowDimensions: The values of all dimensions associated with metric 2796 // values in this row. 2797 RowDimensions *RowDimensions `json:"rowDimensions,omitempty"` 2798 2799 // ForceSendFields is a list of field names (e.g. "BidCount") to 2800 // unconditionally include in API requests. By default, fields with 2801 // empty values are omitted from API requests. However, any non-pointer, 2802 // non-interface field appearing in ForceSendFields will be sent to the 2803 // server regardless of whether the field is empty or not. This may be 2804 // used to include empty fields in Patch requests. 2805 ForceSendFields []string `json:"-"` 2806 2807 // NullFields is a list of field names (e.g. "BidCount") to include in 2808 // API requests with the JSON null value. By default, fields with empty 2809 // values are omitted from API requests. However, any field with an 2810 // empty value appearing in NullFields will be sent to the server as 2811 // null. It is an error if a field in this list has a non-empty value. 2812 // This may be used to include null fields in Patch requests. 2813 NullFields []string `json:"-"` 2814} 2815 2816func (s *FilteredBidDetailRow) MarshalJSON() ([]byte, error) { 2817 type NoMethod FilteredBidDetailRow 2818 raw := NoMethod(*s) 2819 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2820} 2821 2822// FirstPartyMobileApplicationTargeting: Represents a list of targeted 2823// and excluded mobile application IDs that publishers own. Mobile 2824// application IDs are from App Store and Google Play Store. Android App 2825// ID, for example, com.google.android.apps.maps, can be found in Google 2826// Play Store URL. iOS App ID (which is a number) can be found at the 2827// end of iTunes store URL. First party mobile applications is either 2828// included or excluded. 2829type FirstPartyMobileApplicationTargeting struct { 2830 // ExcludedAppIds: A list of application IDs to be excluded. 2831 ExcludedAppIds []string `json:"excludedAppIds,omitempty"` 2832 2833 // TargetedAppIds: A list of application IDs to be included. 2834 TargetedAppIds []string `json:"targetedAppIds,omitempty"` 2835 2836 // ForceSendFields is a list of field names (e.g. "ExcludedAppIds") to 2837 // unconditionally include in API requests. By default, fields with 2838 // empty values are omitted from API requests. However, any non-pointer, 2839 // non-interface field appearing in ForceSendFields will be sent to the 2840 // server regardless of whether the field is empty or not. This may be 2841 // used to include empty fields in Patch requests. 2842 ForceSendFields []string `json:"-"` 2843 2844 // NullFields is a list of field names (e.g. "ExcludedAppIds") to 2845 // include in API requests with the JSON null value. By default, fields 2846 // with empty values are omitted from API requests. However, any field 2847 // with an empty value appearing in NullFields will be sent to the 2848 // server as null. It is an error if a field in this list has a 2849 // non-empty value. This may be used to include null fields in Patch 2850 // requests. 2851 NullFields []string `json:"-"` 2852} 2853 2854func (s *FirstPartyMobileApplicationTargeting) MarshalJSON() ([]byte, error) { 2855 type NoMethod FirstPartyMobileApplicationTargeting 2856 raw := NoMethod(*s) 2857 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2858} 2859 2860// FrequencyCap: Frequency cap. 2861type FrequencyCap struct { 2862 // MaxImpressions: The maximum number of impressions that can be served 2863 // to a user within the specified time period. 2864 MaxImpressions int64 `json:"maxImpressions,omitempty"` 2865 2866 // NumTimeUnits: The amount of time, in the units specified by 2867 // time_unit_type. Defines the amount of time over which impressions per 2868 // user are counted and capped. 2869 NumTimeUnits int64 `json:"numTimeUnits,omitempty"` 2870 2871 // TimeUnitType: The time unit. Along with num_time_units defines the 2872 // amount of time over which impressions per user are counted and 2873 // capped. 2874 // 2875 // Possible values: 2876 // "TIME_UNIT_TYPE_UNSPECIFIED" - A placeholder for an undefined time 2877 // unit type. This just indicates the variable with this value hasn't 2878 // been initialized. 2879 // "MINUTE" - Minute 2880 // "HOUR" - Hour 2881 // "DAY" - Day 2882 // "WEEK" - Week 2883 // "MONTH" - Month 2884 // "LIFETIME" - Lifetime 2885 TimeUnitType string `json:"timeUnitType,omitempty"` 2886 2887 // ForceSendFields is a list of field names (e.g. "MaxImpressions") to 2888 // unconditionally include in API requests. By default, fields with 2889 // empty values are omitted from API requests. However, any non-pointer, 2890 // non-interface field appearing in ForceSendFields will be sent to the 2891 // server regardless of whether the field is empty or not. This may be 2892 // used to include empty fields in Patch requests. 2893 ForceSendFields []string `json:"-"` 2894 2895 // NullFields is a list of field names (e.g. "MaxImpressions") to 2896 // include in API requests with the JSON null value. By default, fields 2897 // with empty values are omitted from API requests. However, any field 2898 // with an empty value appearing in NullFields will be sent to the 2899 // server as null. It is an error if a field in this list has a 2900 // non-empty value. This may be used to include null fields in Patch 2901 // requests. 2902 NullFields []string `json:"-"` 2903} 2904 2905func (s *FrequencyCap) MarshalJSON() ([]byte, error) { 2906 type NoMethod FrequencyCap 2907 raw := NoMethod(*s) 2908 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2909} 2910 2911// GuaranteedFixedPriceTerms: Terms for Programmatic Guaranteed Deals. 2912type GuaranteedFixedPriceTerms struct { 2913 // FixedPrices: Fixed price for the specified buyer. 2914 FixedPrices []*PricePerBuyer `json:"fixedPrices,omitempty"` 2915 2916 // GuaranteedImpressions: Guaranteed impressions as a percentage. This 2917 // is the percentage of guaranteed looks that the buyer is guaranteeing 2918 // to buy. 2919 GuaranteedImpressions int64 `json:"guaranteedImpressions,omitempty,string"` 2920 2921 // GuaranteedLooks: Count of guaranteed looks. Required for deal, 2922 // optional for product. 2923 GuaranteedLooks int64 `json:"guaranteedLooks,omitempty,string"` 2924 2925 // MinimumDailyLooks: Daily minimum looks for CPD deal types. 2926 MinimumDailyLooks int64 `json:"minimumDailyLooks,omitempty,string"` 2927 2928 // ForceSendFields is a list of field names (e.g. "FixedPrices") to 2929 // unconditionally include in API requests. By default, fields with 2930 // empty values are omitted from API requests. However, any non-pointer, 2931 // non-interface field appearing in ForceSendFields will be sent to the 2932 // server regardless of whether the field is empty or not. This may be 2933 // used to include empty fields in Patch requests. 2934 ForceSendFields []string `json:"-"` 2935 2936 // NullFields is a list of field names (e.g. "FixedPrices") to include 2937 // in API requests with the JSON null value. By default, fields with 2938 // empty values are omitted from API requests. However, any field with 2939 // an empty value appearing in NullFields will be sent to the server as 2940 // null. It is an error if a field in this list has a non-empty value. 2941 // This may be used to include null fields in Patch requests. 2942 NullFields []string `json:"-"` 2943} 2944 2945func (s *GuaranteedFixedPriceTerms) MarshalJSON() ([]byte, error) { 2946 type NoMethod GuaranteedFixedPriceTerms 2947 raw := NoMethod(*s) 2948 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2949} 2950 2951// HtmlContent: HTML content for a creative. 2952type HtmlContent struct { 2953 // Height: The height of the HTML snippet in pixels. 2954 Height int64 `json:"height,omitempty"` 2955 2956 // Snippet: The HTML snippet that displays the ad when inserted in the 2957 // web page. 2958 Snippet string `json:"snippet,omitempty"` 2959 2960 // Width: The width of the HTML snippet in pixels. 2961 Width int64 `json:"width,omitempty"` 2962 2963 // ForceSendFields is a list of field names (e.g. "Height") to 2964 // unconditionally include in API requests. By default, fields with 2965 // empty values are omitted from API requests. However, any non-pointer, 2966 // non-interface field appearing in ForceSendFields will be sent to the 2967 // server regardless of whether the field is empty or not. This may be 2968 // used to include empty fields in Patch requests. 2969 ForceSendFields []string `json:"-"` 2970 2971 // NullFields is a list of field names (e.g. "Height") to include in API 2972 // requests with the JSON null value. By default, fields with empty 2973 // values are omitted from API requests. However, any field with an 2974 // empty value appearing in NullFields will be sent to the server as 2975 // null. It is an error if a field in this list has a non-empty value. 2976 // This may be used to include null fields in Patch requests. 2977 NullFields []string `json:"-"` 2978} 2979 2980func (s *HtmlContent) MarshalJSON() ([]byte, error) { 2981 type NoMethod HtmlContent 2982 raw := NoMethod(*s) 2983 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2984} 2985 2986// Image: An image resource. You may provide a larger image than was 2987// requested, so long as the aspect ratio is preserved. 2988type Image struct { 2989 // Height: Image height in pixels. 2990 Height int64 `json:"height,omitempty"` 2991 2992 // Url: The URL of the image. 2993 Url string `json:"url,omitempty"` 2994 2995 // Width: Image width in pixels. 2996 Width int64 `json:"width,omitempty"` 2997 2998 // ForceSendFields is a list of field names (e.g. "Height") to 2999 // unconditionally include in API requests. By default, fields with 3000 // empty values are omitted from API requests. However, any non-pointer, 3001 // non-interface field appearing in ForceSendFields will be sent to the 3002 // server regardless of whether the field is empty or not. This may be 3003 // used to include empty fields in Patch requests. 3004 ForceSendFields []string `json:"-"` 3005 3006 // NullFields is a list of field names (e.g. "Height") to include in API 3007 // requests with the JSON null value. By default, fields with empty 3008 // values are omitted from API requests. However, any field with an 3009 // empty value appearing in NullFields will be sent to the server as 3010 // null. It is an error if a field in this list has a non-empty value. 3011 // This may be used to include null fields in Patch requests. 3012 NullFields []string `json:"-"` 3013} 3014 3015func (s *Image) MarshalJSON() ([]byte, error) { 3016 type NoMethod Image 3017 raw := NoMethod(*s) 3018 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3019} 3020 3021// ImpressionMetricsRow: The set of metrics that are measured in numbers 3022// of impressions, representing how many impressions with the specified 3023// dimension values were considered eligible at each stage of the 3024// bidding funnel. 3025type ImpressionMetricsRow struct { 3026 // AvailableImpressions: The number of impressions available to the 3027 // buyer on Ad Exchange. In some cases this value may be unavailable. 3028 AvailableImpressions *MetricValue `json:"availableImpressions,omitempty"` 3029 3030 // BidRequests: The number of impressions for which Ad Exchange sent the 3031 // buyer a bid request. 3032 BidRequests *MetricValue `json:"bidRequests,omitempty"` 3033 3034 // InventoryMatches: The number of impressions that match the buyer's 3035 // inventory pretargeting. 3036 InventoryMatches *MetricValue `json:"inventoryMatches,omitempty"` 3037 3038 // ResponsesWithBids: The number of impressions for which Ad Exchange 3039 // received a response from the buyer that contained at least one 3040 // applicable bid. 3041 ResponsesWithBids *MetricValue `json:"responsesWithBids,omitempty"` 3042 3043 // RowDimensions: The values of all dimensions associated with metric 3044 // values in this row. 3045 RowDimensions *RowDimensions `json:"rowDimensions,omitempty"` 3046 3047 // SuccessfulResponses: The number of impressions for which the buyer 3048 // successfully sent a response to Ad Exchange. 3049 SuccessfulResponses *MetricValue `json:"successfulResponses,omitempty"` 3050 3051 // ForceSendFields is a list of field names (e.g. 3052 // "AvailableImpressions") to unconditionally include in API requests. 3053 // By default, fields with empty values are omitted from API requests. 3054 // However, any non-pointer, non-interface field appearing in 3055 // ForceSendFields will be sent to the server regardless of whether the 3056 // field is empty or not. This may be used to include empty fields in 3057 // Patch requests. 3058 ForceSendFields []string `json:"-"` 3059 3060 // NullFields is a list of field names (e.g. "AvailableImpressions") to 3061 // include in API requests with the JSON null value. By default, fields 3062 // with empty values are omitted from API requests. However, any field 3063 // with an empty value appearing in NullFields will be sent to the 3064 // server as null. It is an error if a field in this list has a 3065 // non-empty value. This may be used to include null fields in Patch 3066 // requests. 3067 NullFields []string `json:"-"` 3068} 3069 3070func (s *ImpressionMetricsRow) MarshalJSON() ([]byte, error) { 3071 type NoMethod ImpressionMetricsRow 3072 raw := NoMethod(*s) 3073 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3074} 3075 3076// InventorySizeTargeting: Represents the size of an ad unit that can be 3077// targeted on an ad request. It only applies to Private Auction, AdX 3078// Preferred Deals and Auction Packages. This targeting does not apply 3079// to Programmatic Guaranteed and Preferred Deals in Ad Manager. 3080type InventorySizeTargeting struct { 3081 // ExcludedInventorySizes: A list of inventory sizes to be excluded. 3082 ExcludedInventorySizes []*AdSize `json:"excludedInventorySizes,omitempty"` 3083 3084 // TargetedInventorySizes: A list of inventory sizes to be included. 3085 TargetedInventorySizes []*AdSize `json:"targetedInventorySizes,omitempty"` 3086 3087 // ForceSendFields is a list of field names (e.g. 3088 // "ExcludedInventorySizes") to unconditionally include in API requests. 3089 // By default, fields with empty values are omitted from API requests. 3090 // However, any non-pointer, non-interface field appearing in 3091 // ForceSendFields will be sent to the server regardless of whether the 3092 // field is empty or not. This may be used to include empty fields in 3093 // Patch requests. 3094 ForceSendFields []string `json:"-"` 3095 3096 // NullFields is a list of field names (e.g. "ExcludedInventorySizes") 3097 // to include in API requests with the JSON null value. By default, 3098 // fields with empty values are omitted from API requests. However, any 3099 // field with an empty value appearing in NullFields will be sent to the 3100 // server as null. It is an error if a field in this list has a 3101 // non-empty value. This may be used to include null fields in Patch 3102 // requests. 3103 NullFields []string `json:"-"` 3104} 3105 3106func (s *InventorySizeTargeting) MarshalJSON() ([]byte, error) { 3107 type NoMethod InventorySizeTargeting 3108 raw := NoMethod(*s) 3109 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3110} 3111 3112// ListBidMetricsResponse: Response message for listing the metrics that 3113// are measured in number of bids. 3114type ListBidMetricsResponse struct { 3115 // BidMetricsRows: List of rows, each containing a set of bid metrics. 3116 BidMetricsRows []*BidMetricsRow `json:"bidMetricsRows,omitempty"` 3117 3118 // NextPageToken: A token to retrieve the next page of results. Pass 3119 // this value in the ListBidMetricsRequest.pageToken field in the 3120 // subsequent call to the bidMetrics.list method to retrieve the next 3121 // page of results. 3122 NextPageToken string `json:"nextPageToken,omitempty"` 3123 3124 // ServerResponse contains the HTTP response code and headers from the 3125 // server. 3126 googleapi.ServerResponse `json:"-"` 3127 3128 // ForceSendFields is a list of field names (e.g. "BidMetricsRows") to 3129 // unconditionally include in API requests. By default, fields with 3130 // empty values are omitted from API requests. However, any non-pointer, 3131 // non-interface field appearing in ForceSendFields will be sent to the 3132 // server regardless of whether the field is empty or not. This may be 3133 // used to include empty fields in Patch requests. 3134 ForceSendFields []string `json:"-"` 3135 3136 // NullFields is a list of field names (e.g. "BidMetricsRows") to 3137 // include in API requests with the JSON null value. By default, fields 3138 // with empty values are omitted from API requests. However, any field 3139 // with an empty value appearing in NullFields will be sent to the 3140 // server as null. It is an error if a field in this list has a 3141 // non-empty value. This may be used to include null fields in Patch 3142 // requests. 3143 NullFields []string `json:"-"` 3144} 3145 3146func (s *ListBidMetricsResponse) MarshalJSON() ([]byte, error) { 3147 type NoMethod ListBidMetricsResponse 3148 raw := NoMethod(*s) 3149 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3150} 3151 3152// ListBidResponseErrorsResponse: Response message for listing all 3153// reasons that bid responses resulted in an error. 3154type ListBidResponseErrorsResponse struct { 3155 // CalloutStatusRows: List of rows, with counts of bid responses 3156 // aggregated by callout status. 3157 CalloutStatusRows []*CalloutStatusRow `json:"calloutStatusRows,omitempty"` 3158 3159 // NextPageToken: A token to retrieve the next page of results. Pass 3160 // this value in the ListBidResponseErrorsRequest.pageToken field in the 3161 // subsequent call to the bidResponseErrors.list method to retrieve the 3162 // next page of results. 3163 NextPageToken string `json:"nextPageToken,omitempty"` 3164 3165 // ServerResponse contains the HTTP response code and headers from the 3166 // server. 3167 googleapi.ServerResponse `json:"-"` 3168 3169 // ForceSendFields is a list of field names (e.g. "CalloutStatusRows") 3170 // to unconditionally include in API requests. By default, fields with 3171 // empty values are omitted from API requests. However, any non-pointer, 3172 // non-interface field appearing in ForceSendFields will be sent to the 3173 // server regardless of whether the field is empty or not. This may be 3174 // used to include empty fields in Patch requests. 3175 ForceSendFields []string `json:"-"` 3176 3177 // NullFields is a list of field names (e.g. "CalloutStatusRows") to 3178 // include in API requests with the JSON null value. By default, fields 3179 // with empty values are omitted from API requests. However, any field 3180 // with an empty value appearing in NullFields will be sent to the 3181 // server as null. It is an error if a field in this list has a 3182 // non-empty value. This may be used to include null fields in Patch 3183 // requests. 3184 NullFields []string `json:"-"` 3185} 3186 3187func (s *ListBidResponseErrorsResponse) MarshalJSON() ([]byte, error) { 3188 type NoMethod ListBidResponseErrorsResponse 3189 raw := NoMethod(*s) 3190 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3191} 3192 3193// ListBidResponsesWithoutBidsResponse: Response message for listing all 3194// reasons that bid responses were considered to have no applicable 3195// bids. 3196type ListBidResponsesWithoutBidsResponse struct { 3197 // BidResponseWithoutBidsStatusRows: List of rows, with counts of bid 3198 // responses without bids aggregated by status. 3199 BidResponseWithoutBidsStatusRows []*BidResponseWithoutBidsStatusRow `json:"bidResponseWithoutBidsStatusRows,omitempty"` 3200 3201 // NextPageToken: A token to retrieve the next page of results. Pass 3202 // this value in the ListBidResponsesWithoutBidsRequest.pageToken field 3203 // in the subsequent call to the bidResponsesWithoutBids.list method to 3204 // retrieve the next page of results. 3205 NextPageToken string `json:"nextPageToken,omitempty"` 3206 3207 // ServerResponse contains the HTTP response code and headers from the 3208 // server. 3209 googleapi.ServerResponse `json:"-"` 3210 3211 // ForceSendFields is a list of field names (e.g. 3212 // "BidResponseWithoutBidsStatusRows") to unconditionally include in API 3213 // requests. By default, fields with empty values are omitted from API 3214 // requests. However, any non-pointer, non-interface field appearing in 3215 // ForceSendFields will be sent to the server regardless of whether the 3216 // field is empty or not. This may be used to include empty fields in 3217 // Patch requests. 3218 ForceSendFields []string `json:"-"` 3219 3220 // NullFields is a list of field names (e.g. 3221 // "BidResponseWithoutBidsStatusRows") to include in API requests with 3222 // the JSON null value. By default, fields with empty values are omitted 3223 // from API requests. However, any field with an empty value appearing 3224 // in NullFields will be sent to the server as null. It is an error if a 3225 // field in this list has a non-empty value. This may be used to include 3226 // null fields in Patch requests. 3227 NullFields []string `json:"-"` 3228} 3229 3230func (s *ListBidResponsesWithoutBidsResponse) MarshalJSON() ([]byte, error) { 3231 type NoMethod ListBidResponsesWithoutBidsResponse 3232 raw := NoMethod(*s) 3233 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3234} 3235 3236type ListClientUserInvitationsResponse struct { 3237 // Invitations: The returned list of client users. 3238 Invitations []*ClientUserInvitation `json:"invitations,omitempty"` 3239 3240 // NextPageToken: A token to retrieve the next page of results. Pass 3241 // this value in the ListClientUserInvitationsRequest.pageToken field in 3242 // the subsequent call to the clients.invitations.list method to 3243 // retrieve the next page of results. 3244 NextPageToken string `json:"nextPageToken,omitempty"` 3245 3246 // ServerResponse contains the HTTP response code and headers from the 3247 // server. 3248 googleapi.ServerResponse `json:"-"` 3249 3250 // ForceSendFields is a list of field names (e.g. "Invitations") to 3251 // unconditionally include in API requests. By default, fields with 3252 // empty values are omitted from API requests. However, any non-pointer, 3253 // non-interface field appearing in ForceSendFields will be sent to the 3254 // server regardless of whether the field is empty or not. This may be 3255 // used to include empty fields in Patch requests. 3256 ForceSendFields []string `json:"-"` 3257 3258 // NullFields is a list of field names (e.g. "Invitations") to include 3259 // in API requests with the JSON null value. By default, fields with 3260 // empty values are omitted from API requests. However, any field with 3261 // an empty value appearing in NullFields will be sent to the server as 3262 // null. It is an error if a field in this list has a non-empty value. 3263 // This may be used to include null fields in Patch requests. 3264 NullFields []string `json:"-"` 3265} 3266 3267func (s *ListClientUserInvitationsResponse) MarshalJSON() ([]byte, error) { 3268 type NoMethod ListClientUserInvitationsResponse 3269 raw := NoMethod(*s) 3270 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3271} 3272 3273type ListClientUsersResponse struct { 3274 // NextPageToken: A token to retrieve the next page of results. Pass 3275 // this value in the ListClientUsersRequest.pageToken field in the 3276 // subsequent call to the clients.invitations.list method to retrieve 3277 // the next page of results. 3278 NextPageToken string `json:"nextPageToken,omitempty"` 3279 3280 // Users: The returned list of client users. 3281 Users []*ClientUser `json:"users,omitempty"` 3282 3283 // ServerResponse contains the HTTP response code and headers from the 3284 // server. 3285 googleapi.ServerResponse `json:"-"` 3286 3287 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 3288 // unconditionally include in API requests. By default, fields with 3289 // empty values are omitted from API requests. However, any non-pointer, 3290 // non-interface field appearing in ForceSendFields will be sent to the 3291 // server regardless of whether the field is empty or not. This may be 3292 // used to include empty fields in Patch requests. 3293 ForceSendFields []string `json:"-"` 3294 3295 // NullFields is a list of field names (e.g. "NextPageToken") to include 3296 // in API requests with the JSON null value. By default, fields with 3297 // empty values are omitted from API requests. However, any field with 3298 // an empty value appearing in NullFields will be sent to the server as 3299 // null. It is an error if a field in this list has a non-empty value. 3300 // This may be used to include null fields in Patch requests. 3301 NullFields []string `json:"-"` 3302} 3303 3304func (s *ListClientUsersResponse) MarshalJSON() ([]byte, error) { 3305 type NoMethod ListClientUsersResponse 3306 raw := NoMethod(*s) 3307 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3308} 3309 3310type ListClientsResponse struct { 3311 // Clients: The returned list of clients. 3312 Clients []*Client `json:"clients,omitempty"` 3313 3314 // NextPageToken: A token to retrieve the next page of results. Pass 3315 // this value in the ListClientsRequest.pageToken field in the 3316 // subsequent call to the accounts.clients.list method to retrieve the 3317 // next page of results. 3318 NextPageToken string `json:"nextPageToken,omitempty"` 3319 3320 // ServerResponse contains the HTTP response code and headers from the 3321 // server. 3322 googleapi.ServerResponse `json:"-"` 3323 3324 // ForceSendFields is a list of field names (e.g. "Clients") to 3325 // unconditionally include in API requests. By default, fields with 3326 // empty values are omitted from API requests. However, any non-pointer, 3327 // non-interface field appearing in ForceSendFields will be sent to the 3328 // server regardless of whether the field is empty or not. This may be 3329 // used to include empty fields in Patch requests. 3330 ForceSendFields []string `json:"-"` 3331 3332 // NullFields is a list of field names (e.g. "Clients") to include in 3333 // API requests with the JSON null value. By default, fields with empty 3334 // values are omitted from API requests. However, any field with an 3335 // empty value appearing in NullFields will be sent to the server as 3336 // null. It is an error if a field in this list has a non-empty value. 3337 // This may be used to include null fields in Patch requests. 3338 NullFields []string `json:"-"` 3339} 3340 3341func (s *ListClientsResponse) MarshalJSON() ([]byte, error) { 3342 type NoMethod ListClientsResponse 3343 raw := NoMethod(*s) 3344 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3345} 3346 3347// ListCreativeStatusBreakdownByCreativeResponse: Response message for 3348// listing all creatives associated with a given filtered bid reason. 3349type ListCreativeStatusBreakdownByCreativeResponse struct { 3350 // FilteredBidCreativeRows: List of rows, with counts of bids with a 3351 // given creative status aggregated by creative. 3352 FilteredBidCreativeRows []*FilteredBidCreativeRow `json:"filteredBidCreativeRows,omitempty"` 3353 3354 // NextPageToken: A token to retrieve the next page of results. Pass 3355 // this value in the 3356 // ListCreativeStatusBreakdownByCreativeRequest.pageToken field in the 3357 // subsequent call to the filteredBids.creatives.list method to retrieve 3358 // the next page of results. 3359 NextPageToken string `json:"nextPageToken,omitempty"` 3360 3361 // ServerResponse contains the HTTP response code and headers from the 3362 // server. 3363 googleapi.ServerResponse `json:"-"` 3364 3365 // ForceSendFields is a list of field names (e.g. 3366 // "FilteredBidCreativeRows") to unconditionally include in API 3367 // requests. By default, fields with empty values are omitted from API 3368 // requests. However, any non-pointer, non-interface field appearing in 3369 // ForceSendFields will be sent to the server regardless of whether the 3370 // field is empty or not. This may be used to include empty fields in 3371 // Patch requests. 3372 ForceSendFields []string `json:"-"` 3373 3374 // NullFields is a list of field names (e.g. "FilteredBidCreativeRows") 3375 // to include in API requests with the JSON null value. By default, 3376 // fields with empty values are omitted from API requests. However, any 3377 // field with an empty value appearing in NullFields will be sent to the 3378 // server as null. It is an error if a field in this list has a 3379 // non-empty value. This may be used to include null fields in Patch 3380 // requests. 3381 NullFields []string `json:"-"` 3382} 3383 3384func (s *ListCreativeStatusBreakdownByCreativeResponse) MarshalJSON() ([]byte, error) { 3385 type NoMethod ListCreativeStatusBreakdownByCreativeResponse 3386 raw := NoMethod(*s) 3387 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3388} 3389 3390// ListCreativeStatusBreakdownByDetailResponse: Response message for 3391// listing all details associated with a given filtered bid reason. 3392type ListCreativeStatusBreakdownByDetailResponse struct { 3393 // DetailType: The type of detail that the detail IDs represent. 3394 // 3395 // Possible values: 3396 // "DETAIL_TYPE_UNSPECIFIED" - A placeholder for an undefined status. 3397 // This value will never be returned in responses. 3398 // "CREATIVE_ATTRIBUTE" - Indicates that the detail ID refers to a 3399 // creative attribute; see 3400 // [publisher-excludable-creative-attributes](https://developers.google.c 3401 // om/authorized-buyers/rtb/downloads/publisher-excludable-creative-attri 3402 // butes). 3403 // "VENDOR" - Indicates that the detail ID refers to a vendor; see 3404 // [vendors](https://developers.google.com/authorized-buyers/rtb/download 3405 // s/vendors). This namespace is different from that of the `ATP_VENDOR` 3406 // detail type. 3407 // "SENSITIVE_CATEGORY" - Indicates that the detail ID refers to a 3408 // sensitive category; see 3409 // [ad-sensitive-categories](https://developers.google.com/authorized-buy 3410 // ers/rtb/downloads/ad-sensitive-categories). 3411 // "PRODUCT_CATEGORY" - Indicates that the detail ID refers to a 3412 // product category; see 3413 // [ad-product-categories](https://developers.google.com/authorized-buyer 3414 // s/rtb/downloads/ad-product-categories). 3415 // "DISAPPROVAL_REASON" - Indicates that the detail ID refers to a 3416 // disapproval reason; see DisapprovalReason enum in 3417 // [snippet-status-report-proto](https://developers.google.com/authorized 3418 // -buyers/rtb/downloads/snippet-status-report-proto). 3419 // "POLICY_TOPIC" - Indicates that the detail ID refers to a policy 3420 // topic. 3421 // "ATP_VENDOR" - Indicates that the detail ID refers to an ad 3422 // technology provider (ATP); see [providers] 3423 // (https://storage.googleapis.com/adx-rtb-dictionaries/providers.csv). 3424 // This namespace is different from the `VENDOR` detail type; see [ad 3425 // technology 3426 // providers](https://support.google.com/admanager/answer/9012903) for 3427 // more information. 3428 // "VENDOR_DOMAIN" - Indicates that the detail string refers the 3429 // domain of an unknown vendor. 3430 // "GVL_ID" - Indicates that the detail ID refers an IAB GVL ID which 3431 // Google did not detect in the latest TCF Vendor List. See [Global 3432 // Vendor List] (https://vendor-list.consensu.org/v2/vendor-list.json) 3433 DetailType string `json:"detailType,omitempty"` 3434 3435 // FilteredBidDetailRows: List of rows, with counts of bids with a given 3436 // creative status aggregated by detail. 3437 FilteredBidDetailRows []*FilteredBidDetailRow `json:"filteredBidDetailRows,omitempty"` 3438 3439 // NextPageToken: A token to retrieve the next page of results. Pass 3440 // this value in the 3441 // ListCreativeStatusBreakdownByDetailRequest.pageToken field in the 3442 // subsequent call to the filteredBids.details.list method to retrieve 3443 // the next page of results. 3444 NextPageToken string `json:"nextPageToken,omitempty"` 3445 3446 // ServerResponse contains the HTTP response code and headers from the 3447 // server. 3448 googleapi.ServerResponse `json:"-"` 3449 3450 // ForceSendFields is a list of field names (e.g. "DetailType") to 3451 // unconditionally include in API requests. By default, fields with 3452 // empty values are omitted from API requests. However, any non-pointer, 3453 // non-interface field appearing in ForceSendFields will be sent to the 3454 // server regardless of whether the field is empty or not. This may be 3455 // used to include empty fields in Patch requests. 3456 ForceSendFields []string `json:"-"` 3457 3458 // NullFields is a list of field names (e.g. "DetailType") to include in 3459 // API requests with the JSON null value. By default, fields with empty 3460 // values are omitted from API requests. However, any field with an 3461 // empty value appearing in NullFields will be sent to the server as 3462 // null. It is an error if a field in this list has a non-empty value. 3463 // This may be used to include null fields in Patch requests. 3464 NullFields []string `json:"-"` 3465} 3466 3467func (s *ListCreativeStatusBreakdownByDetailResponse) MarshalJSON() ([]byte, error) { 3468 type NoMethod ListCreativeStatusBreakdownByDetailResponse 3469 raw := NoMethod(*s) 3470 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3471} 3472 3473// ListCreativesResponse: A response for listing creatives. 3474type ListCreativesResponse struct { 3475 // Creatives: The list of creatives. 3476 Creatives []*Creative `json:"creatives,omitempty"` 3477 3478 // NextPageToken: A token to retrieve the next page of results. Pass 3479 // this value in the ListCreativesRequest.page_token field in the 3480 // subsequent call to `ListCreatives` method to retrieve the next page 3481 // of results. 3482 NextPageToken string `json:"nextPageToken,omitempty"` 3483 3484 // ServerResponse contains the HTTP response code and headers from the 3485 // server. 3486 googleapi.ServerResponse `json:"-"` 3487 3488 // ForceSendFields is a list of field names (e.g. "Creatives") to 3489 // unconditionally include in API requests. By default, fields with 3490 // empty values are omitted from API requests. However, any non-pointer, 3491 // non-interface field appearing in ForceSendFields will be sent to the 3492 // server regardless of whether the field is empty or not. This may be 3493 // used to include empty fields in Patch requests. 3494 ForceSendFields []string `json:"-"` 3495 3496 // NullFields is a list of field names (e.g. "Creatives") to include in 3497 // API requests with the JSON null value. By default, fields with empty 3498 // values are omitted from API requests. However, any field with an 3499 // empty value appearing in NullFields will be sent to the server as 3500 // null. It is an error if a field in this list has a non-empty value. 3501 // This may be used to include null fields in Patch requests. 3502 NullFields []string `json:"-"` 3503} 3504 3505func (s *ListCreativesResponse) MarshalJSON() ([]byte, error) { 3506 type NoMethod ListCreativesResponse 3507 raw := NoMethod(*s) 3508 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3509} 3510 3511// ListDealAssociationsResponse: A response for listing creative and 3512// deal associations 3513type ListDealAssociationsResponse struct { 3514 // Associations: The list of associations. 3515 Associations []*CreativeDealAssociation `json:"associations,omitempty"` 3516 3517 // NextPageToken: A token to retrieve the next page of results. Pass 3518 // this value in the ListDealAssociationsRequest.page_token field in the 3519 // subsequent call to 'ListDealAssociation' method to retrieve the next 3520 // page of results. 3521 NextPageToken string `json:"nextPageToken,omitempty"` 3522 3523 // ServerResponse contains the HTTP response code and headers from the 3524 // server. 3525 googleapi.ServerResponse `json:"-"` 3526 3527 // ForceSendFields is a list of field names (e.g. "Associations") to 3528 // unconditionally include in API requests. By default, fields with 3529 // empty values are omitted from API requests. However, any non-pointer, 3530 // non-interface field appearing in ForceSendFields will be sent to the 3531 // server regardless of whether the field is empty or not. This may be 3532 // used to include empty fields in Patch requests. 3533 ForceSendFields []string `json:"-"` 3534 3535 // NullFields is a list of field names (e.g. "Associations") to include 3536 // in API requests with the JSON null value. By default, fields with 3537 // empty values are omitted from API requests. However, any field with 3538 // an empty value appearing in NullFields will be sent to the server as 3539 // null. It is an error if a field in this list has a non-empty value. 3540 // This may be used to include null fields in Patch requests. 3541 NullFields []string `json:"-"` 3542} 3543 3544func (s *ListDealAssociationsResponse) MarshalJSON() ([]byte, error) { 3545 type NoMethod ListDealAssociationsResponse 3546 raw := NoMethod(*s) 3547 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3548} 3549 3550// ListFilterSetsResponse: Response message for listing filter sets. 3551type ListFilterSetsResponse struct { 3552 // FilterSets: The filter sets belonging to the buyer. 3553 FilterSets []*FilterSet `json:"filterSets,omitempty"` 3554 3555 // NextPageToken: A token to retrieve the next page of results. Pass 3556 // this value in the ListFilterSetsRequest.pageToken field in the 3557 // subsequent call to the accounts.filterSets.list method to retrieve 3558 // the next page of results. 3559 NextPageToken string `json:"nextPageToken,omitempty"` 3560 3561 // ServerResponse contains the HTTP response code and headers from the 3562 // server. 3563 googleapi.ServerResponse `json:"-"` 3564 3565 // ForceSendFields is a list of field names (e.g. "FilterSets") to 3566 // unconditionally include in API requests. By default, fields with 3567 // empty values are omitted from API requests. However, any non-pointer, 3568 // non-interface field appearing in ForceSendFields will be sent to the 3569 // server regardless of whether the field is empty or not. This may be 3570 // used to include empty fields in Patch requests. 3571 ForceSendFields []string `json:"-"` 3572 3573 // NullFields is a list of field names (e.g. "FilterSets") to include in 3574 // API requests with the JSON null value. By default, fields with empty 3575 // values are omitted from API requests. However, any field with an 3576 // empty value appearing in NullFields will be sent to the server as 3577 // null. It is an error if a field in this list has a non-empty value. 3578 // This may be used to include null fields in Patch requests. 3579 NullFields []string `json:"-"` 3580} 3581 3582func (s *ListFilterSetsResponse) MarshalJSON() ([]byte, error) { 3583 type NoMethod ListFilterSetsResponse 3584 raw := NoMethod(*s) 3585 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3586} 3587 3588// ListFilteredBidRequestsResponse: Response message for listing all 3589// reasons that bid requests were filtered and not sent to the buyer. 3590type ListFilteredBidRequestsResponse struct { 3591 // CalloutStatusRows: List of rows, with counts of filtered bid requests 3592 // aggregated by callout status. 3593 CalloutStatusRows []*CalloutStatusRow `json:"calloutStatusRows,omitempty"` 3594 3595 // NextPageToken: A token to retrieve the next page of results. Pass 3596 // this value in the ListFilteredBidRequestsRequest.pageToken field in 3597 // the subsequent call to the filteredBidRequests.list method to 3598 // retrieve the next page of results. 3599 NextPageToken string `json:"nextPageToken,omitempty"` 3600 3601 // ServerResponse contains the HTTP response code and headers from the 3602 // server. 3603 googleapi.ServerResponse `json:"-"` 3604 3605 // ForceSendFields is a list of field names (e.g. "CalloutStatusRows") 3606 // to unconditionally include in API requests. By default, fields with 3607 // empty values are omitted from API requests. However, any non-pointer, 3608 // non-interface field appearing in ForceSendFields will be sent to the 3609 // server regardless of whether the field is empty or not. This may be 3610 // used to include empty fields in Patch requests. 3611 ForceSendFields []string `json:"-"` 3612 3613 // NullFields is a list of field names (e.g. "CalloutStatusRows") to 3614 // include in API requests with the JSON null value. By default, fields 3615 // with empty values are omitted from API requests. However, any field 3616 // with an empty value appearing in NullFields will be sent to the 3617 // server as null. It is an error if a field in this list has a 3618 // non-empty value. This may be used to include null fields in Patch 3619 // requests. 3620 NullFields []string `json:"-"` 3621} 3622 3623func (s *ListFilteredBidRequestsResponse) MarshalJSON() ([]byte, error) { 3624 type NoMethod ListFilteredBidRequestsResponse 3625 raw := NoMethod(*s) 3626 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3627} 3628 3629// ListFilteredBidsResponse: Response message for listing all reasons 3630// that bids were filtered from the auction. 3631type ListFilteredBidsResponse struct { 3632 // CreativeStatusRows: List of rows, with counts of filtered bids 3633 // aggregated by filtering reason (i.e. creative status). 3634 CreativeStatusRows []*CreativeStatusRow `json:"creativeStatusRows,omitempty"` 3635 3636 // NextPageToken: A token to retrieve the next page of results. Pass 3637 // this value in the ListFilteredBidsRequest.pageToken field in the 3638 // subsequent call to the filteredBids.list method to retrieve the next 3639 // page of results. 3640 NextPageToken string `json:"nextPageToken,omitempty"` 3641 3642 // ServerResponse contains the HTTP response code and headers from the 3643 // server. 3644 googleapi.ServerResponse `json:"-"` 3645 3646 // ForceSendFields is a list of field names (e.g. "CreativeStatusRows") 3647 // to unconditionally include in API requests. By default, fields with 3648 // empty values are omitted from API requests. However, any non-pointer, 3649 // non-interface field appearing in ForceSendFields will be sent to the 3650 // server regardless of whether the field is empty or not. This may be 3651 // used to include empty fields in Patch requests. 3652 ForceSendFields []string `json:"-"` 3653 3654 // NullFields is a list of field names (e.g. "CreativeStatusRows") to 3655 // include in API requests with the JSON null value. By default, fields 3656 // with empty values are omitted from API requests. However, any field 3657 // with an empty value appearing in NullFields will be sent to the 3658 // server as null. It is an error if a field in this list has a 3659 // non-empty value. This may be used to include null fields in Patch 3660 // requests. 3661 NullFields []string `json:"-"` 3662} 3663 3664func (s *ListFilteredBidsResponse) MarshalJSON() ([]byte, error) { 3665 type NoMethod ListFilteredBidsResponse 3666 raw := NoMethod(*s) 3667 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3668} 3669 3670// ListImpressionMetricsResponse: Response message for listing the 3671// metrics that are measured in number of impressions. 3672type ListImpressionMetricsResponse struct { 3673 // ImpressionMetricsRows: List of rows, each containing a set of 3674 // impression metrics. 3675 ImpressionMetricsRows []*ImpressionMetricsRow `json:"impressionMetricsRows,omitempty"` 3676 3677 // NextPageToken: A token to retrieve the next page of results. Pass 3678 // this value in the ListImpressionMetricsRequest.pageToken field in the 3679 // subsequent call to the impressionMetrics.list method to retrieve the 3680 // next page of results. 3681 NextPageToken string `json:"nextPageToken,omitempty"` 3682 3683 // ServerResponse contains the HTTP response code and headers from the 3684 // server. 3685 googleapi.ServerResponse `json:"-"` 3686 3687 // ForceSendFields is a list of field names (e.g. 3688 // "ImpressionMetricsRows") to unconditionally include in API requests. 3689 // By default, fields with empty values are omitted from API requests. 3690 // However, any non-pointer, non-interface field appearing in 3691 // ForceSendFields will be sent to the server regardless of whether the 3692 // field is empty or not. This may be used to include empty fields in 3693 // Patch requests. 3694 ForceSendFields []string `json:"-"` 3695 3696 // NullFields is a list of field names (e.g. "ImpressionMetricsRows") to 3697 // include in API requests with the JSON null value. By default, fields 3698 // with empty values are omitted from API requests. However, any field 3699 // with an empty value appearing in NullFields will be sent to the 3700 // server as null. It is an error if a field in this list has a 3701 // non-empty value. This may be used to include null fields in Patch 3702 // requests. 3703 NullFields []string `json:"-"` 3704} 3705 3706func (s *ListImpressionMetricsResponse) MarshalJSON() ([]byte, error) { 3707 type NoMethod ListImpressionMetricsResponse 3708 raw := NoMethod(*s) 3709 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3710} 3711 3712// ListLosingBidsResponse: Response message for listing all reasons that 3713// bids lost in the auction. 3714type ListLosingBidsResponse struct { 3715 // CreativeStatusRows: List of rows, with counts of losing bids 3716 // aggregated by loss reason (i.e. creative status). 3717 CreativeStatusRows []*CreativeStatusRow `json:"creativeStatusRows,omitempty"` 3718 3719 // NextPageToken: A token to retrieve the next page of results. Pass 3720 // this value in the ListLosingBidsRequest.pageToken field in the 3721 // subsequent call to the losingBids.list method to retrieve the next 3722 // page of results. 3723 NextPageToken string `json:"nextPageToken,omitempty"` 3724 3725 // ServerResponse contains the HTTP response code and headers from the 3726 // server. 3727 googleapi.ServerResponse `json:"-"` 3728 3729 // ForceSendFields is a list of field names (e.g. "CreativeStatusRows") 3730 // to unconditionally include in API requests. By default, fields with 3731 // empty values are omitted from API requests. However, any non-pointer, 3732 // non-interface field appearing in ForceSendFields will be sent to the 3733 // server regardless of whether the field is empty or not. This may be 3734 // used to include empty fields in Patch requests. 3735 ForceSendFields []string `json:"-"` 3736 3737 // NullFields is a list of field names (e.g. "CreativeStatusRows") to 3738 // include in API requests with the JSON null value. By default, fields 3739 // with empty values are omitted from API requests. However, any field 3740 // with an empty value appearing in NullFields will be sent to the 3741 // server as null. It is an error if a field in this list has a 3742 // non-empty value. This may be used to include null fields in Patch 3743 // requests. 3744 NullFields []string `json:"-"` 3745} 3746 3747func (s *ListLosingBidsResponse) MarshalJSON() ([]byte, error) { 3748 type NoMethod ListLosingBidsResponse 3749 raw := NoMethod(*s) 3750 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3751} 3752 3753// ListNonBillableWinningBidsResponse: Response message for listing all 3754// reasons for which a buyer was not billed for a winning bid. 3755type ListNonBillableWinningBidsResponse struct { 3756 // NextPageToken: A token to retrieve the next page of results. Pass 3757 // this value in the ListNonBillableWinningBidsRequest.pageToken field 3758 // in the subsequent call to the nonBillableWinningBids.list method to 3759 // retrieve the next page of results. 3760 NextPageToken string `json:"nextPageToken,omitempty"` 3761 3762 // NonBillableWinningBidStatusRows: List of rows, with counts of bids 3763 // not billed aggregated by reason. 3764 NonBillableWinningBidStatusRows []*NonBillableWinningBidStatusRow `json:"nonBillableWinningBidStatusRows,omitempty"` 3765 3766 // ServerResponse contains the HTTP response code and headers from the 3767 // server. 3768 googleapi.ServerResponse `json:"-"` 3769 3770 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 3771 // unconditionally include in API requests. By default, fields with 3772 // empty values are omitted from API requests. However, any non-pointer, 3773 // non-interface field appearing in ForceSendFields will be sent to the 3774 // server regardless of whether the field is empty or not. This may be 3775 // used to include empty fields in Patch requests. 3776 ForceSendFields []string `json:"-"` 3777 3778 // NullFields is a list of field names (e.g. "NextPageToken") to include 3779 // in API requests with the JSON null value. By default, fields with 3780 // empty values are omitted from API requests. However, any field with 3781 // an empty value appearing in NullFields will be sent to the server as 3782 // null. It is an error if a field in this list has a non-empty value. 3783 // This may be used to include null fields in Patch requests. 3784 NullFields []string `json:"-"` 3785} 3786 3787func (s *ListNonBillableWinningBidsResponse) MarshalJSON() ([]byte, error) { 3788 type NoMethod ListNonBillableWinningBidsResponse 3789 raw := NoMethod(*s) 3790 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3791} 3792 3793// ListProductsResponse: Response message for listing products visible 3794// to the buyer. 3795type ListProductsResponse struct { 3796 // NextPageToken: List pagination support. 3797 NextPageToken string `json:"nextPageToken,omitempty"` 3798 3799 // Products: The list of matching products at their head revision 3800 // number. 3801 Products []*Product `json:"products,omitempty"` 3802 3803 // ServerResponse contains the HTTP response code and headers from the 3804 // server. 3805 googleapi.ServerResponse `json:"-"` 3806 3807 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 3808 // unconditionally include in API requests. By default, fields with 3809 // empty values are omitted from API requests. However, any non-pointer, 3810 // non-interface field appearing in ForceSendFields will be sent to the 3811 // server regardless of whether the field is empty or not. This may be 3812 // used to include empty fields in Patch requests. 3813 ForceSendFields []string `json:"-"` 3814 3815 // NullFields is a list of field names (e.g. "NextPageToken") to include 3816 // in API requests with the JSON null value. By default, fields with 3817 // empty values are omitted from API requests. However, any field with 3818 // an empty value appearing in NullFields will be sent to the server as 3819 // null. It is an error if a field in this list has a non-empty value. 3820 // This may be used to include null fields in Patch requests. 3821 NullFields []string `json:"-"` 3822} 3823 3824func (s *ListProductsResponse) MarshalJSON() ([]byte, error) { 3825 type NoMethod ListProductsResponse 3826 raw := NoMethod(*s) 3827 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3828} 3829 3830// ListProposalsResponse: Response message for listing proposals. 3831type ListProposalsResponse struct { 3832 // NextPageToken: Continuation token for fetching the next page of 3833 // results. 3834 NextPageToken string `json:"nextPageToken,omitempty"` 3835 3836 // Proposals: The list of proposals. 3837 Proposals []*Proposal `json:"proposals,omitempty"` 3838 3839 // ServerResponse contains the HTTP response code and headers from the 3840 // server. 3841 googleapi.ServerResponse `json:"-"` 3842 3843 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 3844 // unconditionally include in API requests. By default, fields with 3845 // empty values are omitted from API requests. However, any non-pointer, 3846 // non-interface field appearing in ForceSendFields will be sent to the 3847 // server regardless of whether the field is empty or not. This may be 3848 // used to include empty fields in Patch requests. 3849 ForceSendFields []string `json:"-"` 3850 3851 // NullFields is a list of field names (e.g. "NextPageToken") to include 3852 // in API requests with the JSON null value. By default, fields with 3853 // empty values are omitted from API requests. However, any field with 3854 // an empty value appearing in NullFields will be sent to the server as 3855 // null. It is an error if a field in this list has a non-empty value. 3856 // This may be used to include null fields in Patch requests. 3857 NullFields []string `json:"-"` 3858} 3859 3860func (s *ListProposalsResponse) MarshalJSON() ([]byte, error) { 3861 type NoMethod ListProposalsResponse 3862 raw := NoMethod(*s) 3863 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3864} 3865 3866// ListPublisherProfilesResponse: Response message for profiles visible 3867// to the buyer. 3868type ListPublisherProfilesResponse struct { 3869 // NextPageToken: List pagination support 3870 NextPageToken string `json:"nextPageToken,omitempty"` 3871 3872 // PublisherProfiles: The list of matching publisher profiles. 3873 PublisherProfiles []*PublisherProfile `json:"publisherProfiles,omitempty"` 3874 3875 // ServerResponse contains the HTTP response code and headers from the 3876 // server. 3877 googleapi.ServerResponse `json:"-"` 3878 3879 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 3880 // unconditionally include in API requests. By default, fields with 3881 // empty values are omitted from API requests. However, any non-pointer, 3882 // non-interface field appearing in ForceSendFields will be sent to the 3883 // server regardless of whether the field is empty or not. This may be 3884 // used to include empty fields in Patch requests. 3885 ForceSendFields []string `json:"-"` 3886 3887 // NullFields is a list of field names (e.g. "NextPageToken") to include 3888 // in API requests with the JSON null value. By default, fields with 3889 // empty values are omitted from API requests. However, any field with 3890 // an empty value appearing in NullFields will be sent to the server as 3891 // null. It is an error if a field in this list has a non-empty value. 3892 // This may be used to include null fields in Patch requests. 3893 NullFields []string `json:"-"` 3894} 3895 3896func (s *ListPublisherProfilesResponse) MarshalJSON() ([]byte, error) { 3897 type NoMethod ListPublisherProfilesResponse 3898 raw := NoMethod(*s) 3899 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3900} 3901 3902// LocationContext: Output only. The Geo criteria the restriction 3903// applies to. 3904type LocationContext struct { 3905 // GeoCriteriaIds: IDs representing the geo location for this context. 3906 // Please refer to the geo-table.csv 3907 // (https://storage.googleapis.com/adx-rtb-dictionaries/geo-table.csv) 3908 // file for different geo criteria IDs. 3909 GeoCriteriaIds []int64 `json:"geoCriteriaIds,omitempty"` 3910 3911 // ForceSendFields is a list of field names (e.g. "GeoCriteriaIds") to 3912 // unconditionally include in API requests. By default, fields with 3913 // empty values are omitted from API requests. However, any non-pointer, 3914 // non-interface field appearing in ForceSendFields will be sent to the 3915 // server regardless of whether the field is empty or not. This may be 3916 // used to include empty fields in Patch requests. 3917 ForceSendFields []string `json:"-"` 3918 3919 // NullFields is a list of field names (e.g. "GeoCriteriaIds") to 3920 // include in API requests with the JSON null value. By default, fields 3921 // with empty values are omitted from API requests. However, any field 3922 // with an empty value appearing in NullFields will be sent to the 3923 // server as null. It is an error if a field in this list has a 3924 // non-empty value. This may be used to include null fields in Patch 3925 // requests. 3926 NullFields []string `json:"-"` 3927} 3928 3929func (s *LocationContext) MarshalJSON() ([]byte, error) { 3930 type NoMethod LocationContext 3931 raw := NoMethod(*s) 3932 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3933} 3934 3935// MarketplaceTargeting: Targeting represents different criteria that 3936// can be used by advertisers to target ad inventory. For example, they 3937// can choose to target ad requests only if the user is in the US. 3938// Multiple types of targeting are always applied as a logical AND, 3939// unless noted otherwise. 3940type MarketplaceTargeting struct { 3941 // GeoTargeting: Geo criteria IDs to be included/excluded. 3942 GeoTargeting *CriteriaTargeting `json:"geoTargeting,omitempty"` 3943 3944 // InventorySizeTargeting: Inventory sizes to be included/excluded. 3945 InventorySizeTargeting *InventorySizeTargeting `json:"inventorySizeTargeting,omitempty"` 3946 3947 // PlacementTargeting: Placement targeting information, e.g., URL, 3948 // mobile applications. 3949 PlacementTargeting *PlacementTargeting `json:"placementTargeting,omitempty"` 3950 3951 // TechnologyTargeting: Technology targeting information, e.g., 3952 // operating system, device category. 3953 TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"` 3954 3955 // VideoTargeting: Video targeting information. 3956 VideoTargeting *VideoTargeting `json:"videoTargeting,omitempty"` 3957 3958 // ForceSendFields is a list of field names (e.g. "GeoTargeting") to 3959 // unconditionally include in API requests. By default, fields with 3960 // empty values are omitted from API requests. However, any non-pointer, 3961 // non-interface field appearing in ForceSendFields will be sent to the 3962 // server regardless of whether the field is empty or not. This may be 3963 // used to include empty fields in Patch requests. 3964 ForceSendFields []string `json:"-"` 3965 3966 // NullFields is a list of field names (e.g. "GeoTargeting") to include 3967 // in API requests with the JSON null value. By default, fields with 3968 // empty values are omitted from API requests. However, any field with 3969 // an empty value appearing in NullFields will be sent to the server as 3970 // null. It is an error if a field in this list has a non-empty value. 3971 // This may be used to include null fields in Patch requests. 3972 NullFields []string `json:"-"` 3973} 3974 3975func (s *MarketplaceTargeting) MarshalJSON() ([]byte, error) { 3976 type NoMethod MarketplaceTargeting 3977 raw := NoMethod(*s) 3978 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3979} 3980 3981// MetricValue: A metric value, with an expected value and a variance; 3982// represents a count that may be either exact or estimated (i.e. when 3983// sampled). 3984type MetricValue struct { 3985 // Value: The expected value of the metric. 3986 Value int64 `json:"value,omitempty,string"` 3987 3988 // Variance: The variance (i.e. square of the standard deviation) of the 3989 // metric value. If value is exact, variance is 0. Can be used to 3990 // calculate margin of error as a percentage of value, using the 3991 // following formula, where Z is the standard constant that depends on 3992 // the desired size of the confidence interval (e.g. for 90% confidence 3993 // interval, use Z = 1.645): marginOfError = 100 * Z * sqrt(variance) / 3994 // value 3995 Variance int64 `json:"variance,omitempty,string"` 3996 3997 // ForceSendFields is a list of field names (e.g. "Value") to 3998 // unconditionally include in API requests. By default, fields with 3999 // empty values are omitted from API requests. However, any non-pointer, 4000 // non-interface field appearing in ForceSendFields will be sent to the 4001 // server regardless of whether the field is empty or not. This may be 4002 // used to include empty fields in Patch requests. 4003 ForceSendFields []string `json:"-"` 4004 4005 // NullFields is a list of field names (e.g. "Value") to include in API 4006 // requests with the JSON null value. By default, fields with empty 4007 // values are omitted from API requests. However, any field with an 4008 // empty value appearing in NullFields will be sent to the server as 4009 // null. It is an error if a field in this list has a non-empty value. 4010 // This may be used to include null fields in Patch requests. 4011 NullFields []string `json:"-"` 4012} 4013 4014func (s *MetricValue) MarshalJSON() ([]byte, error) { 4015 type NoMethod MetricValue 4016 raw := NoMethod(*s) 4017 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4018} 4019 4020// MobileApplicationTargeting: Mobile application targeting settings. 4021type MobileApplicationTargeting struct { 4022 // FirstPartyTargeting: Publisher owned apps to be targeted or excluded 4023 // by the publisher to display the ads in. 4024 FirstPartyTargeting *FirstPartyMobileApplicationTargeting `json:"firstPartyTargeting,omitempty"` 4025 4026 // ForceSendFields is a list of field names (e.g. "FirstPartyTargeting") 4027 // to unconditionally include in API requests. By default, fields with 4028 // empty values are omitted from API requests. However, any non-pointer, 4029 // non-interface field appearing in ForceSendFields will be sent to the 4030 // server regardless of whether the field is empty or not. This may be 4031 // used to include empty fields in Patch requests. 4032 ForceSendFields []string `json:"-"` 4033 4034 // NullFields is a list of field names (e.g. "FirstPartyTargeting") to 4035 // include in API requests with the JSON null value. By default, fields 4036 // with empty values are omitted from API requests. However, any field 4037 // with an empty value appearing in NullFields will be sent to the 4038 // server as null. It is an error if a field in this list has a 4039 // non-empty value. This may be used to include null fields in Patch 4040 // requests. 4041 NullFields []string `json:"-"` 4042} 4043 4044func (s *MobileApplicationTargeting) MarshalJSON() ([]byte, error) { 4045 type NoMethod MobileApplicationTargeting 4046 raw := NoMethod(*s) 4047 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4048} 4049 4050// Money: Represents an amount of money with its currency type. 4051type Money struct { 4052 // CurrencyCode: The three-letter currency code defined in ISO 4217. 4053 CurrencyCode string `json:"currencyCode,omitempty"` 4054 4055 // Nanos: Number of nano (10^-9) units of the amount. The value must be 4056 // between -999,999,999 and +999,999,999 inclusive. If `units` is 4057 // positive, `nanos` must be positive or zero. If `units` is zero, 4058 // `nanos` can be positive, zero, or negative. If `units` is negative, 4059 // `nanos` must be negative or zero. For example $-1.75 is represented 4060 // as `units`=-1 and `nanos`=-750,000,000. 4061 Nanos int64 `json:"nanos,omitempty"` 4062 4063 // Units: The whole units of the amount. For example if `currencyCode` 4064 // is "USD", then 1 unit is one US dollar. 4065 Units int64 `json:"units,omitempty,string"` 4066 4067 // ForceSendFields is a list of field names (e.g. "CurrencyCode") to 4068 // unconditionally include in API requests. By default, fields with 4069 // empty values are omitted from API requests. However, any non-pointer, 4070 // non-interface field appearing in ForceSendFields will be sent to the 4071 // server regardless of whether the field is empty or not. This may be 4072 // used to include empty fields in Patch requests. 4073 ForceSendFields []string `json:"-"` 4074 4075 // NullFields is a list of field names (e.g. "CurrencyCode") to include 4076 // in API requests with the JSON null value. By default, fields with 4077 // empty values are omitted from API requests. However, any field with 4078 // an empty value appearing in NullFields will be sent to the server as 4079 // null. It is an error if a field in this list has a non-empty value. 4080 // This may be used to include null fields in Patch requests. 4081 NullFields []string `json:"-"` 4082} 4083 4084func (s *Money) MarshalJSON() ([]byte, error) { 4085 type NoMethod Money 4086 raw := NoMethod(*s) 4087 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4088} 4089 4090// NativeContent: Native content for a creative. 4091type NativeContent struct { 4092 // AdvertiserName: The name of the advertiser or sponsor, to be 4093 // displayed in the ad creative. 4094 AdvertiserName string `json:"advertiserName,omitempty"` 4095 4096 // AppIcon: The app icon, for app download ads. 4097 AppIcon *Image `json:"appIcon,omitempty"` 4098 4099 // Body: A long description of the ad. 4100 Body string `json:"body,omitempty"` 4101 4102 // CallToAction: A label for the button that the user is supposed to 4103 // click. 4104 CallToAction string `json:"callToAction,omitempty"` 4105 4106 // ClickLinkUrl: The URL that the browser/SDK will load when the user 4107 // clicks the ad. 4108 ClickLinkUrl string `json:"clickLinkUrl,omitempty"` 4109 4110 // ClickTrackingUrl: The URL to use for click tracking. 4111 ClickTrackingUrl string `json:"clickTrackingUrl,omitempty"` 4112 4113 // Headline: A short title for the ad. 4114 Headline string `json:"headline,omitempty"` 4115 4116 // Image: A large image. 4117 Image *Image `json:"image,omitempty"` 4118 4119 // Logo: A smaller image, for the advertiser's logo. 4120 Logo *Image `json:"logo,omitempty"` 4121 4122 // PriceDisplayText: The price of the promoted app including currency 4123 // info. 4124 PriceDisplayText string `json:"priceDisplayText,omitempty"` 4125 4126 // StarRating: The app rating in the app store. Must be in the range 4127 // [0-5]. 4128 StarRating float64 `json:"starRating,omitempty"` 4129 4130 // StoreUrl: The URL to the app store to purchase/download the promoted 4131 // app. 4132 StoreUrl string `json:"storeUrl,omitempty"` 4133 4134 // VideoUrl: The URL to fetch a native video ad. 4135 VideoUrl string `json:"videoUrl,omitempty"` 4136 4137 // ForceSendFields is a list of field names (e.g. "AdvertiserName") to 4138 // unconditionally include in API requests. By default, fields with 4139 // empty values are omitted from API requests. However, any non-pointer, 4140 // non-interface field appearing in ForceSendFields will be sent to the 4141 // server regardless of whether the field is empty or not. This may be 4142 // used to include empty fields in Patch requests. 4143 ForceSendFields []string `json:"-"` 4144 4145 // NullFields is a list of field names (e.g. "AdvertiserName") to 4146 // include in API requests with the JSON null value. By default, fields 4147 // with empty values are omitted from API requests. However, any field 4148 // with an empty value appearing in NullFields will be sent to the 4149 // server as null. It is an error if a field in this list has a 4150 // non-empty value. This may be used to include null fields in Patch 4151 // requests. 4152 NullFields []string `json:"-"` 4153} 4154 4155func (s *NativeContent) MarshalJSON() ([]byte, error) { 4156 type NoMethod NativeContent 4157 raw := NoMethod(*s) 4158 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4159} 4160 4161func (s *NativeContent) UnmarshalJSON(data []byte) error { 4162 type NoMethod NativeContent 4163 var s1 struct { 4164 StarRating gensupport.JSONFloat64 `json:"starRating"` 4165 *NoMethod 4166 } 4167 s1.NoMethod = (*NoMethod)(s) 4168 if err := json.Unmarshal(data, &s1); err != nil { 4169 return err 4170 } 4171 s.StarRating = float64(s1.StarRating) 4172 return nil 4173} 4174 4175// NonBillableWinningBidStatusRow: The number of winning bids with the 4176// specified dimension values for which the buyer was not billed, as 4177// described by the specified status. 4178type NonBillableWinningBidStatusRow struct { 4179 // BidCount: The number of bids with the specified status. 4180 BidCount *MetricValue `json:"bidCount,omitempty"` 4181 4182 // RowDimensions: The values of all dimensions associated with metric 4183 // values in this row. 4184 RowDimensions *RowDimensions `json:"rowDimensions,omitempty"` 4185 4186 // Status: The status specifying why the winning bids were not billed. 4187 // 4188 // Possible values: 4189 // "STATUS_UNSPECIFIED" - A placeholder for an undefined status. This 4190 // value will never be returned in responses. 4191 // "AD_NOT_RENDERED" - The buyer was not billed because the ad was not 4192 // rendered by the publisher. 4193 // "INVALID_IMPRESSION" - The buyer was not billed because the 4194 // impression won by the bid was determined to be invalid. 4195 // "FATAL_VAST_ERROR" - A video impression was served but a fatal 4196 // error was reported from the client during playback. 4197 // "LOST_IN_MEDIATION" - The buyer was not billed because the ad was 4198 // outplaced in the mediation waterfall. 4199 Status string `json:"status,omitempty"` 4200 4201 // ForceSendFields is a list of field names (e.g. "BidCount") to 4202 // unconditionally include in API requests. By default, fields with 4203 // empty values are omitted from API requests. However, any non-pointer, 4204 // non-interface field appearing in ForceSendFields will be sent to the 4205 // server regardless of whether the field is empty or not. This may be 4206 // used to include empty fields in Patch requests. 4207 ForceSendFields []string `json:"-"` 4208 4209 // NullFields is a list of field names (e.g. "BidCount") to include in 4210 // API requests with the JSON null value. By default, fields with empty 4211 // values are omitted from API requests. However, any field with an 4212 // empty value appearing in NullFields will be sent to the server as 4213 // null. It is an error if a field in this list has a non-empty value. 4214 // This may be used to include null fields in Patch requests. 4215 NullFields []string `json:"-"` 4216} 4217 4218func (s *NonBillableWinningBidStatusRow) MarshalJSON() ([]byte, error) { 4219 type NoMethod NonBillableWinningBidStatusRow 4220 raw := NoMethod(*s) 4221 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4222} 4223 4224// NonGuaranteedAuctionTerms: Terms for Private Auctions. Note that 4225// Private Auctions can be created only by the seller, but they can be 4226// returned in a get or list request. 4227type NonGuaranteedAuctionTerms struct { 4228 // AutoOptimizePrivateAuction: True if open auction buyers are allowed 4229 // to compete with invited buyers in this private auction. 4230 AutoOptimizePrivateAuction bool `json:"autoOptimizePrivateAuction,omitempty"` 4231 4232 // ReservePricesPerBuyer: Reserve price for the specified buyer. 4233 ReservePricesPerBuyer []*PricePerBuyer `json:"reservePricesPerBuyer,omitempty"` 4234 4235 // ForceSendFields is a list of field names (e.g. 4236 // "AutoOptimizePrivateAuction") to unconditionally include in API 4237 // requests. By default, fields with empty values are omitted from API 4238 // requests. However, any non-pointer, non-interface field appearing in 4239 // ForceSendFields will be sent to the server regardless of whether the 4240 // field is empty or not. This may be used to include empty fields in 4241 // Patch requests. 4242 ForceSendFields []string `json:"-"` 4243 4244 // NullFields is a list of field names (e.g. 4245 // "AutoOptimizePrivateAuction") to include in API requests with the 4246 // JSON null value. By default, fields with empty values are omitted 4247 // from API requests. However, any field with an empty value appearing 4248 // in NullFields will be sent to the server as null. It is an error if a 4249 // field in this list has a non-empty value. This may be used to include 4250 // null fields in Patch requests. 4251 NullFields []string `json:"-"` 4252} 4253 4254func (s *NonGuaranteedAuctionTerms) MarshalJSON() ([]byte, error) { 4255 type NoMethod NonGuaranteedAuctionTerms 4256 raw := NoMethod(*s) 4257 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4258} 4259 4260// NonGuaranteedFixedPriceTerms: Terms for Preferred Deals. Note that 4261// Preferred Deals cannot be created via the API at this time, but can 4262// be returned in a get or list request. 4263type NonGuaranteedFixedPriceTerms struct { 4264 // FixedPrices: Fixed price for the specified buyer. 4265 FixedPrices []*PricePerBuyer `json:"fixedPrices,omitempty"` 4266 4267 // ForceSendFields is a list of field names (e.g. "FixedPrices") to 4268 // unconditionally include in API requests. By default, fields with 4269 // empty values are omitted from API requests. However, any non-pointer, 4270 // non-interface field appearing in ForceSendFields will be sent to the 4271 // server regardless of whether the field is empty or not. This may be 4272 // used to include empty fields in Patch requests. 4273 ForceSendFields []string `json:"-"` 4274 4275 // NullFields is a list of field names (e.g. "FixedPrices") to include 4276 // in API requests with the JSON null value. By default, fields with 4277 // empty values are omitted from API requests. However, any field with 4278 // an empty value appearing in NullFields will be sent to the server as 4279 // null. It is an error if a field in this list has a non-empty value. 4280 // This may be used to include null fields in Patch requests. 4281 NullFields []string `json:"-"` 4282} 4283 4284func (s *NonGuaranteedFixedPriceTerms) MarshalJSON() ([]byte, error) { 4285 type NoMethod NonGuaranteedFixedPriceTerms 4286 raw := NoMethod(*s) 4287 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4288} 4289 4290// Note: A proposal may be associated to several notes. 4291type Note struct { 4292 // CreateTime: Output only. The timestamp for when this note was 4293 // created. 4294 CreateTime string `json:"createTime,omitempty"` 4295 4296 // CreatorRole: Output only. The role of the person (buyer/seller) 4297 // creating the note. 4298 // 4299 // Possible values: 4300 // "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined 4301 // buyer/seller role. 4302 // "BUYER" - Specifies the role as buyer. 4303 // "SELLER" - Specifies the role as seller. 4304 CreatorRole string `json:"creatorRole,omitempty"` 4305 4306 // Note: The actual note to attach. (max-length: 1024 unicode code 4307 // units) Note: This field may be set only when creating the resource. 4308 // Modifying this field while updating the resource will result in an 4309 // error. 4310 Note string `json:"note,omitempty"` 4311 4312 // NoteId: Output only. The unique ID for the note. 4313 NoteId string `json:"noteId,omitempty"` 4314 4315 // ProposalRevision: Output only. The revision number of the proposal 4316 // when the note is created. 4317 ProposalRevision int64 `json:"proposalRevision,omitempty,string"` 4318 4319 // ServerResponse contains the HTTP response code and headers from the 4320 // server. 4321 googleapi.ServerResponse `json:"-"` 4322 4323 // ForceSendFields is a list of field names (e.g. "CreateTime") to 4324 // unconditionally include in API requests. By default, fields with 4325 // empty values are omitted from API requests. However, any non-pointer, 4326 // non-interface field appearing in ForceSendFields will be sent to the 4327 // server regardless of whether the field is empty or not. This may be 4328 // used to include empty fields in Patch requests. 4329 ForceSendFields []string `json:"-"` 4330 4331 // NullFields is a list of field names (e.g. "CreateTime") to include in 4332 // API requests with the JSON null value. By default, fields with empty 4333 // values are omitted from API requests. However, any field with an 4334 // empty value appearing in NullFields will be sent to the server as 4335 // null. It is an error if a field in this list has a non-empty value. 4336 // This may be used to include null fields in Patch requests. 4337 NullFields []string `json:"-"` 4338} 4339 4340func (s *Note) MarshalJSON() ([]byte, error) { 4341 type NoMethod Note 4342 raw := NoMethod(*s) 4343 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4344} 4345 4346// OperatingSystemTargeting: Represents targeting information for 4347// operating systems. 4348type OperatingSystemTargeting struct { 4349 // OperatingSystemCriteria: IDs of operating systems to be 4350 // included/excluded. 4351 OperatingSystemCriteria *CriteriaTargeting `json:"operatingSystemCriteria,omitempty"` 4352 4353 // OperatingSystemVersionCriteria: IDs of operating system versions to 4354 // be included/excluded. 4355 OperatingSystemVersionCriteria *CriteriaTargeting `json:"operatingSystemVersionCriteria,omitempty"` 4356 4357 // ForceSendFields is a list of field names (e.g. 4358 // "OperatingSystemCriteria") to unconditionally include in API 4359 // requests. By default, fields with empty values are omitted from API 4360 // requests. However, any non-pointer, non-interface field appearing in 4361 // ForceSendFields will be sent to the server regardless of whether the 4362 // field is empty or not. This may be used to include empty fields in 4363 // Patch requests. 4364 ForceSendFields []string `json:"-"` 4365 4366 // NullFields is a list of field names (e.g. "OperatingSystemCriteria") 4367 // to include in API requests with the JSON null value. By default, 4368 // fields with empty values are omitted from API requests. However, any 4369 // field with an empty value appearing in NullFields will be sent to the 4370 // server as null. It is an error if a field in this list has a 4371 // non-empty value. This may be used to include null fields in Patch 4372 // requests. 4373 NullFields []string `json:"-"` 4374} 4375 4376func (s *OperatingSystemTargeting) MarshalJSON() ([]byte, error) { 4377 type NoMethod OperatingSystemTargeting 4378 raw := NoMethod(*s) 4379 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4380} 4381 4382// PauseProposalRequest: Request message to pause serving for an 4383// already-finalized proposal. 4384type PauseProposalRequest struct { 4385 // Reason: The reason why the proposal is being paused. This human 4386 // readable message will be displayed in the seller's UI. (Max length: 4387 // 1000 unicode code units.) 4388 Reason string `json:"reason,omitempty"` 4389 4390 // ForceSendFields is a list of field names (e.g. "Reason") to 4391 // unconditionally include in API requests. By default, fields with 4392 // empty values are omitted from API requests. However, any non-pointer, 4393 // non-interface field appearing in ForceSendFields will be sent to the 4394 // server regardless of whether the field is empty or not. This may be 4395 // used to include empty fields in Patch requests. 4396 ForceSendFields []string `json:"-"` 4397 4398 // NullFields is a list of field names (e.g. "Reason") to include in API 4399 // requests with the JSON null value. By default, fields with empty 4400 // values are omitted from API requests. However, any field with an 4401 // empty value appearing in NullFields will be sent to the server as 4402 // null. It is an error if a field in this list has a non-empty value. 4403 // This may be used to include null fields in Patch requests. 4404 NullFields []string `json:"-"` 4405} 4406 4407func (s *PauseProposalRequest) MarshalJSON() ([]byte, error) { 4408 type NoMethod PauseProposalRequest 4409 raw := NoMethod(*s) 4410 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4411} 4412 4413// PlacementTargeting: Represents targeting about where the ads can 4414// appear, e.g., certain sites or mobile applications. Different 4415// placement targeting types will be logically OR'ed. 4416type PlacementTargeting struct { 4417 // MobileApplicationTargeting: Mobile application targeting information 4418 // in a deal. This doesn't apply to Auction Packages. 4419 MobileApplicationTargeting *MobileApplicationTargeting `json:"mobileApplicationTargeting,omitempty"` 4420 4421 // UrlTargeting: URLs to be included/excluded. 4422 UrlTargeting *UrlTargeting `json:"urlTargeting,omitempty"` 4423 4424 // ForceSendFields is a list of field names (e.g. 4425 // "MobileApplicationTargeting") to unconditionally include in API 4426 // requests. By default, fields with empty values are omitted from API 4427 // requests. However, any non-pointer, non-interface field appearing in 4428 // ForceSendFields will be sent to the server regardless of whether the 4429 // field is empty or not. This may be used to include empty fields in 4430 // Patch requests. 4431 ForceSendFields []string `json:"-"` 4432 4433 // NullFields is a list of field names (e.g. 4434 // "MobileApplicationTargeting") to include in API requests with the 4435 // JSON null value. By default, fields with empty values are omitted 4436 // from API requests. However, any field with an empty value appearing 4437 // in NullFields will be sent to the server as null. It is an error if a 4438 // field in this list has a non-empty value. This may be used to include 4439 // null fields in Patch requests. 4440 NullFields []string `json:"-"` 4441} 4442 4443func (s *PlacementTargeting) MarshalJSON() ([]byte, error) { 4444 type NoMethod PlacementTargeting 4445 raw := NoMethod(*s) 4446 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4447} 4448 4449// PlatformContext: Output only. The type of platform the restriction 4450// applies to. 4451type PlatformContext struct { 4452 // Platforms: The platforms this restriction applies to. 4453 // 4454 // Possible values: 4455 // "DESKTOP" - Desktop platform. 4456 // "ANDROID" - Android platform. 4457 // "IOS" - iOS platform. 4458 Platforms []string `json:"platforms,omitempty"` 4459 4460 // ForceSendFields is a list of field names (e.g. "Platforms") to 4461 // unconditionally include in API requests. By default, fields with 4462 // empty values are omitted from API requests. However, any non-pointer, 4463 // non-interface field appearing in ForceSendFields will be sent to the 4464 // server regardless of whether the field is empty or not. This may be 4465 // used to include empty fields in Patch requests. 4466 ForceSendFields []string `json:"-"` 4467 4468 // NullFields is a list of field names (e.g. "Platforms") to include in 4469 // API requests with the JSON null value. By default, fields with empty 4470 // values are omitted from API requests. However, any field with an 4471 // empty value appearing in NullFields will be sent to the server as 4472 // null. It is an error if a field in this list has a non-empty value. 4473 // This may be used to include null fields in Patch requests. 4474 NullFields []string `json:"-"` 4475} 4476 4477func (s *PlatformContext) MarshalJSON() ([]byte, error) { 4478 type NoMethod PlatformContext 4479 raw := NoMethod(*s) 4480 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4481} 4482 4483// Price: Represents a price and a pricing type for a product / deal. 4484type Price struct { 4485 // Amount: The actual price with currency specified. 4486 Amount *Money `json:"amount,omitempty"` 4487 4488 // PricingType: The pricing type for the deal/product. (default: CPM) 4489 // 4490 // Possible values: 4491 // "PRICING_TYPE_UNSPECIFIED" - A placeholder for an undefined pricing 4492 // type. If the pricing type is unpsecified, `COST_PER_MILLE` will be 4493 // used instead. 4494 // "COST_PER_MILLE" - Cost per thousand impressions. 4495 // "COST_PER_DAY" - Cost per day 4496 PricingType string `json:"pricingType,omitempty"` 4497 4498 // ForceSendFields is a list of field names (e.g. "Amount") to 4499 // unconditionally include in API requests. By default, fields with 4500 // empty values are omitted from API requests. However, any non-pointer, 4501 // non-interface field appearing in ForceSendFields will be sent to the 4502 // server regardless of whether the field is empty or not. This may be 4503 // used to include empty fields in Patch requests. 4504 ForceSendFields []string `json:"-"` 4505 4506 // NullFields is a list of field names (e.g. "Amount") to include in API 4507 // requests with the JSON null value. By default, fields with empty 4508 // values are omitted from API requests. However, any field with an 4509 // empty value appearing in NullFields will be sent to the server as 4510 // null. It is an error if a field in this list has a non-empty value. 4511 // This may be used to include null fields in Patch requests. 4512 NullFields []string `json:"-"` 4513} 4514 4515func (s *Price) MarshalJSON() ([]byte, error) { 4516 type NoMethod Price 4517 raw := NoMethod(*s) 4518 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4519} 4520 4521// PricePerBuyer: Used to specify pricing rules for buyers/advertisers. 4522// Each PricePerBuyer in a product can become 0 or 1 deals. To check if 4523// there is a PricePerBuyer for a particular buyer or buyer/advertiser 4524// pair, we look for the most specific matching rule - we first look for 4525// a rule matching the buyer and advertiser, next a rule with the buyer 4526// but an empty advertiser list, and otherwise look for a matching rule 4527// where no buyer is set. 4528type PricePerBuyer struct { 4529 // AdvertiserIds: The list of advertisers for this price when associated 4530 // with this buyer. If empty, all advertisers with this buyer pay this 4531 // price. 4532 AdvertiserIds []string `json:"advertiserIds,omitempty"` 4533 4534 // Buyer: The buyer who will pay this price. If unset, all buyers can 4535 // pay this price (if the advertisers match, and there's no more 4536 // specific rule matching the buyer). 4537 Buyer *Buyer `json:"buyer,omitempty"` 4538 4539 // Price: The specified price. 4540 Price *Price `json:"price,omitempty"` 4541 4542 // ForceSendFields is a list of field names (e.g. "AdvertiserIds") to 4543 // unconditionally include in API requests. By default, fields with 4544 // empty values are omitted from API requests. However, any non-pointer, 4545 // non-interface field appearing in ForceSendFields will be sent to the 4546 // server regardless of whether the field is empty or not. This may be 4547 // used to include empty fields in Patch requests. 4548 ForceSendFields []string `json:"-"` 4549 4550 // NullFields is a list of field names (e.g. "AdvertiserIds") to include 4551 // in API requests with the JSON null value. By default, fields with 4552 // empty values are omitted from API requests. However, any field with 4553 // an empty value appearing in NullFields will be sent to the server as 4554 // null. It is an error if a field in this list has a non-empty value. 4555 // This may be used to include null fields in Patch requests. 4556 NullFields []string `json:"-"` 4557} 4558 4559func (s *PricePerBuyer) MarshalJSON() ([]byte, error) { 4560 type NoMethod PricePerBuyer 4561 raw := NoMethod(*s) 4562 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4563} 4564 4565// PrivateData: Buyers are allowed to store certain types of private 4566// data in a proposal/deal. 4567type PrivateData struct { 4568 // ReferenceId: A buyer or seller specified reference ID. This can be 4569 // queried in the list operations (max-length: 1024 unicode code units). 4570 ReferenceId string `json:"referenceId,omitempty"` 4571 4572 // ForceSendFields is a list of field names (e.g. "ReferenceId") to 4573 // unconditionally include in API requests. By default, fields with 4574 // empty values are omitted from API requests. However, any non-pointer, 4575 // non-interface field appearing in ForceSendFields will be sent to the 4576 // server regardless of whether the field is empty or not. This may be 4577 // used to include empty fields in Patch requests. 4578 ForceSendFields []string `json:"-"` 4579 4580 // NullFields is a list of field names (e.g. "ReferenceId") to include 4581 // in API requests with the JSON null value. By default, fields with 4582 // empty values are omitted from API requests. However, any field with 4583 // an empty value appearing in NullFields will be sent to the server as 4584 // null. It is an error if a field in this list has a non-empty value. 4585 // This may be used to include null fields in Patch requests. 4586 NullFields []string `json:"-"` 4587} 4588 4589func (s *PrivateData) MarshalJSON() ([]byte, error) { 4590 type NoMethod PrivateData 4591 raw := NoMethod(*s) 4592 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4593} 4594 4595// Product: Note: this resource requires whitelisting for access. Please 4596// contact your account manager for access to Marketplace resources. A 4597// product is a segment of inventory that a seller wishes to sell. It is 4598// associated with certain terms and targeting information which helps 4599// the buyer know more about the inventory. 4600type Product struct { 4601 // AvailableEndTime: The proposed end time for the deal. The field will 4602 // be truncated to the order of seconds during serving. 4603 AvailableEndTime string `json:"availableEndTime,omitempty"` 4604 4605 // AvailableStartTime: Inventory availability dates. The start time will 4606 // be truncated to seconds during serving. Thus, a field specified as 4607 // 3:23:34.456 (HH:mm:ss.SSS) will be truncated to 3:23:34 when serving. 4608 AvailableStartTime string `json:"availableStartTime,omitempty"` 4609 4610 // CreateTime: Creation time. 4611 CreateTime string `json:"createTime,omitempty"` 4612 4613 // CreatorContacts: Optional contact information for the creator of this 4614 // product. 4615 CreatorContacts []*ContactInformation `json:"creatorContacts,omitempty"` 4616 4617 // DisplayName: The display name for this product as set by the seller. 4618 DisplayName string `json:"displayName,omitempty"` 4619 4620 // HasCreatorSignedOff: If the creator has already signed off on the 4621 // product, then the buyer can finalize the deal by accepting the 4622 // product as is. When copying to a proposal, if any of the terms are 4623 // changed, then auto_finalize is automatically set to false. 4624 HasCreatorSignedOff bool `json:"hasCreatorSignedOff,omitempty"` 4625 4626 // ProductId: The unique ID for the product. 4627 ProductId string `json:"productId,omitempty"` 4628 4629 // ProductRevision: The revision number of the product (auto-assigned by 4630 // Marketplace). 4631 ProductRevision int64 `json:"productRevision,omitempty,string"` 4632 4633 // PublisherProfileId: An ID which can be used by the Publisher Profile 4634 // API to get more information about the seller that created this 4635 // product. 4636 PublisherProfileId string `json:"publisherProfileId,omitempty"` 4637 4638 // Seller: Information about the seller that created this product. 4639 Seller *Seller `json:"seller,omitempty"` 4640 4641 // SyndicationProduct: The syndication product associated with the deal. 4642 // 4643 // Possible values: 4644 // "SYNDICATION_PRODUCT_UNSPECIFIED" - A placeholder for an undefined 4645 // syndication product. 4646 // "CONTENT" - This typically represents a web page. 4647 // "MOBILE" - This represents a mobile property. 4648 // "VIDEO" - This represents video ad formats. 4649 // "GAMES" - This represents ads shown within games. 4650 SyndicationProduct string `json:"syndicationProduct,omitempty"` 4651 4652 // TargetingCriterion: Targeting that is shared between the buyer and 4653 // the seller. Each targeting criterion has a specified key and for each 4654 // key there is a list of inclusion value or exclusion values. 4655 TargetingCriterion []*TargetingCriteria `json:"targetingCriterion,omitempty"` 4656 4657 // Terms: The negotiable terms of the deal. 4658 Terms *DealTerms `json:"terms,omitempty"` 4659 4660 // UpdateTime: Time of last update. 4661 UpdateTime string `json:"updateTime,omitempty"` 4662 4663 // WebPropertyCode: The web-property code for the seller. This needs to 4664 // be copied as is when adding a new deal to a proposal. 4665 WebPropertyCode string `json:"webPropertyCode,omitempty"` 4666 4667 // ServerResponse contains the HTTP response code and headers from the 4668 // server. 4669 googleapi.ServerResponse `json:"-"` 4670 4671 // ForceSendFields is a list of field names (e.g. "AvailableEndTime") to 4672 // unconditionally include in API requests. By default, fields with 4673 // empty values are omitted from API requests. However, any non-pointer, 4674 // non-interface field appearing in ForceSendFields will be sent to the 4675 // server regardless of whether the field is empty or not. This may be 4676 // used to include empty fields in Patch requests. 4677 ForceSendFields []string `json:"-"` 4678 4679 // NullFields is a list of field names (e.g. "AvailableEndTime") to 4680 // include in API requests with the JSON null value. By default, fields 4681 // with empty values are omitted from API requests. However, any field 4682 // with an empty value appearing in NullFields will be sent to the 4683 // server as null. It is an error if a field in this list has a 4684 // non-empty value. This may be used to include null fields in Patch 4685 // requests. 4686 NullFields []string `json:"-"` 4687} 4688 4689func (s *Product) MarshalJSON() ([]byte, error) { 4690 type NoMethod Product 4691 raw := NoMethod(*s) 4692 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4693} 4694 4695// Proposal: Note: this resource requires whitelisting for access. 4696// Please contact your account manager for access to Marketplace 4697// resources. Represents a proposal in the Marketplace. A proposal is 4698// the unit of negotiation between a seller and a buyer and contains 4699// deals which are served. Note: you can not update, create, or 4700// otherwise modify Private Auction or Preferred Deals deals through the 4701// API. Fields are updatable unless noted otherwise. 4702type Proposal struct { 4703 // BilledBuyer: Output only. Reference to the buyer that will get billed 4704 // for this proposal. 4705 BilledBuyer *Buyer `json:"billedBuyer,omitempty"` 4706 4707 // Buyer: Reference to the buyer on the proposal. Note: This field may 4708 // be set only when creating the resource. Modifying this field while 4709 // updating the resource will result in an error. 4710 Buyer *Buyer `json:"buyer,omitempty"` 4711 4712 // BuyerContacts: Contact information for the buyer. 4713 BuyerContacts []*ContactInformation `json:"buyerContacts,omitempty"` 4714 4715 // BuyerPrivateData: Private data for buyer. (hidden from seller). 4716 BuyerPrivateData *PrivateData `json:"buyerPrivateData,omitempty"` 4717 4718 // Deals: The deals associated with this proposal. For Private Auction 4719 // proposals (whose deals have NonGuaranteedAuctionTerms), there will 4720 // only be one deal. 4721 Deals []*Deal `json:"deals,omitempty"` 4722 4723 // DisplayName: The name for the proposal. 4724 DisplayName string `json:"displayName,omitempty"` 4725 4726 // IsRenegotiating: Output only. True if the proposal is being 4727 // renegotiated. 4728 IsRenegotiating bool `json:"isRenegotiating,omitempty"` 4729 4730 // IsSetupComplete: Output only. True, if the buyside inventory setup is 4731 // complete for this proposal. 4732 IsSetupComplete bool `json:"isSetupComplete,omitempty"` 4733 4734 // LastUpdaterOrCommentorRole: Output only. The role of the last user 4735 // that either updated the proposal or left a comment. 4736 // 4737 // Possible values: 4738 // "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined 4739 // buyer/seller role. 4740 // "BUYER" - Specifies the role as buyer. 4741 // "SELLER" - Specifies the role as seller. 4742 LastUpdaterOrCommentorRole string `json:"lastUpdaterOrCommentorRole,omitempty"` 4743 4744 // Notes: Output only. The notes associated with this proposal. 4745 Notes []*Note `json:"notes,omitempty"` 4746 4747 // OriginatorRole: Output only. Indicates whether the buyer/seller 4748 // created the proposal. 4749 // 4750 // Possible values: 4751 // "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined 4752 // buyer/seller role. 4753 // "BUYER" - Specifies the role as buyer. 4754 // "SELLER" - Specifies the role as seller. 4755 OriginatorRole string `json:"originatorRole,omitempty"` 4756 4757 // PrivateAuctionId: Output only. Private auction ID if this proposal is 4758 // a private auction proposal. 4759 PrivateAuctionId string `json:"privateAuctionId,omitempty"` 4760 4761 // ProposalId: Output only. The unique ID of the proposal. 4762 ProposalId string `json:"proposalId,omitempty"` 4763 4764 // ProposalRevision: Output only. The revision number for the proposal. 4765 // Each update to the proposal or the deal causes the proposal revision 4766 // number to auto-increment. The buyer keeps track of the last revision 4767 // number they know of and pass it in when making an update. If the head 4768 // revision number on the server has since incremented, then an ABORTED 4769 // error is returned during the update operation to let the buyer know 4770 // that a subsequent update was made. 4771 ProposalRevision int64 `json:"proposalRevision,omitempty,string"` 4772 4773 // ProposalState: Output only. The current state of the proposal. 4774 // 4775 // Possible values: 4776 // "PROPOSAL_STATE_UNSPECIFIED" - A placeholder for an undefined 4777 // proposal state. 4778 // "PROPOSED" - The proposal is under negotiation or renegotiation. 4779 // "BUYER_ACCEPTED" - The proposal has been accepted by the buyer. 4780 // "SELLER_ACCEPTED" - The proposal has been accepted by the seller. 4781 // "CANCELED" - The negotiations on the proposal were canceled and the 4782 // proposal was never finalized. 4783 // "FINALIZED" - The proposal is finalized. During renegotiation, the 4784 // proposal may not be in this state. 4785 ProposalState string `json:"proposalState,omitempty"` 4786 4787 // Seller: Reference to the seller on the proposal. Note: This field may 4788 // be set only when creating the resource. Modifying this field while 4789 // updating the resource will result in an error. 4790 Seller *Seller `json:"seller,omitempty"` 4791 4792 // SellerContacts: Output only. Contact information for the seller. 4793 SellerContacts []*ContactInformation `json:"sellerContacts,omitempty"` 4794 4795 // TermsAndConditions: Output only. The terms and conditions set by the 4796 // publisher for this proposal. 4797 TermsAndConditions string `json:"termsAndConditions,omitempty"` 4798 4799 // UpdateTime: Output only. The time when the proposal was last revised. 4800 UpdateTime string `json:"updateTime,omitempty"` 4801 4802 // ServerResponse contains the HTTP response code and headers from the 4803 // server. 4804 googleapi.ServerResponse `json:"-"` 4805 4806 // ForceSendFields is a list of field names (e.g. "BilledBuyer") to 4807 // unconditionally include in API requests. By default, fields with 4808 // empty values are omitted from API requests. However, any non-pointer, 4809 // non-interface field appearing in ForceSendFields will be sent to the 4810 // server regardless of whether the field is empty or not. This may be 4811 // used to include empty fields in Patch requests. 4812 ForceSendFields []string `json:"-"` 4813 4814 // NullFields is a list of field names (e.g. "BilledBuyer") to include 4815 // in API requests with the JSON null value. By default, fields with 4816 // empty values are omitted from API requests. However, any field with 4817 // an empty value appearing in NullFields will be sent to the server as 4818 // null. It is an error if a field in this list has a non-empty value. 4819 // This may be used to include null fields in Patch requests. 4820 NullFields []string `json:"-"` 4821} 4822 4823func (s *Proposal) MarshalJSON() ([]byte, error) { 4824 type NoMethod Proposal 4825 raw := NoMethod(*s) 4826 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4827} 4828 4829// PublisherProfile: Note: this resource requires whitelisting for 4830// access. Please contact your account manager for access to Marketplace 4831// resources. Represents a publisher profile 4832// (https://support.google.com/admanager/answer/6035806) in Marketplace. 4833// All fields are read only. All string fields are free-form text 4834// entered by the publisher unless noted otherwise. 4835type PublisherProfile struct { 4836 // AudienceDescription: Description on the publisher's audience. 4837 AudienceDescription string `json:"audienceDescription,omitempty"` 4838 4839 // BuyerPitchStatement: Statement explaining what's unique about 4840 // publisher's business, and why buyers should partner with the 4841 // publisher. 4842 BuyerPitchStatement string `json:"buyerPitchStatement,omitempty"` 4843 4844 // DirectDealsContact: Contact information for direct reservation deals. 4845 // This is free text entered by the publisher and may include 4846 // information like names, phone numbers and email addresses. 4847 DirectDealsContact string `json:"directDealsContact,omitempty"` 4848 4849 // DisplayName: Name of the publisher profile. 4850 DisplayName string `json:"displayName,omitempty"` 4851 4852 // Domains: The list of domains represented in this publisher profile. 4853 // Empty if this is a parent profile. These are top private domains, 4854 // meaning that these will not contain a string like 4855 // "photos.google.co.uk/123", but will instead contain "google.co.uk". 4856 Domains []string `json:"domains,omitempty"` 4857 4858 // GooglePlusUrl: URL to publisher's Google+ page. 4859 GooglePlusUrl string `json:"googlePlusUrl,omitempty"` 4860 4861 // IsParent: Indicates if this profile is the parent profile of the 4862 // seller. A parent profile represents all the inventory from the 4863 // seller, as opposed to child profile that is created to brand a 4864 // portion of inventory. One seller should have only one parent 4865 // publisher profile, and can have multiple child profiles. Publisher 4866 // profiles for the same seller will have same value of field 4867 // google.ads.adexchange.buyer.v2beta1.PublisherProfile.seller. See 4868 // https://support.google.com/admanager/answer/6035806 for details. 4869 IsParent bool `json:"isParent,omitempty"` 4870 4871 // LogoUrl: A Google public URL to the logo for this publisher profile. 4872 // The logo is stored as a PNG, JPG, or GIF image. 4873 LogoUrl string `json:"logoUrl,omitempty"` 4874 4875 // MediaKitUrl: URL to additional marketing and sales materials. 4876 MediaKitUrl string `json:"mediaKitUrl,omitempty"` 4877 4878 // MobileApps: The list of apps represented in this publisher profile. 4879 // Empty if this is a parent profile. 4880 MobileApps []*PublisherProfileMobileApplication `json:"mobileApps,omitempty"` 4881 4882 // Overview: Overview of the publisher. 4883 Overview string `json:"overview,omitempty"` 4884 4885 // ProgrammaticDealsContact: Contact information for programmatic deals. 4886 // This is free text entered by the publisher and may include 4887 // information like names, phone numbers and email addresses. 4888 ProgrammaticDealsContact string `json:"programmaticDealsContact,omitempty"` 4889 4890 // PublisherProfileId: Unique ID for publisher profile. 4891 PublisherProfileId string `json:"publisherProfileId,omitempty"` 4892 4893 // RateCardInfoUrl: URL to a publisher rate card. 4894 RateCardInfoUrl string `json:"rateCardInfoUrl,omitempty"` 4895 4896 // SamplePageUrl: URL to a sample content page. 4897 SamplePageUrl string `json:"samplePageUrl,omitempty"` 4898 4899 // Seller: Seller of the publisher profile. 4900 Seller *Seller `json:"seller,omitempty"` 4901 4902 // TopHeadlines: Up to three key metrics and rankings. Max 100 4903 // characters each. For example "#1 Mobile News Site for 20 Straight 4904 // Months". 4905 TopHeadlines []string `json:"topHeadlines,omitempty"` 4906 4907 // ServerResponse contains the HTTP response code and headers from the 4908 // server. 4909 googleapi.ServerResponse `json:"-"` 4910 4911 // ForceSendFields is a list of field names (e.g. "AudienceDescription") 4912 // to unconditionally include in API requests. By default, fields with 4913 // empty values are omitted from API requests. However, any non-pointer, 4914 // non-interface field appearing in ForceSendFields will be sent to the 4915 // server regardless of whether the field is empty or not. This may be 4916 // used to include empty fields in Patch requests. 4917 ForceSendFields []string `json:"-"` 4918 4919 // NullFields is a list of field names (e.g. "AudienceDescription") to 4920 // include in API requests with the JSON null value. By default, fields 4921 // with empty values are omitted from API requests. However, any field 4922 // with an empty value appearing in NullFields will be sent to the 4923 // server as null. It is an error if a field in this list has a 4924 // non-empty value. This may be used to include null fields in Patch 4925 // requests. 4926 NullFields []string `json:"-"` 4927} 4928 4929func (s *PublisherProfile) MarshalJSON() ([]byte, error) { 4930 type NoMethod PublisherProfile 4931 raw := NoMethod(*s) 4932 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4933} 4934 4935// PublisherProfileMobileApplication: A mobile application that contains 4936// a external app ID, name, and app store. 4937type PublisherProfileMobileApplication struct { 4938 // AppStore: The app store the app belongs to. 4939 // 4940 // Possible values: 4941 // "APP_STORE_TYPE_UNSPECIFIED" - A placeholder for an unknown app 4942 // store. 4943 // "APPLE_ITUNES" - Apple iTunes 4944 // "GOOGLE_PLAY" - Google Play 4945 // "ROKU" - Roku 4946 // "AMAZON_FIRETV" - Amazon Fire TV 4947 // "PLAYSTATION" - Playstation 4948 // "XBOX" - Xbox 4949 // "SAMSUNG_TV" - Samsung TV 4950 // "AMAZON" - Amazon Appstore 4951 // "OPPO" - OPPO App Market 4952 // "SAMSUNG" - Samsung Galaxy Store 4953 // "VIVO" - VIVO App Store 4954 // "XIAOMI" - Xiaomi GetApps 4955 AppStore string `json:"appStore,omitempty"` 4956 4957 // ExternalAppId: The external ID for the app from its app store. 4958 ExternalAppId string `json:"externalAppId,omitempty"` 4959 4960 // Name: The name of the app. 4961 Name string `json:"name,omitempty"` 4962 4963 // ForceSendFields is a list of field names (e.g. "AppStore") to 4964 // unconditionally include in API requests. By default, fields with 4965 // empty values are omitted from API requests. However, any non-pointer, 4966 // non-interface field appearing in ForceSendFields will be sent to the 4967 // server regardless of whether the field is empty or not. This may be 4968 // used to include empty fields in Patch requests. 4969 ForceSendFields []string `json:"-"` 4970 4971 // NullFields is a list of field names (e.g. "AppStore") to include in 4972 // API requests with the JSON null value. By default, fields with empty 4973 // values are omitted from API requests. However, any field with an 4974 // empty value appearing in NullFields will be sent to the server as 4975 // null. It is an error if a field in this list has a non-empty value. 4976 // This may be used to include null fields in Patch requests. 4977 NullFields []string `json:"-"` 4978} 4979 4980func (s *PublisherProfileMobileApplication) MarshalJSON() ([]byte, error) { 4981 type NoMethod PublisherProfileMobileApplication 4982 raw := NoMethod(*s) 4983 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4984} 4985 4986// RealtimeTimeRange: An open-ended realtime time range specified by the 4987// start timestamp. For filter sets that specify a realtime time range 4988// RTB metrics continue to be aggregated throughout the lifetime of the 4989// filter set. 4990type RealtimeTimeRange struct { 4991 // StartTimestamp: The start timestamp of the real-time RTB metrics 4992 // aggregation. 4993 StartTimestamp string `json:"startTimestamp,omitempty"` 4994 4995 // ForceSendFields is a list of field names (e.g. "StartTimestamp") to 4996 // unconditionally include in API requests. By default, fields with 4997 // empty values are omitted from API requests. However, any non-pointer, 4998 // non-interface field appearing in ForceSendFields will be sent to the 4999 // server regardless of whether the field is empty or not. This may be 5000 // used to include empty fields in Patch requests. 5001 ForceSendFields []string `json:"-"` 5002 5003 // NullFields is a list of field names (e.g. "StartTimestamp") to 5004 // include in API requests with the JSON null value. By default, fields 5005 // with empty values are omitted from API requests. However, any field 5006 // with an empty value appearing in NullFields will be sent to the 5007 // server as null. It is an error if a field in this list has a 5008 // non-empty value. This may be used to include null fields in Patch 5009 // requests. 5010 NullFields []string `json:"-"` 5011} 5012 5013func (s *RealtimeTimeRange) MarshalJSON() ([]byte, error) { 5014 type NoMethod RealtimeTimeRange 5015 raw := NoMethod(*s) 5016 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5017} 5018 5019// RelativeDateRange: A relative date range, specified by an offset and 5020// a duration. The supported range of dates begins 30 days before today 5021// and ends today, i.e., the limits for these values are: offset_days >= 5022// 0 duration_days >= 1 offset_days + duration_days <= 30 5023type RelativeDateRange struct { 5024 // DurationDays: The number of days in the requested date range, e.g., 5025 // for a range spanning today: 1. For a range spanning the last 7 days: 5026 // 7. 5027 DurationDays int64 `json:"durationDays,omitempty"` 5028 5029 // OffsetDays: The end date of the filter set, specified as the number 5030 // of days before today, e.g., for a range where the last date is today: 5031 // 0. 5032 OffsetDays int64 `json:"offsetDays,omitempty"` 5033 5034 // ForceSendFields is a list of field names (e.g. "DurationDays") to 5035 // unconditionally include in API requests. By default, fields with 5036 // empty values are omitted from API requests. However, any non-pointer, 5037 // non-interface field appearing in ForceSendFields will be sent to the 5038 // server regardless of whether the field is empty or not. This may be 5039 // used to include empty fields in Patch requests. 5040 ForceSendFields []string `json:"-"` 5041 5042 // NullFields is a list of field names (e.g. "DurationDays") to include 5043 // in API requests with the JSON null value. By default, fields with 5044 // empty values are omitted from API requests. However, any field with 5045 // an empty value appearing in NullFields will be sent to the server as 5046 // null. It is an error if a field in this list has a non-empty value. 5047 // This may be used to include null fields in Patch requests. 5048 NullFields []string `json:"-"` 5049} 5050 5051func (s *RelativeDateRange) MarshalJSON() ([]byte, error) { 5052 type NoMethod RelativeDateRange 5053 raw := NoMethod(*s) 5054 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5055} 5056 5057// RemoveDealAssociationRequest: A request for removing the association 5058// between a deal and a creative. 5059type RemoveDealAssociationRequest struct { 5060 // Association: The association between a creative and a deal that 5061 // should be removed. 5062 Association *CreativeDealAssociation `json:"association,omitempty"` 5063 5064 // ForceSendFields is a list of field names (e.g. "Association") to 5065 // unconditionally include in API requests. By default, fields with 5066 // empty values are omitted from API requests. However, any non-pointer, 5067 // non-interface field appearing in ForceSendFields will be sent to the 5068 // server regardless of whether the field is empty or not. This may be 5069 // used to include empty fields in Patch requests. 5070 ForceSendFields []string `json:"-"` 5071 5072 // NullFields is a list of field names (e.g. "Association") to include 5073 // in API requests with the JSON null value. By default, fields with 5074 // empty values are omitted from API requests. However, any field with 5075 // an empty value appearing in NullFields will be sent to the server as 5076 // null. It is an error if a field in this list has a non-empty value. 5077 // This may be used to include null fields in Patch requests. 5078 NullFields []string `json:"-"` 5079} 5080 5081func (s *RemoveDealAssociationRequest) MarshalJSON() ([]byte, error) { 5082 type NoMethod RemoveDealAssociationRequest 5083 raw := NoMethod(*s) 5084 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5085} 5086 5087// ResumeProposalRequest: Request message to resume (unpause) serving 5088// for an already-finalized proposal. 5089type ResumeProposalRequest struct { 5090} 5091 5092// RowDimensions: A response may include multiple rows, breaking down 5093// along various dimensions. Encapsulates the values of all dimensions 5094// for a given row. 5095type RowDimensions struct { 5096 // PublisherIdentifier: The publisher identifier for this row, if a 5097 // breakdown by BreakdownDimension.PUBLISHER_IDENTIFIER 5098 // (https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/bidders.accounts.filterSets#FilterSet.BreakdownDimension) 5099 // was requested. 5100 PublisherIdentifier string `json:"publisherIdentifier,omitempty"` 5101 5102 // TimeInterval: The time interval that this row represents. 5103 TimeInterval *TimeInterval `json:"timeInterval,omitempty"` 5104 5105 // ForceSendFields is a list of field names (e.g. "PublisherIdentifier") 5106 // to unconditionally include in API requests. By default, fields with 5107 // empty values are omitted from API requests. However, any non-pointer, 5108 // non-interface field appearing in ForceSendFields will be sent to the 5109 // server regardless of whether the field is empty or not. This may be 5110 // used to include empty fields in Patch requests. 5111 ForceSendFields []string `json:"-"` 5112 5113 // NullFields is a list of field names (e.g. "PublisherIdentifier") to 5114 // include in API requests with the JSON null value. By default, fields 5115 // with empty values are omitted from API requests. However, any field 5116 // with an empty value appearing in NullFields will be sent to the 5117 // server as null. It is an error if a field in this list has a 5118 // non-empty value. This may be used to include null fields in Patch 5119 // requests. 5120 NullFields []string `json:"-"` 5121} 5122 5123func (s *RowDimensions) MarshalJSON() ([]byte, error) { 5124 type NoMethod RowDimensions 5125 raw := NoMethod(*s) 5126 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5127} 5128 5129// SecurityContext: Output only. A security context. 5130type SecurityContext struct { 5131 // Securities: The security types in this context. 5132 // 5133 // Possible values: 5134 // "INSECURE" - Matches impressions that require insecure 5135 // compatibility. 5136 // "SSL" - Matches impressions that require SSL compatibility. 5137 Securities []string `json:"securities,omitempty"` 5138 5139 // ForceSendFields is a list of field names (e.g. "Securities") to 5140 // unconditionally include in API requests. By default, fields with 5141 // empty values are omitted from API requests. However, any non-pointer, 5142 // non-interface field appearing in ForceSendFields will be sent to the 5143 // server regardless of whether the field is empty or not. This may be 5144 // used to include empty fields in Patch requests. 5145 ForceSendFields []string `json:"-"` 5146 5147 // NullFields is a list of field names (e.g. "Securities") to include in 5148 // API requests with the JSON null value. By default, fields with empty 5149 // values are omitted from API requests. However, any field with an 5150 // empty value appearing in NullFields will be sent to the server as 5151 // null. It is an error if a field in this list has a non-empty value. 5152 // This may be used to include null fields in Patch requests. 5153 NullFields []string `json:"-"` 5154} 5155 5156func (s *SecurityContext) MarshalJSON() ([]byte, error) { 5157 type NoMethod SecurityContext 5158 raw := NoMethod(*s) 5159 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5160} 5161 5162// Seller: Represents a seller of inventory. Each seller is identified 5163// by a unique Ad Manager account ID. 5164type Seller struct { 5165 // AccountId: The unique ID for the seller. The seller fills in this 5166 // field. The seller account ID is then available to buyer in the 5167 // product. 5168 AccountId string `json:"accountId,omitempty"` 5169 5170 // SubAccountId: Optional sub-account ID for the seller. 5171 SubAccountId string `json:"subAccountId,omitempty"` 5172 5173 // ForceSendFields is a list of field names (e.g. "AccountId") to 5174 // unconditionally include in API requests. By default, fields with 5175 // empty values are omitted from API requests. However, any non-pointer, 5176 // non-interface field appearing in ForceSendFields will be sent to the 5177 // server regardless of whether the field is empty or not. This may be 5178 // used to include empty fields in Patch requests. 5179 ForceSendFields []string `json:"-"` 5180 5181 // NullFields is a list of field names (e.g. "AccountId") to include in 5182 // API requests with the JSON null value. By default, fields with empty 5183 // values are omitted from API requests. However, any field with an 5184 // empty value appearing in NullFields will be sent to the server as 5185 // null. It is an error if a field in this list has a non-empty value. 5186 // This may be used to include null fields in Patch requests. 5187 NullFields []string `json:"-"` 5188} 5189 5190func (s *Seller) MarshalJSON() ([]byte, error) { 5191 type NoMethod Seller 5192 raw := NoMethod(*s) 5193 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5194} 5195 5196// ServingContext: The serving context for this restriction. 5197type ServingContext struct { 5198 // All: Matches all contexts. 5199 // 5200 // Possible values: 5201 // "SIMPLE_CONTEXT" - A simple context. 5202 All string `json:"all,omitempty"` 5203 5204 // AppType: Matches impressions for a particular app type. 5205 AppType *AppContext `json:"appType,omitempty"` 5206 5207 // AuctionType: Matches impressions for a particular auction type. 5208 AuctionType *AuctionContext `json:"auctionType,omitempty"` 5209 5210 // Location: Matches impressions coming from users *or* publishers in a 5211 // specific location. 5212 Location *LocationContext `json:"location,omitempty"` 5213 5214 // Platform: Matches impressions coming from a particular platform. 5215 Platform *PlatformContext `json:"platform,omitempty"` 5216 5217 // SecurityType: Matches impressions for a particular security type. 5218 SecurityType *SecurityContext `json:"securityType,omitempty"` 5219 5220 // ForceSendFields is a list of field names (e.g. "All") to 5221 // unconditionally include in API requests. By default, fields with 5222 // empty values are omitted from API requests. However, any non-pointer, 5223 // non-interface field appearing in ForceSendFields will be sent to the 5224 // server regardless of whether the field is empty or not. This may be 5225 // used to include empty fields in Patch requests. 5226 ForceSendFields []string `json:"-"` 5227 5228 // NullFields is a list of field names (e.g. "All") to include in API 5229 // requests with the JSON null value. By default, fields with empty 5230 // values are omitted from API requests. However, any field with an 5231 // empty value appearing in NullFields will be sent to the server as 5232 // null. It is an error if a field in this list has a non-empty value. 5233 // This may be used to include null fields in Patch requests. 5234 NullFields []string `json:"-"` 5235} 5236 5237func (s *ServingContext) MarshalJSON() ([]byte, error) { 5238 type NoMethod ServingContext 5239 raw := NoMethod(*s) 5240 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5241} 5242 5243// ServingRestriction: Output only. A representation of the status of an 5244// ad in a specific context. A context here relates to where something 5245// ultimately serves (for example, a user or publisher geo, a platform, 5246// an HTTPS vs HTTP request, or the type of auction). 5247type ServingRestriction struct { 5248 // Contexts: The contexts for the restriction. 5249 Contexts []*ServingContext `json:"contexts,omitempty"` 5250 5251 // Disapproval: Disapproval bound to this restriction. Only present if 5252 // status=DISAPPROVED. Can be used to filter the response of the 5253 // creatives.list method. 5254 Disapproval *Disapproval `json:"disapproval,omitempty"` 5255 5256 // DisapprovalReasons: Any disapprovals bound to this restriction. Only 5257 // present if status=DISAPPROVED. Can be used to filter the response of 5258 // the creatives.list method. Deprecated; please use disapproval field 5259 // instead. 5260 DisapprovalReasons []*Disapproval `json:"disapprovalReasons,omitempty"` 5261 5262 // Status: The status of the creative in this context (for example, it 5263 // has been explicitly disapproved or is pending review). 5264 // 5265 // Possible values: 5266 // "STATUS_UNSPECIFIED" - The status is not known. 5267 // "DISAPPROVAL" - The ad was disapproved in this context. 5268 // "PENDING_REVIEW" - The ad is pending review in this context. 5269 Status string `json:"status,omitempty"` 5270 5271 // ForceSendFields is a list of field names (e.g. "Contexts") to 5272 // unconditionally include in API requests. By default, fields with 5273 // empty values are omitted from API requests. However, any non-pointer, 5274 // non-interface field appearing in ForceSendFields will be sent to the 5275 // server regardless of whether the field is empty or not. This may be 5276 // used to include empty fields in Patch requests. 5277 ForceSendFields []string `json:"-"` 5278 5279 // NullFields is a list of field names (e.g. "Contexts") to include in 5280 // API requests with the JSON null value. By default, fields with empty 5281 // values are omitted from API requests. However, any field with an 5282 // empty value appearing in NullFields will be sent to the server as 5283 // null. It is an error if a field in this list has a non-empty value. 5284 // This may be used to include null fields in Patch requests. 5285 NullFields []string `json:"-"` 5286} 5287 5288func (s *ServingRestriction) MarshalJSON() ([]byte, error) { 5289 type NoMethod ServingRestriction 5290 raw := NoMethod(*s) 5291 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5292} 5293 5294// Size: Message depicting the size of the creative. The units of width 5295// and height depend on the type of the targeting. 5296type Size struct { 5297 // Height: The height of the creative. 5298 Height int64 `json:"height,omitempty"` 5299 5300 // Width: The width of the creative 5301 Width int64 `json:"width,omitempty"` 5302 5303 // ForceSendFields is a list of field names (e.g. "Height") to 5304 // unconditionally include in API requests. By default, fields with 5305 // empty values are omitted from API requests. However, any non-pointer, 5306 // non-interface field appearing in ForceSendFields will be sent to the 5307 // server regardless of whether the field is empty or not. This may be 5308 // used to include empty fields in Patch requests. 5309 ForceSendFields []string `json:"-"` 5310 5311 // NullFields is a list of field names (e.g. "Height") to include in API 5312 // requests with the JSON null value. By default, fields with empty 5313 // values are omitted from API requests. However, any field with an 5314 // empty value appearing in NullFields will be sent to the server as 5315 // null. It is an error if a field in this list has a non-empty value. 5316 // This may be used to include null fields in Patch requests. 5317 NullFields []string `json:"-"` 5318} 5319 5320func (s *Size) MarshalJSON() ([]byte, error) { 5321 type NoMethod Size 5322 raw := NoMethod(*s) 5323 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5324} 5325 5326// StopWatchingCreativeRequest: A request for stopping notifications for 5327// changes to creative Status. 5328type StopWatchingCreativeRequest struct { 5329} 5330 5331// TargetingCriteria: Advertisers can target different attributes of an 5332// ad slot. For example, they can choose to show ads only if the user is 5333// in the U.S. Such targeting criteria can be specified as part of 5334// Shared Targeting. 5335type TargetingCriteria struct { 5336 // Exclusions: The list of values to exclude from targeting. Each value 5337 // is AND'd together. 5338 Exclusions []*TargetingValue `json:"exclusions,omitempty"` 5339 5340 // Inclusions: The list of value to include as part of the targeting. 5341 // Each value is OR'd together. 5342 Inclusions []*TargetingValue `json:"inclusions,omitempty"` 5343 5344 // Key: The key representing the shared targeting criterion. Targeting 5345 // criteria defined by Google ad servers will begin with GOOG_. Third 5346 // parties may define their own keys. A list of permissible keys along 5347 // with the acceptable values will be provided as part of the external 5348 // documentation. 5349 Key string `json:"key,omitempty"` 5350 5351 // ForceSendFields is a list of field names (e.g. "Exclusions") to 5352 // unconditionally include in API requests. By default, fields with 5353 // empty values are omitted from API requests. However, any non-pointer, 5354 // non-interface field appearing in ForceSendFields will be sent to the 5355 // server regardless of whether the field is empty or not. This may be 5356 // used to include empty fields in Patch requests. 5357 ForceSendFields []string `json:"-"` 5358 5359 // NullFields is a list of field names (e.g. "Exclusions") to include in 5360 // API requests with the JSON null value. By default, fields with empty 5361 // values are omitted from API requests. However, any field with an 5362 // empty value appearing in NullFields will be sent to the server as 5363 // null. It is an error if a field in this list has a non-empty value. 5364 // This may be used to include null fields in Patch requests. 5365 NullFields []string `json:"-"` 5366} 5367 5368func (s *TargetingCriteria) MarshalJSON() ([]byte, error) { 5369 type NoMethod TargetingCriteria 5370 raw := NoMethod(*s) 5371 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5372} 5373 5374// TargetingValue: A polymorphic targeting value used as part of Shared 5375// Targeting. 5376type TargetingValue struct { 5377 // CreativeSizeValue: The creative size value to include/exclude. Filled 5378 // in when key = GOOG_CREATIVE_SIZE 5379 CreativeSizeValue *CreativeSize `json:"creativeSizeValue,omitempty"` 5380 5381 // DayPartTargetingValue: The daypart targeting to include / exclude. 5382 // Filled in when the key is GOOG_DAYPART_TARGETING. The definition of 5383 // this targeting is derived from the structure used by Ad Manager. 5384 DayPartTargetingValue *DayPartTargeting `json:"dayPartTargetingValue,omitempty"` 5385 5386 // LongValue: The long value to include/exclude. 5387 LongValue int64 `json:"longValue,omitempty,string"` 5388 5389 // StringValue: The string value to include/exclude. 5390 StringValue string `json:"stringValue,omitempty"` 5391 5392 // ForceSendFields is a list of field names (e.g. "CreativeSizeValue") 5393 // to unconditionally include in API requests. By default, fields with 5394 // empty values are omitted from API requests. However, any non-pointer, 5395 // non-interface field appearing in ForceSendFields will be sent to the 5396 // server regardless of whether the field is empty or not. This may be 5397 // used to include empty fields in Patch requests. 5398 ForceSendFields []string `json:"-"` 5399 5400 // NullFields is a list of field names (e.g. "CreativeSizeValue") to 5401 // include in API requests with the JSON null value. By default, fields 5402 // with empty values are omitted from API requests. However, any field 5403 // with an empty value appearing in NullFields will be sent to the 5404 // server as null. It is an error if a field in this list has a 5405 // non-empty value. This may be used to include null fields in Patch 5406 // requests. 5407 NullFields []string `json:"-"` 5408} 5409 5410func (s *TargetingValue) MarshalJSON() ([]byte, error) { 5411 type NoMethod TargetingValue 5412 raw := NoMethod(*s) 5413 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5414} 5415 5416// TechnologyTargeting: Represents targeting about various types of 5417// technology. 5418type TechnologyTargeting struct { 5419 // DeviceCapabilityTargeting: IDs of device capabilities to be 5420 // included/excluded. 5421 DeviceCapabilityTargeting *CriteriaTargeting `json:"deviceCapabilityTargeting,omitempty"` 5422 5423 // DeviceCategoryTargeting: IDs of device categories to be 5424 // included/excluded. 5425 DeviceCategoryTargeting *CriteriaTargeting `json:"deviceCategoryTargeting,omitempty"` 5426 5427 // OperatingSystemTargeting: Operating system related targeting 5428 // information. 5429 OperatingSystemTargeting *OperatingSystemTargeting `json:"operatingSystemTargeting,omitempty"` 5430 5431 // ForceSendFields is a list of field names (e.g. 5432 // "DeviceCapabilityTargeting") to unconditionally include in API 5433 // requests. By default, fields with empty values are omitted from API 5434 // requests. However, any non-pointer, non-interface field appearing in 5435 // ForceSendFields will be sent to the server regardless of whether the 5436 // field is empty or not. This may be used to include empty fields in 5437 // Patch requests. 5438 ForceSendFields []string `json:"-"` 5439 5440 // NullFields is a list of field names (e.g. 5441 // "DeviceCapabilityTargeting") to include in API requests with the JSON 5442 // null value. By default, fields with empty values are omitted from API 5443 // requests. However, any field with an empty value appearing in 5444 // NullFields will be sent to the server as null. It is an error if a 5445 // field in this list has a non-empty value. This may be used to include 5446 // null fields in Patch requests. 5447 NullFields []string `json:"-"` 5448} 5449 5450func (s *TechnologyTargeting) MarshalJSON() ([]byte, error) { 5451 type NoMethod TechnologyTargeting 5452 raw := NoMethod(*s) 5453 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5454} 5455 5456// TimeInterval: An interval of time, with an absolute start and end. 5457type TimeInterval struct { 5458 // EndTime: The timestamp marking the end of the range (exclusive) for 5459 // which data is included. 5460 EndTime string `json:"endTime,omitempty"` 5461 5462 // StartTime: The timestamp marking the start of the range (inclusive) 5463 // for which data is included. 5464 StartTime string `json:"startTime,omitempty"` 5465 5466 // ForceSendFields is a list of field names (e.g. "EndTime") to 5467 // unconditionally include in API requests. By default, fields with 5468 // empty values are omitted from API requests. However, any non-pointer, 5469 // non-interface field appearing in ForceSendFields will be sent to the 5470 // server regardless of whether the field is empty or not. This may be 5471 // used to include empty fields in Patch requests. 5472 ForceSendFields []string `json:"-"` 5473 5474 // NullFields is a list of field names (e.g. "EndTime") to include in 5475 // API requests with the JSON null value. By default, fields with empty 5476 // values are omitted from API requests. However, any field with an 5477 // empty value appearing in NullFields will be sent to the server as 5478 // null. It is an error if a field in this list has a non-empty value. 5479 // This may be used to include null fields in Patch requests. 5480 NullFields []string `json:"-"` 5481} 5482 5483func (s *TimeInterval) MarshalJSON() ([]byte, error) { 5484 type NoMethod TimeInterval 5485 raw := NoMethod(*s) 5486 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5487} 5488 5489// TimeOfDay: Represents a time of day. The date and time zone are 5490// either not significant or are specified elsewhere. An API may choose 5491// to allow leap seconds. Related types are google.type.Date and 5492// `google.protobuf.Timestamp`. 5493type TimeOfDay struct { 5494 // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API 5495 // may choose to allow the value "24:00:00" for scenarios like business 5496 // closing time. 5497 Hours int64 `json:"hours,omitempty"` 5498 5499 // Minutes: Minutes of hour of day. Must be from 0 to 59. 5500 Minutes int64 `json:"minutes,omitempty"` 5501 5502 // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to 5503 // 999,999,999. 5504 Nanos int64 `json:"nanos,omitempty"` 5505 5506 // Seconds: Seconds of minutes of the time. Must normally be from 0 to 5507 // 59. An API may allow the value 60 if it allows leap-seconds. 5508 Seconds int64 `json:"seconds,omitempty"` 5509 5510 // ForceSendFields is a list of field names (e.g. "Hours") to 5511 // unconditionally include in API requests. By default, fields with 5512 // empty values are omitted from API requests. However, any non-pointer, 5513 // non-interface field appearing in ForceSendFields will be sent to the 5514 // server regardless of whether the field is empty or not. This may be 5515 // used to include empty fields in Patch requests. 5516 ForceSendFields []string `json:"-"` 5517 5518 // NullFields is a list of field names (e.g. "Hours") to include in API 5519 // requests with the JSON null value. By default, fields with empty 5520 // values are omitted from API requests. However, any field with an 5521 // empty value appearing in NullFields will be sent to the server as 5522 // null. It is an error if a field in this list has a non-empty value. 5523 // This may be used to include null fields in Patch requests. 5524 NullFields []string `json:"-"` 5525} 5526 5527func (s *TimeOfDay) MarshalJSON() ([]byte, error) { 5528 type NoMethod TimeOfDay 5529 raw := NoMethod(*s) 5530 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5531} 5532 5533// UrlTargeting: Represents a list of targeted and excluded URLs (e.g., 5534// google.com). For Private Auction and AdX Preferred Deals, URLs are 5535// either included or excluded. For Programmatic Guaranteed and 5536// Preferred Deals, this doesn't apply. 5537type UrlTargeting struct { 5538 // ExcludedUrls: A list of URLs to be excluded. 5539 ExcludedUrls []string `json:"excludedUrls,omitempty"` 5540 5541 // TargetedUrls: A list of URLs to be included. 5542 TargetedUrls []string `json:"targetedUrls,omitempty"` 5543 5544 // ForceSendFields is a list of field names (e.g. "ExcludedUrls") to 5545 // unconditionally include in API requests. By default, fields with 5546 // empty values are omitted from API requests. However, any non-pointer, 5547 // non-interface field appearing in ForceSendFields will be sent to the 5548 // server regardless of whether the field is empty or not. This may be 5549 // used to include empty fields in Patch requests. 5550 ForceSendFields []string `json:"-"` 5551 5552 // NullFields is a list of field names (e.g. "ExcludedUrls") to include 5553 // in API requests with the JSON null value. By default, fields with 5554 // empty values are omitted from API requests. However, any field with 5555 // an empty value appearing in NullFields will be sent to the server as 5556 // null. It is an error if a field in this list has a non-empty value. 5557 // This may be used to include null fields in Patch requests. 5558 NullFields []string `json:"-"` 5559} 5560 5561func (s *UrlTargeting) MarshalJSON() ([]byte, error) { 5562 type NoMethod UrlTargeting 5563 raw := NoMethod(*s) 5564 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5565} 5566 5567// VideoContent: Video content for a creative. 5568type VideoContent struct { 5569 // VideoUrl: The URL to fetch a video ad. 5570 VideoUrl string `json:"videoUrl,omitempty"` 5571 5572 // VideoVastXml: The contents of a VAST document for a video ad. This 5573 // document should conform to the VAST 2.0 or 3.0 standard. 5574 VideoVastXml string `json:"videoVastXml,omitempty"` 5575 5576 // ForceSendFields is a list of field names (e.g. "VideoUrl") to 5577 // unconditionally include in API requests. By default, fields with 5578 // empty values are omitted from API requests. However, any non-pointer, 5579 // non-interface field appearing in ForceSendFields will be sent to the 5580 // server regardless of whether the field is empty or not. This may be 5581 // used to include empty fields in Patch requests. 5582 ForceSendFields []string `json:"-"` 5583 5584 // NullFields is a list of field names (e.g. "VideoUrl") to include in 5585 // API requests with the JSON null value. By default, fields with empty 5586 // values are omitted from API requests. However, any field with an 5587 // empty value appearing in NullFields will be sent to the server as 5588 // null. It is an error if a field in this list has a non-empty value. 5589 // This may be used to include null fields in Patch requests. 5590 NullFields []string `json:"-"` 5591} 5592 5593func (s *VideoContent) MarshalJSON() ([]byte, error) { 5594 type NoMethod VideoContent 5595 raw := NoMethod(*s) 5596 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5597} 5598 5599// VideoTargeting: Represents targeting information about video. 5600type VideoTargeting struct { 5601 // ExcludedPositionTypes: A list of video positions to be excluded. 5602 // Position types can either be included or excluded (XOR). 5603 // 5604 // Possible values: 5605 // "POSITION_TYPE_UNSPECIFIED" - A placeholder for an undefined video 5606 // position. 5607 // "PREROLL" - Ad is played before the video. 5608 // "MIDROLL" - Ad is played during the video. 5609 // "POSTROLL" - Ad is played after the video. 5610 ExcludedPositionTypes []string `json:"excludedPositionTypes,omitempty"` 5611 5612 // TargetedPositionTypes: A list of video positions to be included. When 5613 // the included list is present, the excluded list must be empty. When 5614 // the excluded list is present, the included list must be empty. 5615 // 5616 // Possible values: 5617 // "POSITION_TYPE_UNSPECIFIED" - A placeholder for an undefined video 5618 // position. 5619 // "PREROLL" - Ad is played before the video. 5620 // "MIDROLL" - Ad is played during the video. 5621 // "POSTROLL" - Ad is played after the video. 5622 TargetedPositionTypes []string `json:"targetedPositionTypes,omitempty"` 5623 5624 // ForceSendFields is a list of field names (e.g. 5625 // "ExcludedPositionTypes") to unconditionally include in API requests. 5626 // By default, fields with empty values are omitted from API requests. 5627 // However, any non-pointer, non-interface field appearing in 5628 // ForceSendFields will be sent to the server regardless of whether the 5629 // field is empty or not. This may be used to include empty fields in 5630 // Patch requests. 5631 ForceSendFields []string `json:"-"` 5632 5633 // NullFields is a list of field names (e.g. "ExcludedPositionTypes") to 5634 // include in API requests with the JSON null value. By default, fields 5635 // with empty values are omitted from API requests. However, any field 5636 // with an empty value appearing in NullFields will be sent to the 5637 // server as null. It is an error if a field in this list has a 5638 // non-empty value. This may be used to include null fields in Patch 5639 // requests. 5640 NullFields []string `json:"-"` 5641} 5642 5643func (s *VideoTargeting) MarshalJSON() ([]byte, error) { 5644 type NoMethod VideoTargeting 5645 raw := NoMethod(*s) 5646 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5647} 5648 5649// WatchCreativeRequest: A request for watching changes to creative 5650// Status. 5651type WatchCreativeRequest struct { 5652 // Topic: The Pub/Sub topic to publish notifications to. This topic must 5653 // already exist and must give permission to 5654 // ad-exchange-buyside-reports@google.com to write to the topic. This 5655 // should be the full resource name in 5656 // "projects/{project_id}/topics/{topic_id}" format. 5657 Topic string `json:"topic,omitempty"` 5658 5659 // ForceSendFields is a list of field names (e.g. "Topic") to 5660 // unconditionally include in API requests. By default, fields with 5661 // empty values are omitted from API requests. However, any non-pointer, 5662 // non-interface field appearing in ForceSendFields will be sent to the 5663 // server regardless of whether the field is empty or not. This may be 5664 // used to include empty fields in Patch requests. 5665 ForceSendFields []string `json:"-"` 5666 5667 // NullFields is a list of field names (e.g. "Topic") to include in API 5668 // requests with the JSON null value. By default, fields with empty 5669 // values are omitted from API requests. However, any field with an 5670 // empty value appearing in NullFields will be sent to the server as 5671 // null. It is an error if a field in this list has a non-empty value. 5672 // This may be used to include null fields in Patch requests. 5673 NullFields []string `json:"-"` 5674} 5675 5676func (s *WatchCreativeRequest) MarshalJSON() ([]byte, error) { 5677 type NoMethod WatchCreativeRequest 5678 raw := NoMethod(*s) 5679 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5680} 5681 5682// method id "adexchangebuyer2.accounts.clients.create": 5683 5684type AccountsClientsCreateCall struct { 5685 s *Service 5686 accountId int64 5687 client *Client 5688 urlParams_ gensupport.URLParams 5689 ctx_ context.Context 5690 header_ http.Header 5691} 5692 5693// Create: Creates a new client buyer. 5694// 5695// - accountId: Unique numerical account ID for the buyer of which the 5696// client buyer is a customer; the sponsor buyer to create a client 5697// for. (required). 5698func (r *AccountsClientsService) Create(accountId int64, client *Client) *AccountsClientsCreateCall { 5699 c := &AccountsClientsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5700 c.accountId = accountId 5701 c.client = client 5702 return c 5703} 5704 5705// Fields allows partial responses to be retrieved. See 5706// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5707// for more information. 5708func (c *AccountsClientsCreateCall) Fields(s ...googleapi.Field) *AccountsClientsCreateCall { 5709 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5710 return c 5711} 5712 5713// Context sets the context to be used in this call's Do method. Any 5714// pending HTTP request will be aborted if the provided context is 5715// canceled. 5716func (c *AccountsClientsCreateCall) Context(ctx context.Context) *AccountsClientsCreateCall { 5717 c.ctx_ = ctx 5718 return c 5719} 5720 5721// Header returns an http.Header that can be modified by the caller to 5722// add HTTP headers to the request. 5723func (c *AccountsClientsCreateCall) Header() http.Header { 5724 if c.header_ == nil { 5725 c.header_ = make(http.Header) 5726 } 5727 return c.header_ 5728} 5729 5730func (c *AccountsClientsCreateCall) doRequest(alt string) (*http.Response, error) { 5731 reqHeaders := make(http.Header) 5732 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 5733 for k, v := range c.header_ { 5734 reqHeaders[k] = v 5735 } 5736 reqHeaders.Set("User-Agent", c.s.userAgent()) 5737 var body io.Reader = nil 5738 body, err := googleapi.WithoutDataWrapper.JSONReader(c.client) 5739 if err != nil { 5740 return nil, err 5741 } 5742 reqHeaders.Set("Content-Type", "application/json") 5743 c.urlParams_.Set("alt", alt) 5744 c.urlParams_.Set("prettyPrint", "false") 5745 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients") 5746 urls += "?" + c.urlParams_.Encode() 5747 req, err := http.NewRequest("POST", urls, body) 5748 if err != nil { 5749 return nil, err 5750 } 5751 req.Header = reqHeaders 5752 googleapi.Expand(req.URL, map[string]string{ 5753 "accountId": strconv.FormatInt(c.accountId, 10), 5754 }) 5755 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5756} 5757 5758// Do executes the "adexchangebuyer2.accounts.clients.create" call. 5759// Exactly one of *Client or error will be non-nil. Any non-2xx status 5760// code is an error. Response headers are in either 5761// *Client.ServerResponse.Header or (if a response was returned at all) 5762// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5763// check whether the returned error was because http.StatusNotModified 5764// was returned. 5765func (c *AccountsClientsCreateCall) Do(opts ...googleapi.CallOption) (*Client, error) { 5766 gensupport.SetOptions(c.urlParams_, opts...) 5767 res, err := c.doRequest("json") 5768 if res != nil && res.StatusCode == http.StatusNotModified { 5769 if res.Body != nil { 5770 res.Body.Close() 5771 } 5772 return nil, &googleapi.Error{ 5773 Code: res.StatusCode, 5774 Header: res.Header, 5775 } 5776 } 5777 if err != nil { 5778 return nil, err 5779 } 5780 defer googleapi.CloseBody(res) 5781 if err := googleapi.CheckResponse(res); err != nil { 5782 return nil, err 5783 } 5784 ret := &Client{ 5785 ServerResponse: googleapi.ServerResponse{ 5786 Header: res.Header, 5787 HTTPStatusCode: res.StatusCode, 5788 }, 5789 } 5790 target := &ret 5791 if err := gensupport.DecodeResponse(target, res); err != nil { 5792 return nil, err 5793 } 5794 return ret, nil 5795 // { 5796 // "description": "Creates a new client buyer.", 5797 // "flatPath": "v2beta1/accounts/{accountId}/clients", 5798 // "httpMethod": "POST", 5799 // "id": "adexchangebuyer2.accounts.clients.create", 5800 // "parameterOrder": [ 5801 // "accountId" 5802 // ], 5803 // "parameters": { 5804 // "accountId": { 5805 // "description": "Unique numerical account ID for the buyer of which the client buyer is a customer; the sponsor buyer to create a client for. (required)", 5806 // "format": "int64", 5807 // "location": "path", 5808 // "required": true, 5809 // "type": "string" 5810 // } 5811 // }, 5812 // "path": "v2beta1/accounts/{accountId}/clients", 5813 // "request": { 5814 // "$ref": "Client" 5815 // }, 5816 // "response": { 5817 // "$ref": "Client" 5818 // }, 5819 // "scopes": [ 5820 // "https://www.googleapis.com/auth/adexchange.buyer" 5821 // ] 5822 // } 5823 5824} 5825 5826// method id "adexchangebuyer2.accounts.clients.get": 5827 5828type AccountsClientsGetCall struct { 5829 s *Service 5830 accountId int64 5831 clientAccountId int64 5832 urlParams_ gensupport.URLParams 5833 ifNoneMatch_ string 5834 ctx_ context.Context 5835 header_ http.Header 5836} 5837 5838// Get: Gets a client buyer with a given client account ID. 5839// 5840// - accountId: Numerical account ID of the client's sponsor buyer. 5841// (required). 5842// - clientAccountId: Numerical account ID of the client buyer to 5843// retrieve. (required). 5844func (r *AccountsClientsService) Get(accountId int64, clientAccountId int64) *AccountsClientsGetCall { 5845 c := &AccountsClientsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5846 c.accountId = accountId 5847 c.clientAccountId = clientAccountId 5848 return c 5849} 5850 5851// Fields allows partial responses to be retrieved. See 5852// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5853// for more information. 5854func (c *AccountsClientsGetCall) Fields(s ...googleapi.Field) *AccountsClientsGetCall { 5855 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5856 return c 5857} 5858 5859// IfNoneMatch sets the optional parameter which makes the operation 5860// fail if the object's ETag matches the given value. This is useful for 5861// getting updates only after the object has changed since the last 5862// request. Use googleapi.IsNotModified to check whether the response 5863// error from Do is the result of In-None-Match. 5864func (c *AccountsClientsGetCall) IfNoneMatch(entityTag string) *AccountsClientsGetCall { 5865 c.ifNoneMatch_ = entityTag 5866 return c 5867} 5868 5869// Context sets the context to be used in this call's Do method. Any 5870// pending HTTP request will be aborted if the provided context is 5871// canceled. 5872func (c *AccountsClientsGetCall) Context(ctx context.Context) *AccountsClientsGetCall { 5873 c.ctx_ = ctx 5874 return c 5875} 5876 5877// Header returns an http.Header that can be modified by the caller to 5878// add HTTP headers to the request. 5879func (c *AccountsClientsGetCall) Header() http.Header { 5880 if c.header_ == nil { 5881 c.header_ = make(http.Header) 5882 } 5883 return c.header_ 5884} 5885 5886func (c *AccountsClientsGetCall) doRequest(alt string) (*http.Response, error) { 5887 reqHeaders := make(http.Header) 5888 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 5889 for k, v := range c.header_ { 5890 reqHeaders[k] = v 5891 } 5892 reqHeaders.Set("User-Agent", c.s.userAgent()) 5893 if c.ifNoneMatch_ != "" { 5894 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5895 } 5896 var body io.Reader = nil 5897 c.urlParams_.Set("alt", alt) 5898 c.urlParams_.Set("prettyPrint", "false") 5899 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}") 5900 urls += "?" + c.urlParams_.Encode() 5901 req, err := http.NewRequest("GET", urls, body) 5902 if err != nil { 5903 return nil, err 5904 } 5905 req.Header = reqHeaders 5906 googleapi.Expand(req.URL, map[string]string{ 5907 "accountId": strconv.FormatInt(c.accountId, 10), 5908 "clientAccountId": strconv.FormatInt(c.clientAccountId, 10), 5909 }) 5910 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5911} 5912 5913// Do executes the "adexchangebuyer2.accounts.clients.get" call. 5914// Exactly one of *Client or error will be non-nil. Any non-2xx status 5915// code is an error. Response headers are in either 5916// *Client.ServerResponse.Header or (if a response was returned at all) 5917// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5918// check whether the returned error was because http.StatusNotModified 5919// was returned. 5920func (c *AccountsClientsGetCall) Do(opts ...googleapi.CallOption) (*Client, error) { 5921 gensupport.SetOptions(c.urlParams_, opts...) 5922 res, err := c.doRequest("json") 5923 if res != nil && res.StatusCode == http.StatusNotModified { 5924 if res.Body != nil { 5925 res.Body.Close() 5926 } 5927 return nil, &googleapi.Error{ 5928 Code: res.StatusCode, 5929 Header: res.Header, 5930 } 5931 } 5932 if err != nil { 5933 return nil, err 5934 } 5935 defer googleapi.CloseBody(res) 5936 if err := googleapi.CheckResponse(res); err != nil { 5937 return nil, err 5938 } 5939 ret := &Client{ 5940 ServerResponse: googleapi.ServerResponse{ 5941 Header: res.Header, 5942 HTTPStatusCode: res.StatusCode, 5943 }, 5944 } 5945 target := &ret 5946 if err := gensupport.DecodeResponse(target, res); err != nil { 5947 return nil, err 5948 } 5949 return ret, nil 5950 // { 5951 // "description": "Gets a client buyer with a given client account ID.", 5952 // "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", 5953 // "httpMethod": "GET", 5954 // "id": "adexchangebuyer2.accounts.clients.get", 5955 // "parameterOrder": [ 5956 // "accountId", 5957 // "clientAccountId" 5958 // ], 5959 // "parameters": { 5960 // "accountId": { 5961 // "description": "Numerical account ID of the client's sponsor buyer. (required)", 5962 // "format": "int64", 5963 // "location": "path", 5964 // "required": true, 5965 // "type": "string" 5966 // }, 5967 // "clientAccountId": { 5968 // "description": "Numerical account ID of the client buyer to retrieve. (required)", 5969 // "format": "int64", 5970 // "location": "path", 5971 // "required": true, 5972 // "type": "string" 5973 // } 5974 // }, 5975 // "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", 5976 // "response": { 5977 // "$ref": "Client" 5978 // }, 5979 // "scopes": [ 5980 // "https://www.googleapis.com/auth/adexchange.buyer" 5981 // ] 5982 // } 5983 5984} 5985 5986// method id "adexchangebuyer2.accounts.clients.list": 5987 5988type AccountsClientsListCall struct { 5989 s *Service 5990 accountId int64 5991 urlParams_ gensupport.URLParams 5992 ifNoneMatch_ string 5993 ctx_ context.Context 5994 header_ http.Header 5995} 5996 5997// List: Lists all the clients for the current sponsor buyer. 5998// 5999// - accountId: Unique numerical account ID of the sponsor buyer to list 6000// the clients for. 6001func (r *AccountsClientsService) List(accountId int64) *AccountsClientsListCall { 6002 c := &AccountsClientsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6003 c.accountId = accountId 6004 return c 6005} 6006 6007// PageSize sets the optional parameter "pageSize": Requested page size. 6008// The server may return fewer clients than requested. If unspecified, 6009// the server will pick an appropriate default. 6010func (c *AccountsClientsListCall) PageSize(pageSize int64) *AccountsClientsListCall { 6011 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 6012 return c 6013} 6014 6015// PageToken sets the optional parameter "pageToken": A token 6016// identifying a page of results the server should return. Typically, 6017// this is the value of ListClientsResponse.nextPageToken returned from 6018// the previous call to the accounts.clients.list method. 6019func (c *AccountsClientsListCall) PageToken(pageToken string) *AccountsClientsListCall { 6020 c.urlParams_.Set("pageToken", pageToken) 6021 return c 6022} 6023 6024// PartnerClientId sets the optional parameter "partnerClientId": 6025// Optional unique identifier (from the standpoint of an Ad Exchange 6026// sponsor buyer partner) of the client to return. If specified, at most 6027// one client will be returned in the response. 6028func (c *AccountsClientsListCall) PartnerClientId(partnerClientId string) *AccountsClientsListCall { 6029 c.urlParams_.Set("partnerClientId", partnerClientId) 6030 return c 6031} 6032 6033// Fields allows partial responses to be retrieved. See 6034// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6035// for more information. 6036func (c *AccountsClientsListCall) Fields(s ...googleapi.Field) *AccountsClientsListCall { 6037 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6038 return c 6039} 6040 6041// IfNoneMatch sets the optional parameter which makes the operation 6042// fail if the object's ETag matches the given value. This is useful for 6043// getting updates only after the object has changed since the last 6044// request. Use googleapi.IsNotModified to check whether the response 6045// error from Do is the result of In-None-Match. 6046func (c *AccountsClientsListCall) IfNoneMatch(entityTag string) *AccountsClientsListCall { 6047 c.ifNoneMatch_ = entityTag 6048 return c 6049} 6050 6051// Context sets the context to be used in this call's Do method. Any 6052// pending HTTP request will be aborted if the provided context is 6053// canceled. 6054func (c *AccountsClientsListCall) Context(ctx context.Context) *AccountsClientsListCall { 6055 c.ctx_ = ctx 6056 return c 6057} 6058 6059// Header returns an http.Header that can be modified by the caller to 6060// add HTTP headers to the request. 6061func (c *AccountsClientsListCall) Header() http.Header { 6062 if c.header_ == nil { 6063 c.header_ = make(http.Header) 6064 } 6065 return c.header_ 6066} 6067 6068func (c *AccountsClientsListCall) doRequest(alt string) (*http.Response, error) { 6069 reqHeaders := make(http.Header) 6070 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 6071 for k, v := range c.header_ { 6072 reqHeaders[k] = v 6073 } 6074 reqHeaders.Set("User-Agent", c.s.userAgent()) 6075 if c.ifNoneMatch_ != "" { 6076 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6077 } 6078 var body io.Reader = nil 6079 c.urlParams_.Set("alt", alt) 6080 c.urlParams_.Set("prettyPrint", "false") 6081 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients") 6082 urls += "?" + c.urlParams_.Encode() 6083 req, err := http.NewRequest("GET", urls, body) 6084 if err != nil { 6085 return nil, err 6086 } 6087 req.Header = reqHeaders 6088 googleapi.Expand(req.URL, map[string]string{ 6089 "accountId": strconv.FormatInt(c.accountId, 10), 6090 }) 6091 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6092} 6093 6094// Do executes the "adexchangebuyer2.accounts.clients.list" call. 6095// Exactly one of *ListClientsResponse or error will be non-nil. Any 6096// non-2xx status code is an error. Response headers are in either 6097// *ListClientsResponse.ServerResponse.Header or (if a response was 6098// returned at all) in error.(*googleapi.Error).Header. Use 6099// googleapi.IsNotModified to check whether the returned error was 6100// because http.StatusNotModified was returned. 6101func (c *AccountsClientsListCall) Do(opts ...googleapi.CallOption) (*ListClientsResponse, error) { 6102 gensupport.SetOptions(c.urlParams_, opts...) 6103 res, err := c.doRequest("json") 6104 if res != nil && res.StatusCode == http.StatusNotModified { 6105 if res.Body != nil { 6106 res.Body.Close() 6107 } 6108 return nil, &googleapi.Error{ 6109 Code: res.StatusCode, 6110 Header: res.Header, 6111 } 6112 } 6113 if err != nil { 6114 return nil, err 6115 } 6116 defer googleapi.CloseBody(res) 6117 if err := googleapi.CheckResponse(res); err != nil { 6118 return nil, err 6119 } 6120 ret := &ListClientsResponse{ 6121 ServerResponse: googleapi.ServerResponse{ 6122 Header: res.Header, 6123 HTTPStatusCode: res.StatusCode, 6124 }, 6125 } 6126 target := &ret 6127 if err := gensupport.DecodeResponse(target, res); err != nil { 6128 return nil, err 6129 } 6130 return ret, nil 6131 // { 6132 // "description": "Lists all the clients for the current sponsor buyer.", 6133 // "flatPath": "v2beta1/accounts/{accountId}/clients", 6134 // "httpMethod": "GET", 6135 // "id": "adexchangebuyer2.accounts.clients.list", 6136 // "parameterOrder": [ 6137 // "accountId" 6138 // ], 6139 // "parameters": { 6140 // "accountId": { 6141 // "description": "Unique numerical account ID of the sponsor buyer to list the clients for.", 6142 // "format": "int64", 6143 // "location": "path", 6144 // "required": true, 6145 // "type": "string" 6146 // }, 6147 // "pageSize": { 6148 // "description": "Requested page size. The server may return fewer clients than requested. If unspecified, the server will pick an appropriate default.", 6149 // "format": "int32", 6150 // "location": "query", 6151 // "type": "integer" 6152 // }, 6153 // "pageToken": { 6154 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListClientsResponse.nextPageToken returned from the previous call to the accounts.clients.list method.", 6155 // "location": "query", 6156 // "type": "string" 6157 // }, 6158 // "partnerClientId": { 6159 // "description": "Optional unique identifier (from the standpoint of an Ad Exchange sponsor buyer partner) of the client to return. If specified, at most one client will be returned in the response.", 6160 // "location": "query", 6161 // "type": "string" 6162 // } 6163 // }, 6164 // "path": "v2beta1/accounts/{accountId}/clients", 6165 // "response": { 6166 // "$ref": "ListClientsResponse" 6167 // }, 6168 // "scopes": [ 6169 // "https://www.googleapis.com/auth/adexchange.buyer" 6170 // ] 6171 // } 6172 6173} 6174 6175// Pages invokes f for each page of results. 6176// A non-nil error returned from f will halt the iteration. 6177// The provided context supersedes any context provided to the Context method. 6178func (c *AccountsClientsListCall) Pages(ctx context.Context, f func(*ListClientsResponse) error) error { 6179 c.ctx_ = ctx 6180 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6181 for { 6182 x, err := c.Do() 6183 if err != nil { 6184 return err 6185 } 6186 if err := f(x); err != nil { 6187 return err 6188 } 6189 if x.NextPageToken == "" { 6190 return nil 6191 } 6192 c.PageToken(x.NextPageToken) 6193 } 6194} 6195 6196// method id "adexchangebuyer2.accounts.clients.update": 6197 6198type AccountsClientsUpdateCall struct { 6199 s *Service 6200 accountId int64 6201 clientAccountId int64 6202 client *Client 6203 urlParams_ gensupport.URLParams 6204 ctx_ context.Context 6205 header_ http.Header 6206} 6207 6208// Update: Updates an existing client buyer. 6209// 6210// - accountId: Unique numerical account ID for the buyer of which the 6211// client buyer is a customer; the sponsor buyer to update a client 6212// for. (required). 6213// - clientAccountId: Unique numerical account ID of the client to 6214// update. (required). 6215func (r *AccountsClientsService) Update(accountId int64, clientAccountId int64, client *Client) *AccountsClientsUpdateCall { 6216 c := &AccountsClientsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6217 c.accountId = accountId 6218 c.clientAccountId = clientAccountId 6219 c.client = client 6220 return c 6221} 6222 6223// Fields allows partial responses to be retrieved. See 6224// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6225// for more information. 6226func (c *AccountsClientsUpdateCall) Fields(s ...googleapi.Field) *AccountsClientsUpdateCall { 6227 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6228 return c 6229} 6230 6231// Context sets the context to be used in this call's Do method. Any 6232// pending HTTP request will be aborted if the provided context is 6233// canceled. 6234func (c *AccountsClientsUpdateCall) Context(ctx context.Context) *AccountsClientsUpdateCall { 6235 c.ctx_ = ctx 6236 return c 6237} 6238 6239// Header returns an http.Header that can be modified by the caller to 6240// add HTTP headers to the request. 6241func (c *AccountsClientsUpdateCall) Header() http.Header { 6242 if c.header_ == nil { 6243 c.header_ = make(http.Header) 6244 } 6245 return c.header_ 6246} 6247 6248func (c *AccountsClientsUpdateCall) doRequest(alt string) (*http.Response, error) { 6249 reqHeaders := make(http.Header) 6250 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 6251 for k, v := range c.header_ { 6252 reqHeaders[k] = v 6253 } 6254 reqHeaders.Set("User-Agent", c.s.userAgent()) 6255 var body io.Reader = nil 6256 body, err := googleapi.WithoutDataWrapper.JSONReader(c.client) 6257 if err != nil { 6258 return nil, err 6259 } 6260 reqHeaders.Set("Content-Type", "application/json") 6261 c.urlParams_.Set("alt", alt) 6262 c.urlParams_.Set("prettyPrint", "false") 6263 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}") 6264 urls += "?" + c.urlParams_.Encode() 6265 req, err := http.NewRequest("PUT", urls, body) 6266 if err != nil { 6267 return nil, err 6268 } 6269 req.Header = reqHeaders 6270 googleapi.Expand(req.URL, map[string]string{ 6271 "accountId": strconv.FormatInt(c.accountId, 10), 6272 "clientAccountId": strconv.FormatInt(c.clientAccountId, 10), 6273 }) 6274 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6275} 6276 6277// Do executes the "adexchangebuyer2.accounts.clients.update" call. 6278// Exactly one of *Client or error will be non-nil. Any non-2xx status 6279// code is an error. Response headers are in either 6280// *Client.ServerResponse.Header or (if a response was returned at all) 6281// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6282// check whether the returned error was because http.StatusNotModified 6283// was returned. 6284func (c *AccountsClientsUpdateCall) Do(opts ...googleapi.CallOption) (*Client, error) { 6285 gensupport.SetOptions(c.urlParams_, opts...) 6286 res, err := c.doRequest("json") 6287 if res != nil && res.StatusCode == http.StatusNotModified { 6288 if res.Body != nil { 6289 res.Body.Close() 6290 } 6291 return nil, &googleapi.Error{ 6292 Code: res.StatusCode, 6293 Header: res.Header, 6294 } 6295 } 6296 if err != nil { 6297 return nil, err 6298 } 6299 defer googleapi.CloseBody(res) 6300 if err := googleapi.CheckResponse(res); err != nil { 6301 return nil, err 6302 } 6303 ret := &Client{ 6304 ServerResponse: googleapi.ServerResponse{ 6305 Header: res.Header, 6306 HTTPStatusCode: res.StatusCode, 6307 }, 6308 } 6309 target := &ret 6310 if err := gensupport.DecodeResponse(target, res); err != nil { 6311 return nil, err 6312 } 6313 return ret, nil 6314 // { 6315 // "description": "Updates an existing client buyer.", 6316 // "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", 6317 // "httpMethod": "PUT", 6318 // "id": "adexchangebuyer2.accounts.clients.update", 6319 // "parameterOrder": [ 6320 // "accountId", 6321 // "clientAccountId" 6322 // ], 6323 // "parameters": { 6324 // "accountId": { 6325 // "description": "Unique numerical account ID for the buyer of which the client buyer is a customer; the sponsor buyer to update a client for. (required)", 6326 // "format": "int64", 6327 // "location": "path", 6328 // "required": true, 6329 // "type": "string" 6330 // }, 6331 // "clientAccountId": { 6332 // "description": "Unique numerical account ID of the client to update. (required)", 6333 // "format": "int64", 6334 // "location": "path", 6335 // "required": true, 6336 // "type": "string" 6337 // } 6338 // }, 6339 // "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", 6340 // "request": { 6341 // "$ref": "Client" 6342 // }, 6343 // "response": { 6344 // "$ref": "Client" 6345 // }, 6346 // "scopes": [ 6347 // "https://www.googleapis.com/auth/adexchange.buyer" 6348 // ] 6349 // } 6350 6351} 6352 6353// method id "adexchangebuyer2.accounts.clients.invitations.create": 6354 6355type AccountsClientsInvitationsCreateCall struct { 6356 s *Service 6357 accountId int64 6358 clientAccountId int64 6359 clientuserinvitation *ClientUserInvitation 6360 urlParams_ gensupport.URLParams 6361 ctx_ context.Context 6362 header_ http.Header 6363} 6364 6365// Create: Creates and sends out an email invitation to access an Ad 6366// Exchange client buyer account. 6367// 6368// - accountId: Numerical account ID of the client's sponsor buyer. 6369// (required). 6370// - clientAccountId: Numerical account ID of the client buyer that the 6371// user should be associated with. (required). 6372func (r *AccountsClientsInvitationsService) Create(accountId int64, clientAccountId int64, clientuserinvitation *ClientUserInvitation) *AccountsClientsInvitationsCreateCall { 6373 c := &AccountsClientsInvitationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6374 c.accountId = accountId 6375 c.clientAccountId = clientAccountId 6376 c.clientuserinvitation = clientuserinvitation 6377 return c 6378} 6379 6380// Fields allows partial responses to be retrieved. See 6381// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6382// for more information. 6383func (c *AccountsClientsInvitationsCreateCall) Fields(s ...googleapi.Field) *AccountsClientsInvitationsCreateCall { 6384 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6385 return c 6386} 6387 6388// Context sets the context to be used in this call's Do method. Any 6389// pending HTTP request will be aborted if the provided context is 6390// canceled. 6391func (c *AccountsClientsInvitationsCreateCall) Context(ctx context.Context) *AccountsClientsInvitationsCreateCall { 6392 c.ctx_ = ctx 6393 return c 6394} 6395 6396// Header returns an http.Header that can be modified by the caller to 6397// add HTTP headers to the request. 6398func (c *AccountsClientsInvitationsCreateCall) Header() http.Header { 6399 if c.header_ == nil { 6400 c.header_ = make(http.Header) 6401 } 6402 return c.header_ 6403} 6404 6405func (c *AccountsClientsInvitationsCreateCall) doRequest(alt string) (*http.Response, error) { 6406 reqHeaders := make(http.Header) 6407 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 6408 for k, v := range c.header_ { 6409 reqHeaders[k] = v 6410 } 6411 reqHeaders.Set("User-Agent", c.s.userAgent()) 6412 var body io.Reader = nil 6413 body, err := googleapi.WithoutDataWrapper.JSONReader(c.clientuserinvitation) 6414 if err != nil { 6415 return nil, err 6416 } 6417 reqHeaders.Set("Content-Type", "application/json") 6418 c.urlParams_.Set("alt", alt) 6419 c.urlParams_.Set("prettyPrint", "false") 6420 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations") 6421 urls += "?" + c.urlParams_.Encode() 6422 req, err := http.NewRequest("POST", urls, body) 6423 if err != nil { 6424 return nil, err 6425 } 6426 req.Header = reqHeaders 6427 googleapi.Expand(req.URL, map[string]string{ 6428 "accountId": strconv.FormatInt(c.accountId, 10), 6429 "clientAccountId": strconv.FormatInt(c.clientAccountId, 10), 6430 }) 6431 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6432} 6433 6434// Do executes the "adexchangebuyer2.accounts.clients.invitations.create" call. 6435// Exactly one of *ClientUserInvitation or error will be non-nil. Any 6436// non-2xx status code is an error. Response headers are in either 6437// *ClientUserInvitation.ServerResponse.Header or (if a response was 6438// returned at all) in error.(*googleapi.Error).Header. Use 6439// googleapi.IsNotModified to check whether the returned error was 6440// because http.StatusNotModified was returned. 6441func (c *AccountsClientsInvitationsCreateCall) Do(opts ...googleapi.CallOption) (*ClientUserInvitation, error) { 6442 gensupport.SetOptions(c.urlParams_, opts...) 6443 res, err := c.doRequest("json") 6444 if res != nil && res.StatusCode == http.StatusNotModified { 6445 if res.Body != nil { 6446 res.Body.Close() 6447 } 6448 return nil, &googleapi.Error{ 6449 Code: res.StatusCode, 6450 Header: res.Header, 6451 } 6452 } 6453 if err != nil { 6454 return nil, err 6455 } 6456 defer googleapi.CloseBody(res) 6457 if err := googleapi.CheckResponse(res); err != nil { 6458 return nil, err 6459 } 6460 ret := &ClientUserInvitation{ 6461 ServerResponse: googleapi.ServerResponse{ 6462 Header: res.Header, 6463 HTTPStatusCode: res.StatusCode, 6464 }, 6465 } 6466 target := &ret 6467 if err := gensupport.DecodeResponse(target, res); err != nil { 6468 return nil, err 6469 } 6470 return ret, nil 6471 // { 6472 // "description": "Creates and sends out an email invitation to access an Ad Exchange client buyer account.", 6473 // "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", 6474 // "httpMethod": "POST", 6475 // "id": "adexchangebuyer2.accounts.clients.invitations.create", 6476 // "parameterOrder": [ 6477 // "accountId", 6478 // "clientAccountId" 6479 // ], 6480 // "parameters": { 6481 // "accountId": { 6482 // "description": "Numerical account ID of the client's sponsor buyer. (required)", 6483 // "format": "int64", 6484 // "location": "path", 6485 // "required": true, 6486 // "type": "string" 6487 // }, 6488 // "clientAccountId": { 6489 // "description": "Numerical account ID of the client buyer that the user should be associated with. (required)", 6490 // "format": "int64", 6491 // "location": "path", 6492 // "required": true, 6493 // "type": "string" 6494 // } 6495 // }, 6496 // "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", 6497 // "request": { 6498 // "$ref": "ClientUserInvitation" 6499 // }, 6500 // "response": { 6501 // "$ref": "ClientUserInvitation" 6502 // }, 6503 // "scopes": [ 6504 // "https://www.googleapis.com/auth/adexchange.buyer" 6505 // ] 6506 // } 6507 6508} 6509 6510// method id "adexchangebuyer2.accounts.clients.invitations.get": 6511 6512type AccountsClientsInvitationsGetCall struct { 6513 s *Service 6514 accountId int64 6515 clientAccountId int64 6516 invitationId int64 6517 urlParams_ gensupport.URLParams 6518 ifNoneMatch_ string 6519 ctx_ context.Context 6520 header_ http.Header 6521} 6522 6523// Get: Retrieves an existing client user invitation. 6524// 6525// - accountId: Numerical account ID of the client's sponsor buyer. 6526// (required). 6527// - clientAccountId: Numerical account ID of the client buyer that the 6528// user invitation to be retrieved is associated with. (required). 6529// - invitationId: Numerical identifier of the user invitation to 6530// retrieve. (required). 6531func (r *AccountsClientsInvitationsService) Get(accountId int64, clientAccountId int64, invitationId int64) *AccountsClientsInvitationsGetCall { 6532 c := &AccountsClientsInvitationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6533 c.accountId = accountId 6534 c.clientAccountId = clientAccountId 6535 c.invitationId = invitationId 6536 return c 6537} 6538 6539// Fields allows partial responses to be retrieved. See 6540// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6541// for more information. 6542func (c *AccountsClientsInvitationsGetCall) Fields(s ...googleapi.Field) *AccountsClientsInvitationsGetCall { 6543 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6544 return c 6545} 6546 6547// IfNoneMatch sets the optional parameter which makes the operation 6548// fail if the object's ETag matches the given value. This is useful for 6549// getting updates only after the object has changed since the last 6550// request. Use googleapi.IsNotModified to check whether the response 6551// error from Do is the result of In-None-Match. 6552func (c *AccountsClientsInvitationsGetCall) IfNoneMatch(entityTag string) *AccountsClientsInvitationsGetCall { 6553 c.ifNoneMatch_ = entityTag 6554 return c 6555} 6556 6557// Context sets the context to be used in this call's Do method. Any 6558// pending HTTP request will be aborted if the provided context is 6559// canceled. 6560func (c *AccountsClientsInvitationsGetCall) Context(ctx context.Context) *AccountsClientsInvitationsGetCall { 6561 c.ctx_ = ctx 6562 return c 6563} 6564 6565// Header returns an http.Header that can be modified by the caller to 6566// add HTTP headers to the request. 6567func (c *AccountsClientsInvitationsGetCall) Header() http.Header { 6568 if c.header_ == nil { 6569 c.header_ = make(http.Header) 6570 } 6571 return c.header_ 6572} 6573 6574func (c *AccountsClientsInvitationsGetCall) doRequest(alt string) (*http.Response, error) { 6575 reqHeaders := make(http.Header) 6576 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 6577 for k, v := range c.header_ { 6578 reqHeaders[k] = v 6579 } 6580 reqHeaders.Set("User-Agent", c.s.userAgent()) 6581 if c.ifNoneMatch_ != "" { 6582 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6583 } 6584 var body io.Reader = nil 6585 c.urlParams_.Set("alt", alt) 6586 c.urlParams_.Set("prettyPrint", "false") 6587 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}") 6588 urls += "?" + c.urlParams_.Encode() 6589 req, err := http.NewRequest("GET", urls, body) 6590 if err != nil { 6591 return nil, err 6592 } 6593 req.Header = reqHeaders 6594 googleapi.Expand(req.URL, map[string]string{ 6595 "accountId": strconv.FormatInt(c.accountId, 10), 6596 "clientAccountId": strconv.FormatInt(c.clientAccountId, 10), 6597 "invitationId": strconv.FormatInt(c.invitationId, 10), 6598 }) 6599 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6600} 6601 6602// Do executes the "adexchangebuyer2.accounts.clients.invitations.get" call. 6603// Exactly one of *ClientUserInvitation or error will be non-nil. Any 6604// non-2xx status code is an error. Response headers are in either 6605// *ClientUserInvitation.ServerResponse.Header or (if a response was 6606// returned at all) in error.(*googleapi.Error).Header. Use 6607// googleapi.IsNotModified to check whether the returned error was 6608// because http.StatusNotModified was returned. 6609func (c *AccountsClientsInvitationsGetCall) Do(opts ...googleapi.CallOption) (*ClientUserInvitation, error) { 6610 gensupport.SetOptions(c.urlParams_, opts...) 6611 res, err := c.doRequest("json") 6612 if res != nil && res.StatusCode == http.StatusNotModified { 6613 if res.Body != nil { 6614 res.Body.Close() 6615 } 6616 return nil, &googleapi.Error{ 6617 Code: res.StatusCode, 6618 Header: res.Header, 6619 } 6620 } 6621 if err != nil { 6622 return nil, err 6623 } 6624 defer googleapi.CloseBody(res) 6625 if err := googleapi.CheckResponse(res); err != nil { 6626 return nil, err 6627 } 6628 ret := &ClientUserInvitation{ 6629 ServerResponse: googleapi.ServerResponse{ 6630 Header: res.Header, 6631 HTTPStatusCode: res.StatusCode, 6632 }, 6633 } 6634 target := &ret 6635 if err := gensupport.DecodeResponse(target, res); err != nil { 6636 return nil, err 6637 } 6638 return ret, nil 6639 // { 6640 // "description": "Retrieves an existing client user invitation.", 6641 // "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}", 6642 // "httpMethod": "GET", 6643 // "id": "adexchangebuyer2.accounts.clients.invitations.get", 6644 // "parameterOrder": [ 6645 // "accountId", 6646 // "clientAccountId", 6647 // "invitationId" 6648 // ], 6649 // "parameters": { 6650 // "accountId": { 6651 // "description": "Numerical account ID of the client's sponsor buyer. (required)", 6652 // "format": "int64", 6653 // "location": "path", 6654 // "required": true, 6655 // "type": "string" 6656 // }, 6657 // "clientAccountId": { 6658 // "description": "Numerical account ID of the client buyer that the user invitation to be retrieved is associated with. (required)", 6659 // "format": "int64", 6660 // "location": "path", 6661 // "required": true, 6662 // "type": "string" 6663 // }, 6664 // "invitationId": { 6665 // "description": "Numerical identifier of the user invitation to retrieve. (required)", 6666 // "format": "int64", 6667 // "location": "path", 6668 // "required": true, 6669 // "type": "string" 6670 // } 6671 // }, 6672 // "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}", 6673 // "response": { 6674 // "$ref": "ClientUserInvitation" 6675 // }, 6676 // "scopes": [ 6677 // "https://www.googleapis.com/auth/adexchange.buyer" 6678 // ] 6679 // } 6680 6681} 6682 6683// method id "adexchangebuyer2.accounts.clients.invitations.list": 6684 6685type AccountsClientsInvitationsListCall struct { 6686 s *Service 6687 accountId int64 6688 clientAccountId string 6689 urlParams_ gensupport.URLParams 6690 ifNoneMatch_ string 6691 ctx_ context.Context 6692 header_ http.Header 6693} 6694 6695// List: Lists all the client users invitations for a client with a 6696// given account ID. 6697// 6698// - accountId: Numerical account ID of the client's sponsor buyer. 6699// (required). 6700// - clientAccountId: Numerical account ID of the client buyer to list 6701// invitations for. (required) You must either specify a string 6702// representation of a numerical account identifier or the `-` 6703// character to list all the invitations for all the clients of a 6704// given sponsor buyer. 6705func (r *AccountsClientsInvitationsService) List(accountId int64, clientAccountId string) *AccountsClientsInvitationsListCall { 6706 c := &AccountsClientsInvitationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6707 c.accountId = accountId 6708 c.clientAccountId = clientAccountId 6709 return c 6710} 6711 6712// PageSize sets the optional parameter "pageSize": Requested page size. 6713// Server may return fewer clients than requested. If unspecified, 6714// server will pick an appropriate default. 6715func (c *AccountsClientsInvitationsListCall) PageSize(pageSize int64) *AccountsClientsInvitationsListCall { 6716 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 6717 return c 6718} 6719 6720// PageToken sets the optional parameter "pageToken": A token 6721// identifying a page of results the server should return. Typically, 6722// this is the value of ListClientUserInvitationsResponse.nextPageToken 6723// returned from the previous call to the clients.invitations.list 6724// method. 6725func (c *AccountsClientsInvitationsListCall) PageToken(pageToken string) *AccountsClientsInvitationsListCall { 6726 c.urlParams_.Set("pageToken", pageToken) 6727 return c 6728} 6729 6730// Fields allows partial responses to be retrieved. See 6731// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6732// for more information. 6733func (c *AccountsClientsInvitationsListCall) Fields(s ...googleapi.Field) *AccountsClientsInvitationsListCall { 6734 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6735 return c 6736} 6737 6738// IfNoneMatch sets the optional parameter which makes the operation 6739// fail if the object's ETag matches the given value. This is useful for 6740// getting updates only after the object has changed since the last 6741// request. Use googleapi.IsNotModified to check whether the response 6742// error from Do is the result of In-None-Match. 6743func (c *AccountsClientsInvitationsListCall) IfNoneMatch(entityTag string) *AccountsClientsInvitationsListCall { 6744 c.ifNoneMatch_ = entityTag 6745 return c 6746} 6747 6748// Context sets the context to be used in this call's Do method. Any 6749// pending HTTP request will be aborted if the provided context is 6750// canceled. 6751func (c *AccountsClientsInvitationsListCall) Context(ctx context.Context) *AccountsClientsInvitationsListCall { 6752 c.ctx_ = ctx 6753 return c 6754} 6755 6756// Header returns an http.Header that can be modified by the caller to 6757// add HTTP headers to the request. 6758func (c *AccountsClientsInvitationsListCall) Header() http.Header { 6759 if c.header_ == nil { 6760 c.header_ = make(http.Header) 6761 } 6762 return c.header_ 6763} 6764 6765func (c *AccountsClientsInvitationsListCall) doRequest(alt string) (*http.Response, error) { 6766 reqHeaders := make(http.Header) 6767 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 6768 for k, v := range c.header_ { 6769 reqHeaders[k] = v 6770 } 6771 reqHeaders.Set("User-Agent", c.s.userAgent()) 6772 if c.ifNoneMatch_ != "" { 6773 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6774 } 6775 var body io.Reader = nil 6776 c.urlParams_.Set("alt", alt) 6777 c.urlParams_.Set("prettyPrint", "false") 6778 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations") 6779 urls += "?" + c.urlParams_.Encode() 6780 req, err := http.NewRequest("GET", urls, body) 6781 if err != nil { 6782 return nil, err 6783 } 6784 req.Header = reqHeaders 6785 googleapi.Expand(req.URL, map[string]string{ 6786 "accountId": strconv.FormatInt(c.accountId, 10), 6787 "clientAccountId": c.clientAccountId, 6788 }) 6789 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6790} 6791 6792// Do executes the "adexchangebuyer2.accounts.clients.invitations.list" call. 6793// Exactly one of *ListClientUserInvitationsResponse or error will be 6794// non-nil. Any non-2xx status code is an error. Response headers are in 6795// either *ListClientUserInvitationsResponse.ServerResponse.Header or 6796// (if a response was returned at all) in 6797// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6798// whether the returned error was because http.StatusNotModified was 6799// returned. 6800func (c *AccountsClientsInvitationsListCall) Do(opts ...googleapi.CallOption) (*ListClientUserInvitationsResponse, error) { 6801 gensupport.SetOptions(c.urlParams_, opts...) 6802 res, err := c.doRequest("json") 6803 if res != nil && res.StatusCode == http.StatusNotModified { 6804 if res.Body != nil { 6805 res.Body.Close() 6806 } 6807 return nil, &googleapi.Error{ 6808 Code: res.StatusCode, 6809 Header: res.Header, 6810 } 6811 } 6812 if err != nil { 6813 return nil, err 6814 } 6815 defer googleapi.CloseBody(res) 6816 if err := googleapi.CheckResponse(res); err != nil { 6817 return nil, err 6818 } 6819 ret := &ListClientUserInvitationsResponse{ 6820 ServerResponse: googleapi.ServerResponse{ 6821 Header: res.Header, 6822 HTTPStatusCode: res.StatusCode, 6823 }, 6824 } 6825 target := &ret 6826 if err := gensupport.DecodeResponse(target, res); err != nil { 6827 return nil, err 6828 } 6829 return ret, nil 6830 // { 6831 // "description": "Lists all the client users invitations for a client with a given account ID.", 6832 // "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", 6833 // "httpMethod": "GET", 6834 // "id": "adexchangebuyer2.accounts.clients.invitations.list", 6835 // "parameterOrder": [ 6836 // "accountId", 6837 // "clientAccountId" 6838 // ], 6839 // "parameters": { 6840 // "accountId": { 6841 // "description": "Numerical account ID of the client's sponsor buyer. (required)", 6842 // "format": "int64", 6843 // "location": "path", 6844 // "required": true, 6845 // "type": "string" 6846 // }, 6847 // "clientAccountId": { 6848 // "description": "Numerical account ID of the client buyer to list invitations for. (required) You must either specify a string representation of a numerical account identifier or the `-` character to list all the invitations for all the clients of a given sponsor buyer.", 6849 // "location": "path", 6850 // "required": true, 6851 // "type": "string" 6852 // }, 6853 // "pageSize": { 6854 // "description": "Requested page size. Server may return fewer clients than requested. If unspecified, server will pick an appropriate default.", 6855 // "format": "int32", 6856 // "location": "query", 6857 // "type": "integer" 6858 // }, 6859 // "pageToken": { 6860 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListClientUserInvitationsResponse.nextPageToken returned from the previous call to the clients.invitations.list method.", 6861 // "location": "query", 6862 // "type": "string" 6863 // } 6864 // }, 6865 // "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", 6866 // "response": { 6867 // "$ref": "ListClientUserInvitationsResponse" 6868 // }, 6869 // "scopes": [ 6870 // "https://www.googleapis.com/auth/adexchange.buyer" 6871 // ] 6872 // } 6873 6874} 6875 6876// Pages invokes f for each page of results. 6877// A non-nil error returned from f will halt the iteration. 6878// The provided context supersedes any context provided to the Context method. 6879func (c *AccountsClientsInvitationsListCall) Pages(ctx context.Context, f func(*ListClientUserInvitationsResponse) error) error { 6880 c.ctx_ = ctx 6881 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6882 for { 6883 x, err := c.Do() 6884 if err != nil { 6885 return err 6886 } 6887 if err := f(x); err != nil { 6888 return err 6889 } 6890 if x.NextPageToken == "" { 6891 return nil 6892 } 6893 c.PageToken(x.NextPageToken) 6894 } 6895} 6896 6897// method id "adexchangebuyer2.accounts.clients.users.get": 6898 6899type AccountsClientsUsersGetCall struct { 6900 s *Service 6901 accountId int64 6902 clientAccountId int64 6903 userId int64 6904 urlParams_ gensupport.URLParams 6905 ifNoneMatch_ string 6906 ctx_ context.Context 6907 header_ http.Header 6908} 6909 6910// Get: Retrieves an existing client user. 6911// 6912// - accountId: Numerical account ID of the client's sponsor buyer. 6913// (required). 6914// - clientAccountId: Numerical account ID of the client buyer that the 6915// user to be retrieved is associated with. (required). 6916// - userId: Numerical identifier of the user to retrieve. (required). 6917func (r *AccountsClientsUsersService) Get(accountId int64, clientAccountId int64, userId int64) *AccountsClientsUsersGetCall { 6918 c := &AccountsClientsUsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6919 c.accountId = accountId 6920 c.clientAccountId = clientAccountId 6921 c.userId = userId 6922 return c 6923} 6924 6925// Fields allows partial responses to be retrieved. See 6926// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6927// for more information. 6928func (c *AccountsClientsUsersGetCall) Fields(s ...googleapi.Field) *AccountsClientsUsersGetCall { 6929 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6930 return c 6931} 6932 6933// IfNoneMatch sets the optional parameter which makes the operation 6934// fail if the object's ETag matches the given value. This is useful for 6935// getting updates only after the object has changed since the last 6936// request. Use googleapi.IsNotModified to check whether the response 6937// error from Do is the result of In-None-Match. 6938func (c *AccountsClientsUsersGetCall) IfNoneMatch(entityTag string) *AccountsClientsUsersGetCall { 6939 c.ifNoneMatch_ = entityTag 6940 return c 6941} 6942 6943// Context sets the context to be used in this call's Do method. Any 6944// pending HTTP request will be aborted if the provided context is 6945// canceled. 6946func (c *AccountsClientsUsersGetCall) Context(ctx context.Context) *AccountsClientsUsersGetCall { 6947 c.ctx_ = ctx 6948 return c 6949} 6950 6951// Header returns an http.Header that can be modified by the caller to 6952// add HTTP headers to the request. 6953func (c *AccountsClientsUsersGetCall) Header() http.Header { 6954 if c.header_ == nil { 6955 c.header_ = make(http.Header) 6956 } 6957 return c.header_ 6958} 6959 6960func (c *AccountsClientsUsersGetCall) doRequest(alt string) (*http.Response, error) { 6961 reqHeaders := make(http.Header) 6962 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 6963 for k, v := range c.header_ { 6964 reqHeaders[k] = v 6965 } 6966 reqHeaders.Set("User-Agent", c.s.userAgent()) 6967 if c.ifNoneMatch_ != "" { 6968 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6969 } 6970 var body io.Reader = nil 6971 c.urlParams_.Set("alt", alt) 6972 c.urlParams_.Set("prettyPrint", "false") 6973 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}") 6974 urls += "?" + c.urlParams_.Encode() 6975 req, err := http.NewRequest("GET", urls, body) 6976 if err != nil { 6977 return nil, err 6978 } 6979 req.Header = reqHeaders 6980 googleapi.Expand(req.URL, map[string]string{ 6981 "accountId": strconv.FormatInt(c.accountId, 10), 6982 "clientAccountId": strconv.FormatInt(c.clientAccountId, 10), 6983 "userId": strconv.FormatInt(c.userId, 10), 6984 }) 6985 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6986} 6987 6988// Do executes the "adexchangebuyer2.accounts.clients.users.get" call. 6989// Exactly one of *ClientUser or error will be non-nil. Any non-2xx 6990// status code is an error. Response headers are in either 6991// *ClientUser.ServerResponse.Header or (if a response was returned at 6992// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6993// to check whether the returned error was because 6994// http.StatusNotModified was returned. 6995func (c *AccountsClientsUsersGetCall) Do(opts ...googleapi.CallOption) (*ClientUser, error) { 6996 gensupport.SetOptions(c.urlParams_, opts...) 6997 res, err := c.doRequest("json") 6998 if res != nil && res.StatusCode == http.StatusNotModified { 6999 if res.Body != nil { 7000 res.Body.Close() 7001 } 7002 return nil, &googleapi.Error{ 7003 Code: res.StatusCode, 7004 Header: res.Header, 7005 } 7006 } 7007 if err != nil { 7008 return nil, err 7009 } 7010 defer googleapi.CloseBody(res) 7011 if err := googleapi.CheckResponse(res); err != nil { 7012 return nil, err 7013 } 7014 ret := &ClientUser{ 7015 ServerResponse: googleapi.ServerResponse{ 7016 Header: res.Header, 7017 HTTPStatusCode: res.StatusCode, 7018 }, 7019 } 7020 target := &ret 7021 if err := gensupport.DecodeResponse(target, res); err != nil { 7022 return nil, err 7023 } 7024 return ret, nil 7025 // { 7026 // "description": "Retrieves an existing client user.", 7027 // "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", 7028 // "httpMethod": "GET", 7029 // "id": "adexchangebuyer2.accounts.clients.users.get", 7030 // "parameterOrder": [ 7031 // "accountId", 7032 // "clientAccountId", 7033 // "userId" 7034 // ], 7035 // "parameters": { 7036 // "accountId": { 7037 // "description": "Numerical account ID of the client's sponsor buyer. (required)", 7038 // "format": "int64", 7039 // "location": "path", 7040 // "required": true, 7041 // "type": "string" 7042 // }, 7043 // "clientAccountId": { 7044 // "description": "Numerical account ID of the client buyer that the user to be retrieved is associated with. (required)", 7045 // "format": "int64", 7046 // "location": "path", 7047 // "required": true, 7048 // "type": "string" 7049 // }, 7050 // "userId": { 7051 // "description": "Numerical identifier of the user to retrieve. (required)", 7052 // "format": "int64", 7053 // "location": "path", 7054 // "required": true, 7055 // "type": "string" 7056 // } 7057 // }, 7058 // "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", 7059 // "response": { 7060 // "$ref": "ClientUser" 7061 // }, 7062 // "scopes": [ 7063 // "https://www.googleapis.com/auth/adexchange.buyer" 7064 // ] 7065 // } 7066 7067} 7068 7069// method id "adexchangebuyer2.accounts.clients.users.list": 7070 7071type AccountsClientsUsersListCall struct { 7072 s *Service 7073 accountId int64 7074 clientAccountId string 7075 urlParams_ gensupport.URLParams 7076 ifNoneMatch_ string 7077 ctx_ context.Context 7078 header_ http.Header 7079} 7080 7081// List: Lists all the known client users for a specified sponsor buyer 7082// account ID. 7083// 7084// - accountId: Numerical account ID of the sponsor buyer of the client 7085// to list users for. (required). 7086// - clientAccountId: The account ID of the client buyer to list users 7087// for. (required) You must specify either a string representation of 7088// a numerical account identifier or the `-` character to list all the 7089// client users for all the clients of a given sponsor buyer. 7090func (r *AccountsClientsUsersService) List(accountId int64, clientAccountId string) *AccountsClientsUsersListCall { 7091 c := &AccountsClientsUsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7092 c.accountId = accountId 7093 c.clientAccountId = clientAccountId 7094 return c 7095} 7096 7097// PageSize sets the optional parameter "pageSize": Requested page size. 7098// The server may return fewer clients than requested. If unspecified, 7099// the server will pick an appropriate default. 7100func (c *AccountsClientsUsersListCall) PageSize(pageSize int64) *AccountsClientsUsersListCall { 7101 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7102 return c 7103} 7104 7105// PageToken sets the optional parameter "pageToken": A token 7106// identifying a page of results the server should return. Typically, 7107// this is the value of ListClientUsersResponse.nextPageToken returned 7108// from the previous call to the accounts.clients.users.list method. 7109func (c *AccountsClientsUsersListCall) PageToken(pageToken string) *AccountsClientsUsersListCall { 7110 c.urlParams_.Set("pageToken", pageToken) 7111 return c 7112} 7113 7114// Fields allows partial responses to be retrieved. See 7115// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7116// for more information. 7117func (c *AccountsClientsUsersListCall) Fields(s ...googleapi.Field) *AccountsClientsUsersListCall { 7118 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7119 return c 7120} 7121 7122// IfNoneMatch sets the optional parameter which makes the operation 7123// fail if the object's ETag matches the given value. This is useful for 7124// getting updates only after the object has changed since the last 7125// request. Use googleapi.IsNotModified to check whether the response 7126// error from Do is the result of In-None-Match. 7127func (c *AccountsClientsUsersListCall) IfNoneMatch(entityTag string) *AccountsClientsUsersListCall { 7128 c.ifNoneMatch_ = entityTag 7129 return c 7130} 7131 7132// Context sets the context to be used in this call's Do method. Any 7133// pending HTTP request will be aborted if the provided context is 7134// canceled. 7135func (c *AccountsClientsUsersListCall) Context(ctx context.Context) *AccountsClientsUsersListCall { 7136 c.ctx_ = ctx 7137 return c 7138} 7139 7140// Header returns an http.Header that can be modified by the caller to 7141// add HTTP headers to the request. 7142func (c *AccountsClientsUsersListCall) Header() http.Header { 7143 if c.header_ == nil { 7144 c.header_ = make(http.Header) 7145 } 7146 return c.header_ 7147} 7148 7149func (c *AccountsClientsUsersListCall) doRequest(alt string) (*http.Response, error) { 7150 reqHeaders := make(http.Header) 7151 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 7152 for k, v := range c.header_ { 7153 reqHeaders[k] = v 7154 } 7155 reqHeaders.Set("User-Agent", c.s.userAgent()) 7156 if c.ifNoneMatch_ != "" { 7157 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7158 } 7159 var body io.Reader = nil 7160 c.urlParams_.Set("alt", alt) 7161 c.urlParams_.Set("prettyPrint", "false") 7162 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users") 7163 urls += "?" + c.urlParams_.Encode() 7164 req, err := http.NewRequest("GET", urls, body) 7165 if err != nil { 7166 return nil, err 7167 } 7168 req.Header = reqHeaders 7169 googleapi.Expand(req.URL, map[string]string{ 7170 "accountId": strconv.FormatInt(c.accountId, 10), 7171 "clientAccountId": c.clientAccountId, 7172 }) 7173 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7174} 7175 7176// Do executes the "adexchangebuyer2.accounts.clients.users.list" call. 7177// Exactly one of *ListClientUsersResponse or error will be non-nil. Any 7178// non-2xx status code is an error. Response headers are in either 7179// *ListClientUsersResponse.ServerResponse.Header or (if a response was 7180// returned at all) in error.(*googleapi.Error).Header. Use 7181// googleapi.IsNotModified to check whether the returned error was 7182// because http.StatusNotModified was returned. 7183func (c *AccountsClientsUsersListCall) Do(opts ...googleapi.CallOption) (*ListClientUsersResponse, error) { 7184 gensupport.SetOptions(c.urlParams_, opts...) 7185 res, err := c.doRequest("json") 7186 if res != nil && res.StatusCode == http.StatusNotModified { 7187 if res.Body != nil { 7188 res.Body.Close() 7189 } 7190 return nil, &googleapi.Error{ 7191 Code: res.StatusCode, 7192 Header: res.Header, 7193 } 7194 } 7195 if err != nil { 7196 return nil, err 7197 } 7198 defer googleapi.CloseBody(res) 7199 if err := googleapi.CheckResponse(res); err != nil { 7200 return nil, err 7201 } 7202 ret := &ListClientUsersResponse{ 7203 ServerResponse: googleapi.ServerResponse{ 7204 Header: res.Header, 7205 HTTPStatusCode: res.StatusCode, 7206 }, 7207 } 7208 target := &ret 7209 if err := gensupport.DecodeResponse(target, res); err != nil { 7210 return nil, err 7211 } 7212 return ret, nil 7213 // { 7214 // "description": "Lists all the known client users for a specified sponsor buyer account ID.", 7215 // "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users", 7216 // "httpMethod": "GET", 7217 // "id": "adexchangebuyer2.accounts.clients.users.list", 7218 // "parameterOrder": [ 7219 // "accountId", 7220 // "clientAccountId" 7221 // ], 7222 // "parameters": { 7223 // "accountId": { 7224 // "description": "Numerical account ID of the sponsor buyer of the client to list users for. (required)", 7225 // "format": "int64", 7226 // "location": "path", 7227 // "required": true, 7228 // "type": "string" 7229 // }, 7230 // "clientAccountId": { 7231 // "description": "The account ID of the client buyer to list users for. (required) You must specify either a string representation of a numerical account identifier or the `-` character to list all the client users for all the clients of a given sponsor buyer.", 7232 // "location": "path", 7233 // "required": true, 7234 // "type": "string" 7235 // }, 7236 // "pageSize": { 7237 // "description": "Requested page size. The server may return fewer clients than requested. If unspecified, the server will pick an appropriate default.", 7238 // "format": "int32", 7239 // "location": "query", 7240 // "type": "integer" 7241 // }, 7242 // "pageToken": { 7243 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListClientUsersResponse.nextPageToken returned from the previous call to the accounts.clients.users.list method.", 7244 // "location": "query", 7245 // "type": "string" 7246 // } 7247 // }, 7248 // "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users", 7249 // "response": { 7250 // "$ref": "ListClientUsersResponse" 7251 // }, 7252 // "scopes": [ 7253 // "https://www.googleapis.com/auth/adexchange.buyer" 7254 // ] 7255 // } 7256 7257} 7258 7259// Pages invokes f for each page of results. 7260// A non-nil error returned from f will halt the iteration. 7261// The provided context supersedes any context provided to the Context method. 7262func (c *AccountsClientsUsersListCall) Pages(ctx context.Context, f func(*ListClientUsersResponse) error) error { 7263 c.ctx_ = ctx 7264 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7265 for { 7266 x, err := c.Do() 7267 if err != nil { 7268 return err 7269 } 7270 if err := f(x); err != nil { 7271 return err 7272 } 7273 if x.NextPageToken == "" { 7274 return nil 7275 } 7276 c.PageToken(x.NextPageToken) 7277 } 7278} 7279 7280// method id "adexchangebuyer2.accounts.clients.users.update": 7281 7282type AccountsClientsUsersUpdateCall struct { 7283 s *Service 7284 accountId int64 7285 clientAccountId int64 7286 userId int64 7287 clientuser *ClientUser 7288 urlParams_ gensupport.URLParams 7289 ctx_ context.Context 7290 header_ http.Header 7291} 7292 7293// Update: Updates an existing client user. Only the user status can be 7294// changed on update. 7295// 7296// - accountId: Numerical account ID of the client's sponsor buyer. 7297// (required). 7298// - clientAccountId: Numerical account ID of the client buyer that the 7299// user to be retrieved is associated with. (required). 7300// - userId: Numerical identifier of the user to retrieve. (required). 7301func (r *AccountsClientsUsersService) Update(accountId int64, clientAccountId int64, userId int64, clientuser *ClientUser) *AccountsClientsUsersUpdateCall { 7302 c := &AccountsClientsUsersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7303 c.accountId = accountId 7304 c.clientAccountId = clientAccountId 7305 c.userId = userId 7306 c.clientuser = clientuser 7307 return c 7308} 7309 7310// Fields allows partial responses to be retrieved. See 7311// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7312// for more information. 7313func (c *AccountsClientsUsersUpdateCall) Fields(s ...googleapi.Field) *AccountsClientsUsersUpdateCall { 7314 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7315 return c 7316} 7317 7318// Context sets the context to be used in this call's Do method. Any 7319// pending HTTP request will be aborted if the provided context is 7320// canceled. 7321func (c *AccountsClientsUsersUpdateCall) Context(ctx context.Context) *AccountsClientsUsersUpdateCall { 7322 c.ctx_ = ctx 7323 return c 7324} 7325 7326// Header returns an http.Header that can be modified by the caller to 7327// add HTTP headers to the request. 7328func (c *AccountsClientsUsersUpdateCall) Header() http.Header { 7329 if c.header_ == nil { 7330 c.header_ = make(http.Header) 7331 } 7332 return c.header_ 7333} 7334 7335func (c *AccountsClientsUsersUpdateCall) doRequest(alt string) (*http.Response, error) { 7336 reqHeaders := make(http.Header) 7337 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 7338 for k, v := range c.header_ { 7339 reqHeaders[k] = v 7340 } 7341 reqHeaders.Set("User-Agent", c.s.userAgent()) 7342 var body io.Reader = nil 7343 body, err := googleapi.WithoutDataWrapper.JSONReader(c.clientuser) 7344 if err != nil { 7345 return nil, err 7346 } 7347 reqHeaders.Set("Content-Type", "application/json") 7348 c.urlParams_.Set("alt", alt) 7349 c.urlParams_.Set("prettyPrint", "false") 7350 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}") 7351 urls += "?" + c.urlParams_.Encode() 7352 req, err := http.NewRequest("PUT", urls, body) 7353 if err != nil { 7354 return nil, err 7355 } 7356 req.Header = reqHeaders 7357 googleapi.Expand(req.URL, map[string]string{ 7358 "accountId": strconv.FormatInt(c.accountId, 10), 7359 "clientAccountId": strconv.FormatInt(c.clientAccountId, 10), 7360 "userId": strconv.FormatInt(c.userId, 10), 7361 }) 7362 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7363} 7364 7365// Do executes the "adexchangebuyer2.accounts.clients.users.update" call. 7366// Exactly one of *ClientUser or error will be non-nil. Any non-2xx 7367// status code is an error. Response headers are in either 7368// *ClientUser.ServerResponse.Header or (if a response was returned at 7369// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7370// to check whether the returned error was because 7371// http.StatusNotModified was returned. 7372func (c *AccountsClientsUsersUpdateCall) Do(opts ...googleapi.CallOption) (*ClientUser, error) { 7373 gensupport.SetOptions(c.urlParams_, opts...) 7374 res, err := c.doRequest("json") 7375 if res != nil && res.StatusCode == http.StatusNotModified { 7376 if res.Body != nil { 7377 res.Body.Close() 7378 } 7379 return nil, &googleapi.Error{ 7380 Code: res.StatusCode, 7381 Header: res.Header, 7382 } 7383 } 7384 if err != nil { 7385 return nil, err 7386 } 7387 defer googleapi.CloseBody(res) 7388 if err := googleapi.CheckResponse(res); err != nil { 7389 return nil, err 7390 } 7391 ret := &ClientUser{ 7392 ServerResponse: googleapi.ServerResponse{ 7393 Header: res.Header, 7394 HTTPStatusCode: res.StatusCode, 7395 }, 7396 } 7397 target := &ret 7398 if err := gensupport.DecodeResponse(target, res); err != nil { 7399 return nil, err 7400 } 7401 return ret, nil 7402 // { 7403 // "description": "Updates an existing client user. Only the user status can be changed on update.", 7404 // "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", 7405 // "httpMethod": "PUT", 7406 // "id": "adexchangebuyer2.accounts.clients.users.update", 7407 // "parameterOrder": [ 7408 // "accountId", 7409 // "clientAccountId", 7410 // "userId" 7411 // ], 7412 // "parameters": { 7413 // "accountId": { 7414 // "description": "Numerical account ID of the client's sponsor buyer. (required)", 7415 // "format": "int64", 7416 // "location": "path", 7417 // "required": true, 7418 // "type": "string" 7419 // }, 7420 // "clientAccountId": { 7421 // "description": "Numerical account ID of the client buyer that the user to be retrieved is associated with. (required)", 7422 // "format": "int64", 7423 // "location": "path", 7424 // "required": true, 7425 // "type": "string" 7426 // }, 7427 // "userId": { 7428 // "description": "Numerical identifier of the user to retrieve. (required)", 7429 // "format": "int64", 7430 // "location": "path", 7431 // "required": true, 7432 // "type": "string" 7433 // } 7434 // }, 7435 // "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", 7436 // "request": { 7437 // "$ref": "ClientUser" 7438 // }, 7439 // "response": { 7440 // "$ref": "ClientUser" 7441 // }, 7442 // "scopes": [ 7443 // "https://www.googleapis.com/auth/adexchange.buyer" 7444 // ] 7445 // } 7446 7447} 7448 7449// method id "adexchangebuyer2.accounts.creatives.create": 7450 7451type AccountsCreativesCreateCall struct { 7452 s *Service 7453 accountId string 7454 creative *Creative 7455 urlParams_ gensupport.URLParams 7456 ctx_ context.Context 7457 header_ http.Header 7458} 7459 7460// Create: Creates a creative. 7461// 7462// - accountId: The account that this creative belongs to. Can be used 7463// to filter the response of the creatives.list method. 7464func (r *AccountsCreativesService) Create(accountId string, creative *Creative) *AccountsCreativesCreateCall { 7465 c := &AccountsCreativesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7466 c.accountId = accountId 7467 c.creative = creative 7468 return c 7469} 7470 7471// DuplicateIdMode sets the optional parameter "duplicateIdMode": 7472// Indicates if multiple creatives can share an ID or not. Default is 7473// NO_DUPLICATES (one ID per creative). 7474// 7475// Possible values: 7476// "NO_DUPLICATES" - Recommended. This means that an ID will be unique 7477// to a single creative. Multiple creatives will not share an ID. 7478// "FORCE_ENABLE_DUPLICATE_IDS" - Not recommended. Using this option 7479// will allow multiple creatives to share the same ID. Get and Update 7480// requests will not be possible for any ID that has more than one 7481// creative associated. (List will still function.) This is only 7482// intended for backwards compatibility in cases where a single ID is 7483// already shared by multiple creatives from previous APIs. 7484func (c *AccountsCreativesCreateCall) DuplicateIdMode(duplicateIdMode string) *AccountsCreativesCreateCall { 7485 c.urlParams_.Set("duplicateIdMode", duplicateIdMode) 7486 return c 7487} 7488 7489// Fields allows partial responses to be retrieved. See 7490// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7491// for more information. 7492func (c *AccountsCreativesCreateCall) Fields(s ...googleapi.Field) *AccountsCreativesCreateCall { 7493 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7494 return c 7495} 7496 7497// Context sets the context to be used in this call's Do method. Any 7498// pending HTTP request will be aborted if the provided context is 7499// canceled. 7500func (c *AccountsCreativesCreateCall) Context(ctx context.Context) *AccountsCreativesCreateCall { 7501 c.ctx_ = ctx 7502 return c 7503} 7504 7505// Header returns an http.Header that can be modified by the caller to 7506// add HTTP headers to the request. 7507func (c *AccountsCreativesCreateCall) Header() http.Header { 7508 if c.header_ == nil { 7509 c.header_ = make(http.Header) 7510 } 7511 return c.header_ 7512} 7513 7514func (c *AccountsCreativesCreateCall) doRequest(alt string) (*http.Response, error) { 7515 reqHeaders := make(http.Header) 7516 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 7517 for k, v := range c.header_ { 7518 reqHeaders[k] = v 7519 } 7520 reqHeaders.Set("User-Agent", c.s.userAgent()) 7521 var body io.Reader = nil 7522 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative) 7523 if err != nil { 7524 return nil, err 7525 } 7526 reqHeaders.Set("Content-Type", "application/json") 7527 c.urlParams_.Set("alt", alt) 7528 c.urlParams_.Set("prettyPrint", "false") 7529 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives") 7530 urls += "?" + c.urlParams_.Encode() 7531 req, err := http.NewRequest("POST", urls, body) 7532 if err != nil { 7533 return nil, err 7534 } 7535 req.Header = reqHeaders 7536 googleapi.Expand(req.URL, map[string]string{ 7537 "accountId": c.accountId, 7538 }) 7539 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7540} 7541 7542// Do executes the "adexchangebuyer2.accounts.creatives.create" call. 7543// Exactly one of *Creative or error will be non-nil. Any non-2xx status 7544// code is an error. Response headers are in either 7545// *Creative.ServerResponse.Header or (if a response was returned at 7546// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7547// to check whether the returned error was because 7548// http.StatusNotModified was returned. 7549func (c *AccountsCreativesCreateCall) Do(opts ...googleapi.CallOption) (*Creative, error) { 7550 gensupport.SetOptions(c.urlParams_, opts...) 7551 res, err := c.doRequest("json") 7552 if res != nil && res.StatusCode == http.StatusNotModified { 7553 if res.Body != nil { 7554 res.Body.Close() 7555 } 7556 return nil, &googleapi.Error{ 7557 Code: res.StatusCode, 7558 Header: res.Header, 7559 } 7560 } 7561 if err != nil { 7562 return nil, err 7563 } 7564 defer googleapi.CloseBody(res) 7565 if err := googleapi.CheckResponse(res); err != nil { 7566 return nil, err 7567 } 7568 ret := &Creative{ 7569 ServerResponse: googleapi.ServerResponse{ 7570 Header: res.Header, 7571 HTTPStatusCode: res.StatusCode, 7572 }, 7573 } 7574 target := &ret 7575 if err := gensupport.DecodeResponse(target, res); err != nil { 7576 return nil, err 7577 } 7578 return ret, nil 7579 // { 7580 // "description": "Creates a creative.", 7581 // "flatPath": "v2beta1/accounts/{accountId}/creatives", 7582 // "httpMethod": "POST", 7583 // "id": "adexchangebuyer2.accounts.creatives.create", 7584 // "parameterOrder": [ 7585 // "accountId" 7586 // ], 7587 // "parameters": { 7588 // "accountId": { 7589 // "description": "The account that this creative belongs to. Can be used to filter the response of the creatives.list method.", 7590 // "location": "path", 7591 // "required": true, 7592 // "type": "string" 7593 // }, 7594 // "duplicateIdMode": { 7595 // "description": "Indicates if multiple creatives can share an ID or not. Default is NO_DUPLICATES (one ID per creative).", 7596 // "enum": [ 7597 // "NO_DUPLICATES", 7598 // "FORCE_ENABLE_DUPLICATE_IDS" 7599 // ], 7600 // "enumDescriptions": [ 7601 // "Recommended. This means that an ID will be unique to a single creative. Multiple creatives will not share an ID.", 7602 // "Not recommended. Using this option will allow multiple creatives to share the same ID. Get and Update requests will not be possible for any ID that has more than one creative associated. (List will still function.) This is only intended for backwards compatibility in cases where a single ID is already shared by multiple creatives from previous APIs." 7603 // ], 7604 // "location": "query", 7605 // "type": "string" 7606 // } 7607 // }, 7608 // "path": "v2beta1/accounts/{accountId}/creatives", 7609 // "request": { 7610 // "$ref": "Creative" 7611 // }, 7612 // "response": { 7613 // "$ref": "Creative" 7614 // }, 7615 // "scopes": [ 7616 // "https://www.googleapis.com/auth/adexchange.buyer" 7617 // ] 7618 // } 7619 7620} 7621 7622// method id "adexchangebuyer2.accounts.creatives.get": 7623 7624type AccountsCreativesGetCall struct { 7625 s *Service 7626 accountId string 7627 creativeId string 7628 urlParams_ gensupport.URLParams 7629 ifNoneMatch_ string 7630 ctx_ context.Context 7631 header_ http.Header 7632} 7633 7634// Get: Gets a creative. 7635// 7636// - accountId: The account the creative belongs to. 7637// - creativeId: The ID of the creative to retrieve. 7638func (r *AccountsCreativesService) Get(accountId string, creativeId string) *AccountsCreativesGetCall { 7639 c := &AccountsCreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7640 c.accountId = accountId 7641 c.creativeId = creativeId 7642 return c 7643} 7644 7645// Fields allows partial responses to be retrieved. See 7646// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7647// for more information. 7648func (c *AccountsCreativesGetCall) Fields(s ...googleapi.Field) *AccountsCreativesGetCall { 7649 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7650 return c 7651} 7652 7653// IfNoneMatch sets the optional parameter which makes the operation 7654// fail if the object's ETag matches the given value. This is useful for 7655// getting updates only after the object has changed since the last 7656// request. Use googleapi.IsNotModified to check whether the response 7657// error from Do is the result of In-None-Match. 7658func (c *AccountsCreativesGetCall) IfNoneMatch(entityTag string) *AccountsCreativesGetCall { 7659 c.ifNoneMatch_ = entityTag 7660 return c 7661} 7662 7663// Context sets the context to be used in this call's Do method. Any 7664// pending HTTP request will be aborted if the provided context is 7665// canceled. 7666func (c *AccountsCreativesGetCall) Context(ctx context.Context) *AccountsCreativesGetCall { 7667 c.ctx_ = ctx 7668 return c 7669} 7670 7671// Header returns an http.Header that can be modified by the caller to 7672// add HTTP headers to the request. 7673func (c *AccountsCreativesGetCall) Header() http.Header { 7674 if c.header_ == nil { 7675 c.header_ = make(http.Header) 7676 } 7677 return c.header_ 7678} 7679 7680func (c *AccountsCreativesGetCall) doRequest(alt string) (*http.Response, error) { 7681 reqHeaders := make(http.Header) 7682 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 7683 for k, v := range c.header_ { 7684 reqHeaders[k] = v 7685 } 7686 reqHeaders.Set("User-Agent", c.s.userAgent()) 7687 if c.ifNoneMatch_ != "" { 7688 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7689 } 7690 var body io.Reader = nil 7691 c.urlParams_.Set("alt", alt) 7692 c.urlParams_.Set("prettyPrint", "false") 7693 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}") 7694 urls += "?" + c.urlParams_.Encode() 7695 req, err := http.NewRequest("GET", urls, body) 7696 if err != nil { 7697 return nil, err 7698 } 7699 req.Header = reqHeaders 7700 googleapi.Expand(req.URL, map[string]string{ 7701 "accountId": c.accountId, 7702 "creativeId": c.creativeId, 7703 }) 7704 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7705} 7706 7707// Do executes the "adexchangebuyer2.accounts.creatives.get" call. 7708// Exactly one of *Creative or error will be non-nil. Any non-2xx status 7709// code is an error. Response headers are in either 7710// *Creative.ServerResponse.Header or (if a response was returned at 7711// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7712// to check whether the returned error was because 7713// http.StatusNotModified was returned. 7714func (c *AccountsCreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) { 7715 gensupport.SetOptions(c.urlParams_, opts...) 7716 res, err := c.doRequest("json") 7717 if res != nil && res.StatusCode == http.StatusNotModified { 7718 if res.Body != nil { 7719 res.Body.Close() 7720 } 7721 return nil, &googleapi.Error{ 7722 Code: res.StatusCode, 7723 Header: res.Header, 7724 } 7725 } 7726 if err != nil { 7727 return nil, err 7728 } 7729 defer googleapi.CloseBody(res) 7730 if err := googleapi.CheckResponse(res); err != nil { 7731 return nil, err 7732 } 7733 ret := &Creative{ 7734 ServerResponse: googleapi.ServerResponse{ 7735 Header: res.Header, 7736 HTTPStatusCode: res.StatusCode, 7737 }, 7738 } 7739 target := &ret 7740 if err := gensupport.DecodeResponse(target, res); err != nil { 7741 return nil, err 7742 } 7743 return ret, nil 7744 // { 7745 // "description": "Gets a creative.", 7746 // "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}", 7747 // "httpMethod": "GET", 7748 // "id": "adexchangebuyer2.accounts.creatives.get", 7749 // "parameterOrder": [ 7750 // "accountId", 7751 // "creativeId" 7752 // ], 7753 // "parameters": { 7754 // "accountId": { 7755 // "description": "The account the creative belongs to.", 7756 // "location": "path", 7757 // "required": true, 7758 // "type": "string" 7759 // }, 7760 // "creativeId": { 7761 // "description": "The ID of the creative to retrieve.", 7762 // "location": "path", 7763 // "required": true, 7764 // "type": "string" 7765 // } 7766 // }, 7767 // "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}", 7768 // "response": { 7769 // "$ref": "Creative" 7770 // }, 7771 // "scopes": [ 7772 // "https://www.googleapis.com/auth/adexchange.buyer" 7773 // ] 7774 // } 7775 7776} 7777 7778// method id "adexchangebuyer2.accounts.creatives.list": 7779 7780type AccountsCreativesListCall struct { 7781 s *Service 7782 accountId string 7783 urlParams_ gensupport.URLParams 7784 ifNoneMatch_ string 7785 ctx_ context.Context 7786 header_ http.Header 7787} 7788 7789// List: Lists creatives. 7790// 7791// - accountId: The account to list the creatives from. Specify "-" to 7792// list all creatives the current user has access to. 7793func (r *AccountsCreativesService) List(accountId string) *AccountsCreativesListCall { 7794 c := &AccountsCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7795 c.accountId = accountId 7796 return c 7797} 7798 7799// PageSize sets the optional parameter "pageSize": Requested page size. 7800// The server may return fewer creatives than requested (due to timeout 7801// constraint) even if more are available via another call. If 7802// unspecified, server will pick an appropriate default. Acceptable 7803// values are 1 to 1000, inclusive. 7804func (c *AccountsCreativesListCall) PageSize(pageSize int64) *AccountsCreativesListCall { 7805 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7806 return c 7807} 7808 7809// PageToken sets the optional parameter "pageToken": A token 7810// identifying a page of results the server should return. Typically, 7811// this is the value of ListCreativesResponse.next_page_token returned 7812// from the previous call to 'ListCreatives' method. 7813func (c *AccountsCreativesListCall) PageToken(pageToken string) *AccountsCreativesListCall { 7814 c.urlParams_.Set("pageToken", pageToken) 7815 return c 7816} 7817 7818// Query sets the optional parameter "query": An optional query string 7819// to filter creatives. If no filter is specified, all active creatives 7820// will be returned. Supported queries are: - 7821// accountId=*account_id_string* - creativeId=*creative_id_string* - 7822// dealsStatus: {approved, conditionally_approved, disapproved, 7823// not_checked} - openAuctionStatus: {approved, conditionally_approved, 7824// disapproved, not_checked} - attribute: {a numeric attribute from the 7825// list of attributes} - disapprovalReason: {a reason from 7826// DisapprovalReason} Example: 'accountId=12345 AND 7827// (dealsStatus:disapproved AND disapprovalReason:unacceptable_content) 7828// OR attribute:47' 7829func (c *AccountsCreativesListCall) Query(query string) *AccountsCreativesListCall { 7830 c.urlParams_.Set("query", query) 7831 return c 7832} 7833 7834// Fields allows partial responses to be retrieved. See 7835// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7836// for more information. 7837func (c *AccountsCreativesListCall) Fields(s ...googleapi.Field) *AccountsCreativesListCall { 7838 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7839 return c 7840} 7841 7842// IfNoneMatch sets the optional parameter which makes the operation 7843// fail if the object's ETag matches the given value. This is useful for 7844// getting updates only after the object has changed since the last 7845// request. Use googleapi.IsNotModified to check whether the response 7846// error from Do is the result of In-None-Match. 7847func (c *AccountsCreativesListCall) IfNoneMatch(entityTag string) *AccountsCreativesListCall { 7848 c.ifNoneMatch_ = entityTag 7849 return c 7850} 7851 7852// Context sets the context to be used in this call's Do method. Any 7853// pending HTTP request will be aborted if the provided context is 7854// canceled. 7855func (c *AccountsCreativesListCall) Context(ctx context.Context) *AccountsCreativesListCall { 7856 c.ctx_ = ctx 7857 return c 7858} 7859 7860// Header returns an http.Header that can be modified by the caller to 7861// add HTTP headers to the request. 7862func (c *AccountsCreativesListCall) Header() http.Header { 7863 if c.header_ == nil { 7864 c.header_ = make(http.Header) 7865 } 7866 return c.header_ 7867} 7868 7869func (c *AccountsCreativesListCall) doRequest(alt string) (*http.Response, error) { 7870 reqHeaders := make(http.Header) 7871 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 7872 for k, v := range c.header_ { 7873 reqHeaders[k] = v 7874 } 7875 reqHeaders.Set("User-Agent", c.s.userAgent()) 7876 if c.ifNoneMatch_ != "" { 7877 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7878 } 7879 var body io.Reader = nil 7880 c.urlParams_.Set("alt", alt) 7881 c.urlParams_.Set("prettyPrint", "false") 7882 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives") 7883 urls += "?" + c.urlParams_.Encode() 7884 req, err := http.NewRequest("GET", urls, body) 7885 if err != nil { 7886 return nil, err 7887 } 7888 req.Header = reqHeaders 7889 googleapi.Expand(req.URL, map[string]string{ 7890 "accountId": c.accountId, 7891 }) 7892 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7893} 7894 7895// Do executes the "adexchangebuyer2.accounts.creatives.list" call. 7896// Exactly one of *ListCreativesResponse or error will be non-nil. Any 7897// non-2xx status code is an error. Response headers are in either 7898// *ListCreativesResponse.ServerResponse.Header or (if a response was 7899// returned at all) in error.(*googleapi.Error).Header. Use 7900// googleapi.IsNotModified to check whether the returned error was 7901// because http.StatusNotModified was returned. 7902func (c *AccountsCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativesResponse, error) { 7903 gensupport.SetOptions(c.urlParams_, opts...) 7904 res, err := c.doRequest("json") 7905 if res != nil && res.StatusCode == http.StatusNotModified { 7906 if res.Body != nil { 7907 res.Body.Close() 7908 } 7909 return nil, &googleapi.Error{ 7910 Code: res.StatusCode, 7911 Header: res.Header, 7912 } 7913 } 7914 if err != nil { 7915 return nil, err 7916 } 7917 defer googleapi.CloseBody(res) 7918 if err := googleapi.CheckResponse(res); err != nil { 7919 return nil, err 7920 } 7921 ret := &ListCreativesResponse{ 7922 ServerResponse: googleapi.ServerResponse{ 7923 Header: res.Header, 7924 HTTPStatusCode: res.StatusCode, 7925 }, 7926 } 7927 target := &ret 7928 if err := gensupport.DecodeResponse(target, res); err != nil { 7929 return nil, err 7930 } 7931 return ret, nil 7932 // { 7933 // "description": "Lists creatives.", 7934 // "flatPath": "v2beta1/accounts/{accountId}/creatives", 7935 // "httpMethod": "GET", 7936 // "id": "adexchangebuyer2.accounts.creatives.list", 7937 // "parameterOrder": [ 7938 // "accountId" 7939 // ], 7940 // "parameters": { 7941 // "accountId": { 7942 // "description": "The account to list the creatives from. Specify \"-\" to list all creatives the current user has access to.", 7943 // "location": "path", 7944 // "required": true, 7945 // "type": "string" 7946 // }, 7947 // "pageSize": { 7948 // "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.", 7949 // "format": "int32", 7950 // "location": "query", 7951 // "type": "integer" 7952 // }, 7953 // "pageToken": { 7954 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListCreativesResponse.next_page_token returned from the previous call to 'ListCreatives' method.", 7955 // "location": "query", 7956 // "type": "string" 7957 // }, 7958 // "query": { 7959 // "description": "An optional query string to filter creatives. If no filter is specified, all active creatives will be returned. Supported queries are: - accountId=*account_id_string* - creativeId=*creative_id_string* - dealsStatus: {approved, conditionally_approved, disapproved, not_checked} - openAuctionStatus: {approved, conditionally_approved, disapproved, not_checked} - attribute: {a numeric attribute from the list of attributes} - disapprovalReason: {a reason from DisapprovalReason} Example: 'accountId=12345 AND (dealsStatus:disapproved AND disapprovalReason:unacceptable_content) OR attribute:47'", 7960 // "location": "query", 7961 // "type": "string" 7962 // } 7963 // }, 7964 // "path": "v2beta1/accounts/{accountId}/creatives", 7965 // "response": { 7966 // "$ref": "ListCreativesResponse" 7967 // }, 7968 // "scopes": [ 7969 // "https://www.googleapis.com/auth/adexchange.buyer" 7970 // ] 7971 // } 7972 7973} 7974 7975// Pages invokes f for each page of results. 7976// A non-nil error returned from f will halt the iteration. 7977// The provided context supersedes any context provided to the Context method. 7978func (c *AccountsCreativesListCall) Pages(ctx context.Context, f func(*ListCreativesResponse) error) error { 7979 c.ctx_ = ctx 7980 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7981 for { 7982 x, err := c.Do() 7983 if err != nil { 7984 return err 7985 } 7986 if err := f(x); err != nil { 7987 return err 7988 } 7989 if x.NextPageToken == "" { 7990 return nil 7991 } 7992 c.PageToken(x.NextPageToken) 7993 } 7994} 7995 7996// method id "adexchangebuyer2.accounts.creatives.stopWatching": 7997 7998type AccountsCreativesStopWatchingCall struct { 7999 s *Service 8000 accountId string 8001 creativeId string 8002 stopwatchingcreativerequest *StopWatchingCreativeRequest 8003 urlParams_ gensupport.URLParams 8004 ctx_ context.Context 8005 header_ http.Header 8006} 8007 8008// StopWatching: Stops watching a creative. Will stop push notifications 8009// being sent to the topics when the creative changes status. 8010// 8011// - accountId: The account of the creative to stop notifications for. 8012// - creativeId: The creative ID of the creative to stop notifications 8013// for. Specify "-" to specify stopping account level notifications. 8014func (r *AccountsCreativesService) StopWatching(accountId string, creativeId string, stopwatchingcreativerequest *StopWatchingCreativeRequest) *AccountsCreativesStopWatchingCall { 8015 c := &AccountsCreativesStopWatchingCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8016 c.accountId = accountId 8017 c.creativeId = creativeId 8018 c.stopwatchingcreativerequest = stopwatchingcreativerequest 8019 return c 8020} 8021 8022// Fields allows partial responses to be retrieved. See 8023// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8024// for more information. 8025func (c *AccountsCreativesStopWatchingCall) Fields(s ...googleapi.Field) *AccountsCreativesStopWatchingCall { 8026 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8027 return c 8028} 8029 8030// Context sets the context to be used in this call's Do method. Any 8031// pending HTTP request will be aborted if the provided context is 8032// canceled. 8033func (c *AccountsCreativesStopWatchingCall) Context(ctx context.Context) *AccountsCreativesStopWatchingCall { 8034 c.ctx_ = ctx 8035 return c 8036} 8037 8038// Header returns an http.Header that can be modified by the caller to 8039// add HTTP headers to the request. 8040func (c *AccountsCreativesStopWatchingCall) Header() http.Header { 8041 if c.header_ == nil { 8042 c.header_ = make(http.Header) 8043 } 8044 return c.header_ 8045} 8046 8047func (c *AccountsCreativesStopWatchingCall) doRequest(alt string) (*http.Response, error) { 8048 reqHeaders := make(http.Header) 8049 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 8050 for k, v := range c.header_ { 8051 reqHeaders[k] = v 8052 } 8053 reqHeaders.Set("User-Agent", c.s.userAgent()) 8054 var body io.Reader = nil 8055 body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopwatchingcreativerequest) 8056 if err != nil { 8057 return nil, err 8058 } 8059 reqHeaders.Set("Content-Type", "application/json") 8060 c.urlParams_.Set("alt", alt) 8061 c.urlParams_.Set("prettyPrint", "false") 8062 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching") 8063 urls += "?" + c.urlParams_.Encode() 8064 req, err := http.NewRequest("POST", urls, body) 8065 if err != nil { 8066 return nil, err 8067 } 8068 req.Header = reqHeaders 8069 googleapi.Expand(req.URL, map[string]string{ 8070 "accountId": c.accountId, 8071 "creativeId": c.creativeId, 8072 }) 8073 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8074} 8075 8076// Do executes the "adexchangebuyer2.accounts.creatives.stopWatching" call. 8077// Exactly one of *Empty or error will be non-nil. Any non-2xx status 8078// code is an error. Response headers are in either 8079// *Empty.ServerResponse.Header or (if a response was returned at all) 8080// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8081// check whether the returned error was because http.StatusNotModified 8082// was returned. 8083func (c *AccountsCreativesStopWatchingCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 8084 gensupport.SetOptions(c.urlParams_, opts...) 8085 res, err := c.doRequest("json") 8086 if res != nil && res.StatusCode == http.StatusNotModified { 8087 if res.Body != nil { 8088 res.Body.Close() 8089 } 8090 return nil, &googleapi.Error{ 8091 Code: res.StatusCode, 8092 Header: res.Header, 8093 } 8094 } 8095 if err != nil { 8096 return nil, err 8097 } 8098 defer googleapi.CloseBody(res) 8099 if err := googleapi.CheckResponse(res); err != nil { 8100 return nil, err 8101 } 8102 ret := &Empty{ 8103 ServerResponse: googleapi.ServerResponse{ 8104 Header: res.Header, 8105 HTTPStatusCode: res.StatusCode, 8106 }, 8107 } 8108 target := &ret 8109 if err := gensupport.DecodeResponse(target, res); err != nil { 8110 return nil, err 8111 } 8112 return ret, nil 8113 // { 8114 // "description": "Stops watching a creative. Will stop push notifications being sent to the topics when the creative changes status.", 8115 // "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching", 8116 // "httpMethod": "POST", 8117 // "id": "adexchangebuyer2.accounts.creatives.stopWatching", 8118 // "parameterOrder": [ 8119 // "accountId", 8120 // "creativeId" 8121 // ], 8122 // "parameters": { 8123 // "accountId": { 8124 // "description": "The account of the creative to stop notifications for.", 8125 // "location": "path", 8126 // "required": true, 8127 // "type": "string" 8128 // }, 8129 // "creativeId": { 8130 // "description": "The creative ID of the creative to stop notifications for. Specify \"-\" to specify stopping account level notifications.", 8131 // "location": "path", 8132 // "required": true, 8133 // "type": "string" 8134 // } 8135 // }, 8136 // "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching", 8137 // "request": { 8138 // "$ref": "StopWatchingCreativeRequest" 8139 // }, 8140 // "response": { 8141 // "$ref": "Empty" 8142 // }, 8143 // "scopes": [ 8144 // "https://www.googleapis.com/auth/adexchange.buyer" 8145 // ] 8146 // } 8147 8148} 8149 8150// method id "adexchangebuyer2.accounts.creatives.update": 8151 8152type AccountsCreativesUpdateCall struct { 8153 s *Service 8154 accountId string 8155 creativeId string 8156 creative *Creative 8157 urlParams_ gensupport.URLParams 8158 ctx_ context.Context 8159 header_ http.Header 8160} 8161 8162// Update: Updates a creative. 8163// 8164// - accountId: The account that this creative belongs to. Can be used 8165// to filter the response of the creatives.list method. 8166// - creativeId: The buyer-defined creative ID of this creative. Can be 8167// used to filter the response of the creatives.list method. 8168func (r *AccountsCreativesService) Update(accountId string, creativeId string, creative *Creative) *AccountsCreativesUpdateCall { 8169 c := &AccountsCreativesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8170 c.accountId = accountId 8171 c.creativeId = creativeId 8172 c.creative = creative 8173 return c 8174} 8175 8176// Fields allows partial responses to be retrieved. See 8177// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8178// for more information. 8179func (c *AccountsCreativesUpdateCall) Fields(s ...googleapi.Field) *AccountsCreativesUpdateCall { 8180 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8181 return c 8182} 8183 8184// Context sets the context to be used in this call's Do method. Any 8185// pending HTTP request will be aborted if the provided context is 8186// canceled. 8187func (c *AccountsCreativesUpdateCall) Context(ctx context.Context) *AccountsCreativesUpdateCall { 8188 c.ctx_ = ctx 8189 return c 8190} 8191 8192// Header returns an http.Header that can be modified by the caller to 8193// add HTTP headers to the request. 8194func (c *AccountsCreativesUpdateCall) Header() http.Header { 8195 if c.header_ == nil { 8196 c.header_ = make(http.Header) 8197 } 8198 return c.header_ 8199} 8200 8201func (c *AccountsCreativesUpdateCall) doRequest(alt string) (*http.Response, error) { 8202 reqHeaders := make(http.Header) 8203 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 8204 for k, v := range c.header_ { 8205 reqHeaders[k] = v 8206 } 8207 reqHeaders.Set("User-Agent", c.s.userAgent()) 8208 var body io.Reader = nil 8209 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative) 8210 if err != nil { 8211 return nil, err 8212 } 8213 reqHeaders.Set("Content-Type", "application/json") 8214 c.urlParams_.Set("alt", alt) 8215 c.urlParams_.Set("prettyPrint", "false") 8216 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}") 8217 urls += "?" + c.urlParams_.Encode() 8218 req, err := http.NewRequest("PUT", urls, body) 8219 if err != nil { 8220 return nil, err 8221 } 8222 req.Header = reqHeaders 8223 googleapi.Expand(req.URL, map[string]string{ 8224 "accountId": c.accountId, 8225 "creativeId": c.creativeId, 8226 }) 8227 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8228} 8229 8230// Do executes the "adexchangebuyer2.accounts.creatives.update" call. 8231// Exactly one of *Creative or error will be non-nil. Any non-2xx status 8232// code is an error. Response headers are in either 8233// *Creative.ServerResponse.Header or (if a response was returned at 8234// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8235// to check whether the returned error was because 8236// http.StatusNotModified was returned. 8237func (c *AccountsCreativesUpdateCall) Do(opts ...googleapi.CallOption) (*Creative, error) { 8238 gensupport.SetOptions(c.urlParams_, opts...) 8239 res, err := c.doRequest("json") 8240 if res != nil && res.StatusCode == http.StatusNotModified { 8241 if res.Body != nil { 8242 res.Body.Close() 8243 } 8244 return nil, &googleapi.Error{ 8245 Code: res.StatusCode, 8246 Header: res.Header, 8247 } 8248 } 8249 if err != nil { 8250 return nil, err 8251 } 8252 defer googleapi.CloseBody(res) 8253 if err := googleapi.CheckResponse(res); err != nil { 8254 return nil, err 8255 } 8256 ret := &Creative{ 8257 ServerResponse: googleapi.ServerResponse{ 8258 Header: res.Header, 8259 HTTPStatusCode: res.StatusCode, 8260 }, 8261 } 8262 target := &ret 8263 if err := gensupport.DecodeResponse(target, res); err != nil { 8264 return nil, err 8265 } 8266 return ret, nil 8267 // { 8268 // "description": "Updates a creative.", 8269 // "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}", 8270 // "httpMethod": "PUT", 8271 // "id": "adexchangebuyer2.accounts.creatives.update", 8272 // "parameterOrder": [ 8273 // "accountId", 8274 // "creativeId" 8275 // ], 8276 // "parameters": { 8277 // "accountId": { 8278 // "description": "The account that this creative belongs to. Can be used to filter the response of the creatives.list method.", 8279 // "location": "path", 8280 // "required": true, 8281 // "type": "string" 8282 // }, 8283 // "creativeId": { 8284 // "description": "The buyer-defined creative ID of this creative. Can be used to filter the response of the creatives.list method.", 8285 // "location": "path", 8286 // "required": true, 8287 // "type": "string" 8288 // } 8289 // }, 8290 // "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}", 8291 // "request": { 8292 // "$ref": "Creative" 8293 // }, 8294 // "response": { 8295 // "$ref": "Creative" 8296 // }, 8297 // "scopes": [ 8298 // "https://www.googleapis.com/auth/adexchange.buyer" 8299 // ] 8300 // } 8301 8302} 8303 8304// method id "adexchangebuyer2.accounts.creatives.watch": 8305 8306type AccountsCreativesWatchCall struct { 8307 s *Service 8308 accountId string 8309 creativeId string 8310 watchcreativerequest *WatchCreativeRequest 8311 urlParams_ gensupport.URLParams 8312 ctx_ context.Context 8313 header_ http.Header 8314} 8315 8316// Watch: Watches a creative. Will result in push notifications being 8317// sent to the topic when the creative changes status. 8318// 8319// - accountId: The account of the creative to watch. 8320// - creativeId: The creative ID to watch for status changes. Specify 8321// "-" to watch all creatives under the above account. If both 8322// creative-level and account-level notifications are sent, only a 8323// single notification will be sent to the creative-level notification 8324// topic. 8325func (r *AccountsCreativesService) Watch(accountId string, creativeId string, watchcreativerequest *WatchCreativeRequest) *AccountsCreativesWatchCall { 8326 c := &AccountsCreativesWatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8327 c.accountId = accountId 8328 c.creativeId = creativeId 8329 c.watchcreativerequest = watchcreativerequest 8330 return c 8331} 8332 8333// Fields allows partial responses to be retrieved. See 8334// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8335// for more information. 8336func (c *AccountsCreativesWatchCall) Fields(s ...googleapi.Field) *AccountsCreativesWatchCall { 8337 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8338 return c 8339} 8340 8341// Context sets the context to be used in this call's Do method. Any 8342// pending HTTP request will be aborted if the provided context is 8343// canceled. 8344func (c *AccountsCreativesWatchCall) Context(ctx context.Context) *AccountsCreativesWatchCall { 8345 c.ctx_ = ctx 8346 return c 8347} 8348 8349// Header returns an http.Header that can be modified by the caller to 8350// add HTTP headers to the request. 8351func (c *AccountsCreativesWatchCall) Header() http.Header { 8352 if c.header_ == nil { 8353 c.header_ = make(http.Header) 8354 } 8355 return c.header_ 8356} 8357 8358func (c *AccountsCreativesWatchCall) doRequest(alt string) (*http.Response, error) { 8359 reqHeaders := make(http.Header) 8360 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 8361 for k, v := range c.header_ { 8362 reqHeaders[k] = v 8363 } 8364 reqHeaders.Set("User-Agent", c.s.userAgent()) 8365 var body io.Reader = nil 8366 body, err := googleapi.WithoutDataWrapper.JSONReader(c.watchcreativerequest) 8367 if err != nil { 8368 return nil, err 8369 } 8370 reqHeaders.Set("Content-Type", "application/json") 8371 c.urlParams_.Set("alt", alt) 8372 c.urlParams_.Set("prettyPrint", "false") 8373 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}:watch") 8374 urls += "?" + c.urlParams_.Encode() 8375 req, err := http.NewRequest("POST", urls, body) 8376 if err != nil { 8377 return nil, err 8378 } 8379 req.Header = reqHeaders 8380 googleapi.Expand(req.URL, map[string]string{ 8381 "accountId": c.accountId, 8382 "creativeId": c.creativeId, 8383 }) 8384 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8385} 8386 8387// Do executes the "adexchangebuyer2.accounts.creatives.watch" call. 8388// Exactly one of *Empty or error will be non-nil. Any non-2xx status 8389// code is an error. Response headers are in either 8390// *Empty.ServerResponse.Header or (if a response was returned at all) 8391// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8392// check whether the returned error was because http.StatusNotModified 8393// was returned. 8394func (c *AccountsCreativesWatchCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 8395 gensupport.SetOptions(c.urlParams_, opts...) 8396 res, err := c.doRequest("json") 8397 if res != nil && res.StatusCode == http.StatusNotModified { 8398 if res.Body != nil { 8399 res.Body.Close() 8400 } 8401 return nil, &googleapi.Error{ 8402 Code: res.StatusCode, 8403 Header: res.Header, 8404 } 8405 } 8406 if err != nil { 8407 return nil, err 8408 } 8409 defer googleapi.CloseBody(res) 8410 if err := googleapi.CheckResponse(res); err != nil { 8411 return nil, err 8412 } 8413 ret := &Empty{ 8414 ServerResponse: googleapi.ServerResponse{ 8415 Header: res.Header, 8416 HTTPStatusCode: res.StatusCode, 8417 }, 8418 } 8419 target := &ret 8420 if err := gensupport.DecodeResponse(target, res); err != nil { 8421 return nil, err 8422 } 8423 return ret, nil 8424 // { 8425 // "description": "Watches a creative. Will result in push notifications being sent to the topic when the creative changes status.", 8426 // "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}:watch", 8427 // "httpMethod": "POST", 8428 // "id": "adexchangebuyer2.accounts.creatives.watch", 8429 // "parameterOrder": [ 8430 // "accountId", 8431 // "creativeId" 8432 // ], 8433 // "parameters": { 8434 // "accountId": { 8435 // "description": "The account of the creative to watch.", 8436 // "location": "path", 8437 // "required": true, 8438 // "type": "string" 8439 // }, 8440 // "creativeId": { 8441 // "description": "The creative ID to watch for status changes. Specify \"-\" to watch all creatives under the above account. If both creative-level and account-level notifications are sent, only a single notification will be sent to the creative-level notification topic.", 8442 // "location": "path", 8443 // "required": true, 8444 // "type": "string" 8445 // } 8446 // }, 8447 // "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}:watch", 8448 // "request": { 8449 // "$ref": "WatchCreativeRequest" 8450 // }, 8451 // "response": { 8452 // "$ref": "Empty" 8453 // }, 8454 // "scopes": [ 8455 // "https://www.googleapis.com/auth/adexchange.buyer" 8456 // ] 8457 // } 8458 8459} 8460 8461// method id "adexchangebuyer2.accounts.creatives.dealAssociations.add": 8462 8463type AccountsCreativesDealAssociationsAddCall struct { 8464 s *Service 8465 accountId string 8466 creativeId string 8467 adddealassociationrequest *AddDealAssociationRequest 8468 urlParams_ gensupport.URLParams 8469 ctx_ context.Context 8470 header_ http.Header 8471} 8472 8473// Add: Associate an existing deal with a creative. 8474// 8475// - accountId: The account the creative belongs to. 8476// - creativeId: The ID of the creative associated with the deal. 8477func (r *AccountsCreativesDealAssociationsService) Add(accountId string, creativeId string, adddealassociationrequest *AddDealAssociationRequest) *AccountsCreativesDealAssociationsAddCall { 8478 c := &AccountsCreativesDealAssociationsAddCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8479 c.accountId = accountId 8480 c.creativeId = creativeId 8481 c.adddealassociationrequest = adddealassociationrequest 8482 return c 8483} 8484 8485// Fields allows partial responses to be retrieved. See 8486// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8487// for more information. 8488func (c *AccountsCreativesDealAssociationsAddCall) Fields(s ...googleapi.Field) *AccountsCreativesDealAssociationsAddCall { 8489 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8490 return c 8491} 8492 8493// Context sets the context to be used in this call's Do method. Any 8494// pending HTTP request will be aborted if the provided context is 8495// canceled. 8496func (c *AccountsCreativesDealAssociationsAddCall) Context(ctx context.Context) *AccountsCreativesDealAssociationsAddCall { 8497 c.ctx_ = ctx 8498 return c 8499} 8500 8501// Header returns an http.Header that can be modified by the caller to 8502// add HTTP headers to the request. 8503func (c *AccountsCreativesDealAssociationsAddCall) Header() http.Header { 8504 if c.header_ == nil { 8505 c.header_ = make(http.Header) 8506 } 8507 return c.header_ 8508} 8509 8510func (c *AccountsCreativesDealAssociationsAddCall) doRequest(alt string) (*http.Response, error) { 8511 reqHeaders := make(http.Header) 8512 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 8513 for k, v := range c.header_ { 8514 reqHeaders[k] = v 8515 } 8516 reqHeaders.Set("User-Agent", c.s.userAgent()) 8517 var body io.Reader = nil 8518 body, err := googleapi.WithoutDataWrapper.JSONReader(c.adddealassociationrequest) 8519 if err != nil { 8520 return nil, err 8521 } 8522 reqHeaders.Set("Content-Type", "application/json") 8523 c.urlParams_.Set("alt", alt) 8524 c.urlParams_.Set("prettyPrint", "false") 8525 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add") 8526 urls += "?" + c.urlParams_.Encode() 8527 req, err := http.NewRequest("POST", urls, body) 8528 if err != nil { 8529 return nil, err 8530 } 8531 req.Header = reqHeaders 8532 googleapi.Expand(req.URL, map[string]string{ 8533 "accountId": c.accountId, 8534 "creativeId": c.creativeId, 8535 }) 8536 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8537} 8538 8539// Do executes the "adexchangebuyer2.accounts.creatives.dealAssociations.add" call. 8540// Exactly one of *Empty or error will be non-nil. Any non-2xx status 8541// code is an error. Response headers are in either 8542// *Empty.ServerResponse.Header or (if a response was returned at all) 8543// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8544// check whether the returned error was because http.StatusNotModified 8545// was returned. 8546func (c *AccountsCreativesDealAssociationsAddCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 8547 gensupport.SetOptions(c.urlParams_, opts...) 8548 res, err := c.doRequest("json") 8549 if res != nil && res.StatusCode == http.StatusNotModified { 8550 if res.Body != nil { 8551 res.Body.Close() 8552 } 8553 return nil, &googleapi.Error{ 8554 Code: res.StatusCode, 8555 Header: res.Header, 8556 } 8557 } 8558 if err != nil { 8559 return nil, err 8560 } 8561 defer googleapi.CloseBody(res) 8562 if err := googleapi.CheckResponse(res); err != nil { 8563 return nil, err 8564 } 8565 ret := &Empty{ 8566 ServerResponse: googleapi.ServerResponse{ 8567 Header: res.Header, 8568 HTTPStatusCode: res.StatusCode, 8569 }, 8570 } 8571 target := &ret 8572 if err := gensupport.DecodeResponse(target, res); err != nil { 8573 return nil, err 8574 } 8575 return ret, nil 8576 // { 8577 // "description": "Associate an existing deal with a creative.", 8578 // "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add", 8579 // "httpMethod": "POST", 8580 // "id": "adexchangebuyer2.accounts.creatives.dealAssociations.add", 8581 // "parameterOrder": [ 8582 // "accountId", 8583 // "creativeId" 8584 // ], 8585 // "parameters": { 8586 // "accountId": { 8587 // "description": "The account the creative belongs to.", 8588 // "location": "path", 8589 // "required": true, 8590 // "type": "string" 8591 // }, 8592 // "creativeId": { 8593 // "description": "The ID of the creative associated with the deal.", 8594 // "location": "path", 8595 // "required": true, 8596 // "type": "string" 8597 // } 8598 // }, 8599 // "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add", 8600 // "request": { 8601 // "$ref": "AddDealAssociationRequest" 8602 // }, 8603 // "response": { 8604 // "$ref": "Empty" 8605 // }, 8606 // "scopes": [ 8607 // "https://www.googleapis.com/auth/adexchange.buyer" 8608 // ] 8609 // } 8610 8611} 8612 8613// method id "adexchangebuyer2.accounts.creatives.dealAssociations.list": 8614 8615type AccountsCreativesDealAssociationsListCall struct { 8616 s *Service 8617 accountId string 8618 creativeId string 8619 urlParams_ gensupport.URLParams 8620 ifNoneMatch_ string 8621 ctx_ context.Context 8622 header_ http.Header 8623} 8624 8625// List: List all creative-deal associations. 8626// 8627// - accountId: The account to list the associations from. Specify "-" 8628// to list all creatives the current user has access to. 8629// - creativeId: The creative ID to list the associations from. Specify 8630// "-" to list all creatives under the above account. 8631func (r *AccountsCreativesDealAssociationsService) List(accountId string, creativeId string) *AccountsCreativesDealAssociationsListCall { 8632 c := &AccountsCreativesDealAssociationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8633 c.accountId = accountId 8634 c.creativeId = creativeId 8635 return c 8636} 8637 8638// PageSize sets the optional parameter "pageSize": Requested page size. 8639// Server may return fewer associations than requested. If unspecified, 8640// server will pick an appropriate default. 8641func (c *AccountsCreativesDealAssociationsListCall) PageSize(pageSize int64) *AccountsCreativesDealAssociationsListCall { 8642 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8643 return c 8644} 8645 8646// PageToken sets the optional parameter "pageToken": A token 8647// identifying a page of results the server should return. Typically, 8648// this is the value of ListDealAssociationsResponse.next_page_token 8649// returned from the previous call to 'ListDealAssociations' method. 8650func (c *AccountsCreativesDealAssociationsListCall) PageToken(pageToken string) *AccountsCreativesDealAssociationsListCall { 8651 c.urlParams_.Set("pageToken", pageToken) 8652 return c 8653} 8654 8655// Query sets the optional parameter "query": An optional query string 8656// to filter deal associations. If no filter is specified, all 8657// associations will be returned. Supported queries are: - 8658// accountId=*account_id_string* - creativeId=*creative_id_string* - 8659// dealsId=*deals_id_string* - dealsStatus:{approved, 8660// conditionally_approved, disapproved, not_checked} - 8661// openAuctionStatus:{approved, conditionally_approved, disapproved, 8662// not_checked} Example: 'dealsId=12345 AND dealsStatus:disapproved' 8663func (c *AccountsCreativesDealAssociationsListCall) Query(query string) *AccountsCreativesDealAssociationsListCall { 8664 c.urlParams_.Set("query", query) 8665 return c 8666} 8667 8668// Fields allows partial responses to be retrieved. See 8669// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8670// for more information. 8671func (c *AccountsCreativesDealAssociationsListCall) Fields(s ...googleapi.Field) *AccountsCreativesDealAssociationsListCall { 8672 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8673 return c 8674} 8675 8676// IfNoneMatch sets the optional parameter which makes the operation 8677// fail if the object's ETag matches the given value. This is useful for 8678// getting updates only after the object has changed since the last 8679// request. Use googleapi.IsNotModified to check whether the response 8680// error from Do is the result of In-None-Match. 8681func (c *AccountsCreativesDealAssociationsListCall) IfNoneMatch(entityTag string) *AccountsCreativesDealAssociationsListCall { 8682 c.ifNoneMatch_ = entityTag 8683 return c 8684} 8685 8686// Context sets the context to be used in this call's Do method. Any 8687// pending HTTP request will be aborted if the provided context is 8688// canceled. 8689func (c *AccountsCreativesDealAssociationsListCall) Context(ctx context.Context) *AccountsCreativesDealAssociationsListCall { 8690 c.ctx_ = ctx 8691 return c 8692} 8693 8694// Header returns an http.Header that can be modified by the caller to 8695// add HTTP headers to the request. 8696func (c *AccountsCreativesDealAssociationsListCall) Header() http.Header { 8697 if c.header_ == nil { 8698 c.header_ = make(http.Header) 8699 } 8700 return c.header_ 8701} 8702 8703func (c *AccountsCreativesDealAssociationsListCall) doRequest(alt string) (*http.Response, error) { 8704 reqHeaders := make(http.Header) 8705 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 8706 for k, v := range c.header_ { 8707 reqHeaders[k] = v 8708 } 8709 reqHeaders.Set("User-Agent", c.s.userAgent()) 8710 if c.ifNoneMatch_ != "" { 8711 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8712 } 8713 var body io.Reader = nil 8714 c.urlParams_.Set("alt", alt) 8715 c.urlParams_.Set("prettyPrint", "false") 8716 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations") 8717 urls += "?" + c.urlParams_.Encode() 8718 req, err := http.NewRequest("GET", urls, body) 8719 if err != nil { 8720 return nil, err 8721 } 8722 req.Header = reqHeaders 8723 googleapi.Expand(req.URL, map[string]string{ 8724 "accountId": c.accountId, 8725 "creativeId": c.creativeId, 8726 }) 8727 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8728} 8729 8730// Do executes the "adexchangebuyer2.accounts.creatives.dealAssociations.list" call. 8731// Exactly one of *ListDealAssociationsResponse or error will be 8732// non-nil. Any non-2xx status code is an error. Response headers are in 8733// either *ListDealAssociationsResponse.ServerResponse.Header or (if a 8734// response was returned at all) in error.(*googleapi.Error).Header. Use 8735// googleapi.IsNotModified to check whether the returned error was 8736// because http.StatusNotModified was returned. 8737func (c *AccountsCreativesDealAssociationsListCall) Do(opts ...googleapi.CallOption) (*ListDealAssociationsResponse, error) { 8738 gensupport.SetOptions(c.urlParams_, opts...) 8739 res, err := c.doRequest("json") 8740 if res != nil && res.StatusCode == http.StatusNotModified { 8741 if res.Body != nil { 8742 res.Body.Close() 8743 } 8744 return nil, &googleapi.Error{ 8745 Code: res.StatusCode, 8746 Header: res.Header, 8747 } 8748 } 8749 if err != nil { 8750 return nil, err 8751 } 8752 defer googleapi.CloseBody(res) 8753 if err := googleapi.CheckResponse(res); err != nil { 8754 return nil, err 8755 } 8756 ret := &ListDealAssociationsResponse{ 8757 ServerResponse: googleapi.ServerResponse{ 8758 Header: res.Header, 8759 HTTPStatusCode: res.StatusCode, 8760 }, 8761 } 8762 target := &ret 8763 if err := gensupport.DecodeResponse(target, res); err != nil { 8764 return nil, err 8765 } 8766 return ret, nil 8767 // { 8768 // "description": "List all creative-deal associations.", 8769 // "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations", 8770 // "httpMethod": "GET", 8771 // "id": "adexchangebuyer2.accounts.creatives.dealAssociations.list", 8772 // "parameterOrder": [ 8773 // "accountId", 8774 // "creativeId" 8775 // ], 8776 // "parameters": { 8777 // "accountId": { 8778 // "description": "The account to list the associations from. Specify \"-\" to list all creatives the current user has access to.", 8779 // "location": "path", 8780 // "required": true, 8781 // "type": "string" 8782 // }, 8783 // "creativeId": { 8784 // "description": "The creative ID to list the associations from. Specify \"-\" to list all creatives under the above account.", 8785 // "location": "path", 8786 // "required": true, 8787 // "type": "string" 8788 // }, 8789 // "pageSize": { 8790 // "description": "Requested page size. Server may return fewer associations than requested. If unspecified, server will pick an appropriate default.", 8791 // "format": "int32", 8792 // "location": "query", 8793 // "type": "integer" 8794 // }, 8795 // "pageToken": { 8796 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListDealAssociationsResponse.next_page_token returned from the previous call to 'ListDealAssociations' method.", 8797 // "location": "query", 8798 // "type": "string" 8799 // }, 8800 // "query": { 8801 // "description": "An optional query string to filter deal associations. If no filter is specified, all associations will be returned. Supported queries are: - accountId=*account_id_string* - creativeId=*creative_id_string* - dealsId=*deals_id_string* - dealsStatus:{approved, conditionally_approved, disapproved, not_checked} - openAuctionStatus:{approved, conditionally_approved, disapproved, not_checked} Example: 'dealsId=12345 AND dealsStatus:disapproved'", 8802 // "location": "query", 8803 // "type": "string" 8804 // } 8805 // }, 8806 // "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations", 8807 // "response": { 8808 // "$ref": "ListDealAssociationsResponse" 8809 // }, 8810 // "scopes": [ 8811 // "https://www.googleapis.com/auth/adexchange.buyer" 8812 // ] 8813 // } 8814 8815} 8816 8817// Pages invokes f for each page of results. 8818// A non-nil error returned from f will halt the iteration. 8819// The provided context supersedes any context provided to the Context method. 8820func (c *AccountsCreativesDealAssociationsListCall) Pages(ctx context.Context, f func(*ListDealAssociationsResponse) error) error { 8821 c.ctx_ = ctx 8822 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 8823 for { 8824 x, err := c.Do() 8825 if err != nil { 8826 return err 8827 } 8828 if err := f(x); err != nil { 8829 return err 8830 } 8831 if x.NextPageToken == "" { 8832 return nil 8833 } 8834 c.PageToken(x.NextPageToken) 8835 } 8836} 8837 8838// method id "adexchangebuyer2.accounts.creatives.dealAssociations.remove": 8839 8840type AccountsCreativesDealAssociationsRemoveCall struct { 8841 s *Service 8842 accountId string 8843 creativeId string 8844 removedealassociationrequest *RemoveDealAssociationRequest 8845 urlParams_ gensupport.URLParams 8846 ctx_ context.Context 8847 header_ http.Header 8848} 8849 8850// Remove: Remove the association between a deal and a creative. 8851// 8852// - accountId: The account the creative belongs to. 8853// - creativeId: The ID of the creative associated with the deal. 8854func (r *AccountsCreativesDealAssociationsService) Remove(accountId string, creativeId string, removedealassociationrequest *RemoveDealAssociationRequest) *AccountsCreativesDealAssociationsRemoveCall { 8855 c := &AccountsCreativesDealAssociationsRemoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8856 c.accountId = accountId 8857 c.creativeId = creativeId 8858 c.removedealassociationrequest = removedealassociationrequest 8859 return c 8860} 8861 8862// Fields allows partial responses to be retrieved. See 8863// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8864// for more information. 8865func (c *AccountsCreativesDealAssociationsRemoveCall) Fields(s ...googleapi.Field) *AccountsCreativesDealAssociationsRemoveCall { 8866 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8867 return c 8868} 8869 8870// Context sets the context to be used in this call's Do method. Any 8871// pending HTTP request will be aborted if the provided context is 8872// canceled. 8873func (c *AccountsCreativesDealAssociationsRemoveCall) Context(ctx context.Context) *AccountsCreativesDealAssociationsRemoveCall { 8874 c.ctx_ = ctx 8875 return c 8876} 8877 8878// Header returns an http.Header that can be modified by the caller to 8879// add HTTP headers to the request. 8880func (c *AccountsCreativesDealAssociationsRemoveCall) Header() http.Header { 8881 if c.header_ == nil { 8882 c.header_ = make(http.Header) 8883 } 8884 return c.header_ 8885} 8886 8887func (c *AccountsCreativesDealAssociationsRemoveCall) doRequest(alt string) (*http.Response, error) { 8888 reqHeaders := make(http.Header) 8889 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 8890 for k, v := range c.header_ { 8891 reqHeaders[k] = v 8892 } 8893 reqHeaders.Set("User-Agent", c.s.userAgent()) 8894 var body io.Reader = nil 8895 body, err := googleapi.WithoutDataWrapper.JSONReader(c.removedealassociationrequest) 8896 if err != nil { 8897 return nil, err 8898 } 8899 reqHeaders.Set("Content-Type", "application/json") 8900 c.urlParams_.Set("alt", alt) 8901 c.urlParams_.Set("prettyPrint", "false") 8902 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove") 8903 urls += "?" + c.urlParams_.Encode() 8904 req, err := http.NewRequest("POST", urls, body) 8905 if err != nil { 8906 return nil, err 8907 } 8908 req.Header = reqHeaders 8909 googleapi.Expand(req.URL, map[string]string{ 8910 "accountId": c.accountId, 8911 "creativeId": c.creativeId, 8912 }) 8913 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8914} 8915 8916// Do executes the "adexchangebuyer2.accounts.creatives.dealAssociations.remove" call. 8917// Exactly one of *Empty or error will be non-nil. Any non-2xx status 8918// code is an error. Response headers are in either 8919// *Empty.ServerResponse.Header or (if a response was returned at all) 8920// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8921// check whether the returned error was because http.StatusNotModified 8922// was returned. 8923func (c *AccountsCreativesDealAssociationsRemoveCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 8924 gensupport.SetOptions(c.urlParams_, opts...) 8925 res, err := c.doRequest("json") 8926 if res != nil && res.StatusCode == http.StatusNotModified { 8927 if res.Body != nil { 8928 res.Body.Close() 8929 } 8930 return nil, &googleapi.Error{ 8931 Code: res.StatusCode, 8932 Header: res.Header, 8933 } 8934 } 8935 if err != nil { 8936 return nil, err 8937 } 8938 defer googleapi.CloseBody(res) 8939 if err := googleapi.CheckResponse(res); err != nil { 8940 return nil, err 8941 } 8942 ret := &Empty{ 8943 ServerResponse: googleapi.ServerResponse{ 8944 Header: res.Header, 8945 HTTPStatusCode: res.StatusCode, 8946 }, 8947 } 8948 target := &ret 8949 if err := gensupport.DecodeResponse(target, res); err != nil { 8950 return nil, err 8951 } 8952 return ret, nil 8953 // { 8954 // "description": "Remove the association between a deal and a creative.", 8955 // "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove", 8956 // "httpMethod": "POST", 8957 // "id": "adexchangebuyer2.accounts.creatives.dealAssociations.remove", 8958 // "parameterOrder": [ 8959 // "accountId", 8960 // "creativeId" 8961 // ], 8962 // "parameters": { 8963 // "accountId": { 8964 // "description": "The account the creative belongs to.", 8965 // "location": "path", 8966 // "required": true, 8967 // "type": "string" 8968 // }, 8969 // "creativeId": { 8970 // "description": "The ID of the creative associated with the deal.", 8971 // "location": "path", 8972 // "required": true, 8973 // "type": "string" 8974 // } 8975 // }, 8976 // "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove", 8977 // "request": { 8978 // "$ref": "RemoveDealAssociationRequest" 8979 // }, 8980 // "response": { 8981 // "$ref": "Empty" 8982 // }, 8983 // "scopes": [ 8984 // "https://www.googleapis.com/auth/adexchange.buyer" 8985 // ] 8986 // } 8987 8988} 8989 8990// method id "adexchangebuyer2.accounts.finalizedProposals.list": 8991 8992type AccountsFinalizedProposalsListCall struct { 8993 s *Service 8994 accountId string 8995 urlParams_ gensupport.URLParams 8996 ifNoneMatch_ string 8997 ctx_ context.Context 8998 header_ http.Header 8999} 9000 9001// List: List finalized proposals, regardless if a proposal is being 9002// renegotiated. A filter expression (PQL query) may be specified to 9003// filter the results. The notes will not be returned. 9004// 9005// - accountId: Account ID of the buyer. 9006func (r *AccountsFinalizedProposalsService) List(accountId string) *AccountsFinalizedProposalsListCall { 9007 c := &AccountsFinalizedProposalsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9008 c.accountId = accountId 9009 return c 9010} 9011 9012// Filter sets the optional parameter "filter": An optional PQL filter 9013// query used to query for proposals. Nested repeated fields, such as 9014// proposal.deals.targetingCriterion, cannot be filtered. 9015func (c *AccountsFinalizedProposalsListCall) Filter(filter string) *AccountsFinalizedProposalsListCall { 9016 c.urlParams_.Set("filter", filter) 9017 return c 9018} 9019 9020// FilterSyntax sets the optional parameter "filterSyntax": Syntax the 9021// filter is written in. Current implementation defaults to PQL but in 9022// the future it will be LIST_FILTER. 9023// 9024// Possible values: 9025// "FILTER_SYNTAX_UNSPECIFIED" - A placeholder for an undefined filter 9026// syntax. 9027// "PQL" - PQL query syntax. Visit 9028// https://developers.google.com/ad-manager/api/pqlreference for PQL 9029// documentation and examples. 9030// "LIST_FILTER" - API list filtering syntax. Read about syntax and 9031// usage at 9032// https://developers.google.com/authorized-buyers/apis/guides/v2/list-filters. 9033func (c *AccountsFinalizedProposalsListCall) FilterSyntax(filterSyntax string) *AccountsFinalizedProposalsListCall { 9034 c.urlParams_.Set("filterSyntax", filterSyntax) 9035 return c 9036} 9037 9038// PageSize sets the optional parameter "pageSize": Requested page size. 9039// The server may return fewer results than requested. If unspecified, 9040// the server will pick an appropriate default. 9041func (c *AccountsFinalizedProposalsListCall) PageSize(pageSize int64) *AccountsFinalizedProposalsListCall { 9042 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9043 return c 9044} 9045 9046// PageToken sets the optional parameter "pageToken": The page token as 9047// returned from ListProposalsResponse. 9048func (c *AccountsFinalizedProposalsListCall) PageToken(pageToken string) *AccountsFinalizedProposalsListCall { 9049 c.urlParams_.Set("pageToken", pageToken) 9050 return c 9051} 9052 9053// Fields allows partial responses to be retrieved. See 9054// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9055// for more information. 9056func (c *AccountsFinalizedProposalsListCall) Fields(s ...googleapi.Field) *AccountsFinalizedProposalsListCall { 9057 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9058 return c 9059} 9060 9061// IfNoneMatch sets the optional parameter which makes the operation 9062// fail if the object's ETag matches the given value. This is useful for 9063// getting updates only after the object has changed since the last 9064// request. Use googleapi.IsNotModified to check whether the response 9065// error from Do is the result of In-None-Match. 9066func (c *AccountsFinalizedProposalsListCall) IfNoneMatch(entityTag string) *AccountsFinalizedProposalsListCall { 9067 c.ifNoneMatch_ = entityTag 9068 return c 9069} 9070 9071// Context sets the context to be used in this call's Do method. Any 9072// pending HTTP request will be aborted if the provided context is 9073// canceled. 9074func (c *AccountsFinalizedProposalsListCall) Context(ctx context.Context) *AccountsFinalizedProposalsListCall { 9075 c.ctx_ = ctx 9076 return c 9077} 9078 9079// Header returns an http.Header that can be modified by the caller to 9080// add HTTP headers to the request. 9081func (c *AccountsFinalizedProposalsListCall) Header() http.Header { 9082 if c.header_ == nil { 9083 c.header_ = make(http.Header) 9084 } 9085 return c.header_ 9086} 9087 9088func (c *AccountsFinalizedProposalsListCall) doRequest(alt string) (*http.Response, error) { 9089 reqHeaders := make(http.Header) 9090 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 9091 for k, v := range c.header_ { 9092 reqHeaders[k] = v 9093 } 9094 reqHeaders.Set("User-Agent", c.s.userAgent()) 9095 if c.ifNoneMatch_ != "" { 9096 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9097 } 9098 var body io.Reader = nil 9099 c.urlParams_.Set("alt", alt) 9100 c.urlParams_.Set("prettyPrint", "false") 9101 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/finalizedProposals") 9102 urls += "?" + c.urlParams_.Encode() 9103 req, err := http.NewRequest("GET", urls, body) 9104 if err != nil { 9105 return nil, err 9106 } 9107 req.Header = reqHeaders 9108 googleapi.Expand(req.URL, map[string]string{ 9109 "accountId": c.accountId, 9110 }) 9111 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9112} 9113 9114// Do executes the "adexchangebuyer2.accounts.finalizedProposals.list" call. 9115// Exactly one of *ListProposalsResponse or error will be non-nil. Any 9116// non-2xx status code is an error. Response headers are in either 9117// *ListProposalsResponse.ServerResponse.Header or (if a response was 9118// returned at all) in error.(*googleapi.Error).Header. Use 9119// googleapi.IsNotModified to check whether the returned error was 9120// because http.StatusNotModified was returned. 9121func (c *AccountsFinalizedProposalsListCall) Do(opts ...googleapi.CallOption) (*ListProposalsResponse, error) { 9122 gensupport.SetOptions(c.urlParams_, opts...) 9123 res, err := c.doRequest("json") 9124 if res != nil && res.StatusCode == http.StatusNotModified { 9125 if res.Body != nil { 9126 res.Body.Close() 9127 } 9128 return nil, &googleapi.Error{ 9129 Code: res.StatusCode, 9130 Header: res.Header, 9131 } 9132 } 9133 if err != nil { 9134 return nil, err 9135 } 9136 defer googleapi.CloseBody(res) 9137 if err := googleapi.CheckResponse(res); err != nil { 9138 return nil, err 9139 } 9140 ret := &ListProposalsResponse{ 9141 ServerResponse: googleapi.ServerResponse{ 9142 Header: res.Header, 9143 HTTPStatusCode: res.StatusCode, 9144 }, 9145 } 9146 target := &ret 9147 if err := gensupport.DecodeResponse(target, res); err != nil { 9148 return nil, err 9149 } 9150 return ret, nil 9151 // { 9152 // "description": "List finalized proposals, regardless if a proposal is being renegotiated. A filter expression (PQL query) may be specified to filter the results. The notes will not be returned.", 9153 // "flatPath": "v2beta1/accounts/{accountId}/finalizedProposals", 9154 // "httpMethod": "GET", 9155 // "id": "adexchangebuyer2.accounts.finalizedProposals.list", 9156 // "parameterOrder": [ 9157 // "accountId" 9158 // ], 9159 // "parameters": { 9160 // "accountId": { 9161 // "description": "Account ID of the buyer.", 9162 // "location": "path", 9163 // "required": true, 9164 // "type": "string" 9165 // }, 9166 // "filter": { 9167 // "description": "An optional PQL filter query used to query for proposals. Nested repeated fields, such as proposal.deals.targetingCriterion, cannot be filtered.", 9168 // "location": "query", 9169 // "type": "string" 9170 // }, 9171 // "filterSyntax": { 9172 // "description": "Syntax the filter is written in. Current implementation defaults to PQL but in the future it will be LIST_FILTER.", 9173 // "enum": [ 9174 // "FILTER_SYNTAX_UNSPECIFIED", 9175 // "PQL", 9176 // "LIST_FILTER" 9177 // ], 9178 // "enumDescriptions": [ 9179 // "A placeholder for an undefined filter syntax.", 9180 // "PQL query syntax. Visit https://developers.google.com/ad-manager/api/pqlreference for PQL documentation and examples.", 9181 // "API list filtering syntax. Read about syntax and usage at https://developers.google.com/authorized-buyers/apis/guides/v2/list-filters." 9182 // ], 9183 // "location": "query", 9184 // "type": "string" 9185 // }, 9186 // "pageSize": { 9187 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 9188 // "format": "int32", 9189 // "location": "query", 9190 // "type": "integer" 9191 // }, 9192 // "pageToken": { 9193 // "description": "The page token as returned from ListProposalsResponse.", 9194 // "location": "query", 9195 // "type": "string" 9196 // } 9197 // }, 9198 // "path": "v2beta1/accounts/{accountId}/finalizedProposals", 9199 // "response": { 9200 // "$ref": "ListProposalsResponse" 9201 // }, 9202 // "scopes": [ 9203 // "https://www.googleapis.com/auth/adexchange.buyer" 9204 // ] 9205 // } 9206 9207} 9208 9209// Pages invokes f for each page of results. 9210// A non-nil error returned from f will halt the iteration. 9211// The provided context supersedes any context provided to the Context method. 9212func (c *AccountsFinalizedProposalsListCall) Pages(ctx context.Context, f func(*ListProposalsResponse) error) error { 9213 c.ctx_ = ctx 9214 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9215 for { 9216 x, err := c.Do() 9217 if err != nil { 9218 return err 9219 } 9220 if err := f(x); err != nil { 9221 return err 9222 } 9223 if x.NextPageToken == "" { 9224 return nil 9225 } 9226 c.PageToken(x.NextPageToken) 9227 } 9228} 9229 9230// method id "adexchangebuyer2.accounts.products.get": 9231 9232type AccountsProductsGetCall struct { 9233 s *Service 9234 accountId string 9235 productId string 9236 urlParams_ gensupport.URLParams 9237 ifNoneMatch_ string 9238 ctx_ context.Context 9239 header_ http.Header 9240} 9241 9242// Get: Gets the requested product by ID. 9243// 9244// - accountId: Account ID of the buyer. 9245// - productId: The ID for the product to get the head revision for. 9246func (r *AccountsProductsService) Get(accountId string, productId string) *AccountsProductsGetCall { 9247 c := &AccountsProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9248 c.accountId = accountId 9249 c.productId = productId 9250 return c 9251} 9252 9253// Fields allows partial responses to be retrieved. See 9254// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9255// for more information. 9256func (c *AccountsProductsGetCall) Fields(s ...googleapi.Field) *AccountsProductsGetCall { 9257 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9258 return c 9259} 9260 9261// IfNoneMatch sets the optional parameter which makes the operation 9262// fail if the object's ETag matches the given value. This is useful for 9263// getting updates only after the object has changed since the last 9264// request. Use googleapi.IsNotModified to check whether the response 9265// error from Do is the result of In-None-Match. 9266func (c *AccountsProductsGetCall) IfNoneMatch(entityTag string) *AccountsProductsGetCall { 9267 c.ifNoneMatch_ = entityTag 9268 return c 9269} 9270 9271// Context sets the context to be used in this call's Do method. Any 9272// pending HTTP request will be aborted if the provided context is 9273// canceled. 9274func (c *AccountsProductsGetCall) Context(ctx context.Context) *AccountsProductsGetCall { 9275 c.ctx_ = ctx 9276 return c 9277} 9278 9279// Header returns an http.Header that can be modified by the caller to 9280// add HTTP headers to the request. 9281func (c *AccountsProductsGetCall) Header() http.Header { 9282 if c.header_ == nil { 9283 c.header_ = make(http.Header) 9284 } 9285 return c.header_ 9286} 9287 9288func (c *AccountsProductsGetCall) doRequest(alt string) (*http.Response, error) { 9289 reqHeaders := make(http.Header) 9290 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 9291 for k, v := range c.header_ { 9292 reqHeaders[k] = v 9293 } 9294 reqHeaders.Set("User-Agent", c.s.userAgent()) 9295 if c.ifNoneMatch_ != "" { 9296 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9297 } 9298 var body io.Reader = nil 9299 c.urlParams_.Set("alt", alt) 9300 c.urlParams_.Set("prettyPrint", "false") 9301 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/products/{productId}") 9302 urls += "?" + c.urlParams_.Encode() 9303 req, err := http.NewRequest("GET", urls, body) 9304 if err != nil { 9305 return nil, err 9306 } 9307 req.Header = reqHeaders 9308 googleapi.Expand(req.URL, map[string]string{ 9309 "accountId": c.accountId, 9310 "productId": c.productId, 9311 }) 9312 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9313} 9314 9315// Do executes the "adexchangebuyer2.accounts.products.get" call. 9316// Exactly one of *Product or error will be non-nil. Any non-2xx status 9317// code is an error. Response headers are in either 9318// *Product.ServerResponse.Header or (if a response was returned at all) 9319// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9320// check whether the returned error was because http.StatusNotModified 9321// was returned. 9322func (c *AccountsProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, error) { 9323 gensupport.SetOptions(c.urlParams_, opts...) 9324 res, err := c.doRequest("json") 9325 if res != nil && res.StatusCode == http.StatusNotModified { 9326 if res.Body != nil { 9327 res.Body.Close() 9328 } 9329 return nil, &googleapi.Error{ 9330 Code: res.StatusCode, 9331 Header: res.Header, 9332 } 9333 } 9334 if err != nil { 9335 return nil, err 9336 } 9337 defer googleapi.CloseBody(res) 9338 if err := googleapi.CheckResponse(res); err != nil { 9339 return nil, err 9340 } 9341 ret := &Product{ 9342 ServerResponse: googleapi.ServerResponse{ 9343 Header: res.Header, 9344 HTTPStatusCode: res.StatusCode, 9345 }, 9346 } 9347 target := &ret 9348 if err := gensupport.DecodeResponse(target, res); err != nil { 9349 return nil, err 9350 } 9351 return ret, nil 9352 // { 9353 // "description": "Gets the requested product by ID.", 9354 // "flatPath": "v2beta1/accounts/{accountId}/products/{productId}", 9355 // "httpMethod": "GET", 9356 // "id": "adexchangebuyer2.accounts.products.get", 9357 // "parameterOrder": [ 9358 // "accountId", 9359 // "productId" 9360 // ], 9361 // "parameters": { 9362 // "accountId": { 9363 // "description": "Account ID of the buyer.", 9364 // "location": "path", 9365 // "required": true, 9366 // "type": "string" 9367 // }, 9368 // "productId": { 9369 // "description": "The ID for the product to get the head revision for.", 9370 // "location": "path", 9371 // "required": true, 9372 // "type": "string" 9373 // } 9374 // }, 9375 // "path": "v2beta1/accounts/{accountId}/products/{productId}", 9376 // "response": { 9377 // "$ref": "Product" 9378 // }, 9379 // "scopes": [ 9380 // "https://www.googleapis.com/auth/adexchange.buyer" 9381 // ] 9382 // } 9383 9384} 9385 9386// method id "adexchangebuyer2.accounts.products.list": 9387 9388type AccountsProductsListCall struct { 9389 s *Service 9390 accountId string 9391 urlParams_ gensupport.URLParams 9392 ifNoneMatch_ string 9393 ctx_ context.Context 9394 header_ http.Header 9395} 9396 9397// List: List all products visible to the buyer (optionally filtered by 9398// the specified PQL query). 9399// 9400// - accountId: Account ID of the buyer. 9401func (r *AccountsProductsService) List(accountId string) *AccountsProductsListCall { 9402 c := &AccountsProductsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9403 c.accountId = accountId 9404 return c 9405} 9406 9407// Filter sets the optional parameter "filter": An optional PQL query 9408// used to query for products. See 9409// https://developers.google.com/ad-manager/docs/pqlreference for 9410// documentation about PQL and examples. Nested repeated fields, such as 9411// product.targetingCriterion.inclusions, cannot be filtered. 9412func (c *AccountsProductsListCall) Filter(filter string) *AccountsProductsListCall { 9413 c.urlParams_.Set("filter", filter) 9414 return c 9415} 9416 9417// PageSize sets the optional parameter "pageSize": Requested page size. 9418// The server may return fewer results than requested. If unspecified, 9419// the server will pick an appropriate default. 9420func (c *AccountsProductsListCall) PageSize(pageSize int64) *AccountsProductsListCall { 9421 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9422 return c 9423} 9424 9425// PageToken sets the optional parameter "pageToken": The page token as 9426// returned from ListProductsResponse. 9427func (c *AccountsProductsListCall) PageToken(pageToken string) *AccountsProductsListCall { 9428 c.urlParams_.Set("pageToken", pageToken) 9429 return c 9430} 9431 9432// Fields allows partial responses to be retrieved. See 9433// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9434// for more information. 9435func (c *AccountsProductsListCall) Fields(s ...googleapi.Field) *AccountsProductsListCall { 9436 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9437 return c 9438} 9439 9440// IfNoneMatch sets the optional parameter which makes the operation 9441// fail if the object's ETag matches the given value. This is useful for 9442// getting updates only after the object has changed since the last 9443// request. Use googleapi.IsNotModified to check whether the response 9444// error from Do is the result of In-None-Match. 9445func (c *AccountsProductsListCall) IfNoneMatch(entityTag string) *AccountsProductsListCall { 9446 c.ifNoneMatch_ = entityTag 9447 return c 9448} 9449 9450// Context sets the context to be used in this call's Do method. Any 9451// pending HTTP request will be aborted if the provided context is 9452// canceled. 9453func (c *AccountsProductsListCall) Context(ctx context.Context) *AccountsProductsListCall { 9454 c.ctx_ = ctx 9455 return c 9456} 9457 9458// Header returns an http.Header that can be modified by the caller to 9459// add HTTP headers to the request. 9460func (c *AccountsProductsListCall) Header() http.Header { 9461 if c.header_ == nil { 9462 c.header_ = make(http.Header) 9463 } 9464 return c.header_ 9465} 9466 9467func (c *AccountsProductsListCall) doRequest(alt string) (*http.Response, error) { 9468 reqHeaders := make(http.Header) 9469 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 9470 for k, v := range c.header_ { 9471 reqHeaders[k] = v 9472 } 9473 reqHeaders.Set("User-Agent", c.s.userAgent()) 9474 if c.ifNoneMatch_ != "" { 9475 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9476 } 9477 var body io.Reader = nil 9478 c.urlParams_.Set("alt", alt) 9479 c.urlParams_.Set("prettyPrint", "false") 9480 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/products") 9481 urls += "?" + c.urlParams_.Encode() 9482 req, err := http.NewRequest("GET", urls, body) 9483 if err != nil { 9484 return nil, err 9485 } 9486 req.Header = reqHeaders 9487 googleapi.Expand(req.URL, map[string]string{ 9488 "accountId": c.accountId, 9489 }) 9490 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9491} 9492 9493// Do executes the "adexchangebuyer2.accounts.products.list" call. 9494// Exactly one of *ListProductsResponse or error will be non-nil. Any 9495// non-2xx status code is an error. Response headers are in either 9496// *ListProductsResponse.ServerResponse.Header or (if a response was 9497// returned at all) in error.(*googleapi.Error).Header. Use 9498// googleapi.IsNotModified to check whether the returned error was 9499// because http.StatusNotModified was returned. 9500func (c *AccountsProductsListCall) Do(opts ...googleapi.CallOption) (*ListProductsResponse, error) { 9501 gensupport.SetOptions(c.urlParams_, opts...) 9502 res, err := c.doRequest("json") 9503 if res != nil && res.StatusCode == http.StatusNotModified { 9504 if res.Body != nil { 9505 res.Body.Close() 9506 } 9507 return nil, &googleapi.Error{ 9508 Code: res.StatusCode, 9509 Header: res.Header, 9510 } 9511 } 9512 if err != nil { 9513 return nil, err 9514 } 9515 defer googleapi.CloseBody(res) 9516 if err := googleapi.CheckResponse(res); err != nil { 9517 return nil, err 9518 } 9519 ret := &ListProductsResponse{ 9520 ServerResponse: googleapi.ServerResponse{ 9521 Header: res.Header, 9522 HTTPStatusCode: res.StatusCode, 9523 }, 9524 } 9525 target := &ret 9526 if err := gensupport.DecodeResponse(target, res); err != nil { 9527 return nil, err 9528 } 9529 return ret, nil 9530 // { 9531 // "description": "List all products visible to the buyer (optionally filtered by the specified PQL query).", 9532 // "flatPath": "v2beta1/accounts/{accountId}/products", 9533 // "httpMethod": "GET", 9534 // "id": "adexchangebuyer2.accounts.products.list", 9535 // "parameterOrder": [ 9536 // "accountId" 9537 // ], 9538 // "parameters": { 9539 // "accountId": { 9540 // "description": "Account ID of the buyer.", 9541 // "location": "path", 9542 // "required": true, 9543 // "type": "string" 9544 // }, 9545 // "filter": { 9546 // "description": "An optional PQL query used to query for products. See https://developers.google.com/ad-manager/docs/pqlreference for documentation about PQL and examples. Nested repeated fields, such as product.targetingCriterion.inclusions, cannot be filtered.", 9547 // "location": "query", 9548 // "type": "string" 9549 // }, 9550 // "pageSize": { 9551 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 9552 // "format": "int32", 9553 // "location": "query", 9554 // "type": "integer" 9555 // }, 9556 // "pageToken": { 9557 // "description": "The page token as returned from ListProductsResponse.", 9558 // "location": "query", 9559 // "type": "string" 9560 // } 9561 // }, 9562 // "path": "v2beta1/accounts/{accountId}/products", 9563 // "response": { 9564 // "$ref": "ListProductsResponse" 9565 // }, 9566 // "scopes": [ 9567 // "https://www.googleapis.com/auth/adexchange.buyer" 9568 // ] 9569 // } 9570 9571} 9572 9573// Pages invokes f for each page of results. 9574// A non-nil error returned from f will halt the iteration. 9575// The provided context supersedes any context provided to the Context method. 9576func (c *AccountsProductsListCall) Pages(ctx context.Context, f func(*ListProductsResponse) error) error { 9577 c.ctx_ = ctx 9578 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9579 for { 9580 x, err := c.Do() 9581 if err != nil { 9582 return err 9583 } 9584 if err := f(x); err != nil { 9585 return err 9586 } 9587 if x.NextPageToken == "" { 9588 return nil 9589 } 9590 c.PageToken(x.NextPageToken) 9591 } 9592} 9593 9594// method id "adexchangebuyer2.accounts.proposals.accept": 9595 9596type AccountsProposalsAcceptCall struct { 9597 s *Service 9598 accountId string 9599 proposalId string 9600 acceptproposalrequest *AcceptProposalRequest 9601 urlParams_ gensupport.URLParams 9602 ctx_ context.Context 9603 header_ http.Header 9604} 9605 9606// Accept: Mark the proposal as accepted at the given revision number. 9607// If the number does not match the server's revision number an 9608// `ABORTED` error message will be returned. This call updates the 9609// proposal_state from `PROPOSED` to `BUYER_ACCEPTED`, or from 9610// `SELLER_ACCEPTED` to `FINALIZED`. Upon calling this endpoint, the 9611// buyer implicitly agrees to the terms and conditions optionally set 9612// within the proposal by the publisher. 9613// 9614// - accountId: Account ID of the buyer. 9615// - proposalId: The ID of the proposal to accept. 9616func (r *AccountsProposalsService) Accept(accountId string, proposalId string, acceptproposalrequest *AcceptProposalRequest) *AccountsProposalsAcceptCall { 9617 c := &AccountsProposalsAcceptCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9618 c.accountId = accountId 9619 c.proposalId = proposalId 9620 c.acceptproposalrequest = acceptproposalrequest 9621 return c 9622} 9623 9624// Fields allows partial responses to be retrieved. See 9625// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9626// for more information. 9627func (c *AccountsProposalsAcceptCall) Fields(s ...googleapi.Field) *AccountsProposalsAcceptCall { 9628 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9629 return c 9630} 9631 9632// Context sets the context to be used in this call's Do method. Any 9633// pending HTTP request will be aborted if the provided context is 9634// canceled. 9635func (c *AccountsProposalsAcceptCall) Context(ctx context.Context) *AccountsProposalsAcceptCall { 9636 c.ctx_ = ctx 9637 return c 9638} 9639 9640// Header returns an http.Header that can be modified by the caller to 9641// add HTTP headers to the request. 9642func (c *AccountsProposalsAcceptCall) Header() http.Header { 9643 if c.header_ == nil { 9644 c.header_ = make(http.Header) 9645 } 9646 return c.header_ 9647} 9648 9649func (c *AccountsProposalsAcceptCall) doRequest(alt string) (*http.Response, error) { 9650 reqHeaders := make(http.Header) 9651 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 9652 for k, v := range c.header_ { 9653 reqHeaders[k] = v 9654 } 9655 reqHeaders.Set("User-Agent", c.s.userAgent()) 9656 var body io.Reader = nil 9657 body, err := googleapi.WithoutDataWrapper.JSONReader(c.acceptproposalrequest) 9658 if err != nil { 9659 return nil, err 9660 } 9661 reqHeaders.Set("Content-Type", "application/json") 9662 c.urlParams_.Set("alt", alt) 9663 c.urlParams_.Set("prettyPrint", "false") 9664 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:accept") 9665 urls += "?" + c.urlParams_.Encode() 9666 req, err := http.NewRequest("POST", urls, body) 9667 if err != nil { 9668 return nil, err 9669 } 9670 req.Header = reqHeaders 9671 googleapi.Expand(req.URL, map[string]string{ 9672 "accountId": c.accountId, 9673 "proposalId": c.proposalId, 9674 }) 9675 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9676} 9677 9678// Do executes the "adexchangebuyer2.accounts.proposals.accept" call. 9679// Exactly one of *Proposal or error will be non-nil. Any non-2xx status 9680// code is an error. Response headers are in either 9681// *Proposal.ServerResponse.Header or (if a response was returned at 9682// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9683// to check whether the returned error was because 9684// http.StatusNotModified was returned. 9685func (c *AccountsProposalsAcceptCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { 9686 gensupport.SetOptions(c.urlParams_, opts...) 9687 res, err := c.doRequest("json") 9688 if res != nil && res.StatusCode == http.StatusNotModified { 9689 if res.Body != nil { 9690 res.Body.Close() 9691 } 9692 return nil, &googleapi.Error{ 9693 Code: res.StatusCode, 9694 Header: res.Header, 9695 } 9696 } 9697 if err != nil { 9698 return nil, err 9699 } 9700 defer googleapi.CloseBody(res) 9701 if err := googleapi.CheckResponse(res); err != nil { 9702 return nil, err 9703 } 9704 ret := &Proposal{ 9705 ServerResponse: googleapi.ServerResponse{ 9706 Header: res.Header, 9707 HTTPStatusCode: res.StatusCode, 9708 }, 9709 } 9710 target := &ret 9711 if err := gensupport.DecodeResponse(target, res); err != nil { 9712 return nil, err 9713 } 9714 return ret, nil 9715 // { 9716 // "description": "Mark the proposal as accepted at the given revision number. If the number does not match the server's revision number an `ABORTED` error message will be returned. This call updates the proposal_state from `PROPOSED` to `BUYER_ACCEPTED`, or from `SELLER_ACCEPTED` to `FINALIZED`. Upon calling this endpoint, the buyer implicitly agrees to the terms and conditions optionally set within the proposal by the publisher.", 9717 // "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}:accept", 9718 // "httpMethod": "POST", 9719 // "id": "adexchangebuyer2.accounts.proposals.accept", 9720 // "parameterOrder": [ 9721 // "accountId", 9722 // "proposalId" 9723 // ], 9724 // "parameters": { 9725 // "accountId": { 9726 // "description": "Account ID of the buyer.", 9727 // "location": "path", 9728 // "required": true, 9729 // "type": "string" 9730 // }, 9731 // "proposalId": { 9732 // "description": "The ID of the proposal to accept.", 9733 // "location": "path", 9734 // "required": true, 9735 // "type": "string" 9736 // } 9737 // }, 9738 // "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}:accept", 9739 // "request": { 9740 // "$ref": "AcceptProposalRequest" 9741 // }, 9742 // "response": { 9743 // "$ref": "Proposal" 9744 // }, 9745 // "scopes": [ 9746 // "https://www.googleapis.com/auth/adexchange.buyer" 9747 // ] 9748 // } 9749 9750} 9751 9752// method id "adexchangebuyer2.accounts.proposals.addNote": 9753 9754type AccountsProposalsAddNoteCall struct { 9755 s *Service 9756 accountId string 9757 proposalId string 9758 addnoterequest *AddNoteRequest 9759 urlParams_ gensupport.URLParams 9760 ctx_ context.Context 9761 header_ http.Header 9762} 9763 9764// AddNote: Create a new note and attach it to the proposal. The note is 9765// assigned a unique ID by the server. The proposal revision number will 9766// not increase when associated with a new note. 9767// 9768// - accountId: Account ID of the buyer. 9769// - proposalId: The ID of the proposal to attach the note to. 9770func (r *AccountsProposalsService) AddNote(accountId string, proposalId string, addnoterequest *AddNoteRequest) *AccountsProposalsAddNoteCall { 9771 c := &AccountsProposalsAddNoteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9772 c.accountId = accountId 9773 c.proposalId = proposalId 9774 c.addnoterequest = addnoterequest 9775 return c 9776} 9777 9778// Fields allows partial responses to be retrieved. See 9779// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9780// for more information. 9781func (c *AccountsProposalsAddNoteCall) Fields(s ...googleapi.Field) *AccountsProposalsAddNoteCall { 9782 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9783 return c 9784} 9785 9786// Context sets the context to be used in this call's Do method. Any 9787// pending HTTP request will be aborted if the provided context is 9788// canceled. 9789func (c *AccountsProposalsAddNoteCall) Context(ctx context.Context) *AccountsProposalsAddNoteCall { 9790 c.ctx_ = ctx 9791 return c 9792} 9793 9794// Header returns an http.Header that can be modified by the caller to 9795// add HTTP headers to the request. 9796func (c *AccountsProposalsAddNoteCall) Header() http.Header { 9797 if c.header_ == nil { 9798 c.header_ = make(http.Header) 9799 } 9800 return c.header_ 9801} 9802 9803func (c *AccountsProposalsAddNoteCall) doRequest(alt string) (*http.Response, error) { 9804 reqHeaders := make(http.Header) 9805 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 9806 for k, v := range c.header_ { 9807 reqHeaders[k] = v 9808 } 9809 reqHeaders.Set("User-Agent", c.s.userAgent()) 9810 var body io.Reader = nil 9811 body, err := googleapi.WithoutDataWrapper.JSONReader(c.addnoterequest) 9812 if err != nil { 9813 return nil, err 9814 } 9815 reqHeaders.Set("Content-Type", "application/json") 9816 c.urlParams_.Set("alt", alt) 9817 c.urlParams_.Set("prettyPrint", "false") 9818 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:addNote") 9819 urls += "?" + c.urlParams_.Encode() 9820 req, err := http.NewRequest("POST", urls, body) 9821 if err != nil { 9822 return nil, err 9823 } 9824 req.Header = reqHeaders 9825 googleapi.Expand(req.URL, map[string]string{ 9826 "accountId": c.accountId, 9827 "proposalId": c.proposalId, 9828 }) 9829 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9830} 9831 9832// Do executes the "adexchangebuyer2.accounts.proposals.addNote" call. 9833// Exactly one of *Note or error will be non-nil. Any non-2xx status 9834// code is an error. Response headers are in either 9835// *Note.ServerResponse.Header or (if a response was returned at all) in 9836// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9837// whether the returned error was because http.StatusNotModified was 9838// returned. 9839func (c *AccountsProposalsAddNoteCall) Do(opts ...googleapi.CallOption) (*Note, error) { 9840 gensupport.SetOptions(c.urlParams_, opts...) 9841 res, err := c.doRequest("json") 9842 if res != nil && res.StatusCode == http.StatusNotModified { 9843 if res.Body != nil { 9844 res.Body.Close() 9845 } 9846 return nil, &googleapi.Error{ 9847 Code: res.StatusCode, 9848 Header: res.Header, 9849 } 9850 } 9851 if err != nil { 9852 return nil, err 9853 } 9854 defer googleapi.CloseBody(res) 9855 if err := googleapi.CheckResponse(res); err != nil { 9856 return nil, err 9857 } 9858 ret := &Note{ 9859 ServerResponse: googleapi.ServerResponse{ 9860 Header: res.Header, 9861 HTTPStatusCode: res.StatusCode, 9862 }, 9863 } 9864 target := &ret 9865 if err := gensupport.DecodeResponse(target, res); err != nil { 9866 return nil, err 9867 } 9868 return ret, nil 9869 // { 9870 // "description": "Create a new note and attach it to the proposal. The note is assigned a unique ID by the server. The proposal revision number will not increase when associated with a new note.", 9871 // "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}:addNote", 9872 // "httpMethod": "POST", 9873 // "id": "adexchangebuyer2.accounts.proposals.addNote", 9874 // "parameterOrder": [ 9875 // "accountId", 9876 // "proposalId" 9877 // ], 9878 // "parameters": { 9879 // "accountId": { 9880 // "description": "Account ID of the buyer.", 9881 // "location": "path", 9882 // "required": true, 9883 // "type": "string" 9884 // }, 9885 // "proposalId": { 9886 // "description": "The ID of the proposal to attach the note to.", 9887 // "location": "path", 9888 // "required": true, 9889 // "type": "string" 9890 // } 9891 // }, 9892 // "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}:addNote", 9893 // "request": { 9894 // "$ref": "AddNoteRequest" 9895 // }, 9896 // "response": { 9897 // "$ref": "Note" 9898 // }, 9899 // "scopes": [ 9900 // "https://www.googleapis.com/auth/adexchange.buyer" 9901 // ] 9902 // } 9903 9904} 9905 9906// method id "adexchangebuyer2.accounts.proposals.cancelNegotiation": 9907 9908type AccountsProposalsCancelNegotiationCall struct { 9909 s *Service 9910 accountId string 9911 proposalId string 9912 cancelnegotiationrequest *CancelNegotiationRequest 9913 urlParams_ gensupport.URLParams 9914 ctx_ context.Context 9915 header_ http.Header 9916} 9917 9918// CancelNegotiation: Cancel an ongoing negotiation on a proposal. This 9919// does not cancel or end serving for the deals if the proposal has been 9920// finalized, but only cancels a negotiation unilaterally. 9921// 9922// - accountId: Account ID of the buyer. 9923// - proposalId: The ID of the proposal to cancel negotiation for. 9924func (r *AccountsProposalsService) CancelNegotiation(accountId string, proposalId string, cancelnegotiationrequest *CancelNegotiationRequest) *AccountsProposalsCancelNegotiationCall { 9925 c := &AccountsProposalsCancelNegotiationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9926 c.accountId = accountId 9927 c.proposalId = proposalId 9928 c.cancelnegotiationrequest = cancelnegotiationrequest 9929 return c 9930} 9931 9932// Fields allows partial responses to be retrieved. See 9933// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9934// for more information. 9935func (c *AccountsProposalsCancelNegotiationCall) Fields(s ...googleapi.Field) *AccountsProposalsCancelNegotiationCall { 9936 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9937 return c 9938} 9939 9940// Context sets the context to be used in this call's Do method. Any 9941// pending HTTP request will be aborted if the provided context is 9942// canceled. 9943func (c *AccountsProposalsCancelNegotiationCall) Context(ctx context.Context) *AccountsProposalsCancelNegotiationCall { 9944 c.ctx_ = ctx 9945 return c 9946} 9947 9948// Header returns an http.Header that can be modified by the caller to 9949// add HTTP headers to the request. 9950func (c *AccountsProposalsCancelNegotiationCall) Header() http.Header { 9951 if c.header_ == nil { 9952 c.header_ = make(http.Header) 9953 } 9954 return c.header_ 9955} 9956 9957func (c *AccountsProposalsCancelNegotiationCall) doRequest(alt string) (*http.Response, error) { 9958 reqHeaders := make(http.Header) 9959 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 9960 for k, v := range c.header_ { 9961 reqHeaders[k] = v 9962 } 9963 reqHeaders.Set("User-Agent", c.s.userAgent()) 9964 var body io.Reader = nil 9965 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelnegotiationrequest) 9966 if err != nil { 9967 return nil, err 9968 } 9969 reqHeaders.Set("Content-Type", "application/json") 9970 c.urlParams_.Set("alt", alt) 9971 c.urlParams_.Set("prettyPrint", "false") 9972 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:cancelNegotiation") 9973 urls += "?" + c.urlParams_.Encode() 9974 req, err := http.NewRequest("POST", urls, body) 9975 if err != nil { 9976 return nil, err 9977 } 9978 req.Header = reqHeaders 9979 googleapi.Expand(req.URL, map[string]string{ 9980 "accountId": c.accountId, 9981 "proposalId": c.proposalId, 9982 }) 9983 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9984} 9985 9986// Do executes the "adexchangebuyer2.accounts.proposals.cancelNegotiation" call. 9987// Exactly one of *Proposal or error will be non-nil. Any non-2xx status 9988// code is an error. Response headers are in either 9989// *Proposal.ServerResponse.Header or (if a response was returned at 9990// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9991// to check whether the returned error was because 9992// http.StatusNotModified was returned. 9993func (c *AccountsProposalsCancelNegotiationCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { 9994 gensupport.SetOptions(c.urlParams_, opts...) 9995 res, err := c.doRequest("json") 9996 if res != nil && res.StatusCode == http.StatusNotModified { 9997 if res.Body != nil { 9998 res.Body.Close() 9999 } 10000 return nil, &googleapi.Error{ 10001 Code: res.StatusCode, 10002 Header: res.Header, 10003 } 10004 } 10005 if err != nil { 10006 return nil, err 10007 } 10008 defer googleapi.CloseBody(res) 10009 if err := googleapi.CheckResponse(res); err != nil { 10010 return nil, err 10011 } 10012 ret := &Proposal{ 10013 ServerResponse: googleapi.ServerResponse{ 10014 Header: res.Header, 10015 HTTPStatusCode: res.StatusCode, 10016 }, 10017 } 10018 target := &ret 10019 if err := gensupport.DecodeResponse(target, res); err != nil { 10020 return nil, err 10021 } 10022 return ret, nil 10023 // { 10024 // "description": "Cancel an ongoing negotiation on a proposal. This does not cancel or end serving for the deals if the proposal has been finalized, but only cancels a negotiation unilaterally.", 10025 // "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}:cancelNegotiation", 10026 // "httpMethod": "POST", 10027 // "id": "adexchangebuyer2.accounts.proposals.cancelNegotiation", 10028 // "parameterOrder": [ 10029 // "accountId", 10030 // "proposalId" 10031 // ], 10032 // "parameters": { 10033 // "accountId": { 10034 // "description": "Account ID of the buyer.", 10035 // "location": "path", 10036 // "required": true, 10037 // "type": "string" 10038 // }, 10039 // "proposalId": { 10040 // "description": "The ID of the proposal to cancel negotiation for.", 10041 // "location": "path", 10042 // "required": true, 10043 // "type": "string" 10044 // } 10045 // }, 10046 // "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}:cancelNegotiation", 10047 // "request": { 10048 // "$ref": "CancelNegotiationRequest" 10049 // }, 10050 // "response": { 10051 // "$ref": "Proposal" 10052 // }, 10053 // "scopes": [ 10054 // "https://www.googleapis.com/auth/adexchange.buyer" 10055 // ] 10056 // } 10057 10058} 10059 10060// method id "adexchangebuyer2.accounts.proposals.completeSetup": 10061 10062type AccountsProposalsCompleteSetupCall struct { 10063 s *Service 10064 accountId string 10065 proposalId string 10066 completesetuprequest *CompleteSetupRequest 10067 urlParams_ gensupport.URLParams 10068 ctx_ context.Context 10069 header_ http.Header 10070} 10071 10072// CompleteSetup: Update the given proposal to indicate that setup has 10073// been completed. This method is called by the buyer when the line 10074// items have been created on their end for a finalized proposal and all 10075// the required creatives have been uploaded using the creatives API. 10076// This call updates the `is_setup_completed` bit on the proposal and 10077// also notifies the seller. The server will advance the revision number 10078// of the most recent proposal. 10079// 10080// - accountId: Account ID of the buyer. 10081// - proposalId: The ID of the proposal to mark as setup completed. 10082func (r *AccountsProposalsService) CompleteSetup(accountId string, proposalId string, completesetuprequest *CompleteSetupRequest) *AccountsProposalsCompleteSetupCall { 10083 c := &AccountsProposalsCompleteSetupCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10084 c.accountId = accountId 10085 c.proposalId = proposalId 10086 c.completesetuprequest = completesetuprequest 10087 return c 10088} 10089 10090// Fields allows partial responses to be retrieved. See 10091// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10092// for more information. 10093func (c *AccountsProposalsCompleteSetupCall) Fields(s ...googleapi.Field) *AccountsProposalsCompleteSetupCall { 10094 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10095 return c 10096} 10097 10098// Context sets the context to be used in this call's Do method. Any 10099// pending HTTP request will be aborted if the provided context is 10100// canceled. 10101func (c *AccountsProposalsCompleteSetupCall) Context(ctx context.Context) *AccountsProposalsCompleteSetupCall { 10102 c.ctx_ = ctx 10103 return c 10104} 10105 10106// Header returns an http.Header that can be modified by the caller to 10107// add HTTP headers to the request. 10108func (c *AccountsProposalsCompleteSetupCall) Header() http.Header { 10109 if c.header_ == nil { 10110 c.header_ = make(http.Header) 10111 } 10112 return c.header_ 10113} 10114 10115func (c *AccountsProposalsCompleteSetupCall) doRequest(alt string) (*http.Response, error) { 10116 reqHeaders := make(http.Header) 10117 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 10118 for k, v := range c.header_ { 10119 reqHeaders[k] = v 10120 } 10121 reqHeaders.Set("User-Agent", c.s.userAgent()) 10122 var body io.Reader = nil 10123 body, err := googleapi.WithoutDataWrapper.JSONReader(c.completesetuprequest) 10124 if err != nil { 10125 return nil, err 10126 } 10127 reqHeaders.Set("Content-Type", "application/json") 10128 c.urlParams_.Set("alt", alt) 10129 c.urlParams_.Set("prettyPrint", "false") 10130 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:completeSetup") 10131 urls += "?" + c.urlParams_.Encode() 10132 req, err := http.NewRequest("POST", urls, body) 10133 if err != nil { 10134 return nil, err 10135 } 10136 req.Header = reqHeaders 10137 googleapi.Expand(req.URL, map[string]string{ 10138 "accountId": c.accountId, 10139 "proposalId": c.proposalId, 10140 }) 10141 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10142} 10143 10144// Do executes the "adexchangebuyer2.accounts.proposals.completeSetup" call. 10145// Exactly one of *Proposal or error will be non-nil. Any non-2xx status 10146// code is an error. Response headers are in either 10147// *Proposal.ServerResponse.Header or (if a response was returned at 10148// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10149// to check whether the returned error was because 10150// http.StatusNotModified was returned. 10151func (c *AccountsProposalsCompleteSetupCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { 10152 gensupport.SetOptions(c.urlParams_, opts...) 10153 res, err := c.doRequest("json") 10154 if res != nil && res.StatusCode == http.StatusNotModified { 10155 if res.Body != nil { 10156 res.Body.Close() 10157 } 10158 return nil, &googleapi.Error{ 10159 Code: res.StatusCode, 10160 Header: res.Header, 10161 } 10162 } 10163 if err != nil { 10164 return nil, err 10165 } 10166 defer googleapi.CloseBody(res) 10167 if err := googleapi.CheckResponse(res); err != nil { 10168 return nil, err 10169 } 10170 ret := &Proposal{ 10171 ServerResponse: googleapi.ServerResponse{ 10172 Header: res.Header, 10173 HTTPStatusCode: res.StatusCode, 10174 }, 10175 } 10176 target := &ret 10177 if err := gensupport.DecodeResponse(target, res); err != nil { 10178 return nil, err 10179 } 10180 return ret, nil 10181 // { 10182 // "description": "Update the given proposal to indicate that setup has been completed. This method is called by the buyer when the line items have been created on their end for a finalized proposal and all the required creatives have been uploaded using the creatives API. This call updates the `is_setup_completed` bit on the proposal and also notifies the seller. The server will advance the revision number of the most recent proposal.", 10183 // "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}:completeSetup", 10184 // "httpMethod": "POST", 10185 // "id": "adexchangebuyer2.accounts.proposals.completeSetup", 10186 // "parameterOrder": [ 10187 // "accountId", 10188 // "proposalId" 10189 // ], 10190 // "parameters": { 10191 // "accountId": { 10192 // "description": "Account ID of the buyer.", 10193 // "location": "path", 10194 // "required": true, 10195 // "type": "string" 10196 // }, 10197 // "proposalId": { 10198 // "description": "The ID of the proposal to mark as setup completed.", 10199 // "location": "path", 10200 // "required": true, 10201 // "type": "string" 10202 // } 10203 // }, 10204 // "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}:completeSetup", 10205 // "request": { 10206 // "$ref": "CompleteSetupRequest" 10207 // }, 10208 // "response": { 10209 // "$ref": "Proposal" 10210 // }, 10211 // "scopes": [ 10212 // "https://www.googleapis.com/auth/adexchange.buyer" 10213 // ] 10214 // } 10215 10216} 10217 10218// method id "adexchangebuyer2.accounts.proposals.create": 10219 10220type AccountsProposalsCreateCall struct { 10221 s *Service 10222 accountId string 10223 proposal *Proposal 10224 urlParams_ gensupport.URLParams 10225 ctx_ context.Context 10226 header_ http.Header 10227} 10228 10229// Create: Create the given proposal. Each created proposal and any 10230// deals it contains are assigned a unique ID by the server. 10231// 10232// - accountId: Account ID of the buyer. 10233func (r *AccountsProposalsService) Create(accountId string, proposal *Proposal) *AccountsProposalsCreateCall { 10234 c := &AccountsProposalsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10235 c.accountId = accountId 10236 c.proposal = proposal 10237 return c 10238} 10239 10240// Fields allows partial responses to be retrieved. See 10241// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10242// for more information. 10243func (c *AccountsProposalsCreateCall) Fields(s ...googleapi.Field) *AccountsProposalsCreateCall { 10244 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10245 return c 10246} 10247 10248// Context sets the context to be used in this call's Do method. Any 10249// pending HTTP request will be aborted if the provided context is 10250// canceled. 10251func (c *AccountsProposalsCreateCall) Context(ctx context.Context) *AccountsProposalsCreateCall { 10252 c.ctx_ = ctx 10253 return c 10254} 10255 10256// Header returns an http.Header that can be modified by the caller to 10257// add HTTP headers to the request. 10258func (c *AccountsProposalsCreateCall) Header() http.Header { 10259 if c.header_ == nil { 10260 c.header_ = make(http.Header) 10261 } 10262 return c.header_ 10263} 10264 10265func (c *AccountsProposalsCreateCall) doRequest(alt string) (*http.Response, error) { 10266 reqHeaders := make(http.Header) 10267 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 10268 for k, v := range c.header_ { 10269 reqHeaders[k] = v 10270 } 10271 reqHeaders.Set("User-Agent", c.s.userAgent()) 10272 var body io.Reader = nil 10273 body, err := googleapi.WithoutDataWrapper.JSONReader(c.proposal) 10274 if err != nil { 10275 return nil, err 10276 } 10277 reqHeaders.Set("Content-Type", "application/json") 10278 c.urlParams_.Set("alt", alt) 10279 c.urlParams_.Set("prettyPrint", "false") 10280 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals") 10281 urls += "?" + c.urlParams_.Encode() 10282 req, err := http.NewRequest("POST", urls, body) 10283 if err != nil { 10284 return nil, err 10285 } 10286 req.Header = reqHeaders 10287 googleapi.Expand(req.URL, map[string]string{ 10288 "accountId": c.accountId, 10289 }) 10290 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10291} 10292 10293// Do executes the "adexchangebuyer2.accounts.proposals.create" call. 10294// Exactly one of *Proposal or error will be non-nil. Any non-2xx status 10295// code is an error. Response headers are in either 10296// *Proposal.ServerResponse.Header or (if a response was returned at 10297// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10298// to check whether the returned error was because 10299// http.StatusNotModified was returned. 10300func (c *AccountsProposalsCreateCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { 10301 gensupport.SetOptions(c.urlParams_, opts...) 10302 res, err := c.doRequest("json") 10303 if res != nil && res.StatusCode == http.StatusNotModified { 10304 if res.Body != nil { 10305 res.Body.Close() 10306 } 10307 return nil, &googleapi.Error{ 10308 Code: res.StatusCode, 10309 Header: res.Header, 10310 } 10311 } 10312 if err != nil { 10313 return nil, err 10314 } 10315 defer googleapi.CloseBody(res) 10316 if err := googleapi.CheckResponse(res); err != nil { 10317 return nil, err 10318 } 10319 ret := &Proposal{ 10320 ServerResponse: googleapi.ServerResponse{ 10321 Header: res.Header, 10322 HTTPStatusCode: res.StatusCode, 10323 }, 10324 } 10325 target := &ret 10326 if err := gensupport.DecodeResponse(target, res); err != nil { 10327 return nil, err 10328 } 10329 return ret, nil 10330 // { 10331 // "description": "Create the given proposal. Each created proposal and any deals it contains are assigned a unique ID by the server.", 10332 // "flatPath": "v2beta1/accounts/{accountId}/proposals", 10333 // "httpMethod": "POST", 10334 // "id": "adexchangebuyer2.accounts.proposals.create", 10335 // "parameterOrder": [ 10336 // "accountId" 10337 // ], 10338 // "parameters": { 10339 // "accountId": { 10340 // "description": "Account ID of the buyer.", 10341 // "location": "path", 10342 // "required": true, 10343 // "type": "string" 10344 // } 10345 // }, 10346 // "path": "v2beta1/accounts/{accountId}/proposals", 10347 // "request": { 10348 // "$ref": "Proposal" 10349 // }, 10350 // "response": { 10351 // "$ref": "Proposal" 10352 // }, 10353 // "scopes": [ 10354 // "https://www.googleapis.com/auth/adexchange.buyer" 10355 // ] 10356 // } 10357 10358} 10359 10360// method id "adexchangebuyer2.accounts.proposals.get": 10361 10362type AccountsProposalsGetCall struct { 10363 s *Service 10364 accountId string 10365 proposalId string 10366 urlParams_ gensupport.URLParams 10367 ifNoneMatch_ string 10368 ctx_ context.Context 10369 header_ http.Header 10370} 10371 10372// Get: Gets a proposal given its ID. The proposal is returned at its 10373// head revision. 10374// 10375// - accountId: Account ID of the buyer. 10376// - proposalId: The unique ID of the proposal. 10377func (r *AccountsProposalsService) Get(accountId string, proposalId string) *AccountsProposalsGetCall { 10378 c := &AccountsProposalsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10379 c.accountId = accountId 10380 c.proposalId = proposalId 10381 return c 10382} 10383 10384// Fields allows partial responses to be retrieved. See 10385// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10386// for more information. 10387func (c *AccountsProposalsGetCall) Fields(s ...googleapi.Field) *AccountsProposalsGetCall { 10388 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10389 return c 10390} 10391 10392// IfNoneMatch sets the optional parameter which makes the operation 10393// fail if the object's ETag matches the given value. This is useful for 10394// getting updates only after the object has changed since the last 10395// request. Use googleapi.IsNotModified to check whether the response 10396// error from Do is the result of In-None-Match. 10397func (c *AccountsProposalsGetCall) IfNoneMatch(entityTag string) *AccountsProposalsGetCall { 10398 c.ifNoneMatch_ = entityTag 10399 return c 10400} 10401 10402// Context sets the context to be used in this call's Do method. Any 10403// pending HTTP request will be aborted if the provided context is 10404// canceled. 10405func (c *AccountsProposalsGetCall) Context(ctx context.Context) *AccountsProposalsGetCall { 10406 c.ctx_ = ctx 10407 return c 10408} 10409 10410// Header returns an http.Header that can be modified by the caller to 10411// add HTTP headers to the request. 10412func (c *AccountsProposalsGetCall) Header() http.Header { 10413 if c.header_ == nil { 10414 c.header_ = make(http.Header) 10415 } 10416 return c.header_ 10417} 10418 10419func (c *AccountsProposalsGetCall) doRequest(alt string) (*http.Response, error) { 10420 reqHeaders := make(http.Header) 10421 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 10422 for k, v := range c.header_ { 10423 reqHeaders[k] = v 10424 } 10425 reqHeaders.Set("User-Agent", c.s.userAgent()) 10426 if c.ifNoneMatch_ != "" { 10427 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10428 } 10429 var body io.Reader = nil 10430 c.urlParams_.Set("alt", alt) 10431 c.urlParams_.Set("prettyPrint", "false") 10432 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}") 10433 urls += "?" + c.urlParams_.Encode() 10434 req, err := http.NewRequest("GET", urls, body) 10435 if err != nil { 10436 return nil, err 10437 } 10438 req.Header = reqHeaders 10439 googleapi.Expand(req.URL, map[string]string{ 10440 "accountId": c.accountId, 10441 "proposalId": c.proposalId, 10442 }) 10443 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10444} 10445 10446// Do executes the "adexchangebuyer2.accounts.proposals.get" call. 10447// Exactly one of *Proposal or error will be non-nil. Any non-2xx status 10448// code is an error. Response headers are in either 10449// *Proposal.ServerResponse.Header or (if a response was returned at 10450// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10451// to check whether the returned error was because 10452// http.StatusNotModified was returned. 10453func (c *AccountsProposalsGetCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { 10454 gensupport.SetOptions(c.urlParams_, opts...) 10455 res, err := c.doRequest("json") 10456 if res != nil && res.StatusCode == http.StatusNotModified { 10457 if res.Body != nil { 10458 res.Body.Close() 10459 } 10460 return nil, &googleapi.Error{ 10461 Code: res.StatusCode, 10462 Header: res.Header, 10463 } 10464 } 10465 if err != nil { 10466 return nil, err 10467 } 10468 defer googleapi.CloseBody(res) 10469 if err := googleapi.CheckResponse(res); err != nil { 10470 return nil, err 10471 } 10472 ret := &Proposal{ 10473 ServerResponse: googleapi.ServerResponse{ 10474 Header: res.Header, 10475 HTTPStatusCode: res.StatusCode, 10476 }, 10477 } 10478 target := &ret 10479 if err := gensupport.DecodeResponse(target, res); err != nil { 10480 return nil, err 10481 } 10482 return ret, nil 10483 // { 10484 // "description": "Gets a proposal given its ID. The proposal is returned at its head revision.", 10485 // "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}", 10486 // "httpMethod": "GET", 10487 // "id": "adexchangebuyer2.accounts.proposals.get", 10488 // "parameterOrder": [ 10489 // "accountId", 10490 // "proposalId" 10491 // ], 10492 // "parameters": { 10493 // "accountId": { 10494 // "description": "Account ID of the buyer.", 10495 // "location": "path", 10496 // "required": true, 10497 // "type": "string" 10498 // }, 10499 // "proposalId": { 10500 // "description": "The unique ID of the proposal", 10501 // "location": "path", 10502 // "required": true, 10503 // "type": "string" 10504 // } 10505 // }, 10506 // "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}", 10507 // "response": { 10508 // "$ref": "Proposal" 10509 // }, 10510 // "scopes": [ 10511 // "https://www.googleapis.com/auth/adexchange.buyer" 10512 // ] 10513 // } 10514 10515} 10516 10517// method id "adexchangebuyer2.accounts.proposals.list": 10518 10519type AccountsProposalsListCall struct { 10520 s *Service 10521 accountId string 10522 urlParams_ gensupport.URLParams 10523 ifNoneMatch_ string 10524 ctx_ context.Context 10525 header_ http.Header 10526} 10527 10528// List: List proposals. A filter expression (PQL query) may be 10529// specified to filter the results. To retrieve all finalized proposals, 10530// regardless if a proposal is being renegotiated, see the 10531// FinalizedProposals resource. Note that Bidder/ChildSeat relationships 10532// differ from the usual behavior. A Bidder account can only see its 10533// child seats' proposals by specifying the ChildSeat's accountId in the 10534// request path. 10535// 10536// - accountId: Account ID of the buyer. 10537func (r *AccountsProposalsService) List(accountId string) *AccountsProposalsListCall { 10538 c := &AccountsProposalsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10539 c.accountId = accountId 10540 return c 10541} 10542 10543// Filter sets the optional parameter "filter": An optional PQL filter 10544// query used to query for proposals. Nested repeated fields, such as 10545// proposal.deals.targetingCriterion, cannot be filtered. 10546func (c *AccountsProposalsListCall) Filter(filter string) *AccountsProposalsListCall { 10547 c.urlParams_.Set("filter", filter) 10548 return c 10549} 10550 10551// FilterSyntax sets the optional parameter "filterSyntax": Syntax the 10552// filter is written in. Current implementation defaults to PQL but in 10553// the future it will be LIST_FILTER. 10554// 10555// Possible values: 10556// "FILTER_SYNTAX_UNSPECIFIED" - A placeholder for an undefined filter 10557// syntax. 10558// "PQL" - PQL query syntax. Visit 10559// https://developers.google.com/ad-manager/api/pqlreference for PQL 10560// documentation and examples. 10561// "LIST_FILTER" - API list filtering syntax. Read about syntax and 10562// usage at 10563// https://developers.google.com/authorized-buyers/apis/guides/v2/list-filters. 10564func (c *AccountsProposalsListCall) FilterSyntax(filterSyntax string) *AccountsProposalsListCall { 10565 c.urlParams_.Set("filterSyntax", filterSyntax) 10566 return c 10567} 10568 10569// PageSize sets the optional parameter "pageSize": Requested page size. 10570// The server may return fewer results than requested. If unspecified, 10571// the server will pick an appropriate default. 10572func (c *AccountsProposalsListCall) PageSize(pageSize int64) *AccountsProposalsListCall { 10573 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10574 return c 10575} 10576 10577// PageToken sets the optional parameter "pageToken": The page token as 10578// returned from ListProposalsResponse. 10579func (c *AccountsProposalsListCall) PageToken(pageToken string) *AccountsProposalsListCall { 10580 c.urlParams_.Set("pageToken", pageToken) 10581 return c 10582} 10583 10584// Fields allows partial responses to be retrieved. See 10585// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10586// for more information. 10587func (c *AccountsProposalsListCall) Fields(s ...googleapi.Field) *AccountsProposalsListCall { 10588 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10589 return c 10590} 10591 10592// IfNoneMatch sets the optional parameter which makes the operation 10593// fail if the object's ETag matches the given value. This is useful for 10594// getting updates only after the object has changed since the last 10595// request. Use googleapi.IsNotModified to check whether the response 10596// error from Do is the result of In-None-Match. 10597func (c *AccountsProposalsListCall) IfNoneMatch(entityTag string) *AccountsProposalsListCall { 10598 c.ifNoneMatch_ = entityTag 10599 return c 10600} 10601 10602// Context sets the context to be used in this call's Do method. Any 10603// pending HTTP request will be aborted if the provided context is 10604// canceled. 10605func (c *AccountsProposalsListCall) Context(ctx context.Context) *AccountsProposalsListCall { 10606 c.ctx_ = ctx 10607 return c 10608} 10609 10610// Header returns an http.Header that can be modified by the caller to 10611// add HTTP headers to the request. 10612func (c *AccountsProposalsListCall) Header() http.Header { 10613 if c.header_ == nil { 10614 c.header_ = make(http.Header) 10615 } 10616 return c.header_ 10617} 10618 10619func (c *AccountsProposalsListCall) doRequest(alt string) (*http.Response, error) { 10620 reqHeaders := make(http.Header) 10621 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 10622 for k, v := range c.header_ { 10623 reqHeaders[k] = v 10624 } 10625 reqHeaders.Set("User-Agent", c.s.userAgent()) 10626 if c.ifNoneMatch_ != "" { 10627 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10628 } 10629 var body io.Reader = nil 10630 c.urlParams_.Set("alt", alt) 10631 c.urlParams_.Set("prettyPrint", "false") 10632 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals") 10633 urls += "?" + c.urlParams_.Encode() 10634 req, err := http.NewRequest("GET", urls, body) 10635 if err != nil { 10636 return nil, err 10637 } 10638 req.Header = reqHeaders 10639 googleapi.Expand(req.URL, map[string]string{ 10640 "accountId": c.accountId, 10641 }) 10642 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10643} 10644 10645// Do executes the "adexchangebuyer2.accounts.proposals.list" call. 10646// Exactly one of *ListProposalsResponse or error will be non-nil. Any 10647// non-2xx status code is an error. Response headers are in either 10648// *ListProposalsResponse.ServerResponse.Header or (if a response was 10649// returned at all) in error.(*googleapi.Error).Header. Use 10650// googleapi.IsNotModified to check whether the returned error was 10651// because http.StatusNotModified was returned. 10652func (c *AccountsProposalsListCall) Do(opts ...googleapi.CallOption) (*ListProposalsResponse, error) { 10653 gensupport.SetOptions(c.urlParams_, opts...) 10654 res, err := c.doRequest("json") 10655 if res != nil && res.StatusCode == http.StatusNotModified { 10656 if res.Body != nil { 10657 res.Body.Close() 10658 } 10659 return nil, &googleapi.Error{ 10660 Code: res.StatusCode, 10661 Header: res.Header, 10662 } 10663 } 10664 if err != nil { 10665 return nil, err 10666 } 10667 defer googleapi.CloseBody(res) 10668 if err := googleapi.CheckResponse(res); err != nil { 10669 return nil, err 10670 } 10671 ret := &ListProposalsResponse{ 10672 ServerResponse: googleapi.ServerResponse{ 10673 Header: res.Header, 10674 HTTPStatusCode: res.StatusCode, 10675 }, 10676 } 10677 target := &ret 10678 if err := gensupport.DecodeResponse(target, res); err != nil { 10679 return nil, err 10680 } 10681 return ret, nil 10682 // { 10683 // "description": "List proposals. A filter expression (PQL query) may be specified to filter the results. To retrieve all finalized proposals, regardless if a proposal is being renegotiated, see the FinalizedProposals resource. Note that Bidder/ChildSeat relationships differ from the usual behavior. A Bidder account can only see its child seats' proposals by specifying the ChildSeat's accountId in the request path.", 10684 // "flatPath": "v2beta1/accounts/{accountId}/proposals", 10685 // "httpMethod": "GET", 10686 // "id": "adexchangebuyer2.accounts.proposals.list", 10687 // "parameterOrder": [ 10688 // "accountId" 10689 // ], 10690 // "parameters": { 10691 // "accountId": { 10692 // "description": "Account ID of the buyer.", 10693 // "location": "path", 10694 // "required": true, 10695 // "type": "string" 10696 // }, 10697 // "filter": { 10698 // "description": "An optional PQL filter query used to query for proposals. Nested repeated fields, such as proposal.deals.targetingCriterion, cannot be filtered.", 10699 // "location": "query", 10700 // "type": "string" 10701 // }, 10702 // "filterSyntax": { 10703 // "description": "Syntax the filter is written in. Current implementation defaults to PQL but in the future it will be LIST_FILTER.", 10704 // "enum": [ 10705 // "FILTER_SYNTAX_UNSPECIFIED", 10706 // "PQL", 10707 // "LIST_FILTER" 10708 // ], 10709 // "enumDescriptions": [ 10710 // "A placeholder for an undefined filter syntax.", 10711 // "PQL query syntax. Visit https://developers.google.com/ad-manager/api/pqlreference for PQL documentation and examples.", 10712 // "API list filtering syntax. Read about syntax and usage at https://developers.google.com/authorized-buyers/apis/guides/v2/list-filters." 10713 // ], 10714 // "location": "query", 10715 // "type": "string" 10716 // }, 10717 // "pageSize": { 10718 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 10719 // "format": "int32", 10720 // "location": "query", 10721 // "type": "integer" 10722 // }, 10723 // "pageToken": { 10724 // "description": "The page token as returned from ListProposalsResponse.", 10725 // "location": "query", 10726 // "type": "string" 10727 // } 10728 // }, 10729 // "path": "v2beta1/accounts/{accountId}/proposals", 10730 // "response": { 10731 // "$ref": "ListProposalsResponse" 10732 // }, 10733 // "scopes": [ 10734 // "https://www.googleapis.com/auth/adexchange.buyer" 10735 // ] 10736 // } 10737 10738} 10739 10740// Pages invokes f for each page of results. 10741// A non-nil error returned from f will halt the iteration. 10742// The provided context supersedes any context provided to the Context method. 10743func (c *AccountsProposalsListCall) Pages(ctx context.Context, f func(*ListProposalsResponse) error) error { 10744 c.ctx_ = ctx 10745 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10746 for { 10747 x, err := c.Do() 10748 if err != nil { 10749 return err 10750 } 10751 if err := f(x); err != nil { 10752 return err 10753 } 10754 if x.NextPageToken == "" { 10755 return nil 10756 } 10757 c.PageToken(x.NextPageToken) 10758 } 10759} 10760 10761// method id "adexchangebuyer2.accounts.proposals.pause": 10762 10763type AccountsProposalsPauseCall struct { 10764 s *Service 10765 accountId string 10766 proposalId string 10767 pauseproposalrequest *PauseProposalRequest 10768 urlParams_ gensupport.URLParams 10769 ctx_ context.Context 10770 header_ http.Header 10771} 10772 10773// Pause: Update the given proposal to pause serving. This method will 10774// set the `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to 10775// true for all deals in the proposal. It is a no-op to pause an 10776// already-paused proposal. It is an error to call PauseProposal for a 10777// proposal that is not finalized or renegotiating. 10778// 10779// - accountId: Account ID of the buyer. 10780// - proposalId: The ID of the proposal to pause. 10781func (r *AccountsProposalsService) Pause(accountId string, proposalId string, pauseproposalrequest *PauseProposalRequest) *AccountsProposalsPauseCall { 10782 c := &AccountsProposalsPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10783 c.accountId = accountId 10784 c.proposalId = proposalId 10785 c.pauseproposalrequest = pauseproposalrequest 10786 return c 10787} 10788 10789// Fields allows partial responses to be retrieved. See 10790// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10791// for more information. 10792func (c *AccountsProposalsPauseCall) Fields(s ...googleapi.Field) *AccountsProposalsPauseCall { 10793 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10794 return c 10795} 10796 10797// Context sets the context to be used in this call's Do method. Any 10798// pending HTTP request will be aborted if the provided context is 10799// canceled. 10800func (c *AccountsProposalsPauseCall) Context(ctx context.Context) *AccountsProposalsPauseCall { 10801 c.ctx_ = ctx 10802 return c 10803} 10804 10805// Header returns an http.Header that can be modified by the caller to 10806// add HTTP headers to the request. 10807func (c *AccountsProposalsPauseCall) Header() http.Header { 10808 if c.header_ == nil { 10809 c.header_ = make(http.Header) 10810 } 10811 return c.header_ 10812} 10813 10814func (c *AccountsProposalsPauseCall) doRequest(alt string) (*http.Response, error) { 10815 reqHeaders := make(http.Header) 10816 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 10817 for k, v := range c.header_ { 10818 reqHeaders[k] = v 10819 } 10820 reqHeaders.Set("User-Agent", c.s.userAgent()) 10821 var body io.Reader = nil 10822 body, err := googleapi.WithoutDataWrapper.JSONReader(c.pauseproposalrequest) 10823 if err != nil { 10824 return nil, err 10825 } 10826 reqHeaders.Set("Content-Type", "application/json") 10827 c.urlParams_.Set("alt", alt) 10828 c.urlParams_.Set("prettyPrint", "false") 10829 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:pause") 10830 urls += "?" + c.urlParams_.Encode() 10831 req, err := http.NewRequest("POST", urls, body) 10832 if err != nil { 10833 return nil, err 10834 } 10835 req.Header = reqHeaders 10836 googleapi.Expand(req.URL, map[string]string{ 10837 "accountId": c.accountId, 10838 "proposalId": c.proposalId, 10839 }) 10840 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10841} 10842 10843// Do executes the "adexchangebuyer2.accounts.proposals.pause" call. 10844// Exactly one of *Proposal or error will be non-nil. Any non-2xx status 10845// code is an error. Response headers are in either 10846// *Proposal.ServerResponse.Header or (if a response was returned at 10847// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10848// to check whether the returned error was because 10849// http.StatusNotModified was returned. 10850func (c *AccountsProposalsPauseCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { 10851 gensupport.SetOptions(c.urlParams_, opts...) 10852 res, err := c.doRequest("json") 10853 if res != nil && res.StatusCode == http.StatusNotModified { 10854 if res.Body != nil { 10855 res.Body.Close() 10856 } 10857 return nil, &googleapi.Error{ 10858 Code: res.StatusCode, 10859 Header: res.Header, 10860 } 10861 } 10862 if err != nil { 10863 return nil, err 10864 } 10865 defer googleapi.CloseBody(res) 10866 if err := googleapi.CheckResponse(res); err != nil { 10867 return nil, err 10868 } 10869 ret := &Proposal{ 10870 ServerResponse: googleapi.ServerResponse{ 10871 Header: res.Header, 10872 HTTPStatusCode: res.StatusCode, 10873 }, 10874 } 10875 target := &ret 10876 if err := gensupport.DecodeResponse(target, res); err != nil { 10877 return nil, err 10878 } 10879 return ret, nil 10880 // { 10881 // "description": "Update the given proposal to pause serving. This method will set the `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to true for all deals in the proposal. It is a no-op to pause an already-paused proposal. It is an error to call PauseProposal for a proposal that is not finalized or renegotiating.", 10882 // "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}:pause", 10883 // "httpMethod": "POST", 10884 // "id": "adexchangebuyer2.accounts.proposals.pause", 10885 // "parameterOrder": [ 10886 // "accountId", 10887 // "proposalId" 10888 // ], 10889 // "parameters": { 10890 // "accountId": { 10891 // "description": "Account ID of the buyer.", 10892 // "location": "path", 10893 // "required": true, 10894 // "type": "string" 10895 // }, 10896 // "proposalId": { 10897 // "description": "The ID of the proposal to pause.", 10898 // "location": "path", 10899 // "required": true, 10900 // "type": "string" 10901 // } 10902 // }, 10903 // "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}:pause", 10904 // "request": { 10905 // "$ref": "PauseProposalRequest" 10906 // }, 10907 // "response": { 10908 // "$ref": "Proposal" 10909 // }, 10910 // "scopes": [ 10911 // "https://www.googleapis.com/auth/adexchange.buyer" 10912 // ] 10913 // } 10914 10915} 10916 10917// method id "adexchangebuyer2.accounts.proposals.resume": 10918 10919type AccountsProposalsResumeCall struct { 10920 s *Service 10921 accountId string 10922 proposalId string 10923 resumeproposalrequest *ResumeProposalRequest 10924 urlParams_ gensupport.URLParams 10925 ctx_ context.Context 10926 header_ http.Header 10927} 10928 10929// Resume: Update the given proposal to resume serving. This method will 10930// set the `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to 10931// false for all deals in the proposal. Note that if the 10932// `has_seller_paused` bit is also set, serving will not resume until 10933// the seller also resumes. It is a no-op to resume an already-running 10934// proposal. It is an error to call ResumeProposal for a proposal that 10935// is not finalized or renegotiating. 10936// 10937// - accountId: Account ID of the buyer. 10938// - proposalId: The ID of the proposal to resume. 10939func (r *AccountsProposalsService) Resume(accountId string, proposalId string, resumeproposalrequest *ResumeProposalRequest) *AccountsProposalsResumeCall { 10940 c := &AccountsProposalsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10941 c.accountId = accountId 10942 c.proposalId = proposalId 10943 c.resumeproposalrequest = resumeproposalrequest 10944 return c 10945} 10946 10947// Fields allows partial responses to be retrieved. See 10948// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10949// for more information. 10950func (c *AccountsProposalsResumeCall) Fields(s ...googleapi.Field) *AccountsProposalsResumeCall { 10951 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10952 return c 10953} 10954 10955// Context sets the context to be used in this call's Do method. Any 10956// pending HTTP request will be aborted if the provided context is 10957// canceled. 10958func (c *AccountsProposalsResumeCall) Context(ctx context.Context) *AccountsProposalsResumeCall { 10959 c.ctx_ = ctx 10960 return c 10961} 10962 10963// Header returns an http.Header that can be modified by the caller to 10964// add HTTP headers to the request. 10965func (c *AccountsProposalsResumeCall) Header() http.Header { 10966 if c.header_ == nil { 10967 c.header_ = make(http.Header) 10968 } 10969 return c.header_ 10970} 10971 10972func (c *AccountsProposalsResumeCall) doRequest(alt string) (*http.Response, error) { 10973 reqHeaders := make(http.Header) 10974 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 10975 for k, v := range c.header_ { 10976 reqHeaders[k] = v 10977 } 10978 reqHeaders.Set("User-Agent", c.s.userAgent()) 10979 var body io.Reader = nil 10980 body, err := googleapi.WithoutDataWrapper.JSONReader(c.resumeproposalrequest) 10981 if err != nil { 10982 return nil, err 10983 } 10984 reqHeaders.Set("Content-Type", "application/json") 10985 c.urlParams_.Set("alt", alt) 10986 c.urlParams_.Set("prettyPrint", "false") 10987 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:resume") 10988 urls += "?" + c.urlParams_.Encode() 10989 req, err := http.NewRequest("POST", urls, body) 10990 if err != nil { 10991 return nil, err 10992 } 10993 req.Header = reqHeaders 10994 googleapi.Expand(req.URL, map[string]string{ 10995 "accountId": c.accountId, 10996 "proposalId": c.proposalId, 10997 }) 10998 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10999} 11000 11001// Do executes the "adexchangebuyer2.accounts.proposals.resume" call. 11002// Exactly one of *Proposal or error will be non-nil. Any non-2xx status 11003// code is an error. Response headers are in either 11004// *Proposal.ServerResponse.Header or (if a response was returned at 11005// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11006// to check whether the returned error was because 11007// http.StatusNotModified was returned. 11008func (c *AccountsProposalsResumeCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { 11009 gensupport.SetOptions(c.urlParams_, opts...) 11010 res, err := c.doRequest("json") 11011 if res != nil && res.StatusCode == http.StatusNotModified { 11012 if res.Body != nil { 11013 res.Body.Close() 11014 } 11015 return nil, &googleapi.Error{ 11016 Code: res.StatusCode, 11017 Header: res.Header, 11018 } 11019 } 11020 if err != nil { 11021 return nil, err 11022 } 11023 defer googleapi.CloseBody(res) 11024 if err := googleapi.CheckResponse(res); err != nil { 11025 return nil, err 11026 } 11027 ret := &Proposal{ 11028 ServerResponse: googleapi.ServerResponse{ 11029 Header: res.Header, 11030 HTTPStatusCode: res.StatusCode, 11031 }, 11032 } 11033 target := &ret 11034 if err := gensupport.DecodeResponse(target, res); err != nil { 11035 return nil, err 11036 } 11037 return ret, nil 11038 // { 11039 // "description": "Update the given proposal to resume serving. This method will set the `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to false for all deals in the proposal. Note that if the `has_seller_paused` bit is also set, serving will not resume until the seller also resumes. It is a no-op to resume an already-running proposal. It is an error to call ResumeProposal for a proposal that is not finalized or renegotiating.", 11040 // "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}:resume", 11041 // "httpMethod": "POST", 11042 // "id": "adexchangebuyer2.accounts.proposals.resume", 11043 // "parameterOrder": [ 11044 // "accountId", 11045 // "proposalId" 11046 // ], 11047 // "parameters": { 11048 // "accountId": { 11049 // "description": "Account ID of the buyer.", 11050 // "location": "path", 11051 // "required": true, 11052 // "type": "string" 11053 // }, 11054 // "proposalId": { 11055 // "description": "The ID of the proposal to resume.", 11056 // "location": "path", 11057 // "required": true, 11058 // "type": "string" 11059 // } 11060 // }, 11061 // "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}:resume", 11062 // "request": { 11063 // "$ref": "ResumeProposalRequest" 11064 // }, 11065 // "response": { 11066 // "$ref": "Proposal" 11067 // }, 11068 // "scopes": [ 11069 // "https://www.googleapis.com/auth/adexchange.buyer" 11070 // ] 11071 // } 11072 11073} 11074 11075// method id "adexchangebuyer2.accounts.proposals.update": 11076 11077type AccountsProposalsUpdateCall struct { 11078 s *Service 11079 accountId string 11080 proposalId string 11081 proposal *Proposal 11082 urlParams_ gensupport.URLParams 11083 ctx_ context.Context 11084 header_ http.Header 11085} 11086 11087// Update: Update the given proposal at the client known revision 11088// number. If the server revision has advanced since the passed-in 11089// `proposal.proposal_revision`, an `ABORTED` error message will be 11090// returned. Only the buyer-modifiable fields of the proposal will be 11091// updated. Note that the deals in the proposal will be updated to match 11092// the passed-in copy. If a passed-in deal does not have a `deal_id`, 11093// the server will assign a new unique ID and create the deal. If 11094// passed-in deal has a `deal_id`, it will be updated to match the 11095// passed-in copy. Any existing deals not present in the passed-in 11096// proposal will be deleted. It is an error to pass in a deal with a 11097// `deal_id` not present at head. 11098// 11099// - accountId: Account ID of the buyer. 11100// - proposalId: The unique ID of the proposal. 11101func (r *AccountsProposalsService) Update(accountId string, proposalId string, proposal *Proposal) *AccountsProposalsUpdateCall { 11102 c := &AccountsProposalsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11103 c.accountId = accountId 11104 c.proposalId = proposalId 11105 c.proposal = proposal 11106 return c 11107} 11108 11109// Fields allows partial responses to be retrieved. See 11110// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11111// for more information. 11112func (c *AccountsProposalsUpdateCall) Fields(s ...googleapi.Field) *AccountsProposalsUpdateCall { 11113 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11114 return c 11115} 11116 11117// Context sets the context to be used in this call's Do method. Any 11118// pending HTTP request will be aborted if the provided context is 11119// canceled. 11120func (c *AccountsProposalsUpdateCall) Context(ctx context.Context) *AccountsProposalsUpdateCall { 11121 c.ctx_ = ctx 11122 return c 11123} 11124 11125// Header returns an http.Header that can be modified by the caller to 11126// add HTTP headers to the request. 11127func (c *AccountsProposalsUpdateCall) Header() http.Header { 11128 if c.header_ == nil { 11129 c.header_ = make(http.Header) 11130 } 11131 return c.header_ 11132} 11133 11134func (c *AccountsProposalsUpdateCall) doRequest(alt string) (*http.Response, error) { 11135 reqHeaders := make(http.Header) 11136 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 11137 for k, v := range c.header_ { 11138 reqHeaders[k] = v 11139 } 11140 reqHeaders.Set("User-Agent", c.s.userAgent()) 11141 var body io.Reader = nil 11142 body, err := googleapi.WithoutDataWrapper.JSONReader(c.proposal) 11143 if err != nil { 11144 return nil, err 11145 } 11146 reqHeaders.Set("Content-Type", "application/json") 11147 c.urlParams_.Set("alt", alt) 11148 c.urlParams_.Set("prettyPrint", "false") 11149 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}") 11150 urls += "?" + c.urlParams_.Encode() 11151 req, err := http.NewRequest("PUT", urls, body) 11152 if err != nil { 11153 return nil, err 11154 } 11155 req.Header = reqHeaders 11156 googleapi.Expand(req.URL, map[string]string{ 11157 "accountId": c.accountId, 11158 "proposalId": c.proposalId, 11159 }) 11160 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11161} 11162 11163// Do executes the "adexchangebuyer2.accounts.proposals.update" call. 11164// Exactly one of *Proposal or error will be non-nil. Any non-2xx status 11165// code is an error. Response headers are in either 11166// *Proposal.ServerResponse.Header or (if a response was returned at 11167// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11168// to check whether the returned error was because 11169// http.StatusNotModified was returned. 11170func (c *AccountsProposalsUpdateCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { 11171 gensupport.SetOptions(c.urlParams_, opts...) 11172 res, err := c.doRequest("json") 11173 if res != nil && res.StatusCode == http.StatusNotModified { 11174 if res.Body != nil { 11175 res.Body.Close() 11176 } 11177 return nil, &googleapi.Error{ 11178 Code: res.StatusCode, 11179 Header: res.Header, 11180 } 11181 } 11182 if err != nil { 11183 return nil, err 11184 } 11185 defer googleapi.CloseBody(res) 11186 if err := googleapi.CheckResponse(res); err != nil { 11187 return nil, err 11188 } 11189 ret := &Proposal{ 11190 ServerResponse: googleapi.ServerResponse{ 11191 Header: res.Header, 11192 HTTPStatusCode: res.StatusCode, 11193 }, 11194 } 11195 target := &ret 11196 if err := gensupport.DecodeResponse(target, res); err != nil { 11197 return nil, err 11198 } 11199 return ret, nil 11200 // { 11201 // "description": "Update the given proposal at the client known revision number. If the server revision has advanced since the passed-in `proposal.proposal_revision`, an `ABORTED` error message will be returned. Only the buyer-modifiable fields of the proposal will be updated. Note that the deals in the proposal will be updated to match the passed-in copy. If a passed-in deal does not have a `deal_id`, the server will assign a new unique ID and create the deal. If passed-in deal has a `deal_id`, it will be updated to match the passed-in copy. Any existing deals not present in the passed-in proposal will be deleted. It is an error to pass in a deal with a `deal_id` not present at head.", 11202 // "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}", 11203 // "httpMethod": "PUT", 11204 // "id": "adexchangebuyer2.accounts.proposals.update", 11205 // "parameterOrder": [ 11206 // "accountId", 11207 // "proposalId" 11208 // ], 11209 // "parameters": { 11210 // "accountId": { 11211 // "description": "Account ID of the buyer.", 11212 // "location": "path", 11213 // "required": true, 11214 // "type": "string" 11215 // }, 11216 // "proposalId": { 11217 // "description": "The unique ID of the proposal.", 11218 // "location": "path", 11219 // "required": true, 11220 // "type": "string" 11221 // } 11222 // }, 11223 // "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}", 11224 // "request": { 11225 // "$ref": "Proposal" 11226 // }, 11227 // "response": { 11228 // "$ref": "Proposal" 11229 // }, 11230 // "scopes": [ 11231 // "https://www.googleapis.com/auth/adexchange.buyer" 11232 // ] 11233 // } 11234 11235} 11236 11237// method id "adexchangebuyer2.accounts.publisherProfiles.get": 11238 11239type AccountsPublisherProfilesGetCall struct { 11240 s *Service 11241 accountId string 11242 publisherProfileId string 11243 urlParams_ gensupport.URLParams 11244 ifNoneMatch_ string 11245 ctx_ context.Context 11246 header_ http.Header 11247} 11248 11249// Get: Gets the requested publisher profile by id. 11250// 11251// - accountId: Account ID of the buyer. 11252// - publisherProfileId: The id for the publisher profile to get. 11253func (r *AccountsPublisherProfilesService) Get(accountId string, publisherProfileId string) *AccountsPublisherProfilesGetCall { 11254 c := &AccountsPublisherProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11255 c.accountId = accountId 11256 c.publisherProfileId = publisherProfileId 11257 return c 11258} 11259 11260// Fields allows partial responses to be retrieved. See 11261// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11262// for more information. 11263func (c *AccountsPublisherProfilesGetCall) Fields(s ...googleapi.Field) *AccountsPublisherProfilesGetCall { 11264 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11265 return c 11266} 11267 11268// IfNoneMatch sets the optional parameter which makes the operation 11269// fail if the object's ETag matches the given value. This is useful for 11270// getting updates only after the object has changed since the last 11271// request. Use googleapi.IsNotModified to check whether the response 11272// error from Do is the result of In-None-Match. 11273func (c *AccountsPublisherProfilesGetCall) IfNoneMatch(entityTag string) *AccountsPublisherProfilesGetCall { 11274 c.ifNoneMatch_ = entityTag 11275 return c 11276} 11277 11278// Context sets the context to be used in this call's Do method. Any 11279// pending HTTP request will be aborted if the provided context is 11280// canceled. 11281func (c *AccountsPublisherProfilesGetCall) Context(ctx context.Context) *AccountsPublisherProfilesGetCall { 11282 c.ctx_ = ctx 11283 return c 11284} 11285 11286// Header returns an http.Header that can be modified by the caller to 11287// add HTTP headers to the request. 11288func (c *AccountsPublisherProfilesGetCall) Header() http.Header { 11289 if c.header_ == nil { 11290 c.header_ = make(http.Header) 11291 } 11292 return c.header_ 11293} 11294 11295func (c *AccountsPublisherProfilesGetCall) doRequest(alt string) (*http.Response, error) { 11296 reqHeaders := make(http.Header) 11297 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 11298 for k, v := range c.header_ { 11299 reqHeaders[k] = v 11300 } 11301 reqHeaders.Set("User-Agent", c.s.userAgent()) 11302 if c.ifNoneMatch_ != "" { 11303 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11304 } 11305 var body io.Reader = nil 11306 c.urlParams_.Set("alt", alt) 11307 c.urlParams_.Set("prettyPrint", "false") 11308 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/publisherProfiles/{publisherProfileId}") 11309 urls += "?" + c.urlParams_.Encode() 11310 req, err := http.NewRequest("GET", urls, body) 11311 if err != nil { 11312 return nil, err 11313 } 11314 req.Header = reqHeaders 11315 googleapi.Expand(req.URL, map[string]string{ 11316 "accountId": c.accountId, 11317 "publisherProfileId": c.publisherProfileId, 11318 }) 11319 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11320} 11321 11322// Do executes the "adexchangebuyer2.accounts.publisherProfiles.get" call. 11323// Exactly one of *PublisherProfile or error will be non-nil. Any 11324// non-2xx status code is an error. Response headers are in either 11325// *PublisherProfile.ServerResponse.Header or (if a response was 11326// returned at all) in error.(*googleapi.Error).Header. Use 11327// googleapi.IsNotModified to check whether the returned error was 11328// because http.StatusNotModified was returned. 11329func (c *AccountsPublisherProfilesGetCall) Do(opts ...googleapi.CallOption) (*PublisherProfile, error) { 11330 gensupport.SetOptions(c.urlParams_, opts...) 11331 res, err := c.doRequest("json") 11332 if res != nil && res.StatusCode == http.StatusNotModified { 11333 if res.Body != nil { 11334 res.Body.Close() 11335 } 11336 return nil, &googleapi.Error{ 11337 Code: res.StatusCode, 11338 Header: res.Header, 11339 } 11340 } 11341 if err != nil { 11342 return nil, err 11343 } 11344 defer googleapi.CloseBody(res) 11345 if err := googleapi.CheckResponse(res); err != nil { 11346 return nil, err 11347 } 11348 ret := &PublisherProfile{ 11349 ServerResponse: googleapi.ServerResponse{ 11350 Header: res.Header, 11351 HTTPStatusCode: res.StatusCode, 11352 }, 11353 } 11354 target := &ret 11355 if err := gensupport.DecodeResponse(target, res); err != nil { 11356 return nil, err 11357 } 11358 return ret, nil 11359 // { 11360 // "description": "Gets the requested publisher profile by id.", 11361 // "flatPath": "v2beta1/accounts/{accountId}/publisherProfiles/{publisherProfileId}", 11362 // "httpMethod": "GET", 11363 // "id": "adexchangebuyer2.accounts.publisherProfiles.get", 11364 // "parameterOrder": [ 11365 // "accountId", 11366 // "publisherProfileId" 11367 // ], 11368 // "parameters": { 11369 // "accountId": { 11370 // "description": "Account ID of the buyer.", 11371 // "location": "path", 11372 // "required": true, 11373 // "type": "string" 11374 // }, 11375 // "publisherProfileId": { 11376 // "description": "The id for the publisher profile to get.", 11377 // "location": "path", 11378 // "required": true, 11379 // "type": "string" 11380 // } 11381 // }, 11382 // "path": "v2beta1/accounts/{accountId}/publisherProfiles/{publisherProfileId}", 11383 // "response": { 11384 // "$ref": "PublisherProfile" 11385 // }, 11386 // "scopes": [ 11387 // "https://www.googleapis.com/auth/adexchange.buyer" 11388 // ] 11389 // } 11390 11391} 11392 11393// method id "adexchangebuyer2.accounts.publisherProfiles.list": 11394 11395type AccountsPublisherProfilesListCall struct { 11396 s *Service 11397 accountId string 11398 urlParams_ gensupport.URLParams 11399 ifNoneMatch_ string 11400 ctx_ context.Context 11401 header_ http.Header 11402} 11403 11404// List: List all publisher profiles visible to the buyer 11405// 11406// - accountId: Account ID of the buyer. 11407func (r *AccountsPublisherProfilesService) List(accountId string) *AccountsPublisherProfilesListCall { 11408 c := &AccountsPublisherProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11409 c.accountId = accountId 11410 return c 11411} 11412 11413// PageSize sets the optional parameter "pageSize": Specify the number 11414// of results to include per page. 11415func (c *AccountsPublisherProfilesListCall) PageSize(pageSize int64) *AccountsPublisherProfilesListCall { 11416 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 11417 return c 11418} 11419 11420// PageToken sets the optional parameter "pageToken": The page token as 11421// return from ListPublisherProfilesResponse. 11422func (c *AccountsPublisherProfilesListCall) PageToken(pageToken string) *AccountsPublisherProfilesListCall { 11423 c.urlParams_.Set("pageToken", pageToken) 11424 return c 11425} 11426 11427// Fields allows partial responses to be retrieved. See 11428// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11429// for more information. 11430func (c *AccountsPublisherProfilesListCall) Fields(s ...googleapi.Field) *AccountsPublisherProfilesListCall { 11431 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11432 return c 11433} 11434 11435// IfNoneMatch sets the optional parameter which makes the operation 11436// fail if the object's ETag matches the given value. This is useful for 11437// getting updates only after the object has changed since the last 11438// request. Use googleapi.IsNotModified to check whether the response 11439// error from Do is the result of In-None-Match. 11440func (c *AccountsPublisherProfilesListCall) IfNoneMatch(entityTag string) *AccountsPublisherProfilesListCall { 11441 c.ifNoneMatch_ = entityTag 11442 return c 11443} 11444 11445// Context sets the context to be used in this call's Do method. Any 11446// pending HTTP request will be aborted if the provided context is 11447// canceled. 11448func (c *AccountsPublisherProfilesListCall) Context(ctx context.Context) *AccountsPublisherProfilesListCall { 11449 c.ctx_ = ctx 11450 return c 11451} 11452 11453// Header returns an http.Header that can be modified by the caller to 11454// add HTTP headers to the request. 11455func (c *AccountsPublisherProfilesListCall) Header() http.Header { 11456 if c.header_ == nil { 11457 c.header_ = make(http.Header) 11458 } 11459 return c.header_ 11460} 11461 11462func (c *AccountsPublisherProfilesListCall) doRequest(alt string) (*http.Response, error) { 11463 reqHeaders := make(http.Header) 11464 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 11465 for k, v := range c.header_ { 11466 reqHeaders[k] = v 11467 } 11468 reqHeaders.Set("User-Agent", c.s.userAgent()) 11469 if c.ifNoneMatch_ != "" { 11470 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11471 } 11472 var body io.Reader = nil 11473 c.urlParams_.Set("alt", alt) 11474 c.urlParams_.Set("prettyPrint", "false") 11475 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/publisherProfiles") 11476 urls += "?" + c.urlParams_.Encode() 11477 req, err := http.NewRequest("GET", urls, body) 11478 if err != nil { 11479 return nil, err 11480 } 11481 req.Header = reqHeaders 11482 googleapi.Expand(req.URL, map[string]string{ 11483 "accountId": c.accountId, 11484 }) 11485 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11486} 11487 11488// Do executes the "adexchangebuyer2.accounts.publisherProfiles.list" call. 11489// Exactly one of *ListPublisherProfilesResponse or error will be 11490// non-nil. Any non-2xx status code is an error. Response headers are in 11491// either *ListPublisherProfilesResponse.ServerResponse.Header or (if a 11492// response was returned at all) in error.(*googleapi.Error).Header. Use 11493// googleapi.IsNotModified to check whether the returned error was 11494// because http.StatusNotModified was returned. 11495func (c *AccountsPublisherProfilesListCall) Do(opts ...googleapi.CallOption) (*ListPublisherProfilesResponse, error) { 11496 gensupport.SetOptions(c.urlParams_, opts...) 11497 res, err := c.doRequest("json") 11498 if res != nil && res.StatusCode == http.StatusNotModified { 11499 if res.Body != nil { 11500 res.Body.Close() 11501 } 11502 return nil, &googleapi.Error{ 11503 Code: res.StatusCode, 11504 Header: res.Header, 11505 } 11506 } 11507 if err != nil { 11508 return nil, err 11509 } 11510 defer googleapi.CloseBody(res) 11511 if err := googleapi.CheckResponse(res); err != nil { 11512 return nil, err 11513 } 11514 ret := &ListPublisherProfilesResponse{ 11515 ServerResponse: googleapi.ServerResponse{ 11516 Header: res.Header, 11517 HTTPStatusCode: res.StatusCode, 11518 }, 11519 } 11520 target := &ret 11521 if err := gensupport.DecodeResponse(target, res); err != nil { 11522 return nil, err 11523 } 11524 return ret, nil 11525 // { 11526 // "description": "List all publisher profiles visible to the buyer", 11527 // "flatPath": "v2beta1/accounts/{accountId}/publisherProfiles", 11528 // "httpMethod": "GET", 11529 // "id": "adexchangebuyer2.accounts.publisherProfiles.list", 11530 // "parameterOrder": [ 11531 // "accountId" 11532 // ], 11533 // "parameters": { 11534 // "accountId": { 11535 // "description": "Account ID of the buyer.", 11536 // "location": "path", 11537 // "required": true, 11538 // "type": "string" 11539 // }, 11540 // "pageSize": { 11541 // "description": "Specify the number of results to include per page.", 11542 // "format": "int32", 11543 // "location": "query", 11544 // "type": "integer" 11545 // }, 11546 // "pageToken": { 11547 // "description": "The page token as return from ListPublisherProfilesResponse.", 11548 // "location": "query", 11549 // "type": "string" 11550 // } 11551 // }, 11552 // "path": "v2beta1/accounts/{accountId}/publisherProfiles", 11553 // "response": { 11554 // "$ref": "ListPublisherProfilesResponse" 11555 // }, 11556 // "scopes": [ 11557 // "https://www.googleapis.com/auth/adexchange.buyer" 11558 // ] 11559 // } 11560 11561} 11562 11563// Pages invokes f for each page of results. 11564// A non-nil error returned from f will halt the iteration. 11565// The provided context supersedes any context provided to the Context method. 11566func (c *AccountsPublisherProfilesListCall) Pages(ctx context.Context, f func(*ListPublisherProfilesResponse) error) error { 11567 c.ctx_ = ctx 11568 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 11569 for { 11570 x, err := c.Do() 11571 if err != nil { 11572 return err 11573 } 11574 if err := f(x); err != nil { 11575 return err 11576 } 11577 if x.NextPageToken == "" { 11578 return nil 11579 } 11580 c.PageToken(x.NextPageToken) 11581 } 11582} 11583 11584// method id "adexchangebuyer2.bidders.accounts.filterSets.create": 11585 11586type BiddersAccountsFilterSetsCreateCall struct { 11587 s *Service 11588 ownerName string 11589 filterset *FilterSet 11590 urlParams_ gensupport.URLParams 11591 ctx_ context.Context 11592 header_ http.Header 11593} 11594 11595// Create: Creates the specified filter set for the account with the 11596// given account ID. 11597// 11598// - ownerName: Name of the owner (bidder or account) of the filter set 11599// to be created. For example: - For a bidder-level filter set for 11600// bidder 123: `bidders/123` - For an account-level filter set for the 11601// buyer account representing bidder 123: `bidders/123/accounts/123` - 11602// For an account-level filter set for the child seat buyer account 11603// 456 whose bidder is 123: `bidders/123/accounts/456`. 11604func (r *BiddersAccountsFilterSetsService) Create(ownerName string, filterset *FilterSet) *BiddersAccountsFilterSetsCreateCall { 11605 c := &BiddersAccountsFilterSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11606 c.ownerName = ownerName 11607 c.filterset = filterset 11608 return c 11609} 11610 11611// IsTransient sets the optional parameter "isTransient": Whether the 11612// filter set is transient, or should be persisted indefinitely. By 11613// default, filter sets are not transient. If transient, it will be 11614// available for at least 1 hour after creation. 11615func (c *BiddersAccountsFilterSetsCreateCall) IsTransient(isTransient bool) *BiddersAccountsFilterSetsCreateCall { 11616 c.urlParams_.Set("isTransient", fmt.Sprint(isTransient)) 11617 return c 11618} 11619 11620// Fields allows partial responses to be retrieved. See 11621// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11622// for more information. 11623func (c *BiddersAccountsFilterSetsCreateCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsCreateCall { 11624 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11625 return c 11626} 11627 11628// Context sets the context to be used in this call's Do method. Any 11629// pending HTTP request will be aborted if the provided context is 11630// canceled. 11631func (c *BiddersAccountsFilterSetsCreateCall) Context(ctx context.Context) *BiddersAccountsFilterSetsCreateCall { 11632 c.ctx_ = ctx 11633 return c 11634} 11635 11636// Header returns an http.Header that can be modified by the caller to 11637// add HTTP headers to the request. 11638func (c *BiddersAccountsFilterSetsCreateCall) Header() http.Header { 11639 if c.header_ == nil { 11640 c.header_ = make(http.Header) 11641 } 11642 return c.header_ 11643} 11644 11645func (c *BiddersAccountsFilterSetsCreateCall) doRequest(alt string) (*http.Response, error) { 11646 reqHeaders := make(http.Header) 11647 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 11648 for k, v := range c.header_ { 11649 reqHeaders[k] = v 11650 } 11651 reqHeaders.Set("User-Agent", c.s.userAgent()) 11652 var body io.Reader = nil 11653 body, err := googleapi.WithoutDataWrapper.JSONReader(c.filterset) 11654 if err != nil { 11655 return nil, err 11656 } 11657 reqHeaders.Set("Content-Type", "application/json") 11658 c.urlParams_.Set("alt", alt) 11659 c.urlParams_.Set("prettyPrint", "false") 11660 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+ownerName}/filterSets") 11661 urls += "?" + c.urlParams_.Encode() 11662 req, err := http.NewRequest("POST", urls, body) 11663 if err != nil { 11664 return nil, err 11665 } 11666 req.Header = reqHeaders 11667 googleapi.Expand(req.URL, map[string]string{ 11668 "ownerName": c.ownerName, 11669 }) 11670 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11671} 11672 11673// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.create" call. 11674// Exactly one of *FilterSet or error will be non-nil. Any non-2xx 11675// status code is an error. Response headers are in either 11676// *FilterSet.ServerResponse.Header or (if a response was returned at 11677// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11678// to check whether the returned error was because 11679// http.StatusNotModified was returned. 11680func (c *BiddersAccountsFilterSetsCreateCall) Do(opts ...googleapi.CallOption) (*FilterSet, error) { 11681 gensupport.SetOptions(c.urlParams_, opts...) 11682 res, err := c.doRequest("json") 11683 if res != nil && res.StatusCode == http.StatusNotModified { 11684 if res.Body != nil { 11685 res.Body.Close() 11686 } 11687 return nil, &googleapi.Error{ 11688 Code: res.StatusCode, 11689 Header: res.Header, 11690 } 11691 } 11692 if err != nil { 11693 return nil, err 11694 } 11695 defer googleapi.CloseBody(res) 11696 if err := googleapi.CheckResponse(res); err != nil { 11697 return nil, err 11698 } 11699 ret := &FilterSet{ 11700 ServerResponse: googleapi.ServerResponse{ 11701 Header: res.Header, 11702 HTTPStatusCode: res.StatusCode, 11703 }, 11704 } 11705 target := &ret 11706 if err := gensupport.DecodeResponse(target, res); err != nil { 11707 return nil, err 11708 } 11709 return ret, nil 11710 // { 11711 // "description": "Creates the specified filter set for the account with the given account ID.", 11712 // "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets", 11713 // "httpMethod": "POST", 11714 // "id": "adexchangebuyer2.bidders.accounts.filterSets.create", 11715 // "parameterOrder": [ 11716 // "ownerName" 11717 // ], 11718 // "parameters": { 11719 // "isTransient": { 11720 // "description": "Whether the filter set is transient, or should be persisted indefinitely. By default, filter sets are not transient. If transient, it will be available for at least 1 hour after creation.", 11721 // "location": "query", 11722 // "type": "boolean" 11723 // }, 11724 // "ownerName": { 11725 // "description": "Name of the owner (bidder or account) of the filter set to be created. For example: - For a bidder-level filter set for bidder 123: `bidders/123` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456`", 11726 // "location": "path", 11727 // "pattern": "^bidders/[^/]+/accounts/[^/]+$", 11728 // "required": true, 11729 // "type": "string" 11730 // } 11731 // }, 11732 // "path": "v2beta1/{+ownerName}/filterSets", 11733 // "request": { 11734 // "$ref": "FilterSet" 11735 // }, 11736 // "response": { 11737 // "$ref": "FilterSet" 11738 // }, 11739 // "scopes": [ 11740 // "https://www.googleapis.com/auth/adexchange.buyer" 11741 // ] 11742 // } 11743 11744} 11745 11746// method id "adexchangebuyer2.bidders.accounts.filterSets.delete": 11747 11748type BiddersAccountsFilterSetsDeleteCall struct { 11749 s *Service 11750 name string 11751 urlParams_ gensupport.URLParams 11752 ctx_ context.Context 11753 header_ http.Header 11754} 11755 11756// Delete: Deletes the requested filter set from the account with the 11757// given account ID. 11758// 11759// - name: Full name of the resource to delete. For example: - For a 11760// bidder-level filter set for bidder 123: 11761// `bidders/123/filterSets/abc` - For an account-level filter set for 11762// the buyer account representing bidder 123: 11763// `bidders/123/accounts/123/filterSets/abc` - For an account-level 11764// filter set for the child seat buyer account 456 whose bidder is 11765// 123: `bidders/123/accounts/456/filterSets/abc`. 11766func (r *BiddersAccountsFilterSetsService) Delete(name string) *BiddersAccountsFilterSetsDeleteCall { 11767 c := &BiddersAccountsFilterSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11768 c.name = name 11769 return c 11770} 11771 11772// Fields allows partial responses to be retrieved. See 11773// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11774// for more information. 11775func (c *BiddersAccountsFilterSetsDeleteCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsDeleteCall { 11776 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11777 return c 11778} 11779 11780// Context sets the context to be used in this call's Do method. Any 11781// pending HTTP request will be aborted if the provided context is 11782// canceled. 11783func (c *BiddersAccountsFilterSetsDeleteCall) Context(ctx context.Context) *BiddersAccountsFilterSetsDeleteCall { 11784 c.ctx_ = ctx 11785 return c 11786} 11787 11788// Header returns an http.Header that can be modified by the caller to 11789// add HTTP headers to the request. 11790func (c *BiddersAccountsFilterSetsDeleteCall) Header() http.Header { 11791 if c.header_ == nil { 11792 c.header_ = make(http.Header) 11793 } 11794 return c.header_ 11795} 11796 11797func (c *BiddersAccountsFilterSetsDeleteCall) doRequest(alt string) (*http.Response, error) { 11798 reqHeaders := make(http.Header) 11799 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 11800 for k, v := range c.header_ { 11801 reqHeaders[k] = v 11802 } 11803 reqHeaders.Set("User-Agent", c.s.userAgent()) 11804 var body io.Reader = nil 11805 c.urlParams_.Set("alt", alt) 11806 c.urlParams_.Set("prettyPrint", "false") 11807 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}") 11808 urls += "?" + c.urlParams_.Encode() 11809 req, err := http.NewRequest("DELETE", urls, body) 11810 if err != nil { 11811 return nil, err 11812 } 11813 req.Header = reqHeaders 11814 googleapi.Expand(req.URL, map[string]string{ 11815 "name": c.name, 11816 }) 11817 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11818} 11819 11820// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.delete" call. 11821// Exactly one of *Empty or error will be non-nil. Any non-2xx status 11822// code is an error. Response headers are in either 11823// *Empty.ServerResponse.Header or (if a response was returned at all) 11824// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11825// check whether the returned error was because http.StatusNotModified 11826// was returned. 11827func (c *BiddersAccountsFilterSetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 11828 gensupport.SetOptions(c.urlParams_, opts...) 11829 res, err := c.doRequest("json") 11830 if res != nil && res.StatusCode == http.StatusNotModified { 11831 if res.Body != nil { 11832 res.Body.Close() 11833 } 11834 return nil, &googleapi.Error{ 11835 Code: res.StatusCode, 11836 Header: res.Header, 11837 } 11838 } 11839 if err != nil { 11840 return nil, err 11841 } 11842 defer googleapi.CloseBody(res) 11843 if err := googleapi.CheckResponse(res); err != nil { 11844 return nil, err 11845 } 11846 ret := &Empty{ 11847 ServerResponse: googleapi.ServerResponse{ 11848 Header: res.Header, 11849 HTTPStatusCode: res.StatusCode, 11850 }, 11851 } 11852 target := &ret 11853 if err := gensupport.DecodeResponse(target, res); err != nil { 11854 return nil, err 11855 } 11856 return ret, nil 11857 // { 11858 // "description": "Deletes the requested filter set from the account with the given account ID.", 11859 // "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}", 11860 // "httpMethod": "DELETE", 11861 // "id": "adexchangebuyer2.bidders.accounts.filterSets.delete", 11862 // "parameterOrder": [ 11863 // "name" 11864 // ], 11865 // "parameters": { 11866 // "name": { 11867 // "description": "Full name of the resource to delete. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 11868 // "location": "path", 11869 // "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$", 11870 // "required": true, 11871 // "type": "string" 11872 // } 11873 // }, 11874 // "path": "v2beta1/{+name}", 11875 // "response": { 11876 // "$ref": "Empty" 11877 // }, 11878 // "scopes": [ 11879 // "https://www.googleapis.com/auth/adexchange.buyer" 11880 // ] 11881 // } 11882 11883} 11884 11885// method id "adexchangebuyer2.bidders.accounts.filterSets.get": 11886 11887type BiddersAccountsFilterSetsGetCall struct { 11888 s *Service 11889 name string 11890 urlParams_ gensupport.URLParams 11891 ifNoneMatch_ string 11892 ctx_ context.Context 11893 header_ http.Header 11894} 11895 11896// Get: Retrieves the requested filter set for the account with the 11897// given account ID. 11898// 11899// - name: Full name of the resource being requested. For example: - For 11900// a bidder-level filter set for bidder 123: 11901// `bidders/123/filterSets/abc` - For an account-level filter set for 11902// the buyer account representing bidder 123: 11903// `bidders/123/accounts/123/filterSets/abc` - For an account-level 11904// filter set for the child seat buyer account 456 whose bidder is 11905// 123: `bidders/123/accounts/456/filterSets/abc`. 11906func (r *BiddersAccountsFilterSetsService) Get(name string) *BiddersAccountsFilterSetsGetCall { 11907 c := &BiddersAccountsFilterSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11908 c.name = name 11909 return c 11910} 11911 11912// Fields allows partial responses to be retrieved. See 11913// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11914// for more information. 11915func (c *BiddersAccountsFilterSetsGetCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsGetCall { 11916 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11917 return c 11918} 11919 11920// IfNoneMatch sets the optional parameter which makes the operation 11921// fail if the object's ETag matches the given value. This is useful for 11922// getting updates only after the object has changed since the last 11923// request. Use googleapi.IsNotModified to check whether the response 11924// error from Do is the result of In-None-Match. 11925func (c *BiddersAccountsFilterSetsGetCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsGetCall { 11926 c.ifNoneMatch_ = entityTag 11927 return c 11928} 11929 11930// Context sets the context to be used in this call's Do method. Any 11931// pending HTTP request will be aborted if the provided context is 11932// canceled. 11933func (c *BiddersAccountsFilterSetsGetCall) Context(ctx context.Context) *BiddersAccountsFilterSetsGetCall { 11934 c.ctx_ = ctx 11935 return c 11936} 11937 11938// Header returns an http.Header that can be modified by the caller to 11939// add HTTP headers to the request. 11940func (c *BiddersAccountsFilterSetsGetCall) Header() http.Header { 11941 if c.header_ == nil { 11942 c.header_ = make(http.Header) 11943 } 11944 return c.header_ 11945} 11946 11947func (c *BiddersAccountsFilterSetsGetCall) doRequest(alt string) (*http.Response, error) { 11948 reqHeaders := make(http.Header) 11949 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 11950 for k, v := range c.header_ { 11951 reqHeaders[k] = v 11952 } 11953 reqHeaders.Set("User-Agent", c.s.userAgent()) 11954 if c.ifNoneMatch_ != "" { 11955 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11956 } 11957 var body io.Reader = nil 11958 c.urlParams_.Set("alt", alt) 11959 c.urlParams_.Set("prettyPrint", "false") 11960 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}") 11961 urls += "?" + c.urlParams_.Encode() 11962 req, err := http.NewRequest("GET", urls, body) 11963 if err != nil { 11964 return nil, err 11965 } 11966 req.Header = reqHeaders 11967 googleapi.Expand(req.URL, map[string]string{ 11968 "name": c.name, 11969 }) 11970 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11971} 11972 11973// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.get" call. 11974// Exactly one of *FilterSet or error will be non-nil. Any non-2xx 11975// status code is an error. Response headers are in either 11976// *FilterSet.ServerResponse.Header or (if a response was returned at 11977// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11978// to check whether the returned error was because 11979// http.StatusNotModified was returned. 11980func (c *BiddersAccountsFilterSetsGetCall) Do(opts ...googleapi.CallOption) (*FilterSet, error) { 11981 gensupport.SetOptions(c.urlParams_, opts...) 11982 res, err := c.doRequest("json") 11983 if res != nil && res.StatusCode == http.StatusNotModified { 11984 if res.Body != nil { 11985 res.Body.Close() 11986 } 11987 return nil, &googleapi.Error{ 11988 Code: res.StatusCode, 11989 Header: res.Header, 11990 } 11991 } 11992 if err != nil { 11993 return nil, err 11994 } 11995 defer googleapi.CloseBody(res) 11996 if err := googleapi.CheckResponse(res); err != nil { 11997 return nil, err 11998 } 11999 ret := &FilterSet{ 12000 ServerResponse: googleapi.ServerResponse{ 12001 Header: res.Header, 12002 HTTPStatusCode: res.StatusCode, 12003 }, 12004 } 12005 target := &ret 12006 if err := gensupport.DecodeResponse(target, res); err != nil { 12007 return nil, err 12008 } 12009 return ret, nil 12010 // { 12011 // "description": "Retrieves the requested filter set for the account with the given account ID.", 12012 // "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}", 12013 // "httpMethod": "GET", 12014 // "id": "adexchangebuyer2.bidders.accounts.filterSets.get", 12015 // "parameterOrder": [ 12016 // "name" 12017 // ], 12018 // "parameters": { 12019 // "name": { 12020 // "description": "Full name of the resource being requested. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 12021 // "location": "path", 12022 // "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$", 12023 // "required": true, 12024 // "type": "string" 12025 // } 12026 // }, 12027 // "path": "v2beta1/{+name}", 12028 // "response": { 12029 // "$ref": "FilterSet" 12030 // }, 12031 // "scopes": [ 12032 // "https://www.googleapis.com/auth/adexchange.buyer" 12033 // ] 12034 // } 12035 12036} 12037 12038// method id "adexchangebuyer2.bidders.accounts.filterSets.list": 12039 12040type BiddersAccountsFilterSetsListCall struct { 12041 s *Service 12042 ownerName string 12043 urlParams_ gensupport.URLParams 12044 ifNoneMatch_ string 12045 ctx_ context.Context 12046 header_ http.Header 12047} 12048 12049// List: Lists all filter sets for the account with the given account 12050// ID. 12051// 12052// - ownerName: Name of the owner (bidder or account) of the filter sets 12053// to be listed. For example: - For a bidder-level filter set for 12054// bidder 123: `bidders/123` - For an account-level filter set for the 12055// buyer account representing bidder 123: `bidders/123/accounts/123` - 12056// For an account-level filter set for the child seat buyer account 12057// 456 whose bidder is 123: `bidders/123/accounts/456`. 12058func (r *BiddersAccountsFilterSetsService) List(ownerName string) *BiddersAccountsFilterSetsListCall { 12059 c := &BiddersAccountsFilterSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12060 c.ownerName = ownerName 12061 return c 12062} 12063 12064// PageSize sets the optional parameter "pageSize": Requested page size. 12065// The server may return fewer results than requested. If unspecified, 12066// the server will pick an appropriate default. 12067func (c *BiddersAccountsFilterSetsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsListCall { 12068 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12069 return c 12070} 12071 12072// PageToken sets the optional parameter "pageToken": A token 12073// identifying a page of results the server should return. Typically, 12074// this is the value of ListFilterSetsResponse.nextPageToken returned 12075// from the previous call to the accounts.filterSets.list method. 12076func (c *BiddersAccountsFilterSetsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsListCall { 12077 c.urlParams_.Set("pageToken", pageToken) 12078 return c 12079} 12080 12081// Fields allows partial responses to be retrieved. See 12082// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12083// for more information. 12084func (c *BiddersAccountsFilterSetsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsListCall { 12085 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12086 return c 12087} 12088 12089// IfNoneMatch sets the optional parameter which makes the operation 12090// fail if the object's ETag matches the given value. This is useful for 12091// getting updates only after the object has changed since the last 12092// request. Use googleapi.IsNotModified to check whether the response 12093// error from Do is the result of In-None-Match. 12094func (c *BiddersAccountsFilterSetsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsListCall { 12095 c.ifNoneMatch_ = entityTag 12096 return c 12097} 12098 12099// Context sets the context to be used in this call's Do method. Any 12100// pending HTTP request will be aborted if the provided context is 12101// canceled. 12102func (c *BiddersAccountsFilterSetsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsListCall { 12103 c.ctx_ = ctx 12104 return c 12105} 12106 12107// Header returns an http.Header that can be modified by the caller to 12108// add HTTP headers to the request. 12109func (c *BiddersAccountsFilterSetsListCall) Header() http.Header { 12110 if c.header_ == nil { 12111 c.header_ = make(http.Header) 12112 } 12113 return c.header_ 12114} 12115 12116func (c *BiddersAccountsFilterSetsListCall) doRequest(alt string) (*http.Response, error) { 12117 reqHeaders := make(http.Header) 12118 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 12119 for k, v := range c.header_ { 12120 reqHeaders[k] = v 12121 } 12122 reqHeaders.Set("User-Agent", c.s.userAgent()) 12123 if c.ifNoneMatch_ != "" { 12124 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12125 } 12126 var body io.Reader = nil 12127 c.urlParams_.Set("alt", alt) 12128 c.urlParams_.Set("prettyPrint", "false") 12129 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+ownerName}/filterSets") 12130 urls += "?" + c.urlParams_.Encode() 12131 req, err := http.NewRequest("GET", urls, body) 12132 if err != nil { 12133 return nil, err 12134 } 12135 req.Header = reqHeaders 12136 googleapi.Expand(req.URL, map[string]string{ 12137 "ownerName": c.ownerName, 12138 }) 12139 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12140} 12141 12142// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.list" call. 12143// Exactly one of *ListFilterSetsResponse or error will be non-nil. Any 12144// non-2xx status code is an error. Response headers are in either 12145// *ListFilterSetsResponse.ServerResponse.Header or (if a response was 12146// returned at all) in error.(*googleapi.Error).Header. Use 12147// googleapi.IsNotModified to check whether the returned error was 12148// because http.StatusNotModified was returned. 12149func (c *BiddersAccountsFilterSetsListCall) Do(opts ...googleapi.CallOption) (*ListFilterSetsResponse, error) { 12150 gensupport.SetOptions(c.urlParams_, opts...) 12151 res, err := c.doRequest("json") 12152 if res != nil && res.StatusCode == http.StatusNotModified { 12153 if res.Body != nil { 12154 res.Body.Close() 12155 } 12156 return nil, &googleapi.Error{ 12157 Code: res.StatusCode, 12158 Header: res.Header, 12159 } 12160 } 12161 if err != nil { 12162 return nil, err 12163 } 12164 defer googleapi.CloseBody(res) 12165 if err := googleapi.CheckResponse(res); err != nil { 12166 return nil, err 12167 } 12168 ret := &ListFilterSetsResponse{ 12169 ServerResponse: googleapi.ServerResponse{ 12170 Header: res.Header, 12171 HTTPStatusCode: res.StatusCode, 12172 }, 12173 } 12174 target := &ret 12175 if err := gensupport.DecodeResponse(target, res); err != nil { 12176 return nil, err 12177 } 12178 return ret, nil 12179 // { 12180 // "description": "Lists all filter sets for the account with the given account ID.", 12181 // "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets", 12182 // "httpMethod": "GET", 12183 // "id": "adexchangebuyer2.bidders.accounts.filterSets.list", 12184 // "parameterOrder": [ 12185 // "ownerName" 12186 // ], 12187 // "parameters": { 12188 // "ownerName": { 12189 // "description": "Name of the owner (bidder or account) of the filter sets to be listed. For example: - For a bidder-level filter set for bidder 123: `bidders/123` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456`", 12190 // "location": "path", 12191 // "pattern": "^bidders/[^/]+/accounts/[^/]+$", 12192 // "required": true, 12193 // "type": "string" 12194 // }, 12195 // "pageSize": { 12196 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 12197 // "format": "int32", 12198 // "location": "query", 12199 // "type": "integer" 12200 // }, 12201 // "pageToken": { 12202 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListFilterSetsResponse.nextPageToken returned from the previous call to the accounts.filterSets.list method.", 12203 // "location": "query", 12204 // "type": "string" 12205 // } 12206 // }, 12207 // "path": "v2beta1/{+ownerName}/filterSets", 12208 // "response": { 12209 // "$ref": "ListFilterSetsResponse" 12210 // }, 12211 // "scopes": [ 12212 // "https://www.googleapis.com/auth/adexchange.buyer" 12213 // ] 12214 // } 12215 12216} 12217 12218// Pages invokes f for each page of results. 12219// A non-nil error returned from f will halt the iteration. 12220// The provided context supersedes any context provided to the Context method. 12221func (c *BiddersAccountsFilterSetsListCall) Pages(ctx context.Context, f func(*ListFilterSetsResponse) error) error { 12222 c.ctx_ = ctx 12223 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 12224 for { 12225 x, err := c.Do() 12226 if err != nil { 12227 return err 12228 } 12229 if err := f(x); err != nil { 12230 return err 12231 } 12232 if x.NextPageToken == "" { 12233 return nil 12234 } 12235 c.PageToken(x.NextPageToken) 12236 } 12237} 12238 12239// method id "adexchangebuyer2.bidders.accounts.filterSets.bidMetrics.list": 12240 12241type BiddersAccountsFilterSetsBidMetricsListCall struct { 12242 s *Service 12243 filterSetName string 12244 urlParams_ gensupport.URLParams 12245 ifNoneMatch_ string 12246 ctx_ context.Context 12247 header_ http.Header 12248} 12249 12250// List: Lists all metrics that are measured in terms of number of bids. 12251// 12252// - filterSetName: Name of the filter set that should be applied to the 12253// requested metrics. For example: - For a bidder-level filter set for 12254// bidder 123: `bidders/123/filterSets/abc` - For an account-level 12255// filter set for the buyer account representing bidder 123: 12256// `bidders/123/accounts/123/filterSets/abc` - For an account-level 12257// filter set for the child seat buyer account 456 whose bidder is 12258// 123: `bidders/123/accounts/456/filterSets/abc`. 12259func (r *BiddersAccountsFilterSetsBidMetricsService) List(filterSetName string) *BiddersAccountsFilterSetsBidMetricsListCall { 12260 c := &BiddersAccountsFilterSetsBidMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12261 c.filterSetName = filterSetName 12262 return c 12263} 12264 12265// PageSize sets the optional parameter "pageSize": Requested page size. 12266// The server may return fewer results than requested. If unspecified, 12267// the server will pick an appropriate default. 12268func (c *BiddersAccountsFilterSetsBidMetricsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsBidMetricsListCall { 12269 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12270 return c 12271} 12272 12273// PageToken sets the optional parameter "pageToken": A token 12274// identifying a page of results the server should return. Typically, 12275// this is the value of ListBidMetricsResponse.nextPageToken returned 12276// from the previous call to the bidMetrics.list method. 12277func (c *BiddersAccountsFilterSetsBidMetricsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsBidMetricsListCall { 12278 c.urlParams_.Set("pageToken", pageToken) 12279 return c 12280} 12281 12282// Fields allows partial responses to be retrieved. See 12283// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12284// for more information. 12285func (c *BiddersAccountsFilterSetsBidMetricsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsBidMetricsListCall { 12286 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12287 return c 12288} 12289 12290// IfNoneMatch sets the optional parameter which makes the operation 12291// fail if the object's ETag matches the given value. This is useful for 12292// getting updates only after the object has changed since the last 12293// request. Use googleapi.IsNotModified to check whether the response 12294// error from Do is the result of In-None-Match. 12295func (c *BiddersAccountsFilterSetsBidMetricsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsBidMetricsListCall { 12296 c.ifNoneMatch_ = entityTag 12297 return c 12298} 12299 12300// Context sets the context to be used in this call's Do method. Any 12301// pending HTTP request will be aborted if the provided context is 12302// canceled. 12303func (c *BiddersAccountsFilterSetsBidMetricsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsBidMetricsListCall { 12304 c.ctx_ = ctx 12305 return c 12306} 12307 12308// Header returns an http.Header that can be modified by the caller to 12309// add HTTP headers to the request. 12310func (c *BiddersAccountsFilterSetsBidMetricsListCall) Header() http.Header { 12311 if c.header_ == nil { 12312 c.header_ = make(http.Header) 12313 } 12314 return c.header_ 12315} 12316 12317func (c *BiddersAccountsFilterSetsBidMetricsListCall) doRequest(alt string) (*http.Response, error) { 12318 reqHeaders := make(http.Header) 12319 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 12320 for k, v := range c.header_ { 12321 reqHeaders[k] = v 12322 } 12323 reqHeaders.Set("User-Agent", c.s.userAgent()) 12324 if c.ifNoneMatch_ != "" { 12325 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12326 } 12327 var body io.Reader = nil 12328 c.urlParams_.Set("alt", alt) 12329 c.urlParams_.Set("prettyPrint", "false") 12330 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidMetrics") 12331 urls += "?" + c.urlParams_.Encode() 12332 req, err := http.NewRequest("GET", urls, body) 12333 if err != nil { 12334 return nil, err 12335 } 12336 req.Header = reqHeaders 12337 googleapi.Expand(req.URL, map[string]string{ 12338 "filterSetName": c.filterSetName, 12339 }) 12340 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12341} 12342 12343// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.bidMetrics.list" call. 12344// Exactly one of *ListBidMetricsResponse or error will be non-nil. Any 12345// non-2xx status code is an error. Response headers are in either 12346// *ListBidMetricsResponse.ServerResponse.Header or (if a response was 12347// returned at all) in error.(*googleapi.Error).Header. Use 12348// googleapi.IsNotModified to check whether the returned error was 12349// because http.StatusNotModified was returned. 12350func (c *BiddersAccountsFilterSetsBidMetricsListCall) Do(opts ...googleapi.CallOption) (*ListBidMetricsResponse, error) { 12351 gensupport.SetOptions(c.urlParams_, opts...) 12352 res, err := c.doRequest("json") 12353 if res != nil && res.StatusCode == http.StatusNotModified { 12354 if res.Body != nil { 12355 res.Body.Close() 12356 } 12357 return nil, &googleapi.Error{ 12358 Code: res.StatusCode, 12359 Header: res.Header, 12360 } 12361 } 12362 if err != nil { 12363 return nil, err 12364 } 12365 defer googleapi.CloseBody(res) 12366 if err := googleapi.CheckResponse(res); err != nil { 12367 return nil, err 12368 } 12369 ret := &ListBidMetricsResponse{ 12370 ServerResponse: googleapi.ServerResponse{ 12371 Header: res.Header, 12372 HTTPStatusCode: res.StatusCode, 12373 }, 12374 } 12375 target := &ret 12376 if err := gensupport.DecodeResponse(target, res); err != nil { 12377 return nil, err 12378 } 12379 return ret, nil 12380 // { 12381 // "description": "Lists all metrics that are measured in terms of number of bids.", 12382 // "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/bidMetrics", 12383 // "httpMethod": "GET", 12384 // "id": "adexchangebuyer2.bidders.accounts.filterSets.bidMetrics.list", 12385 // "parameterOrder": [ 12386 // "filterSetName" 12387 // ], 12388 // "parameters": { 12389 // "filterSetName": { 12390 // "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 12391 // "location": "path", 12392 // "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$", 12393 // "required": true, 12394 // "type": "string" 12395 // }, 12396 // "pageSize": { 12397 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 12398 // "format": "int32", 12399 // "location": "query", 12400 // "type": "integer" 12401 // }, 12402 // "pageToken": { 12403 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListBidMetricsResponse.nextPageToken returned from the previous call to the bidMetrics.list method.", 12404 // "location": "query", 12405 // "type": "string" 12406 // } 12407 // }, 12408 // "path": "v2beta1/{+filterSetName}/bidMetrics", 12409 // "response": { 12410 // "$ref": "ListBidMetricsResponse" 12411 // }, 12412 // "scopes": [ 12413 // "https://www.googleapis.com/auth/adexchange.buyer" 12414 // ] 12415 // } 12416 12417} 12418 12419// Pages invokes f for each page of results. 12420// A non-nil error returned from f will halt the iteration. 12421// The provided context supersedes any context provided to the Context method. 12422func (c *BiddersAccountsFilterSetsBidMetricsListCall) Pages(ctx context.Context, f func(*ListBidMetricsResponse) error) error { 12423 c.ctx_ = ctx 12424 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 12425 for { 12426 x, err := c.Do() 12427 if err != nil { 12428 return err 12429 } 12430 if err := f(x); err != nil { 12431 return err 12432 } 12433 if x.NextPageToken == "" { 12434 return nil 12435 } 12436 c.PageToken(x.NextPageToken) 12437 } 12438} 12439 12440// method id "adexchangebuyer2.bidders.accounts.filterSets.bidResponseErrors.list": 12441 12442type BiddersAccountsFilterSetsBidResponseErrorsListCall struct { 12443 s *Service 12444 filterSetName string 12445 urlParams_ gensupport.URLParams 12446 ifNoneMatch_ string 12447 ctx_ context.Context 12448 header_ http.Header 12449} 12450 12451// List: List all errors that occurred in bid responses, with the number 12452// of bid responses affected for each reason. 12453// 12454// - filterSetName: Name of the filter set that should be applied to the 12455// requested metrics. For example: - For a bidder-level filter set for 12456// bidder 123: `bidders/123/filterSets/abc` - For an account-level 12457// filter set for the buyer account representing bidder 123: 12458// `bidders/123/accounts/123/filterSets/abc` - For an account-level 12459// filter set for the child seat buyer account 456 whose bidder is 12460// 123: `bidders/123/accounts/456/filterSets/abc`. 12461func (r *BiddersAccountsFilterSetsBidResponseErrorsService) List(filterSetName string) *BiddersAccountsFilterSetsBidResponseErrorsListCall { 12462 c := &BiddersAccountsFilterSetsBidResponseErrorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12463 c.filterSetName = filterSetName 12464 return c 12465} 12466 12467// PageSize sets the optional parameter "pageSize": Requested page size. 12468// The server may return fewer results than requested. If unspecified, 12469// the server will pick an appropriate default. 12470func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsBidResponseErrorsListCall { 12471 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12472 return c 12473} 12474 12475// PageToken sets the optional parameter "pageToken": A token 12476// identifying a page of results the server should return. Typically, 12477// this is the value of ListBidResponseErrorsResponse.nextPageToken 12478// returned from the previous call to the bidResponseErrors.list method. 12479func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsBidResponseErrorsListCall { 12480 c.urlParams_.Set("pageToken", pageToken) 12481 return c 12482} 12483 12484// Fields allows partial responses to be retrieved. See 12485// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12486// for more information. 12487func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsBidResponseErrorsListCall { 12488 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12489 return c 12490} 12491 12492// IfNoneMatch sets the optional parameter which makes the operation 12493// fail if the object's ETag matches the given value. This is useful for 12494// getting updates only after the object has changed since the last 12495// request. Use googleapi.IsNotModified to check whether the response 12496// error from Do is the result of In-None-Match. 12497func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsBidResponseErrorsListCall { 12498 c.ifNoneMatch_ = entityTag 12499 return c 12500} 12501 12502// Context sets the context to be used in this call's Do method. Any 12503// pending HTTP request will be aborted if the provided context is 12504// canceled. 12505func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsBidResponseErrorsListCall { 12506 c.ctx_ = ctx 12507 return c 12508} 12509 12510// Header returns an http.Header that can be modified by the caller to 12511// add HTTP headers to the request. 12512func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) Header() http.Header { 12513 if c.header_ == nil { 12514 c.header_ = make(http.Header) 12515 } 12516 return c.header_ 12517} 12518 12519func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) doRequest(alt string) (*http.Response, error) { 12520 reqHeaders := make(http.Header) 12521 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 12522 for k, v := range c.header_ { 12523 reqHeaders[k] = v 12524 } 12525 reqHeaders.Set("User-Agent", c.s.userAgent()) 12526 if c.ifNoneMatch_ != "" { 12527 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12528 } 12529 var body io.Reader = nil 12530 c.urlParams_.Set("alt", alt) 12531 c.urlParams_.Set("prettyPrint", "false") 12532 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidResponseErrors") 12533 urls += "?" + c.urlParams_.Encode() 12534 req, err := http.NewRequest("GET", urls, body) 12535 if err != nil { 12536 return nil, err 12537 } 12538 req.Header = reqHeaders 12539 googleapi.Expand(req.URL, map[string]string{ 12540 "filterSetName": c.filterSetName, 12541 }) 12542 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12543} 12544 12545// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.bidResponseErrors.list" call. 12546// Exactly one of *ListBidResponseErrorsResponse or error will be 12547// non-nil. Any non-2xx status code is an error. Response headers are in 12548// either *ListBidResponseErrorsResponse.ServerResponse.Header or (if a 12549// response was returned at all) in error.(*googleapi.Error).Header. Use 12550// googleapi.IsNotModified to check whether the returned error was 12551// because http.StatusNotModified was returned. 12552func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) Do(opts ...googleapi.CallOption) (*ListBidResponseErrorsResponse, error) { 12553 gensupport.SetOptions(c.urlParams_, opts...) 12554 res, err := c.doRequest("json") 12555 if res != nil && res.StatusCode == http.StatusNotModified { 12556 if res.Body != nil { 12557 res.Body.Close() 12558 } 12559 return nil, &googleapi.Error{ 12560 Code: res.StatusCode, 12561 Header: res.Header, 12562 } 12563 } 12564 if err != nil { 12565 return nil, err 12566 } 12567 defer googleapi.CloseBody(res) 12568 if err := googleapi.CheckResponse(res); err != nil { 12569 return nil, err 12570 } 12571 ret := &ListBidResponseErrorsResponse{ 12572 ServerResponse: googleapi.ServerResponse{ 12573 Header: res.Header, 12574 HTTPStatusCode: res.StatusCode, 12575 }, 12576 } 12577 target := &ret 12578 if err := gensupport.DecodeResponse(target, res); err != nil { 12579 return nil, err 12580 } 12581 return ret, nil 12582 // { 12583 // "description": "List all errors that occurred in bid responses, with the number of bid responses affected for each reason.", 12584 // "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/bidResponseErrors", 12585 // "httpMethod": "GET", 12586 // "id": "adexchangebuyer2.bidders.accounts.filterSets.bidResponseErrors.list", 12587 // "parameterOrder": [ 12588 // "filterSetName" 12589 // ], 12590 // "parameters": { 12591 // "filterSetName": { 12592 // "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 12593 // "location": "path", 12594 // "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$", 12595 // "required": true, 12596 // "type": "string" 12597 // }, 12598 // "pageSize": { 12599 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 12600 // "format": "int32", 12601 // "location": "query", 12602 // "type": "integer" 12603 // }, 12604 // "pageToken": { 12605 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListBidResponseErrorsResponse.nextPageToken returned from the previous call to the bidResponseErrors.list method.", 12606 // "location": "query", 12607 // "type": "string" 12608 // } 12609 // }, 12610 // "path": "v2beta1/{+filterSetName}/bidResponseErrors", 12611 // "response": { 12612 // "$ref": "ListBidResponseErrorsResponse" 12613 // }, 12614 // "scopes": [ 12615 // "https://www.googleapis.com/auth/adexchange.buyer" 12616 // ] 12617 // } 12618 12619} 12620 12621// Pages invokes f for each page of results. 12622// A non-nil error returned from f will halt the iteration. 12623// The provided context supersedes any context provided to the Context method. 12624func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) Pages(ctx context.Context, f func(*ListBidResponseErrorsResponse) error) error { 12625 c.ctx_ = ctx 12626 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 12627 for { 12628 x, err := c.Do() 12629 if err != nil { 12630 return err 12631 } 12632 if err := f(x); err != nil { 12633 return err 12634 } 12635 if x.NextPageToken == "" { 12636 return nil 12637 } 12638 c.PageToken(x.NextPageToken) 12639 } 12640} 12641 12642// method id "adexchangebuyer2.bidders.accounts.filterSets.bidResponsesWithoutBids.list": 12643 12644type BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall struct { 12645 s *Service 12646 filterSetName string 12647 urlParams_ gensupport.URLParams 12648 ifNoneMatch_ string 12649 ctx_ context.Context 12650 header_ http.Header 12651} 12652 12653// List: List all reasons for which bid responses were considered to 12654// have no applicable bids, with the number of bid responses affected 12655// for each reason. 12656// 12657// - filterSetName: Name of the filter set that should be applied to the 12658// requested metrics. For example: - For a bidder-level filter set for 12659// bidder 123: `bidders/123/filterSets/abc` - For an account-level 12660// filter set for the buyer account representing bidder 123: 12661// `bidders/123/accounts/123/filterSets/abc` - For an account-level 12662// filter set for the child seat buyer account 456 whose bidder is 12663// 123: `bidders/123/accounts/456/filterSets/abc`. 12664func (r *BiddersAccountsFilterSetsBidResponsesWithoutBidsService) List(filterSetName string) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall { 12665 c := &BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12666 c.filterSetName = filterSetName 12667 return c 12668} 12669 12670// PageSize sets the optional parameter "pageSize": Requested page size. 12671// The server may return fewer results than requested. If unspecified, 12672// the server will pick an appropriate default. 12673func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall { 12674 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12675 return c 12676} 12677 12678// PageToken sets the optional parameter "pageToken": A token 12679// identifying a page of results the server should return. Typically, 12680// this is the value of 12681// ListBidResponsesWithoutBidsResponse.nextPageToken returned from the 12682// previous call to the bidResponsesWithoutBids.list method. 12683func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall { 12684 c.urlParams_.Set("pageToken", pageToken) 12685 return c 12686} 12687 12688// Fields allows partial responses to be retrieved. See 12689// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12690// for more information. 12691func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall { 12692 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12693 return c 12694} 12695 12696// IfNoneMatch sets the optional parameter which makes the operation 12697// fail if the object's ETag matches the given value. This is useful for 12698// getting updates only after the object has changed since the last 12699// request. Use googleapi.IsNotModified to check whether the response 12700// error from Do is the result of In-None-Match. 12701func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall { 12702 c.ifNoneMatch_ = entityTag 12703 return c 12704} 12705 12706// Context sets the context to be used in this call's Do method. Any 12707// pending HTTP request will be aborted if the provided context is 12708// canceled. 12709func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall { 12710 c.ctx_ = ctx 12711 return c 12712} 12713 12714// Header returns an http.Header that can be modified by the caller to 12715// add HTTP headers to the request. 12716func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) Header() http.Header { 12717 if c.header_ == nil { 12718 c.header_ = make(http.Header) 12719 } 12720 return c.header_ 12721} 12722 12723func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) doRequest(alt string) (*http.Response, error) { 12724 reqHeaders := make(http.Header) 12725 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 12726 for k, v := range c.header_ { 12727 reqHeaders[k] = v 12728 } 12729 reqHeaders.Set("User-Agent", c.s.userAgent()) 12730 if c.ifNoneMatch_ != "" { 12731 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12732 } 12733 var body io.Reader = nil 12734 c.urlParams_.Set("alt", alt) 12735 c.urlParams_.Set("prettyPrint", "false") 12736 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidResponsesWithoutBids") 12737 urls += "?" + c.urlParams_.Encode() 12738 req, err := http.NewRequest("GET", urls, body) 12739 if err != nil { 12740 return nil, err 12741 } 12742 req.Header = reqHeaders 12743 googleapi.Expand(req.URL, map[string]string{ 12744 "filterSetName": c.filterSetName, 12745 }) 12746 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12747} 12748 12749// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.bidResponsesWithoutBids.list" call. 12750// Exactly one of *ListBidResponsesWithoutBidsResponse or error will be 12751// non-nil. Any non-2xx status code is an error. Response headers are in 12752// either *ListBidResponsesWithoutBidsResponse.ServerResponse.Header or 12753// (if a response was returned at all) in 12754// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12755// whether the returned error was because http.StatusNotModified was 12756// returned. 12757func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) Do(opts ...googleapi.CallOption) (*ListBidResponsesWithoutBidsResponse, error) { 12758 gensupport.SetOptions(c.urlParams_, opts...) 12759 res, err := c.doRequest("json") 12760 if res != nil && res.StatusCode == http.StatusNotModified { 12761 if res.Body != nil { 12762 res.Body.Close() 12763 } 12764 return nil, &googleapi.Error{ 12765 Code: res.StatusCode, 12766 Header: res.Header, 12767 } 12768 } 12769 if err != nil { 12770 return nil, err 12771 } 12772 defer googleapi.CloseBody(res) 12773 if err := googleapi.CheckResponse(res); err != nil { 12774 return nil, err 12775 } 12776 ret := &ListBidResponsesWithoutBidsResponse{ 12777 ServerResponse: googleapi.ServerResponse{ 12778 Header: res.Header, 12779 HTTPStatusCode: res.StatusCode, 12780 }, 12781 } 12782 target := &ret 12783 if err := gensupport.DecodeResponse(target, res); err != nil { 12784 return nil, err 12785 } 12786 return ret, nil 12787 // { 12788 // "description": "List all reasons for which bid responses were considered to have no applicable bids, with the number of bid responses affected for each reason.", 12789 // "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/bidResponsesWithoutBids", 12790 // "httpMethod": "GET", 12791 // "id": "adexchangebuyer2.bidders.accounts.filterSets.bidResponsesWithoutBids.list", 12792 // "parameterOrder": [ 12793 // "filterSetName" 12794 // ], 12795 // "parameters": { 12796 // "filterSetName": { 12797 // "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 12798 // "location": "path", 12799 // "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$", 12800 // "required": true, 12801 // "type": "string" 12802 // }, 12803 // "pageSize": { 12804 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 12805 // "format": "int32", 12806 // "location": "query", 12807 // "type": "integer" 12808 // }, 12809 // "pageToken": { 12810 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListBidResponsesWithoutBidsResponse.nextPageToken returned from the previous call to the bidResponsesWithoutBids.list method.", 12811 // "location": "query", 12812 // "type": "string" 12813 // } 12814 // }, 12815 // "path": "v2beta1/{+filterSetName}/bidResponsesWithoutBids", 12816 // "response": { 12817 // "$ref": "ListBidResponsesWithoutBidsResponse" 12818 // }, 12819 // "scopes": [ 12820 // "https://www.googleapis.com/auth/adexchange.buyer" 12821 // ] 12822 // } 12823 12824} 12825 12826// Pages invokes f for each page of results. 12827// A non-nil error returned from f will halt the iteration. 12828// The provided context supersedes any context provided to the Context method. 12829func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) Pages(ctx context.Context, f func(*ListBidResponsesWithoutBidsResponse) error) error { 12830 c.ctx_ = ctx 12831 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 12832 for { 12833 x, err := c.Do() 12834 if err != nil { 12835 return err 12836 } 12837 if err := f(x); err != nil { 12838 return err 12839 } 12840 if x.NextPageToken == "" { 12841 return nil 12842 } 12843 c.PageToken(x.NextPageToken) 12844 } 12845} 12846 12847// method id "adexchangebuyer2.bidders.accounts.filterSets.filteredBidRequests.list": 12848 12849type BiddersAccountsFilterSetsFilteredBidRequestsListCall struct { 12850 s *Service 12851 filterSetName string 12852 urlParams_ gensupport.URLParams 12853 ifNoneMatch_ string 12854 ctx_ context.Context 12855 header_ http.Header 12856} 12857 12858// List: List all reasons that caused a bid request not to be sent for 12859// an impression, with the number of bid requests not sent for each 12860// reason. 12861// 12862// - filterSetName: Name of the filter set that should be applied to the 12863// requested metrics. For example: - For a bidder-level filter set for 12864// bidder 123: `bidders/123/filterSets/abc` - For an account-level 12865// filter set for the buyer account representing bidder 123: 12866// `bidders/123/accounts/123/filterSets/abc` - For an account-level 12867// filter set for the child seat buyer account 456 whose bidder is 12868// 123: `bidders/123/accounts/456/filterSets/abc`. 12869func (r *BiddersAccountsFilterSetsFilteredBidRequestsService) List(filterSetName string) *BiddersAccountsFilterSetsFilteredBidRequestsListCall { 12870 c := &BiddersAccountsFilterSetsFilteredBidRequestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12871 c.filterSetName = filterSetName 12872 return c 12873} 12874 12875// PageSize sets the optional parameter "pageSize": Requested page size. 12876// The server may return fewer results than requested. If unspecified, 12877// the server will pick an appropriate default. 12878func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsFilteredBidRequestsListCall { 12879 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12880 return c 12881} 12882 12883// PageToken sets the optional parameter "pageToken": A token 12884// identifying a page of results the server should return. Typically, 12885// this is the value of ListFilteredBidRequestsResponse.nextPageToken 12886// returned from the previous call to the filteredBidRequests.list 12887// method. 12888func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsFilteredBidRequestsListCall { 12889 c.urlParams_.Set("pageToken", pageToken) 12890 return c 12891} 12892 12893// Fields allows partial responses to be retrieved. See 12894// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12895// for more information. 12896func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsFilteredBidRequestsListCall { 12897 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12898 return c 12899} 12900 12901// IfNoneMatch sets the optional parameter which makes the operation 12902// fail if the object's ETag matches the given value. This is useful for 12903// getting updates only after the object has changed since the last 12904// request. Use googleapi.IsNotModified to check whether the response 12905// error from Do is the result of In-None-Match. 12906func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsFilteredBidRequestsListCall { 12907 c.ifNoneMatch_ = entityTag 12908 return c 12909} 12910 12911// Context sets the context to be used in this call's Do method. Any 12912// pending HTTP request will be aborted if the provided context is 12913// canceled. 12914func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsFilteredBidRequestsListCall { 12915 c.ctx_ = ctx 12916 return c 12917} 12918 12919// Header returns an http.Header that can be modified by the caller to 12920// add HTTP headers to the request. 12921func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) Header() http.Header { 12922 if c.header_ == nil { 12923 c.header_ = make(http.Header) 12924 } 12925 return c.header_ 12926} 12927 12928func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) doRequest(alt string) (*http.Response, error) { 12929 reqHeaders := make(http.Header) 12930 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 12931 for k, v := range c.header_ { 12932 reqHeaders[k] = v 12933 } 12934 reqHeaders.Set("User-Agent", c.s.userAgent()) 12935 if c.ifNoneMatch_ != "" { 12936 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12937 } 12938 var body io.Reader = nil 12939 c.urlParams_.Set("alt", alt) 12940 c.urlParams_.Set("prettyPrint", "false") 12941 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBidRequests") 12942 urls += "?" + c.urlParams_.Encode() 12943 req, err := http.NewRequest("GET", urls, body) 12944 if err != nil { 12945 return nil, err 12946 } 12947 req.Header = reqHeaders 12948 googleapi.Expand(req.URL, map[string]string{ 12949 "filterSetName": c.filterSetName, 12950 }) 12951 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12952} 12953 12954// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.filteredBidRequests.list" call. 12955// Exactly one of *ListFilteredBidRequestsResponse or error will be 12956// non-nil. Any non-2xx status code is an error. Response headers are in 12957// either *ListFilteredBidRequestsResponse.ServerResponse.Header or (if 12958// a response was returned at all) in error.(*googleapi.Error).Header. 12959// Use googleapi.IsNotModified to check whether the returned error was 12960// because http.StatusNotModified was returned. 12961func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) Do(opts ...googleapi.CallOption) (*ListFilteredBidRequestsResponse, error) { 12962 gensupport.SetOptions(c.urlParams_, opts...) 12963 res, err := c.doRequest("json") 12964 if res != nil && res.StatusCode == http.StatusNotModified { 12965 if res.Body != nil { 12966 res.Body.Close() 12967 } 12968 return nil, &googleapi.Error{ 12969 Code: res.StatusCode, 12970 Header: res.Header, 12971 } 12972 } 12973 if err != nil { 12974 return nil, err 12975 } 12976 defer googleapi.CloseBody(res) 12977 if err := googleapi.CheckResponse(res); err != nil { 12978 return nil, err 12979 } 12980 ret := &ListFilteredBidRequestsResponse{ 12981 ServerResponse: googleapi.ServerResponse{ 12982 Header: res.Header, 12983 HTTPStatusCode: res.StatusCode, 12984 }, 12985 } 12986 target := &ret 12987 if err := gensupport.DecodeResponse(target, res); err != nil { 12988 return nil, err 12989 } 12990 return ret, nil 12991 // { 12992 // "description": "List all reasons that caused a bid request not to be sent for an impression, with the number of bid requests not sent for each reason.", 12993 // "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/filteredBidRequests", 12994 // "httpMethod": "GET", 12995 // "id": "adexchangebuyer2.bidders.accounts.filterSets.filteredBidRequests.list", 12996 // "parameterOrder": [ 12997 // "filterSetName" 12998 // ], 12999 // "parameters": { 13000 // "filterSetName": { 13001 // "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 13002 // "location": "path", 13003 // "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$", 13004 // "required": true, 13005 // "type": "string" 13006 // }, 13007 // "pageSize": { 13008 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 13009 // "format": "int32", 13010 // "location": "query", 13011 // "type": "integer" 13012 // }, 13013 // "pageToken": { 13014 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListFilteredBidRequestsResponse.nextPageToken returned from the previous call to the filteredBidRequests.list method.", 13015 // "location": "query", 13016 // "type": "string" 13017 // } 13018 // }, 13019 // "path": "v2beta1/{+filterSetName}/filteredBidRequests", 13020 // "response": { 13021 // "$ref": "ListFilteredBidRequestsResponse" 13022 // }, 13023 // "scopes": [ 13024 // "https://www.googleapis.com/auth/adexchange.buyer" 13025 // ] 13026 // } 13027 13028} 13029 13030// Pages invokes f for each page of results. 13031// A non-nil error returned from f will halt the iteration. 13032// The provided context supersedes any context provided to the Context method. 13033func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) Pages(ctx context.Context, f func(*ListFilteredBidRequestsResponse) error) error { 13034 c.ctx_ = ctx 13035 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13036 for { 13037 x, err := c.Do() 13038 if err != nil { 13039 return err 13040 } 13041 if err := f(x); err != nil { 13042 return err 13043 } 13044 if x.NextPageToken == "" { 13045 return nil 13046 } 13047 c.PageToken(x.NextPageToken) 13048 } 13049} 13050 13051// method id "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.list": 13052 13053type BiddersAccountsFilterSetsFilteredBidsListCall struct { 13054 s *Service 13055 filterSetName string 13056 urlParams_ gensupport.URLParams 13057 ifNoneMatch_ string 13058 ctx_ context.Context 13059 header_ http.Header 13060} 13061 13062// List: List all reasons for which bids were filtered, with the number 13063// of bids filtered for each reason. 13064// 13065// - filterSetName: Name of the filter set that should be applied to the 13066// requested metrics. For example: - For a bidder-level filter set for 13067// bidder 123: `bidders/123/filterSets/abc` - For an account-level 13068// filter set for the buyer account representing bidder 123: 13069// `bidders/123/accounts/123/filterSets/abc` - For an account-level 13070// filter set for the child seat buyer account 456 whose bidder is 13071// 123: `bidders/123/accounts/456/filterSets/abc`. 13072func (r *BiddersAccountsFilterSetsFilteredBidsService) List(filterSetName string) *BiddersAccountsFilterSetsFilteredBidsListCall { 13073 c := &BiddersAccountsFilterSetsFilteredBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13074 c.filterSetName = filterSetName 13075 return c 13076} 13077 13078// PageSize sets the optional parameter "pageSize": Requested page size. 13079// The server may return fewer results than requested. If unspecified, 13080// the server will pick an appropriate default. 13081func (c *BiddersAccountsFilterSetsFilteredBidsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsFilteredBidsListCall { 13082 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 13083 return c 13084} 13085 13086// PageToken sets the optional parameter "pageToken": A token 13087// identifying a page of results the server should return. Typically, 13088// this is the value of ListFilteredBidsResponse.nextPageToken returned 13089// from the previous call to the filteredBids.list method. 13090func (c *BiddersAccountsFilterSetsFilteredBidsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsFilteredBidsListCall { 13091 c.urlParams_.Set("pageToken", pageToken) 13092 return c 13093} 13094 13095// Fields allows partial responses to be retrieved. See 13096// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13097// for more information. 13098func (c *BiddersAccountsFilterSetsFilteredBidsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsFilteredBidsListCall { 13099 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13100 return c 13101} 13102 13103// IfNoneMatch sets the optional parameter which makes the operation 13104// fail if the object's ETag matches the given value. This is useful for 13105// getting updates only after the object has changed since the last 13106// request. Use googleapi.IsNotModified to check whether the response 13107// error from Do is the result of In-None-Match. 13108func (c *BiddersAccountsFilterSetsFilteredBidsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsFilteredBidsListCall { 13109 c.ifNoneMatch_ = entityTag 13110 return c 13111} 13112 13113// Context sets the context to be used in this call's Do method. Any 13114// pending HTTP request will be aborted if the provided context is 13115// canceled. 13116func (c *BiddersAccountsFilterSetsFilteredBidsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsFilteredBidsListCall { 13117 c.ctx_ = ctx 13118 return c 13119} 13120 13121// Header returns an http.Header that can be modified by the caller to 13122// add HTTP headers to the request. 13123func (c *BiddersAccountsFilterSetsFilteredBidsListCall) Header() http.Header { 13124 if c.header_ == nil { 13125 c.header_ = make(http.Header) 13126 } 13127 return c.header_ 13128} 13129 13130func (c *BiddersAccountsFilterSetsFilteredBidsListCall) doRequest(alt string) (*http.Response, error) { 13131 reqHeaders := make(http.Header) 13132 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 13133 for k, v := range c.header_ { 13134 reqHeaders[k] = v 13135 } 13136 reqHeaders.Set("User-Agent", c.s.userAgent()) 13137 if c.ifNoneMatch_ != "" { 13138 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13139 } 13140 var body io.Reader = nil 13141 c.urlParams_.Set("alt", alt) 13142 c.urlParams_.Set("prettyPrint", "false") 13143 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids") 13144 urls += "?" + c.urlParams_.Encode() 13145 req, err := http.NewRequest("GET", urls, body) 13146 if err != nil { 13147 return nil, err 13148 } 13149 req.Header = reqHeaders 13150 googleapi.Expand(req.URL, map[string]string{ 13151 "filterSetName": c.filterSetName, 13152 }) 13153 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13154} 13155 13156// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.list" call. 13157// Exactly one of *ListFilteredBidsResponse or error will be non-nil. 13158// Any non-2xx status code is an error. Response headers are in either 13159// *ListFilteredBidsResponse.ServerResponse.Header or (if a response was 13160// returned at all) in error.(*googleapi.Error).Header. Use 13161// googleapi.IsNotModified to check whether the returned error was 13162// because http.StatusNotModified was returned. 13163func (c *BiddersAccountsFilterSetsFilteredBidsListCall) Do(opts ...googleapi.CallOption) (*ListFilteredBidsResponse, error) { 13164 gensupport.SetOptions(c.urlParams_, opts...) 13165 res, err := c.doRequest("json") 13166 if res != nil && res.StatusCode == http.StatusNotModified { 13167 if res.Body != nil { 13168 res.Body.Close() 13169 } 13170 return nil, &googleapi.Error{ 13171 Code: res.StatusCode, 13172 Header: res.Header, 13173 } 13174 } 13175 if err != nil { 13176 return nil, err 13177 } 13178 defer googleapi.CloseBody(res) 13179 if err := googleapi.CheckResponse(res); err != nil { 13180 return nil, err 13181 } 13182 ret := &ListFilteredBidsResponse{ 13183 ServerResponse: googleapi.ServerResponse{ 13184 Header: res.Header, 13185 HTTPStatusCode: res.StatusCode, 13186 }, 13187 } 13188 target := &ret 13189 if err := gensupport.DecodeResponse(target, res); err != nil { 13190 return nil, err 13191 } 13192 return ret, nil 13193 // { 13194 // "description": "List all reasons for which bids were filtered, with the number of bids filtered for each reason.", 13195 // "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/filteredBids", 13196 // "httpMethod": "GET", 13197 // "id": "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.list", 13198 // "parameterOrder": [ 13199 // "filterSetName" 13200 // ], 13201 // "parameters": { 13202 // "filterSetName": { 13203 // "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 13204 // "location": "path", 13205 // "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$", 13206 // "required": true, 13207 // "type": "string" 13208 // }, 13209 // "pageSize": { 13210 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 13211 // "format": "int32", 13212 // "location": "query", 13213 // "type": "integer" 13214 // }, 13215 // "pageToken": { 13216 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListFilteredBidsResponse.nextPageToken returned from the previous call to the filteredBids.list method.", 13217 // "location": "query", 13218 // "type": "string" 13219 // } 13220 // }, 13221 // "path": "v2beta1/{+filterSetName}/filteredBids", 13222 // "response": { 13223 // "$ref": "ListFilteredBidsResponse" 13224 // }, 13225 // "scopes": [ 13226 // "https://www.googleapis.com/auth/adexchange.buyer" 13227 // ] 13228 // } 13229 13230} 13231 13232// Pages invokes f for each page of results. 13233// A non-nil error returned from f will halt the iteration. 13234// The provided context supersedes any context provided to the Context method. 13235func (c *BiddersAccountsFilterSetsFilteredBidsListCall) Pages(ctx context.Context, f func(*ListFilteredBidsResponse) error) error { 13236 c.ctx_ = ctx 13237 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13238 for { 13239 x, err := c.Do() 13240 if err != nil { 13241 return err 13242 } 13243 if err := f(x); err != nil { 13244 return err 13245 } 13246 if x.NextPageToken == "" { 13247 return nil 13248 } 13249 c.PageToken(x.NextPageToken) 13250 } 13251} 13252 13253// method id "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.creatives.list": 13254 13255type BiddersAccountsFilterSetsFilteredBidsCreativesListCall struct { 13256 s *Service 13257 filterSetName string 13258 creativeStatusId int64 13259 urlParams_ gensupport.URLParams 13260 ifNoneMatch_ string 13261 ctx_ context.Context 13262 header_ http.Header 13263} 13264 13265// List: List all creatives associated with a specific reason for which 13266// bids were filtered, with the number of bids filtered for each 13267// creative. 13268// 13269// - creativeStatusId: The ID of the creative status for which to 13270// retrieve a breakdown by creative. See creative-status-codes 13271// (https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). 13272// - filterSetName: Name of the filter set that should be applied to the 13273// requested metrics. For example: - For a bidder-level filter set for 13274// bidder 123: `bidders/123/filterSets/abc` - For an account-level 13275// filter set for the buyer account representing bidder 123: 13276// `bidders/123/accounts/123/filterSets/abc` - For an account-level 13277// filter set for the child seat buyer account 456 whose bidder is 13278// 123: `bidders/123/accounts/456/filterSets/abc`. 13279func (r *BiddersAccountsFilterSetsFilteredBidsCreativesService) List(filterSetName string, creativeStatusId int64) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall { 13280 c := &BiddersAccountsFilterSetsFilteredBidsCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13281 c.filterSetName = filterSetName 13282 c.creativeStatusId = creativeStatusId 13283 return c 13284} 13285 13286// PageSize sets the optional parameter "pageSize": Requested page size. 13287// The server may return fewer results than requested. If unspecified, 13288// the server will pick an appropriate default. 13289func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall { 13290 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 13291 return c 13292} 13293 13294// PageToken sets the optional parameter "pageToken": A token 13295// identifying a page of results the server should return. Typically, 13296// this is the value of 13297// ListCreativeStatusBreakdownByCreativeResponse.nextPageToken returned 13298// from the previous call to the filteredBids.creatives.list method. 13299func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall { 13300 c.urlParams_.Set("pageToken", pageToken) 13301 return c 13302} 13303 13304// Fields allows partial responses to be retrieved. See 13305// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13306// for more information. 13307func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall { 13308 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13309 return c 13310} 13311 13312// IfNoneMatch sets the optional parameter which makes the operation 13313// fail if the object's ETag matches the given value. This is useful for 13314// getting updates only after the object has changed since the last 13315// request. Use googleapi.IsNotModified to check whether the response 13316// error from Do is the result of In-None-Match. 13317func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall { 13318 c.ifNoneMatch_ = entityTag 13319 return c 13320} 13321 13322// Context sets the context to be used in this call's Do method. Any 13323// pending HTTP request will be aborted if the provided context is 13324// canceled. 13325func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall { 13326 c.ctx_ = ctx 13327 return c 13328} 13329 13330// Header returns an http.Header that can be modified by the caller to 13331// add HTTP headers to the request. 13332func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) Header() http.Header { 13333 if c.header_ == nil { 13334 c.header_ = make(http.Header) 13335 } 13336 return c.header_ 13337} 13338 13339func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) doRequest(alt string) (*http.Response, error) { 13340 reqHeaders := make(http.Header) 13341 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 13342 for k, v := range c.header_ { 13343 reqHeaders[k] = v 13344 } 13345 reqHeaders.Set("User-Agent", c.s.userAgent()) 13346 if c.ifNoneMatch_ != "" { 13347 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13348 } 13349 var body io.Reader = nil 13350 c.urlParams_.Set("alt", alt) 13351 c.urlParams_.Set("prettyPrint", "false") 13352 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/creatives") 13353 urls += "?" + c.urlParams_.Encode() 13354 req, err := http.NewRequest("GET", urls, body) 13355 if err != nil { 13356 return nil, err 13357 } 13358 req.Header = reqHeaders 13359 googleapi.Expand(req.URL, map[string]string{ 13360 "filterSetName": c.filterSetName, 13361 "creativeStatusId": strconv.FormatInt(c.creativeStatusId, 10), 13362 }) 13363 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13364} 13365 13366// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.creatives.list" call. 13367// Exactly one of *ListCreativeStatusBreakdownByCreativeResponse or 13368// error will be non-nil. Any non-2xx status code is an error. Response 13369// headers are in either 13370// *ListCreativeStatusBreakdownByCreativeResponse.ServerResponse.Header 13371// or (if a response was returned at all) in 13372// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13373// whether the returned error was because http.StatusNotModified was 13374// returned. 13375func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativeStatusBreakdownByCreativeResponse, error) { 13376 gensupport.SetOptions(c.urlParams_, opts...) 13377 res, err := c.doRequest("json") 13378 if res != nil && res.StatusCode == http.StatusNotModified { 13379 if res.Body != nil { 13380 res.Body.Close() 13381 } 13382 return nil, &googleapi.Error{ 13383 Code: res.StatusCode, 13384 Header: res.Header, 13385 } 13386 } 13387 if err != nil { 13388 return nil, err 13389 } 13390 defer googleapi.CloseBody(res) 13391 if err := googleapi.CheckResponse(res); err != nil { 13392 return nil, err 13393 } 13394 ret := &ListCreativeStatusBreakdownByCreativeResponse{ 13395 ServerResponse: googleapi.ServerResponse{ 13396 Header: res.Header, 13397 HTTPStatusCode: res.StatusCode, 13398 }, 13399 } 13400 target := &ret 13401 if err := gensupport.DecodeResponse(target, res); err != nil { 13402 return nil, err 13403 } 13404 return ret, nil 13405 // { 13406 // "description": "List all creatives associated with a specific reason for which bids were filtered, with the number of bids filtered for each creative.", 13407 // "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/filteredBids/{creativeStatusId}/creatives", 13408 // "httpMethod": "GET", 13409 // "id": "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.creatives.list", 13410 // "parameterOrder": [ 13411 // "filterSetName", 13412 // "creativeStatusId" 13413 // ], 13414 // "parameters": { 13415 // "creativeStatusId": { 13416 // "description": "The ID of the creative status for which to retrieve a breakdown by creative. See [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).", 13417 // "format": "int32", 13418 // "location": "path", 13419 // "required": true, 13420 // "type": "integer" 13421 // }, 13422 // "filterSetName": { 13423 // "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 13424 // "location": "path", 13425 // "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$", 13426 // "required": true, 13427 // "type": "string" 13428 // }, 13429 // "pageSize": { 13430 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 13431 // "format": "int32", 13432 // "location": "query", 13433 // "type": "integer" 13434 // }, 13435 // "pageToken": { 13436 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListCreativeStatusBreakdownByCreativeResponse.nextPageToken returned from the previous call to the filteredBids.creatives.list method.", 13437 // "location": "query", 13438 // "type": "string" 13439 // } 13440 // }, 13441 // "path": "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/creatives", 13442 // "response": { 13443 // "$ref": "ListCreativeStatusBreakdownByCreativeResponse" 13444 // }, 13445 // "scopes": [ 13446 // "https://www.googleapis.com/auth/adexchange.buyer" 13447 // ] 13448 // } 13449 13450} 13451 13452// Pages invokes f for each page of results. 13453// A non-nil error returned from f will halt the iteration. 13454// The provided context supersedes any context provided to the Context method. 13455func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) Pages(ctx context.Context, f func(*ListCreativeStatusBreakdownByCreativeResponse) error) error { 13456 c.ctx_ = ctx 13457 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13458 for { 13459 x, err := c.Do() 13460 if err != nil { 13461 return err 13462 } 13463 if err := f(x); err != nil { 13464 return err 13465 } 13466 if x.NextPageToken == "" { 13467 return nil 13468 } 13469 c.PageToken(x.NextPageToken) 13470 } 13471} 13472 13473// method id "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.details.list": 13474 13475type BiddersAccountsFilterSetsFilteredBidsDetailsListCall struct { 13476 s *Service 13477 filterSetName string 13478 creativeStatusId int64 13479 urlParams_ gensupport.URLParams 13480 ifNoneMatch_ string 13481 ctx_ context.Context 13482 header_ http.Header 13483} 13484 13485// List: List all details associated with a specific reason for which 13486// bids were filtered, with the number of bids filtered for each detail. 13487// 13488// - creativeStatusId: The ID of the creative status for which to 13489// retrieve a breakdown by detail. See creative-status-codes 13490// (https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). 13491// Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, 13492// and 87. 13493// - filterSetName: Name of the filter set that should be applied to the 13494// requested metrics. For example: - For a bidder-level filter set for 13495// bidder 123: `bidders/123/filterSets/abc` - For an account-level 13496// filter set for the buyer account representing bidder 123: 13497// `bidders/123/accounts/123/filterSets/abc` - For an account-level 13498// filter set for the child seat buyer account 456 whose bidder is 13499// 123: `bidders/123/accounts/456/filterSets/abc`. 13500func (r *BiddersAccountsFilterSetsFilteredBidsDetailsService) List(filterSetName string, creativeStatusId int64) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall { 13501 c := &BiddersAccountsFilterSetsFilteredBidsDetailsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13502 c.filterSetName = filterSetName 13503 c.creativeStatusId = creativeStatusId 13504 return c 13505} 13506 13507// PageSize sets the optional parameter "pageSize": Requested page size. 13508// The server may return fewer results than requested. If unspecified, 13509// the server will pick an appropriate default. 13510func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall { 13511 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 13512 return c 13513} 13514 13515// PageToken sets the optional parameter "pageToken": A token 13516// identifying a page of results the server should return. Typically, 13517// this is the value of 13518// ListCreativeStatusBreakdownByDetailResponse.nextPageToken returned 13519// from the previous call to the filteredBids.details.list method. 13520func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall { 13521 c.urlParams_.Set("pageToken", pageToken) 13522 return c 13523} 13524 13525// Fields allows partial responses to be retrieved. See 13526// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13527// for more information. 13528func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall { 13529 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13530 return c 13531} 13532 13533// IfNoneMatch sets the optional parameter which makes the operation 13534// fail if the object's ETag matches the given value. This is useful for 13535// getting updates only after the object has changed since the last 13536// request. Use googleapi.IsNotModified to check whether the response 13537// error from Do is the result of In-None-Match. 13538func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall { 13539 c.ifNoneMatch_ = entityTag 13540 return c 13541} 13542 13543// Context sets the context to be used in this call's Do method. Any 13544// pending HTTP request will be aborted if the provided context is 13545// canceled. 13546func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall { 13547 c.ctx_ = ctx 13548 return c 13549} 13550 13551// Header returns an http.Header that can be modified by the caller to 13552// add HTTP headers to the request. 13553func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) Header() http.Header { 13554 if c.header_ == nil { 13555 c.header_ = make(http.Header) 13556 } 13557 return c.header_ 13558} 13559 13560func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) doRequest(alt string) (*http.Response, error) { 13561 reqHeaders := make(http.Header) 13562 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 13563 for k, v := range c.header_ { 13564 reqHeaders[k] = v 13565 } 13566 reqHeaders.Set("User-Agent", c.s.userAgent()) 13567 if c.ifNoneMatch_ != "" { 13568 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13569 } 13570 var body io.Reader = nil 13571 c.urlParams_.Set("alt", alt) 13572 c.urlParams_.Set("prettyPrint", "false") 13573 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/details") 13574 urls += "?" + c.urlParams_.Encode() 13575 req, err := http.NewRequest("GET", urls, body) 13576 if err != nil { 13577 return nil, err 13578 } 13579 req.Header = reqHeaders 13580 googleapi.Expand(req.URL, map[string]string{ 13581 "filterSetName": c.filterSetName, 13582 "creativeStatusId": strconv.FormatInt(c.creativeStatusId, 10), 13583 }) 13584 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13585} 13586 13587// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.details.list" call. 13588// Exactly one of *ListCreativeStatusBreakdownByDetailResponse or error 13589// will be non-nil. Any non-2xx status code is an error. Response 13590// headers are in either 13591// *ListCreativeStatusBreakdownByDetailResponse.ServerResponse.Header or 13592// (if a response was returned at all) in 13593// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13594// whether the returned error was because http.StatusNotModified was 13595// returned. 13596func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) Do(opts ...googleapi.CallOption) (*ListCreativeStatusBreakdownByDetailResponse, error) { 13597 gensupport.SetOptions(c.urlParams_, opts...) 13598 res, err := c.doRequest("json") 13599 if res != nil && res.StatusCode == http.StatusNotModified { 13600 if res.Body != nil { 13601 res.Body.Close() 13602 } 13603 return nil, &googleapi.Error{ 13604 Code: res.StatusCode, 13605 Header: res.Header, 13606 } 13607 } 13608 if err != nil { 13609 return nil, err 13610 } 13611 defer googleapi.CloseBody(res) 13612 if err := googleapi.CheckResponse(res); err != nil { 13613 return nil, err 13614 } 13615 ret := &ListCreativeStatusBreakdownByDetailResponse{ 13616 ServerResponse: googleapi.ServerResponse{ 13617 Header: res.Header, 13618 HTTPStatusCode: res.StatusCode, 13619 }, 13620 } 13621 target := &ret 13622 if err := gensupport.DecodeResponse(target, res); err != nil { 13623 return nil, err 13624 } 13625 return ret, nil 13626 // { 13627 // "description": "List all details associated with a specific reason for which bids were filtered, with the number of bids filtered for each detail.", 13628 // "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/filteredBids/{creativeStatusId}/details", 13629 // "httpMethod": "GET", 13630 // "id": "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.details.list", 13631 // "parameterOrder": [ 13632 // "filterSetName", 13633 // "creativeStatusId" 13634 // ], 13635 // "parameters": { 13636 // "creativeStatusId": { 13637 // "description": "The ID of the creative status for which to retrieve a breakdown by detail. See [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, and 87.", 13638 // "format": "int32", 13639 // "location": "path", 13640 // "required": true, 13641 // "type": "integer" 13642 // }, 13643 // "filterSetName": { 13644 // "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 13645 // "location": "path", 13646 // "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$", 13647 // "required": true, 13648 // "type": "string" 13649 // }, 13650 // "pageSize": { 13651 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 13652 // "format": "int32", 13653 // "location": "query", 13654 // "type": "integer" 13655 // }, 13656 // "pageToken": { 13657 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListCreativeStatusBreakdownByDetailResponse.nextPageToken returned from the previous call to the filteredBids.details.list method.", 13658 // "location": "query", 13659 // "type": "string" 13660 // } 13661 // }, 13662 // "path": "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/details", 13663 // "response": { 13664 // "$ref": "ListCreativeStatusBreakdownByDetailResponse" 13665 // }, 13666 // "scopes": [ 13667 // "https://www.googleapis.com/auth/adexchange.buyer" 13668 // ] 13669 // } 13670 13671} 13672 13673// Pages invokes f for each page of results. 13674// A non-nil error returned from f will halt the iteration. 13675// The provided context supersedes any context provided to the Context method. 13676func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) Pages(ctx context.Context, f func(*ListCreativeStatusBreakdownByDetailResponse) error) error { 13677 c.ctx_ = ctx 13678 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13679 for { 13680 x, err := c.Do() 13681 if err != nil { 13682 return err 13683 } 13684 if err := f(x); err != nil { 13685 return err 13686 } 13687 if x.NextPageToken == "" { 13688 return nil 13689 } 13690 c.PageToken(x.NextPageToken) 13691 } 13692} 13693 13694// method id "adexchangebuyer2.bidders.accounts.filterSets.impressionMetrics.list": 13695 13696type BiddersAccountsFilterSetsImpressionMetricsListCall struct { 13697 s *Service 13698 filterSetName string 13699 urlParams_ gensupport.URLParams 13700 ifNoneMatch_ string 13701 ctx_ context.Context 13702 header_ http.Header 13703} 13704 13705// List: Lists all metrics that are measured in terms of number of 13706// impressions. 13707// 13708// - filterSetName: Name of the filter set that should be applied to the 13709// requested metrics. For example: - For a bidder-level filter set for 13710// bidder 123: `bidders/123/filterSets/abc` - For an account-level 13711// filter set for the buyer account representing bidder 123: 13712// `bidders/123/accounts/123/filterSets/abc` - For an account-level 13713// filter set for the child seat buyer account 456 whose bidder is 13714// 123: `bidders/123/accounts/456/filterSets/abc`. 13715func (r *BiddersAccountsFilterSetsImpressionMetricsService) List(filterSetName string) *BiddersAccountsFilterSetsImpressionMetricsListCall { 13716 c := &BiddersAccountsFilterSetsImpressionMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13717 c.filterSetName = filterSetName 13718 return c 13719} 13720 13721// PageSize sets the optional parameter "pageSize": Requested page size. 13722// The server may return fewer results than requested. If unspecified, 13723// the server will pick an appropriate default. 13724func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsImpressionMetricsListCall { 13725 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 13726 return c 13727} 13728 13729// PageToken sets the optional parameter "pageToken": A token 13730// identifying a page of results the server should return. Typically, 13731// this is the value of ListImpressionMetricsResponse.nextPageToken 13732// returned from the previous call to the impressionMetrics.list method. 13733func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsImpressionMetricsListCall { 13734 c.urlParams_.Set("pageToken", pageToken) 13735 return c 13736} 13737 13738// Fields allows partial responses to be retrieved. See 13739// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13740// for more information. 13741func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsImpressionMetricsListCall { 13742 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13743 return c 13744} 13745 13746// IfNoneMatch sets the optional parameter which makes the operation 13747// fail if the object's ETag matches the given value. This is useful for 13748// getting updates only after the object has changed since the last 13749// request. Use googleapi.IsNotModified to check whether the response 13750// error from Do is the result of In-None-Match. 13751func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsImpressionMetricsListCall { 13752 c.ifNoneMatch_ = entityTag 13753 return c 13754} 13755 13756// Context sets the context to be used in this call's Do method. Any 13757// pending HTTP request will be aborted if the provided context is 13758// canceled. 13759func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsImpressionMetricsListCall { 13760 c.ctx_ = ctx 13761 return c 13762} 13763 13764// Header returns an http.Header that can be modified by the caller to 13765// add HTTP headers to the request. 13766func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) Header() http.Header { 13767 if c.header_ == nil { 13768 c.header_ = make(http.Header) 13769 } 13770 return c.header_ 13771} 13772 13773func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) doRequest(alt string) (*http.Response, error) { 13774 reqHeaders := make(http.Header) 13775 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 13776 for k, v := range c.header_ { 13777 reqHeaders[k] = v 13778 } 13779 reqHeaders.Set("User-Agent", c.s.userAgent()) 13780 if c.ifNoneMatch_ != "" { 13781 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13782 } 13783 var body io.Reader = nil 13784 c.urlParams_.Set("alt", alt) 13785 c.urlParams_.Set("prettyPrint", "false") 13786 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/impressionMetrics") 13787 urls += "?" + c.urlParams_.Encode() 13788 req, err := http.NewRequest("GET", urls, body) 13789 if err != nil { 13790 return nil, err 13791 } 13792 req.Header = reqHeaders 13793 googleapi.Expand(req.URL, map[string]string{ 13794 "filterSetName": c.filterSetName, 13795 }) 13796 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13797} 13798 13799// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.impressionMetrics.list" call. 13800// Exactly one of *ListImpressionMetricsResponse or error will be 13801// non-nil. Any non-2xx status code is an error. Response headers are in 13802// either *ListImpressionMetricsResponse.ServerResponse.Header or (if a 13803// response was returned at all) in error.(*googleapi.Error).Header. Use 13804// googleapi.IsNotModified to check whether the returned error was 13805// because http.StatusNotModified was returned. 13806func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) Do(opts ...googleapi.CallOption) (*ListImpressionMetricsResponse, error) { 13807 gensupport.SetOptions(c.urlParams_, opts...) 13808 res, err := c.doRequest("json") 13809 if res != nil && res.StatusCode == http.StatusNotModified { 13810 if res.Body != nil { 13811 res.Body.Close() 13812 } 13813 return nil, &googleapi.Error{ 13814 Code: res.StatusCode, 13815 Header: res.Header, 13816 } 13817 } 13818 if err != nil { 13819 return nil, err 13820 } 13821 defer googleapi.CloseBody(res) 13822 if err := googleapi.CheckResponse(res); err != nil { 13823 return nil, err 13824 } 13825 ret := &ListImpressionMetricsResponse{ 13826 ServerResponse: googleapi.ServerResponse{ 13827 Header: res.Header, 13828 HTTPStatusCode: res.StatusCode, 13829 }, 13830 } 13831 target := &ret 13832 if err := gensupport.DecodeResponse(target, res); err != nil { 13833 return nil, err 13834 } 13835 return ret, nil 13836 // { 13837 // "description": "Lists all metrics that are measured in terms of number of impressions.", 13838 // "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/impressionMetrics", 13839 // "httpMethod": "GET", 13840 // "id": "adexchangebuyer2.bidders.accounts.filterSets.impressionMetrics.list", 13841 // "parameterOrder": [ 13842 // "filterSetName" 13843 // ], 13844 // "parameters": { 13845 // "filterSetName": { 13846 // "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 13847 // "location": "path", 13848 // "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$", 13849 // "required": true, 13850 // "type": "string" 13851 // }, 13852 // "pageSize": { 13853 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 13854 // "format": "int32", 13855 // "location": "query", 13856 // "type": "integer" 13857 // }, 13858 // "pageToken": { 13859 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListImpressionMetricsResponse.nextPageToken returned from the previous call to the impressionMetrics.list method.", 13860 // "location": "query", 13861 // "type": "string" 13862 // } 13863 // }, 13864 // "path": "v2beta1/{+filterSetName}/impressionMetrics", 13865 // "response": { 13866 // "$ref": "ListImpressionMetricsResponse" 13867 // }, 13868 // "scopes": [ 13869 // "https://www.googleapis.com/auth/adexchange.buyer" 13870 // ] 13871 // } 13872 13873} 13874 13875// Pages invokes f for each page of results. 13876// A non-nil error returned from f will halt the iteration. 13877// The provided context supersedes any context provided to the Context method. 13878func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) Pages(ctx context.Context, f func(*ListImpressionMetricsResponse) error) error { 13879 c.ctx_ = ctx 13880 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13881 for { 13882 x, err := c.Do() 13883 if err != nil { 13884 return err 13885 } 13886 if err := f(x); err != nil { 13887 return err 13888 } 13889 if x.NextPageToken == "" { 13890 return nil 13891 } 13892 c.PageToken(x.NextPageToken) 13893 } 13894} 13895 13896// method id "adexchangebuyer2.bidders.accounts.filterSets.losingBids.list": 13897 13898type BiddersAccountsFilterSetsLosingBidsListCall struct { 13899 s *Service 13900 filterSetName string 13901 urlParams_ gensupport.URLParams 13902 ifNoneMatch_ string 13903 ctx_ context.Context 13904 header_ http.Header 13905} 13906 13907// List: List all reasons for which bids lost in the auction, with the 13908// number of bids that lost for each reason. 13909// 13910// - filterSetName: Name of the filter set that should be applied to the 13911// requested metrics. For example: - For a bidder-level filter set for 13912// bidder 123: `bidders/123/filterSets/abc` - For an account-level 13913// filter set for the buyer account representing bidder 123: 13914// `bidders/123/accounts/123/filterSets/abc` - For an account-level 13915// filter set for the child seat buyer account 456 whose bidder is 13916// 123: `bidders/123/accounts/456/filterSets/abc`. 13917func (r *BiddersAccountsFilterSetsLosingBidsService) List(filterSetName string) *BiddersAccountsFilterSetsLosingBidsListCall { 13918 c := &BiddersAccountsFilterSetsLosingBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13919 c.filterSetName = filterSetName 13920 return c 13921} 13922 13923// PageSize sets the optional parameter "pageSize": Requested page size. 13924// The server may return fewer results than requested. If unspecified, 13925// the server will pick an appropriate default. 13926func (c *BiddersAccountsFilterSetsLosingBidsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsLosingBidsListCall { 13927 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 13928 return c 13929} 13930 13931// PageToken sets the optional parameter "pageToken": A token 13932// identifying a page of results the server should return. Typically, 13933// this is the value of ListLosingBidsResponse.nextPageToken returned 13934// from the previous call to the losingBids.list method. 13935func (c *BiddersAccountsFilterSetsLosingBidsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsLosingBidsListCall { 13936 c.urlParams_.Set("pageToken", pageToken) 13937 return c 13938} 13939 13940// Fields allows partial responses to be retrieved. See 13941// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13942// for more information. 13943func (c *BiddersAccountsFilterSetsLosingBidsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsLosingBidsListCall { 13944 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13945 return c 13946} 13947 13948// IfNoneMatch sets the optional parameter which makes the operation 13949// fail if the object's ETag matches the given value. This is useful for 13950// getting updates only after the object has changed since the last 13951// request. Use googleapi.IsNotModified to check whether the response 13952// error from Do is the result of In-None-Match. 13953func (c *BiddersAccountsFilterSetsLosingBidsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsLosingBidsListCall { 13954 c.ifNoneMatch_ = entityTag 13955 return c 13956} 13957 13958// Context sets the context to be used in this call's Do method. Any 13959// pending HTTP request will be aborted if the provided context is 13960// canceled. 13961func (c *BiddersAccountsFilterSetsLosingBidsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsLosingBidsListCall { 13962 c.ctx_ = ctx 13963 return c 13964} 13965 13966// Header returns an http.Header that can be modified by the caller to 13967// add HTTP headers to the request. 13968func (c *BiddersAccountsFilterSetsLosingBidsListCall) Header() http.Header { 13969 if c.header_ == nil { 13970 c.header_ = make(http.Header) 13971 } 13972 return c.header_ 13973} 13974 13975func (c *BiddersAccountsFilterSetsLosingBidsListCall) doRequest(alt string) (*http.Response, error) { 13976 reqHeaders := make(http.Header) 13977 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 13978 for k, v := range c.header_ { 13979 reqHeaders[k] = v 13980 } 13981 reqHeaders.Set("User-Agent", c.s.userAgent()) 13982 if c.ifNoneMatch_ != "" { 13983 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13984 } 13985 var body io.Reader = nil 13986 c.urlParams_.Set("alt", alt) 13987 c.urlParams_.Set("prettyPrint", "false") 13988 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/losingBids") 13989 urls += "?" + c.urlParams_.Encode() 13990 req, err := http.NewRequest("GET", urls, body) 13991 if err != nil { 13992 return nil, err 13993 } 13994 req.Header = reqHeaders 13995 googleapi.Expand(req.URL, map[string]string{ 13996 "filterSetName": c.filterSetName, 13997 }) 13998 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13999} 14000 14001// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.losingBids.list" call. 14002// Exactly one of *ListLosingBidsResponse or error will be non-nil. Any 14003// non-2xx status code is an error. Response headers are in either 14004// *ListLosingBidsResponse.ServerResponse.Header or (if a response was 14005// returned at all) in error.(*googleapi.Error).Header. Use 14006// googleapi.IsNotModified to check whether the returned error was 14007// because http.StatusNotModified was returned. 14008func (c *BiddersAccountsFilterSetsLosingBidsListCall) Do(opts ...googleapi.CallOption) (*ListLosingBidsResponse, error) { 14009 gensupport.SetOptions(c.urlParams_, opts...) 14010 res, err := c.doRequest("json") 14011 if res != nil && res.StatusCode == http.StatusNotModified { 14012 if res.Body != nil { 14013 res.Body.Close() 14014 } 14015 return nil, &googleapi.Error{ 14016 Code: res.StatusCode, 14017 Header: res.Header, 14018 } 14019 } 14020 if err != nil { 14021 return nil, err 14022 } 14023 defer googleapi.CloseBody(res) 14024 if err := googleapi.CheckResponse(res); err != nil { 14025 return nil, err 14026 } 14027 ret := &ListLosingBidsResponse{ 14028 ServerResponse: googleapi.ServerResponse{ 14029 Header: res.Header, 14030 HTTPStatusCode: res.StatusCode, 14031 }, 14032 } 14033 target := &ret 14034 if err := gensupport.DecodeResponse(target, res); err != nil { 14035 return nil, err 14036 } 14037 return ret, nil 14038 // { 14039 // "description": "List all reasons for which bids lost in the auction, with the number of bids that lost for each reason.", 14040 // "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/losingBids", 14041 // "httpMethod": "GET", 14042 // "id": "adexchangebuyer2.bidders.accounts.filterSets.losingBids.list", 14043 // "parameterOrder": [ 14044 // "filterSetName" 14045 // ], 14046 // "parameters": { 14047 // "filterSetName": { 14048 // "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 14049 // "location": "path", 14050 // "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$", 14051 // "required": true, 14052 // "type": "string" 14053 // }, 14054 // "pageSize": { 14055 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 14056 // "format": "int32", 14057 // "location": "query", 14058 // "type": "integer" 14059 // }, 14060 // "pageToken": { 14061 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListLosingBidsResponse.nextPageToken returned from the previous call to the losingBids.list method.", 14062 // "location": "query", 14063 // "type": "string" 14064 // } 14065 // }, 14066 // "path": "v2beta1/{+filterSetName}/losingBids", 14067 // "response": { 14068 // "$ref": "ListLosingBidsResponse" 14069 // }, 14070 // "scopes": [ 14071 // "https://www.googleapis.com/auth/adexchange.buyer" 14072 // ] 14073 // } 14074 14075} 14076 14077// Pages invokes f for each page of results. 14078// A non-nil error returned from f will halt the iteration. 14079// The provided context supersedes any context provided to the Context method. 14080func (c *BiddersAccountsFilterSetsLosingBidsListCall) Pages(ctx context.Context, f func(*ListLosingBidsResponse) error) error { 14081 c.ctx_ = ctx 14082 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 14083 for { 14084 x, err := c.Do() 14085 if err != nil { 14086 return err 14087 } 14088 if err := f(x); err != nil { 14089 return err 14090 } 14091 if x.NextPageToken == "" { 14092 return nil 14093 } 14094 c.PageToken(x.NextPageToken) 14095 } 14096} 14097 14098// method id "adexchangebuyer2.bidders.accounts.filterSets.nonBillableWinningBids.list": 14099 14100type BiddersAccountsFilterSetsNonBillableWinningBidsListCall struct { 14101 s *Service 14102 filterSetName string 14103 urlParams_ gensupport.URLParams 14104 ifNoneMatch_ string 14105 ctx_ context.Context 14106 header_ http.Header 14107} 14108 14109// List: List all reasons for which winning bids were not billable, with 14110// the number of bids not billed for each reason. 14111// 14112// - filterSetName: Name of the filter set that should be applied to the 14113// requested metrics. For example: - For a bidder-level filter set for 14114// bidder 123: `bidders/123/filterSets/abc` - For an account-level 14115// filter set for the buyer account representing bidder 123: 14116// `bidders/123/accounts/123/filterSets/abc` - For an account-level 14117// filter set for the child seat buyer account 456 whose bidder is 14118// 123: `bidders/123/accounts/456/filterSets/abc`. 14119func (r *BiddersAccountsFilterSetsNonBillableWinningBidsService) List(filterSetName string) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall { 14120 c := &BiddersAccountsFilterSetsNonBillableWinningBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14121 c.filterSetName = filterSetName 14122 return c 14123} 14124 14125// PageSize sets the optional parameter "pageSize": Requested page size. 14126// The server may return fewer results than requested. If unspecified, 14127// the server will pick an appropriate default. 14128func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall { 14129 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 14130 return c 14131} 14132 14133// PageToken sets the optional parameter "pageToken": A token 14134// identifying a page of results the server should return. Typically, 14135// this is the value of ListNonBillableWinningBidsResponse.nextPageToken 14136// returned from the previous call to the nonBillableWinningBids.list 14137// method. 14138func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall { 14139 c.urlParams_.Set("pageToken", pageToken) 14140 return c 14141} 14142 14143// Fields allows partial responses to be retrieved. See 14144// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14145// for more information. 14146func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall { 14147 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14148 return c 14149} 14150 14151// IfNoneMatch sets the optional parameter which makes the operation 14152// fail if the object's ETag matches the given value. This is useful for 14153// getting updates only after the object has changed since the last 14154// request. Use googleapi.IsNotModified to check whether the response 14155// error from Do is the result of In-None-Match. 14156func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall { 14157 c.ifNoneMatch_ = entityTag 14158 return c 14159} 14160 14161// Context sets the context to be used in this call's Do method. Any 14162// pending HTTP request will be aborted if the provided context is 14163// canceled. 14164func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall { 14165 c.ctx_ = ctx 14166 return c 14167} 14168 14169// Header returns an http.Header that can be modified by the caller to 14170// add HTTP headers to the request. 14171func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) Header() http.Header { 14172 if c.header_ == nil { 14173 c.header_ = make(http.Header) 14174 } 14175 return c.header_ 14176} 14177 14178func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) doRequest(alt string) (*http.Response, error) { 14179 reqHeaders := make(http.Header) 14180 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 14181 for k, v := range c.header_ { 14182 reqHeaders[k] = v 14183 } 14184 reqHeaders.Set("User-Agent", c.s.userAgent()) 14185 if c.ifNoneMatch_ != "" { 14186 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14187 } 14188 var body io.Reader = nil 14189 c.urlParams_.Set("alt", alt) 14190 c.urlParams_.Set("prettyPrint", "false") 14191 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/nonBillableWinningBids") 14192 urls += "?" + c.urlParams_.Encode() 14193 req, err := http.NewRequest("GET", urls, body) 14194 if err != nil { 14195 return nil, err 14196 } 14197 req.Header = reqHeaders 14198 googleapi.Expand(req.URL, map[string]string{ 14199 "filterSetName": c.filterSetName, 14200 }) 14201 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14202} 14203 14204// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.nonBillableWinningBids.list" call. 14205// Exactly one of *ListNonBillableWinningBidsResponse or error will be 14206// non-nil. Any non-2xx status code is an error. Response headers are in 14207// either *ListNonBillableWinningBidsResponse.ServerResponse.Header or 14208// (if a response was returned at all) in 14209// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14210// whether the returned error was because http.StatusNotModified was 14211// returned. 14212func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) Do(opts ...googleapi.CallOption) (*ListNonBillableWinningBidsResponse, error) { 14213 gensupport.SetOptions(c.urlParams_, opts...) 14214 res, err := c.doRequest("json") 14215 if res != nil && res.StatusCode == http.StatusNotModified { 14216 if res.Body != nil { 14217 res.Body.Close() 14218 } 14219 return nil, &googleapi.Error{ 14220 Code: res.StatusCode, 14221 Header: res.Header, 14222 } 14223 } 14224 if err != nil { 14225 return nil, err 14226 } 14227 defer googleapi.CloseBody(res) 14228 if err := googleapi.CheckResponse(res); err != nil { 14229 return nil, err 14230 } 14231 ret := &ListNonBillableWinningBidsResponse{ 14232 ServerResponse: googleapi.ServerResponse{ 14233 Header: res.Header, 14234 HTTPStatusCode: res.StatusCode, 14235 }, 14236 } 14237 target := &ret 14238 if err := gensupport.DecodeResponse(target, res); err != nil { 14239 return nil, err 14240 } 14241 return ret, nil 14242 // { 14243 // "description": "List all reasons for which winning bids were not billable, with the number of bids not billed for each reason.", 14244 // "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/nonBillableWinningBids", 14245 // "httpMethod": "GET", 14246 // "id": "adexchangebuyer2.bidders.accounts.filterSets.nonBillableWinningBids.list", 14247 // "parameterOrder": [ 14248 // "filterSetName" 14249 // ], 14250 // "parameters": { 14251 // "filterSetName": { 14252 // "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 14253 // "location": "path", 14254 // "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$", 14255 // "required": true, 14256 // "type": "string" 14257 // }, 14258 // "pageSize": { 14259 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 14260 // "format": "int32", 14261 // "location": "query", 14262 // "type": "integer" 14263 // }, 14264 // "pageToken": { 14265 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListNonBillableWinningBidsResponse.nextPageToken returned from the previous call to the nonBillableWinningBids.list method.", 14266 // "location": "query", 14267 // "type": "string" 14268 // } 14269 // }, 14270 // "path": "v2beta1/{+filterSetName}/nonBillableWinningBids", 14271 // "response": { 14272 // "$ref": "ListNonBillableWinningBidsResponse" 14273 // }, 14274 // "scopes": [ 14275 // "https://www.googleapis.com/auth/adexchange.buyer" 14276 // ] 14277 // } 14278 14279} 14280 14281// Pages invokes f for each page of results. 14282// A non-nil error returned from f will halt the iteration. 14283// The provided context supersedes any context provided to the Context method. 14284func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) Pages(ctx context.Context, f func(*ListNonBillableWinningBidsResponse) error) error { 14285 c.ctx_ = ctx 14286 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 14287 for { 14288 x, err := c.Do() 14289 if err != nil { 14290 return err 14291 } 14292 if err := f(x); err != nil { 14293 return err 14294 } 14295 if x.NextPageToken == "" { 14296 return nil 14297 } 14298 c.PageToken(x.NextPageToken) 14299 } 14300} 14301 14302// method id "adexchangebuyer2.bidders.filterSets.create": 14303 14304type BiddersFilterSetsCreateCall struct { 14305 s *Service 14306 ownerName string 14307 filterset *FilterSet 14308 urlParams_ gensupport.URLParams 14309 ctx_ context.Context 14310 header_ http.Header 14311} 14312 14313// Create: Creates the specified filter set for the account with the 14314// given account ID. 14315// 14316// - ownerName: Name of the owner (bidder or account) of the filter set 14317// to be created. For example: - For a bidder-level filter set for 14318// bidder 123: `bidders/123` - For an account-level filter set for the 14319// buyer account representing bidder 123: `bidders/123/accounts/123` - 14320// For an account-level filter set for the child seat buyer account 14321// 456 whose bidder is 123: `bidders/123/accounts/456`. 14322func (r *BiddersFilterSetsService) Create(ownerName string, filterset *FilterSet) *BiddersFilterSetsCreateCall { 14323 c := &BiddersFilterSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14324 c.ownerName = ownerName 14325 c.filterset = filterset 14326 return c 14327} 14328 14329// IsTransient sets the optional parameter "isTransient": Whether the 14330// filter set is transient, or should be persisted indefinitely. By 14331// default, filter sets are not transient. If transient, it will be 14332// available for at least 1 hour after creation. 14333func (c *BiddersFilterSetsCreateCall) IsTransient(isTransient bool) *BiddersFilterSetsCreateCall { 14334 c.urlParams_.Set("isTransient", fmt.Sprint(isTransient)) 14335 return c 14336} 14337 14338// Fields allows partial responses to be retrieved. See 14339// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14340// for more information. 14341func (c *BiddersFilterSetsCreateCall) Fields(s ...googleapi.Field) *BiddersFilterSetsCreateCall { 14342 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14343 return c 14344} 14345 14346// Context sets the context to be used in this call's Do method. Any 14347// pending HTTP request will be aborted if the provided context is 14348// canceled. 14349func (c *BiddersFilterSetsCreateCall) Context(ctx context.Context) *BiddersFilterSetsCreateCall { 14350 c.ctx_ = ctx 14351 return c 14352} 14353 14354// Header returns an http.Header that can be modified by the caller to 14355// add HTTP headers to the request. 14356func (c *BiddersFilterSetsCreateCall) Header() http.Header { 14357 if c.header_ == nil { 14358 c.header_ = make(http.Header) 14359 } 14360 return c.header_ 14361} 14362 14363func (c *BiddersFilterSetsCreateCall) doRequest(alt string) (*http.Response, error) { 14364 reqHeaders := make(http.Header) 14365 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 14366 for k, v := range c.header_ { 14367 reqHeaders[k] = v 14368 } 14369 reqHeaders.Set("User-Agent", c.s.userAgent()) 14370 var body io.Reader = nil 14371 body, err := googleapi.WithoutDataWrapper.JSONReader(c.filterset) 14372 if err != nil { 14373 return nil, err 14374 } 14375 reqHeaders.Set("Content-Type", "application/json") 14376 c.urlParams_.Set("alt", alt) 14377 c.urlParams_.Set("prettyPrint", "false") 14378 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+ownerName}/filterSets") 14379 urls += "?" + c.urlParams_.Encode() 14380 req, err := http.NewRequest("POST", urls, body) 14381 if err != nil { 14382 return nil, err 14383 } 14384 req.Header = reqHeaders 14385 googleapi.Expand(req.URL, map[string]string{ 14386 "ownerName": c.ownerName, 14387 }) 14388 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14389} 14390 14391// Do executes the "adexchangebuyer2.bidders.filterSets.create" call. 14392// Exactly one of *FilterSet or error will be non-nil. Any non-2xx 14393// status code is an error. Response headers are in either 14394// *FilterSet.ServerResponse.Header or (if a response was returned at 14395// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14396// to check whether the returned error was because 14397// http.StatusNotModified was returned. 14398func (c *BiddersFilterSetsCreateCall) Do(opts ...googleapi.CallOption) (*FilterSet, error) { 14399 gensupport.SetOptions(c.urlParams_, opts...) 14400 res, err := c.doRequest("json") 14401 if res != nil && res.StatusCode == http.StatusNotModified { 14402 if res.Body != nil { 14403 res.Body.Close() 14404 } 14405 return nil, &googleapi.Error{ 14406 Code: res.StatusCode, 14407 Header: res.Header, 14408 } 14409 } 14410 if err != nil { 14411 return nil, err 14412 } 14413 defer googleapi.CloseBody(res) 14414 if err := googleapi.CheckResponse(res); err != nil { 14415 return nil, err 14416 } 14417 ret := &FilterSet{ 14418 ServerResponse: googleapi.ServerResponse{ 14419 Header: res.Header, 14420 HTTPStatusCode: res.StatusCode, 14421 }, 14422 } 14423 target := &ret 14424 if err := gensupport.DecodeResponse(target, res); err != nil { 14425 return nil, err 14426 } 14427 return ret, nil 14428 // { 14429 // "description": "Creates the specified filter set for the account with the given account ID.", 14430 // "flatPath": "v2beta1/bidders/{biddersId}/filterSets", 14431 // "httpMethod": "POST", 14432 // "id": "adexchangebuyer2.bidders.filterSets.create", 14433 // "parameterOrder": [ 14434 // "ownerName" 14435 // ], 14436 // "parameters": { 14437 // "isTransient": { 14438 // "description": "Whether the filter set is transient, or should be persisted indefinitely. By default, filter sets are not transient. If transient, it will be available for at least 1 hour after creation.", 14439 // "location": "query", 14440 // "type": "boolean" 14441 // }, 14442 // "ownerName": { 14443 // "description": "Name of the owner (bidder or account) of the filter set to be created. For example: - For a bidder-level filter set for bidder 123: `bidders/123` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456`", 14444 // "location": "path", 14445 // "pattern": "^bidders/[^/]+$", 14446 // "required": true, 14447 // "type": "string" 14448 // } 14449 // }, 14450 // "path": "v2beta1/{+ownerName}/filterSets", 14451 // "request": { 14452 // "$ref": "FilterSet" 14453 // }, 14454 // "response": { 14455 // "$ref": "FilterSet" 14456 // }, 14457 // "scopes": [ 14458 // "https://www.googleapis.com/auth/adexchange.buyer" 14459 // ] 14460 // } 14461 14462} 14463 14464// method id "adexchangebuyer2.bidders.filterSets.delete": 14465 14466type BiddersFilterSetsDeleteCall struct { 14467 s *Service 14468 name string 14469 urlParams_ gensupport.URLParams 14470 ctx_ context.Context 14471 header_ http.Header 14472} 14473 14474// Delete: Deletes the requested filter set from the account with the 14475// given account ID. 14476// 14477// - name: Full name of the resource to delete. For example: - For a 14478// bidder-level filter set for bidder 123: 14479// `bidders/123/filterSets/abc` - For an account-level filter set for 14480// the buyer account representing bidder 123: 14481// `bidders/123/accounts/123/filterSets/abc` - For an account-level 14482// filter set for the child seat buyer account 456 whose bidder is 14483// 123: `bidders/123/accounts/456/filterSets/abc`. 14484func (r *BiddersFilterSetsService) Delete(name string) *BiddersFilterSetsDeleteCall { 14485 c := &BiddersFilterSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14486 c.name = name 14487 return c 14488} 14489 14490// Fields allows partial responses to be retrieved. See 14491// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14492// for more information. 14493func (c *BiddersFilterSetsDeleteCall) Fields(s ...googleapi.Field) *BiddersFilterSetsDeleteCall { 14494 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14495 return c 14496} 14497 14498// Context sets the context to be used in this call's Do method. Any 14499// pending HTTP request will be aborted if the provided context is 14500// canceled. 14501func (c *BiddersFilterSetsDeleteCall) Context(ctx context.Context) *BiddersFilterSetsDeleteCall { 14502 c.ctx_ = ctx 14503 return c 14504} 14505 14506// Header returns an http.Header that can be modified by the caller to 14507// add HTTP headers to the request. 14508func (c *BiddersFilterSetsDeleteCall) Header() http.Header { 14509 if c.header_ == nil { 14510 c.header_ = make(http.Header) 14511 } 14512 return c.header_ 14513} 14514 14515func (c *BiddersFilterSetsDeleteCall) doRequest(alt string) (*http.Response, error) { 14516 reqHeaders := make(http.Header) 14517 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 14518 for k, v := range c.header_ { 14519 reqHeaders[k] = v 14520 } 14521 reqHeaders.Set("User-Agent", c.s.userAgent()) 14522 var body io.Reader = nil 14523 c.urlParams_.Set("alt", alt) 14524 c.urlParams_.Set("prettyPrint", "false") 14525 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}") 14526 urls += "?" + c.urlParams_.Encode() 14527 req, err := http.NewRequest("DELETE", urls, body) 14528 if err != nil { 14529 return nil, err 14530 } 14531 req.Header = reqHeaders 14532 googleapi.Expand(req.URL, map[string]string{ 14533 "name": c.name, 14534 }) 14535 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14536} 14537 14538// Do executes the "adexchangebuyer2.bidders.filterSets.delete" call. 14539// Exactly one of *Empty or error will be non-nil. Any non-2xx status 14540// code is an error. Response headers are in either 14541// *Empty.ServerResponse.Header or (if a response was returned at all) 14542// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 14543// check whether the returned error was because http.StatusNotModified 14544// was returned. 14545func (c *BiddersFilterSetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 14546 gensupport.SetOptions(c.urlParams_, opts...) 14547 res, err := c.doRequest("json") 14548 if res != nil && res.StatusCode == http.StatusNotModified { 14549 if res.Body != nil { 14550 res.Body.Close() 14551 } 14552 return nil, &googleapi.Error{ 14553 Code: res.StatusCode, 14554 Header: res.Header, 14555 } 14556 } 14557 if err != nil { 14558 return nil, err 14559 } 14560 defer googleapi.CloseBody(res) 14561 if err := googleapi.CheckResponse(res); err != nil { 14562 return nil, err 14563 } 14564 ret := &Empty{ 14565 ServerResponse: googleapi.ServerResponse{ 14566 Header: res.Header, 14567 HTTPStatusCode: res.StatusCode, 14568 }, 14569 } 14570 target := &ret 14571 if err := gensupport.DecodeResponse(target, res); err != nil { 14572 return nil, err 14573 } 14574 return ret, nil 14575 // { 14576 // "description": "Deletes the requested filter set from the account with the given account ID.", 14577 // "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}", 14578 // "httpMethod": "DELETE", 14579 // "id": "adexchangebuyer2.bidders.filterSets.delete", 14580 // "parameterOrder": [ 14581 // "name" 14582 // ], 14583 // "parameters": { 14584 // "name": { 14585 // "description": "Full name of the resource to delete. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 14586 // "location": "path", 14587 // "pattern": "^bidders/[^/]+/filterSets/[^/]+$", 14588 // "required": true, 14589 // "type": "string" 14590 // } 14591 // }, 14592 // "path": "v2beta1/{+name}", 14593 // "response": { 14594 // "$ref": "Empty" 14595 // }, 14596 // "scopes": [ 14597 // "https://www.googleapis.com/auth/adexchange.buyer" 14598 // ] 14599 // } 14600 14601} 14602 14603// method id "adexchangebuyer2.bidders.filterSets.get": 14604 14605type BiddersFilterSetsGetCall struct { 14606 s *Service 14607 name string 14608 urlParams_ gensupport.URLParams 14609 ifNoneMatch_ string 14610 ctx_ context.Context 14611 header_ http.Header 14612} 14613 14614// Get: Retrieves the requested filter set for the account with the 14615// given account ID. 14616// 14617// - name: Full name of the resource being requested. For example: - For 14618// a bidder-level filter set for bidder 123: 14619// `bidders/123/filterSets/abc` - For an account-level filter set for 14620// the buyer account representing bidder 123: 14621// `bidders/123/accounts/123/filterSets/abc` - For an account-level 14622// filter set for the child seat buyer account 456 whose bidder is 14623// 123: `bidders/123/accounts/456/filterSets/abc`. 14624func (r *BiddersFilterSetsService) Get(name string) *BiddersFilterSetsGetCall { 14625 c := &BiddersFilterSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14626 c.name = name 14627 return c 14628} 14629 14630// Fields allows partial responses to be retrieved. See 14631// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14632// for more information. 14633func (c *BiddersFilterSetsGetCall) Fields(s ...googleapi.Field) *BiddersFilterSetsGetCall { 14634 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14635 return c 14636} 14637 14638// IfNoneMatch sets the optional parameter which makes the operation 14639// fail if the object's ETag matches the given value. This is useful for 14640// getting updates only after the object has changed since the last 14641// request. Use googleapi.IsNotModified to check whether the response 14642// error from Do is the result of In-None-Match. 14643func (c *BiddersFilterSetsGetCall) IfNoneMatch(entityTag string) *BiddersFilterSetsGetCall { 14644 c.ifNoneMatch_ = entityTag 14645 return c 14646} 14647 14648// Context sets the context to be used in this call's Do method. Any 14649// pending HTTP request will be aborted if the provided context is 14650// canceled. 14651func (c *BiddersFilterSetsGetCall) Context(ctx context.Context) *BiddersFilterSetsGetCall { 14652 c.ctx_ = ctx 14653 return c 14654} 14655 14656// Header returns an http.Header that can be modified by the caller to 14657// add HTTP headers to the request. 14658func (c *BiddersFilterSetsGetCall) Header() http.Header { 14659 if c.header_ == nil { 14660 c.header_ = make(http.Header) 14661 } 14662 return c.header_ 14663} 14664 14665func (c *BiddersFilterSetsGetCall) doRequest(alt string) (*http.Response, error) { 14666 reqHeaders := make(http.Header) 14667 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 14668 for k, v := range c.header_ { 14669 reqHeaders[k] = v 14670 } 14671 reqHeaders.Set("User-Agent", c.s.userAgent()) 14672 if c.ifNoneMatch_ != "" { 14673 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14674 } 14675 var body io.Reader = nil 14676 c.urlParams_.Set("alt", alt) 14677 c.urlParams_.Set("prettyPrint", "false") 14678 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}") 14679 urls += "?" + c.urlParams_.Encode() 14680 req, err := http.NewRequest("GET", urls, body) 14681 if err != nil { 14682 return nil, err 14683 } 14684 req.Header = reqHeaders 14685 googleapi.Expand(req.URL, map[string]string{ 14686 "name": c.name, 14687 }) 14688 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14689} 14690 14691// Do executes the "adexchangebuyer2.bidders.filterSets.get" call. 14692// Exactly one of *FilterSet or error will be non-nil. Any non-2xx 14693// status code is an error. Response headers are in either 14694// *FilterSet.ServerResponse.Header or (if a response was returned at 14695// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14696// to check whether the returned error was because 14697// http.StatusNotModified was returned. 14698func (c *BiddersFilterSetsGetCall) Do(opts ...googleapi.CallOption) (*FilterSet, error) { 14699 gensupport.SetOptions(c.urlParams_, opts...) 14700 res, err := c.doRequest("json") 14701 if res != nil && res.StatusCode == http.StatusNotModified { 14702 if res.Body != nil { 14703 res.Body.Close() 14704 } 14705 return nil, &googleapi.Error{ 14706 Code: res.StatusCode, 14707 Header: res.Header, 14708 } 14709 } 14710 if err != nil { 14711 return nil, err 14712 } 14713 defer googleapi.CloseBody(res) 14714 if err := googleapi.CheckResponse(res); err != nil { 14715 return nil, err 14716 } 14717 ret := &FilterSet{ 14718 ServerResponse: googleapi.ServerResponse{ 14719 Header: res.Header, 14720 HTTPStatusCode: res.StatusCode, 14721 }, 14722 } 14723 target := &ret 14724 if err := gensupport.DecodeResponse(target, res); err != nil { 14725 return nil, err 14726 } 14727 return ret, nil 14728 // { 14729 // "description": "Retrieves the requested filter set for the account with the given account ID.", 14730 // "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}", 14731 // "httpMethod": "GET", 14732 // "id": "adexchangebuyer2.bidders.filterSets.get", 14733 // "parameterOrder": [ 14734 // "name" 14735 // ], 14736 // "parameters": { 14737 // "name": { 14738 // "description": "Full name of the resource being requested. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 14739 // "location": "path", 14740 // "pattern": "^bidders/[^/]+/filterSets/[^/]+$", 14741 // "required": true, 14742 // "type": "string" 14743 // } 14744 // }, 14745 // "path": "v2beta1/{+name}", 14746 // "response": { 14747 // "$ref": "FilterSet" 14748 // }, 14749 // "scopes": [ 14750 // "https://www.googleapis.com/auth/adexchange.buyer" 14751 // ] 14752 // } 14753 14754} 14755 14756// method id "adexchangebuyer2.bidders.filterSets.list": 14757 14758type BiddersFilterSetsListCall struct { 14759 s *Service 14760 ownerName string 14761 urlParams_ gensupport.URLParams 14762 ifNoneMatch_ string 14763 ctx_ context.Context 14764 header_ http.Header 14765} 14766 14767// List: Lists all filter sets for the account with the given account 14768// ID. 14769// 14770// - ownerName: Name of the owner (bidder or account) of the filter sets 14771// to be listed. For example: - For a bidder-level filter set for 14772// bidder 123: `bidders/123` - For an account-level filter set for the 14773// buyer account representing bidder 123: `bidders/123/accounts/123` - 14774// For an account-level filter set for the child seat buyer account 14775// 456 whose bidder is 123: `bidders/123/accounts/456`. 14776func (r *BiddersFilterSetsService) List(ownerName string) *BiddersFilterSetsListCall { 14777 c := &BiddersFilterSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14778 c.ownerName = ownerName 14779 return c 14780} 14781 14782// PageSize sets the optional parameter "pageSize": Requested page size. 14783// The server may return fewer results than requested. If unspecified, 14784// the server will pick an appropriate default. 14785func (c *BiddersFilterSetsListCall) PageSize(pageSize int64) *BiddersFilterSetsListCall { 14786 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 14787 return c 14788} 14789 14790// PageToken sets the optional parameter "pageToken": A token 14791// identifying a page of results the server should return. Typically, 14792// this is the value of ListFilterSetsResponse.nextPageToken returned 14793// from the previous call to the accounts.filterSets.list method. 14794func (c *BiddersFilterSetsListCall) PageToken(pageToken string) *BiddersFilterSetsListCall { 14795 c.urlParams_.Set("pageToken", pageToken) 14796 return c 14797} 14798 14799// Fields allows partial responses to be retrieved. See 14800// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14801// for more information. 14802func (c *BiddersFilterSetsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsListCall { 14803 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14804 return c 14805} 14806 14807// IfNoneMatch sets the optional parameter which makes the operation 14808// fail if the object's ETag matches the given value. This is useful for 14809// getting updates only after the object has changed since the last 14810// request. Use googleapi.IsNotModified to check whether the response 14811// error from Do is the result of In-None-Match. 14812func (c *BiddersFilterSetsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsListCall { 14813 c.ifNoneMatch_ = entityTag 14814 return c 14815} 14816 14817// Context sets the context to be used in this call's Do method. Any 14818// pending HTTP request will be aborted if the provided context is 14819// canceled. 14820func (c *BiddersFilterSetsListCall) Context(ctx context.Context) *BiddersFilterSetsListCall { 14821 c.ctx_ = ctx 14822 return c 14823} 14824 14825// Header returns an http.Header that can be modified by the caller to 14826// add HTTP headers to the request. 14827func (c *BiddersFilterSetsListCall) Header() http.Header { 14828 if c.header_ == nil { 14829 c.header_ = make(http.Header) 14830 } 14831 return c.header_ 14832} 14833 14834func (c *BiddersFilterSetsListCall) doRequest(alt string) (*http.Response, error) { 14835 reqHeaders := make(http.Header) 14836 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 14837 for k, v := range c.header_ { 14838 reqHeaders[k] = v 14839 } 14840 reqHeaders.Set("User-Agent", c.s.userAgent()) 14841 if c.ifNoneMatch_ != "" { 14842 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14843 } 14844 var body io.Reader = nil 14845 c.urlParams_.Set("alt", alt) 14846 c.urlParams_.Set("prettyPrint", "false") 14847 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+ownerName}/filterSets") 14848 urls += "?" + c.urlParams_.Encode() 14849 req, err := http.NewRequest("GET", urls, body) 14850 if err != nil { 14851 return nil, err 14852 } 14853 req.Header = reqHeaders 14854 googleapi.Expand(req.URL, map[string]string{ 14855 "ownerName": c.ownerName, 14856 }) 14857 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14858} 14859 14860// Do executes the "adexchangebuyer2.bidders.filterSets.list" call. 14861// Exactly one of *ListFilterSetsResponse or error will be non-nil. Any 14862// non-2xx status code is an error. Response headers are in either 14863// *ListFilterSetsResponse.ServerResponse.Header or (if a response was 14864// returned at all) in error.(*googleapi.Error).Header. Use 14865// googleapi.IsNotModified to check whether the returned error was 14866// because http.StatusNotModified was returned. 14867func (c *BiddersFilterSetsListCall) Do(opts ...googleapi.CallOption) (*ListFilterSetsResponse, error) { 14868 gensupport.SetOptions(c.urlParams_, opts...) 14869 res, err := c.doRequest("json") 14870 if res != nil && res.StatusCode == http.StatusNotModified { 14871 if res.Body != nil { 14872 res.Body.Close() 14873 } 14874 return nil, &googleapi.Error{ 14875 Code: res.StatusCode, 14876 Header: res.Header, 14877 } 14878 } 14879 if err != nil { 14880 return nil, err 14881 } 14882 defer googleapi.CloseBody(res) 14883 if err := googleapi.CheckResponse(res); err != nil { 14884 return nil, err 14885 } 14886 ret := &ListFilterSetsResponse{ 14887 ServerResponse: googleapi.ServerResponse{ 14888 Header: res.Header, 14889 HTTPStatusCode: res.StatusCode, 14890 }, 14891 } 14892 target := &ret 14893 if err := gensupport.DecodeResponse(target, res); err != nil { 14894 return nil, err 14895 } 14896 return ret, nil 14897 // { 14898 // "description": "Lists all filter sets for the account with the given account ID.", 14899 // "flatPath": "v2beta1/bidders/{biddersId}/filterSets", 14900 // "httpMethod": "GET", 14901 // "id": "adexchangebuyer2.bidders.filterSets.list", 14902 // "parameterOrder": [ 14903 // "ownerName" 14904 // ], 14905 // "parameters": { 14906 // "ownerName": { 14907 // "description": "Name of the owner (bidder or account) of the filter sets to be listed. For example: - For a bidder-level filter set for bidder 123: `bidders/123` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456`", 14908 // "location": "path", 14909 // "pattern": "^bidders/[^/]+$", 14910 // "required": true, 14911 // "type": "string" 14912 // }, 14913 // "pageSize": { 14914 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 14915 // "format": "int32", 14916 // "location": "query", 14917 // "type": "integer" 14918 // }, 14919 // "pageToken": { 14920 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListFilterSetsResponse.nextPageToken returned from the previous call to the accounts.filterSets.list method.", 14921 // "location": "query", 14922 // "type": "string" 14923 // } 14924 // }, 14925 // "path": "v2beta1/{+ownerName}/filterSets", 14926 // "response": { 14927 // "$ref": "ListFilterSetsResponse" 14928 // }, 14929 // "scopes": [ 14930 // "https://www.googleapis.com/auth/adexchange.buyer" 14931 // ] 14932 // } 14933 14934} 14935 14936// Pages invokes f for each page of results. 14937// A non-nil error returned from f will halt the iteration. 14938// The provided context supersedes any context provided to the Context method. 14939func (c *BiddersFilterSetsListCall) Pages(ctx context.Context, f func(*ListFilterSetsResponse) error) error { 14940 c.ctx_ = ctx 14941 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 14942 for { 14943 x, err := c.Do() 14944 if err != nil { 14945 return err 14946 } 14947 if err := f(x); err != nil { 14948 return err 14949 } 14950 if x.NextPageToken == "" { 14951 return nil 14952 } 14953 c.PageToken(x.NextPageToken) 14954 } 14955} 14956 14957// method id "adexchangebuyer2.bidders.filterSets.bidMetrics.list": 14958 14959type BiddersFilterSetsBidMetricsListCall struct { 14960 s *Service 14961 filterSetName string 14962 urlParams_ gensupport.URLParams 14963 ifNoneMatch_ string 14964 ctx_ context.Context 14965 header_ http.Header 14966} 14967 14968// List: Lists all metrics that are measured in terms of number of bids. 14969// 14970// - filterSetName: Name of the filter set that should be applied to the 14971// requested metrics. For example: - For a bidder-level filter set for 14972// bidder 123: `bidders/123/filterSets/abc` - For an account-level 14973// filter set for the buyer account representing bidder 123: 14974// `bidders/123/accounts/123/filterSets/abc` - For an account-level 14975// filter set for the child seat buyer account 456 whose bidder is 14976// 123: `bidders/123/accounts/456/filterSets/abc`. 14977func (r *BiddersFilterSetsBidMetricsService) List(filterSetName string) *BiddersFilterSetsBidMetricsListCall { 14978 c := &BiddersFilterSetsBidMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14979 c.filterSetName = filterSetName 14980 return c 14981} 14982 14983// PageSize sets the optional parameter "pageSize": Requested page size. 14984// The server may return fewer results than requested. If unspecified, 14985// the server will pick an appropriate default. 14986func (c *BiddersFilterSetsBidMetricsListCall) PageSize(pageSize int64) *BiddersFilterSetsBidMetricsListCall { 14987 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 14988 return c 14989} 14990 14991// PageToken sets the optional parameter "pageToken": A token 14992// identifying a page of results the server should return. Typically, 14993// this is the value of ListBidMetricsResponse.nextPageToken returned 14994// from the previous call to the bidMetrics.list method. 14995func (c *BiddersFilterSetsBidMetricsListCall) PageToken(pageToken string) *BiddersFilterSetsBidMetricsListCall { 14996 c.urlParams_.Set("pageToken", pageToken) 14997 return c 14998} 14999 15000// Fields allows partial responses to be retrieved. See 15001// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15002// for more information. 15003func (c *BiddersFilterSetsBidMetricsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsBidMetricsListCall { 15004 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15005 return c 15006} 15007 15008// IfNoneMatch sets the optional parameter which makes the operation 15009// fail if the object's ETag matches the given value. This is useful for 15010// getting updates only after the object has changed since the last 15011// request. Use googleapi.IsNotModified to check whether the response 15012// error from Do is the result of In-None-Match. 15013func (c *BiddersFilterSetsBidMetricsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsBidMetricsListCall { 15014 c.ifNoneMatch_ = entityTag 15015 return c 15016} 15017 15018// Context sets the context to be used in this call's Do method. Any 15019// pending HTTP request will be aborted if the provided context is 15020// canceled. 15021func (c *BiddersFilterSetsBidMetricsListCall) Context(ctx context.Context) *BiddersFilterSetsBidMetricsListCall { 15022 c.ctx_ = ctx 15023 return c 15024} 15025 15026// Header returns an http.Header that can be modified by the caller to 15027// add HTTP headers to the request. 15028func (c *BiddersFilterSetsBidMetricsListCall) Header() http.Header { 15029 if c.header_ == nil { 15030 c.header_ = make(http.Header) 15031 } 15032 return c.header_ 15033} 15034 15035func (c *BiddersFilterSetsBidMetricsListCall) doRequest(alt string) (*http.Response, error) { 15036 reqHeaders := make(http.Header) 15037 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 15038 for k, v := range c.header_ { 15039 reqHeaders[k] = v 15040 } 15041 reqHeaders.Set("User-Agent", c.s.userAgent()) 15042 if c.ifNoneMatch_ != "" { 15043 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15044 } 15045 var body io.Reader = nil 15046 c.urlParams_.Set("alt", alt) 15047 c.urlParams_.Set("prettyPrint", "false") 15048 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidMetrics") 15049 urls += "?" + c.urlParams_.Encode() 15050 req, err := http.NewRequest("GET", urls, body) 15051 if err != nil { 15052 return nil, err 15053 } 15054 req.Header = reqHeaders 15055 googleapi.Expand(req.URL, map[string]string{ 15056 "filterSetName": c.filterSetName, 15057 }) 15058 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15059} 15060 15061// Do executes the "adexchangebuyer2.bidders.filterSets.bidMetrics.list" call. 15062// Exactly one of *ListBidMetricsResponse or error will be non-nil. Any 15063// non-2xx status code is an error. Response headers are in either 15064// *ListBidMetricsResponse.ServerResponse.Header or (if a response was 15065// returned at all) in error.(*googleapi.Error).Header. Use 15066// googleapi.IsNotModified to check whether the returned error was 15067// because http.StatusNotModified was returned. 15068func (c *BiddersFilterSetsBidMetricsListCall) Do(opts ...googleapi.CallOption) (*ListBidMetricsResponse, error) { 15069 gensupport.SetOptions(c.urlParams_, opts...) 15070 res, err := c.doRequest("json") 15071 if res != nil && res.StatusCode == http.StatusNotModified { 15072 if res.Body != nil { 15073 res.Body.Close() 15074 } 15075 return nil, &googleapi.Error{ 15076 Code: res.StatusCode, 15077 Header: res.Header, 15078 } 15079 } 15080 if err != nil { 15081 return nil, err 15082 } 15083 defer googleapi.CloseBody(res) 15084 if err := googleapi.CheckResponse(res); err != nil { 15085 return nil, err 15086 } 15087 ret := &ListBidMetricsResponse{ 15088 ServerResponse: googleapi.ServerResponse{ 15089 Header: res.Header, 15090 HTTPStatusCode: res.StatusCode, 15091 }, 15092 } 15093 target := &ret 15094 if err := gensupport.DecodeResponse(target, res); err != nil { 15095 return nil, err 15096 } 15097 return ret, nil 15098 // { 15099 // "description": "Lists all metrics that are measured in terms of number of bids.", 15100 // "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/bidMetrics", 15101 // "httpMethod": "GET", 15102 // "id": "adexchangebuyer2.bidders.filterSets.bidMetrics.list", 15103 // "parameterOrder": [ 15104 // "filterSetName" 15105 // ], 15106 // "parameters": { 15107 // "filterSetName": { 15108 // "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 15109 // "location": "path", 15110 // "pattern": "^bidders/[^/]+/filterSets/[^/]+$", 15111 // "required": true, 15112 // "type": "string" 15113 // }, 15114 // "pageSize": { 15115 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 15116 // "format": "int32", 15117 // "location": "query", 15118 // "type": "integer" 15119 // }, 15120 // "pageToken": { 15121 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListBidMetricsResponse.nextPageToken returned from the previous call to the bidMetrics.list method.", 15122 // "location": "query", 15123 // "type": "string" 15124 // } 15125 // }, 15126 // "path": "v2beta1/{+filterSetName}/bidMetrics", 15127 // "response": { 15128 // "$ref": "ListBidMetricsResponse" 15129 // }, 15130 // "scopes": [ 15131 // "https://www.googleapis.com/auth/adexchange.buyer" 15132 // ] 15133 // } 15134 15135} 15136 15137// Pages invokes f for each page of results. 15138// A non-nil error returned from f will halt the iteration. 15139// The provided context supersedes any context provided to the Context method. 15140func (c *BiddersFilterSetsBidMetricsListCall) Pages(ctx context.Context, f func(*ListBidMetricsResponse) error) error { 15141 c.ctx_ = ctx 15142 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 15143 for { 15144 x, err := c.Do() 15145 if err != nil { 15146 return err 15147 } 15148 if err := f(x); err != nil { 15149 return err 15150 } 15151 if x.NextPageToken == "" { 15152 return nil 15153 } 15154 c.PageToken(x.NextPageToken) 15155 } 15156} 15157 15158// method id "adexchangebuyer2.bidders.filterSets.bidResponseErrors.list": 15159 15160type BiddersFilterSetsBidResponseErrorsListCall struct { 15161 s *Service 15162 filterSetName string 15163 urlParams_ gensupport.URLParams 15164 ifNoneMatch_ string 15165 ctx_ context.Context 15166 header_ http.Header 15167} 15168 15169// List: List all errors that occurred in bid responses, with the number 15170// of bid responses affected for each reason. 15171// 15172// - filterSetName: Name of the filter set that should be applied to the 15173// requested metrics. For example: - For a bidder-level filter set for 15174// bidder 123: `bidders/123/filterSets/abc` - For an account-level 15175// filter set for the buyer account representing bidder 123: 15176// `bidders/123/accounts/123/filterSets/abc` - For an account-level 15177// filter set for the child seat buyer account 456 whose bidder is 15178// 123: `bidders/123/accounts/456/filterSets/abc`. 15179func (r *BiddersFilterSetsBidResponseErrorsService) List(filterSetName string) *BiddersFilterSetsBidResponseErrorsListCall { 15180 c := &BiddersFilterSetsBidResponseErrorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15181 c.filterSetName = filterSetName 15182 return c 15183} 15184 15185// PageSize sets the optional parameter "pageSize": Requested page size. 15186// The server may return fewer results than requested. If unspecified, 15187// the server will pick an appropriate default. 15188func (c *BiddersFilterSetsBidResponseErrorsListCall) PageSize(pageSize int64) *BiddersFilterSetsBidResponseErrorsListCall { 15189 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 15190 return c 15191} 15192 15193// PageToken sets the optional parameter "pageToken": A token 15194// identifying a page of results the server should return. Typically, 15195// this is the value of ListBidResponseErrorsResponse.nextPageToken 15196// returned from the previous call to the bidResponseErrors.list method. 15197func (c *BiddersFilterSetsBidResponseErrorsListCall) PageToken(pageToken string) *BiddersFilterSetsBidResponseErrorsListCall { 15198 c.urlParams_.Set("pageToken", pageToken) 15199 return c 15200} 15201 15202// Fields allows partial responses to be retrieved. See 15203// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15204// for more information. 15205func (c *BiddersFilterSetsBidResponseErrorsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsBidResponseErrorsListCall { 15206 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15207 return c 15208} 15209 15210// IfNoneMatch sets the optional parameter which makes the operation 15211// fail if the object's ETag matches the given value. This is useful for 15212// getting updates only after the object has changed since the last 15213// request. Use googleapi.IsNotModified to check whether the response 15214// error from Do is the result of In-None-Match. 15215func (c *BiddersFilterSetsBidResponseErrorsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsBidResponseErrorsListCall { 15216 c.ifNoneMatch_ = entityTag 15217 return c 15218} 15219 15220// Context sets the context to be used in this call's Do method. Any 15221// pending HTTP request will be aborted if the provided context is 15222// canceled. 15223func (c *BiddersFilterSetsBidResponseErrorsListCall) Context(ctx context.Context) *BiddersFilterSetsBidResponseErrorsListCall { 15224 c.ctx_ = ctx 15225 return c 15226} 15227 15228// Header returns an http.Header that can be modified by the caller to 15229// add HTTP headers to the request. 15230func (c *BiddersFilterSetsBidResponseErrorsListCall) Header() http.Header { 15231 if c.header_ == nil { 15232 c.header_ = make(http.Header) 15233 } 15234 return c.header_ 15235} 15236 15237func (c *BiddersFilterSetsBidResponseErrorsListCall) doRequest(alt string) (*http.Response, error) { 15238 reqHeaders := make(http.Header) 15239 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 15240 for k, v := range c.header_ { 15241 reqHeaders[k] = v 15242 } 15243 reqHeaders.Set("User-Agent", c.s.userAgent()) 15244 if c.ifNoneMatch_ != "" { 15245 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15246 } 15247 var body io.Reader = nil 15248 c.urlParams_.Set("alt", alt) 15249 c.urlParams_.Set("prettyPrint", "false") 15250 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidResponseErrors") 15251 urls += "?" + c.urlParams_.Encode() 15252 req, err := http.NewRequest("GET", urls, body) 15253 if err != nil { 15254 return nil, err 15255 } 15256 req.Header = reqHeaders 15257 googleapi.Expand(req.URL, map[string]string{ 15258 "filterSetName": c.filterSetName, 15259 }) 15260 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15261} 15262 15263// Do executes the "adexchangebuyer2.bidders.filterSets.bidResponseErrors.list" call. 15264// Exactly one of *ListBidResponseErrorsResponse or error will be 15265// non-nil. Any non-2xx status code is an error. Response headers are in 15266// either *ListBidResponseErrorsResponse.ServerResponse.Header or (if a 15267// response was returned at all) in error.(*googleapi.Error).Header. Use 15268// googleapi.IsNotModified to check whether the returned error was 15269// because http.StatusNotModified was returned. 15270func (c *BiddersFilterSetsBidResponseErrorsListCall) Do(opts ...googleapi.CallOption) (*ListBidResponseErrorsResponse, error) { 15271 gensupport.SetOptions(c.urlParams_, opts...) 15272 res, err := c.doRequest("json") 15273 if res != nil && res.StatusCode == http.StatusNotModified { 15274 if res.Body != nil { 15275 res.Body.Close() 15276 } 15277 return nil, &googleapi.Error{ 15278 Code: res.StatusCode, 15279 Header: res.Header, 15280 } 15281 } 15282 if err != nil { 15283 return nil, err 15284 } 15285 defer googleapi.CloseBody(res) 15286 if err := googleapi.CheckResponse(res); err != nil { 15287 return nil, err 15288 } 15289 ret := &ListBidResponseErrorsResponse{ 15290 ServerResponse: googleapi.ServerResponse{ 15291 Header: res.Header, 15292 HTTPStatusCode: res.StatusCode, 15293 }, 15294 } 15295 target := &ret 15296 if err := gensupport.DecodeResponse(target, res); err != nil { 15297 return nil, err 15298 } 15299 return ret, nil 15300 // { 15301 // "description": "List all errors that occurred in bid responses, with the number of bid responses affected for each reason.", 15302 // "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/bidResponseErrors", 15303 // "httpMethod": "GET", 15304 // "id": "adexchangebuyer2.bidders.filterSets.bidResponseErrors.list", 15305 // "parameterOrder": [ 15306 // "filterSetName" 15307 // ], 15308 // "parameters": { 15309 // "filterSetName": { 15310 // "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 15311 // "location": "path", 15312 // "pattern": "^bidders/[^/]+/filterSets/[^/]+$", 15313 // "required": true, 15314 // "type": "string" 15315 // }, 15316 // "pageSize": { 15317 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 15318 // "format": "int32", 15319 // "location": "query", 15320 // "type": "integer" 15321 // }, 15322 // "pageToken": { 15323 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListBidResponseErrorsResponse.nextPageToken returned from the previous call to the bidResponseErrors.list method.", 15324 // "location": "query", 15325 // "type": "string" 15326 // } 15327 // }, 15328 // "path": "v2beta1/{+filterSetName}/bidResponseErrors", 15329 // "response": { 15330 // "$ref": "ListBidResponseErrorsResponse" 15331 // }, 15332 // "scopes": [ 15333 // "https://www.googleapis.com/auth/adexchange.buyer" 15334 // ] 15335 // } 15336 15337} 15338 15339// Pages invokes f for each page of results. 15340// A non-nil error returned from f will halt the iteration. 15341// The provided context supersedes any context provided to the Context method. 15342func (c *BiddersFilterSetsBidResponseErrorsListCall) Pages(ctx context.Context, f func(*ListBidResponseErrorsResponse) error) error { 15343 c.ctx_ = ctx 15344 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 15345 for { 15346 x, err := c.Do() 15347 if err != nil { 15348 return err 15349 } 15350 if err := f(x); err != nil { 15351 return err 15352 } 15353 if x.NextPageToken == "" { 15354 return nil 15355 } 15356 c.PageToken(x.NextPageToken) 15357 } 15358} 15359 15360// method id "adexchangebuyer2.bidders.filterSets.bidResponsesWithoutBids.list": 15361 15362type BiddersFilterSetsBidResponsesWithoutBidsListCall struct { 15363 s *Service 15364 filterSetName string 15365 urlParams_ gensupport.URLParams 15366 ifNoneMatch_ string 15367 ctx_ context.Context 15368 header_ http.Header 15369} 15370 15371// List: List all reasons for which bid responses were considered to 15372// have no applicable bids, with the number of bid responses affected 15373// for each reason. 15374// 15375// - filterSetName: Name of the filter set that should be applied to the 15376// requested metrics. For example: - For a bidder-level filter set for 15377// bidder 123: `bidders/123/filterSets/abc` - For an account-level 15378// filter set for the buyer account representing bidder 123: 15379// `bidders/123/accounts/123/filterSets/abc` - For an account-level 15380// filter set for the child seat buyer account 456 whose bidder is 15381// 123: `bidders/123/accounts/456/filterSets/abc`. 15382func (r *BiddersFilterSetsBidResponsesWithoutBidsService) List(filterSetName string) *BiddersFilterSetsBidResponsesWithoutBidsListCall { 15383 c := &BiddersFilterSetsBidResponsesWithoutBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15384 c.filterSetName = filterSetName 15385 return c 15386} 15387 15388// PageSize sets the optional parameter "pageSize": Requested page size. 15389// The server may return fewer results than requested. If unspecified, 15390// the server will pick an appropriate default. 15391func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) PageSize(pageSize int64) *BiddersFilterSetsBidResponsesWithoutBidsListCall { 15392 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 15393 return c 15394} 15395 15396// PageToken sets the optional parameter "pageToken": A token 15397// identifying a page of results the server should return. Typically, 15398// this is the value of 15399// ListBidResponsesWithoutBidsResponse.nextPageToken returned from the 15400// previous call to the bidResponsesWithoutBids.list method. 15401func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) PageToken(pageToken string) *BiddersFilterSetsBidResponsesWithoutBidsListCall { 15402 c.urlParams_.Set("pageToken", pageToken) 15403 return c 15404} 15405 15406// Fields allows partial responses to be retrieved. See 15407// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15408// for more information. 15409func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsBidResponsesWithoutBidsListCall { 15410 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15411 return c 15412} 15413 15414// IfNoneMatch sets the optional parameter which makes the operation 15415// fail if the object's ETag matches the given value. This is useful for 15416// getting updates only after the object has changed since the last 15417// request. Use googleapi.IsNotModified to check whether the response 15418// error from Do is the result of In-None-Match. 15419func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsBidResponsesWithoutBidsListCall { 15420 c.ifNoneMatch_ = entityTag 15421 return c 15422} 15423 15424// Context sets the context to be used in this call's Do method. Any 15425// pending HTTP request will be aborted if the provided context is 15426// canceled. 15427func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) Context(ctx context.Context) *BiddersFilterSetsBidResponsesWithoutBidsListCall { 15428 c.ctx_ = ctx 15429 return c 15430} 15431 15432// Header returns an http.Header that can be modified by the caller to 15433// add HTTP headers to the request. 15434func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) Header() http.Header { 15435 if c.header_ == nil { 15436 c.header_ = make(http.Header) 15437 } 15438 return c.header_ 15439} 15440 15441func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) doRequest(alt string) (*http.Response, error) { 15442 reqHeaders := make(http.Header) 15443 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 15444 for k, v := range c.header_ { 15445 reqHeaders[k] = v 15446 } 15447 reqHeaders.Set("User-Agent", c.s.userAgent()) 15448 if c.ifNoneMatch_ != "" { 15449 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15450 } 15451 var body io.Reader = nil 15452 c.urlParams_.Set("alt", alt) 15453 c.urlParams_.Set("prettyPrint", "false") 15454 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidResponsesWithoutBids") 15455 urls += "?" + c.urlParams_.Encode() 15456 req, err := http.NewRequest("GET", urls, body) 15457 if err != nil { 15458 return nil, err 15459 } 15460 req.Header = reqHeaders 15461 googleapi.Expand(req.URL, map[string]string{ 15462 "filterSetName": c.filterSetName, 15463 }) 15464 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15465} 15466 15467// Do executes the "adexchangebuyer2.bidders.filterSets.bidResponsesWithoutBids.list" call. 15468// Exactly one of *ListBidResponsesWithoutBidsResponse or error will be 15469// non-nil. Any non-2xx status code is an error. Response headers are in 15470// either *ListBidResponsesWithoutBidsResponse.ServerResponse.Header or 15471// (if a response was returned at all) in 15472// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15473// whether the returned error was because http.StatusNotModified was 15474// returned. 15475func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) Do(opts ...googleapi.CallOption) (*ListBidResponsesWithoutBidsResponse, error) { 15476 gensupport.SetOptions(c.urlParams_, opts...) 15477 res, err := c.doRequest("json") 15478 if res != nil && res.StatusCode == http.StatusNotModified { 15479 if res.Body != nil { 15480 res.Body.Close() 15481 } 15482 return nil, &googleapi.Error{ 15483 Code: res.StatusCode, 15484 Header: res.Header, 15485 } 15486 } 15487 if err != nil { 15488 return nil, err 15489 } 15490 defer googleapi.CloseBody(res) 15491 if err := googleapi.CheckResponse(res); err != nil { 15492 return nil, err 15493 } 15494 ret := &ListBidResponsesWithoutBidsResponse{ 15495 ServerResponse: googleapi.ServerResponse{ 15496 Header: res.Header, 15497 HTTPStatusCode: res.StatusCode, 15498 }, 15499 } 15500 target := &ret 15501 if err := gensupport.DecodeResponse(target, res); err != nil { 15502 return nil, err 15503 } 15504 return ret, nil 15505 // { 15506 // "description": "List all reasons for which bid responses were considered to have no applicable bids, with the number of bid responses affected for each reason.", 15507 // "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/bidResponsesWithoutBids", 15508 // "httpMethod": "GET", 15509 // "id": "adexchangebuyer2.bidders.filterSets.bidResponsesWithoutBids.list", 15510 // "parameterOrder": [ 15511 // "filterSetName" 15512 // ], 15513 // "parameters": { 15514 // "filterSetName": { 15515 // "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 15516 // "location": "path", 15517 // "pattern": "^bidders/[^/]+/filterSets/[^/]+$", 15518 // "required": true, 15519 // "type": "string" 15520 // }, 15521 // "pageSize": { 15522 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 15523 // "format": "int32", 15524 // "location": "query", 15525 // "type": "integer" 15526 // }, 15527 // "pageToken": { 15528 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListBidResponsesWithoutBidsResponse.nextPageToken returned from the previous call to the bidResponsesWithoutBids.list method.", 15529 // "location": "query", 15530 // "type": "string" 15531 // } 15532 // }, 15533 // "path": "v2beta1/{+filterSetName}/bidResponsesWithoutBids", 15534 // "response": { 15535 // "$ref": "ListBidResponsesWithoutBidsResponse" 15536 // }, 15537 // "scopes": [ 15538 // "https://www.googleapis.com/auth/adexchange.buyer" 15539 // ] 15540 // } 15541 15542} 15543 15544// Pages invokes f for each page of results. 15545// A non-nil error returned from f will halt the iteration. 15546// The provided context supersedes any context provided to the Context method. 15547func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) Pages(ctx context.Context, f func(*ListBidResponsesWithoutBidsResponse) error) error { 15548 c.ctx_ = ctx 15549 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 15550 for { 15551 x, err := c.Do() 15552 if err != nil { 15553 return err 15554 } 15555 if err := f(x); err != nil { 15556 return err 15557 } 15558 if x.NextPageToken == "" { 15559 return nil 15560 } 15561 c.PageToken(x.NextPageToken) 15562 } 15563} 15564 15565// method id "adexchangebuyer2.bidders.filterSets.filteredBidRequests.list": 15566 15567type BiddersFilterSetsFilteredBidRequestsListCall struct { 15568 s *Service 15569 filterSetName string 15570 urlParams_ gensupport.URLParams 15571 ifNoneMatch_ string 15572 ctx_ context.Context 15573 header_ http.Header 15574} 15575 15576// List: List all reasons that caused a bid request not to be sent for 15577// an impression, with the number of bid requests not sent for each 15578// reason. 15579// 15580// - filterSetName: Name of the filter set that should be applied to the 15581// requested metrics. For example: - For a bidder-level filter set for 15582// bidder 123: `bidders/123/filterSets/abc` - For an account-level 15583// filter set for the buyer account representing bidder 123: 15584// `bidders/123/accounts/123/filterSets/abc` - For an account-level 15585// filter set for the child seat buyer account 456 whose bidder is 15586// 123: `bidders/123/accounts/456/filterSets/abc`. 15587func (r *BiddersFilterSetsFilteredBidRequestsService) List(filterSetName string) *BiddersFilterSetsFilteredBidRequestsListCall { 15588 c := &BiddersFilterSetsFilteredBidRequestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15589 c.filterSetName = filterSetName 15590 return c 15591} 15592 15593// PageSize sets the optional parameter "pageSize": Requested page size. 15594// The server may return fewer results than requested. If unspecified, 15595// the server will pick an appropriate default. 15596func (c *BiddersFilterSetsFilteredBidRequestsListCall) PageSize(pageSize int64) *BiddersFilterSetsFilteredBidRequestsListCall { 15597 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 15598 return c 15599} 15600 15601// PageToken sets the optional parameter "pageToken": A token 15602// identifying a page of results the server should return. Typically, 15603// this is the value of ListFilteredBidRequestsResponse.nextPageToken 15604// returned from the previous call to the filteredBidRequests.list 15605// method. 15606func (c *BiddersFilterSetsFilteredBidRequestsListCall) PageToken(pageToken string) *BiddersFilterSetsFilteredBidRequestsListCall { 15607 c.urlParams_.Set("pageToken", pageToken) 15608 return c 15609} 15610 15611// Fields allows partial responses to be retrieved. See 15612// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15613// for more information. 15614func (c *BiddersFilterSetsFilteredBidRequestsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsFilteredBidRequestsListCall { 15615 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15616 return c 15617} 15618 15619// IfNoneMatch sets the optional parameter which makes the operation 15620// fail if the object's ETag matches the given value. This is useful for 15621// getting updates only after the object has changed since the last 15622// request. Use googleapi.IsNotModified to check whether the response 15623// error from Do is the result of In-None-Match. 15624func (c *BiddersFilterSetsFilteredBidRequestsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsFilteredBidRequestsListCall { 15625 c.ifNoneMatch_ = entityTag 15626 return c 15627} 15628 15629// Context sets the context to be used in this call's Do method. Any 15630// pending HTTP request will be aborted if the provided context is 15631// canceled. 15632func (c *BiddersFilterSetsFilteredBidRequestsListCall) Context(ctx context.Context) *BiddersFilterSetsFilteredBidRequestsListCall { 15633 c.ctx_ = ctx 15634 return c 15635} 15636 15637// Header returns an http.Header that can be modified by the caller to 15638// add HTTP headers to the request. 15639func (c *BiddersFilterSetsFilteredBidRequestsListCall) Header() http.Header { 15640 if c.header_ == nil { 15641 c.header_ = make(http.Header) 15642 } 15643 return c.header_ 15644} 15645 15646func (c *BiddersFilterSetsFilteredBidRequestsListCall) doRequest(alt string) (*http.Response, error) { 15647 reqHeaders := make(http.Header) 15648 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 15649 for k, v := range c.header_ { 15650 reqHeaders[k] = v 15651 } 15652 reqHeaders.Set("User-Agent", c.s.userAgent()) 15653 if c.ifNoneMatch_ != "" { 15654 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15655 } 15656 var body io.Reader = nil 15657 c.urlParams_.Set("alt", alt) 15658 c.urlParams_.Set("prettyPrint", "false") 15659 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBidRequests") 15660 urls += "?" + c.urlParams_.Encode() 15661 req, err := http.NewRequest("GET", urls, body) 15662 if err != nil { 15663 return nil, err 15664 } 15665 req.Header = reqHeaders 15666 googleapi.Expand(req.URL, map[string]string{ 15667 "filterSetName": c.filterSetName, 15668 }) 15669 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15670} 15671 15672// Do executes the "adexchangebuyer2.bidders.filterSets.filteredBidRequests.list" call. 15673// Exactly one of *ListFilteredBidRequestsResponse or error will be 15674// non-nil. Any non-2xx status code is an error. Response headers are in 15675// either *ListFilteredBidRequestsResponse.ServerResponse.Header or (if 15676// a response was returned at all) in error.(*googleapi.Error).Header. 15677// Use googleapi.IsNotModified to check whether the returned error was 15678// because http.StatusNotModified was returned. 15679func (c *BiddersFilterSetsFilteredBidRequestsListCall) Do(opts ...googleapi.CallOption) (*ListFilteredBidRequestsResponse, error) { 15680 gensupport.SetOptions(c.urlParams_, opts...) 15681 res, err := c.doRequest("json") 15682 if res != nil && res.StatusCode == http.StatusNotModified { 15683 if res.Body != nil { 15684 res.Body.Close() 15685 } 15686 return nil, &googleapi.Error{ 15687 Code: res.StatusCode, 15688 Header: res.Header, 15689 } 15690 } 15691 if err != nil { 15692 return nil, err 15693 } 15694 defer googleapi.CloseBody(res) 15695 if err := googleapi.CheckResponse(res); err != nil { 15696 return nil, err 15697 } 15698 ret := &ListFilteredBidRequestsResponse{ 15699 ServerResponse: googleapi.ServerResponse{ 15700 Header: res.Header, 15701 HTTPStatusCode: res.StatusCode, 15702 }, 15703 } 15704 target := &ret 15705 if err := gensupport.DecodeResponse(target, res); err != nil { 15706 return nil, err 15707 } 15708 return ret, nil 15709 // { 15710 // "description": "List all reasons that caused a bid request not to be sent for an impression, with the number of bid requests not sent for each reason.", 15711 // "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/filteredBidRequests", 15712 // "httpMethod": "GET", 15713 // "id": "adexchangebuyer2.bidders.filterSets.filteredBidRequests.list", 15714 // "parameterOrder": [ 15715 // "filterSetName" 15716 // ], 15717 // "parameters": { 15718 // "filterSetName": { 15719 // "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 15720 // "location": "path", 15721 // "pattern": "^bidders/[^/]+/filterSets/[^/]+$", 15722 // "required": true, 15723 // "type": "string" 15724 // }, 15725 // "pageSize": { 15726 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 15727 // "format": "int32", 15728 // "location": "query", 15729 // "type": "integer" 15730 // }, 15731 // "pageToken": { 15732 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListFilteredBidRequestsResponse.nextPageToken returned from the previous call to the filteredBidRequests.list method.", 15733 // "location": "query", 15734 // "type": "string" 15735 // } 15736 // }, 15737 // "path": "v2beta1/{+filterSetName}/filteredBidRequests", 15738 // "response": { 15739 // "$ref": "ListFilteredBidRequestsResponse" 15740 // }, 15741 // "scopes": [ 15742 // "https://www.googleapis.com/auth/adexchange.buyer" 15743 // ] 15744 // } 15745 15746} 15747 15748// Pages invokes f for each page of results. 15749// A non-nil error returned from f will halt the iteration. 15750// The provided context supersedes any context provided to the Context method. 15751func (c *BiddersFilterSetsFilteredBidRequestsListCall) Pages(ctx context.Context, f func(*ListFilteredBidRequestsResponse) error) error { 15752 c.ctx_ = ctx 15753 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 15754 for { 15755 x, err := c.Do() 15756 if err != nil { 15757 return err 15758 } 15759 if err := f(x); err != nil { 15760 return err 15761 } 15762 if x.NextPageToken == "" { 15763 return nil 15764 } 15765 c.PageToken(x.NextPageToken) 15766 } 15767} 15768 15769// method id "adexchangebuyer2.bidders.filterSets.filteredBids.list": 15770 15771type BiddersFilterSetsFilteredBidsListCall struct { 15772 s *Service 15773 filterSetName string 15774 urlParams_ gensupport.URLParams 15775 ifNoneMatch_ string 15776 ctx_ context.Context 15777 header_ http.Header 15778} 15779 15780// List: List all reasons for which bids were filtered, with the number 15781// of bids filtered for each reason. 15782// 15783// - filterSetName: Name of the filter set that should be applied to the 15784// requested metrics. For example: - For a bidder-level filter set for 15785// bidder 123: `bidders/123/filterSets/abc` - For an account-level 15786// filter set for the buyer account representing bidder 123: 15787// `bidders/123/accounts/123/filterSets/abc` - For an account-level 15788// filter set for the child seat buyer account 456 whose bidder is 15789// 123: `bidders/123/accounts/456/filterSets/abc`. 15790func (r *BiddersFilterSetsFilteredBidsService) List(filterSetName string) *BiddersFilterSetsFilteredBidsListCall { 15791 c := &BiddersFilterSetsFilteredBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15792 c.filterSetName = filterSetName 15793 return c 15794} 15795 15796// PageSize sets the optional parameter "pageSize": Requested page size. 15797// The server may return fewer results than requested. If unspecified, 15798// the server will pick an appropriate default. 15799func (c *BiddersFilterSetsFilteredBidsListCall) PageSize(pageSize int64) *BiddersFilterSetsFilteredBidsListCall { 15800 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 15801 return c 15802} 15803 15804// PageToken sets the optional parameter "pageToken": A token 15805// identifying a page of results the server should return. Typically, 15806// this is the value of ListFilteredBidsResponse.nextPageToken returned 15807// from the previous call to the filteredBids.list method. 15808func (c *BiddersFilterSetsFilteredBidsListCall) PageToken(pageToken string) *BiddersFilterSetsFilteredBidsListCall { 15809 c.urlParams_.Set("pageToken", pageToken) 15810 return c 15811} 15812 15813// Fields allows partial responses to be retrieved. See 15814// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15815// for more information. 15816func (c *BiddersFilterSetsFilteredBidsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsFilteredBidsListCall { 15817 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15818 return c 15819} 15820 15821// IfNoneMatch sets the optional parameter which makes the operation 15822// fail if the object's ETag matches the given value. This is useful for 15823// getting updates only after the object has changed since the last 15824// request. Use googleapi.IsNotModified to check whether the response 15825// error from Do is the result of In-None-Match. 15826func (c *BiddersFilterSetsFilteredBidsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsFilteredBidsListCall { 15827 c.ifNoneMatch_ = entityTag 15828 return c 15829} 15830 15831// Context sets the context to be used in this call's Do method. Any 15832// pending HTTP request will be aborted if the provided context is 15833// canceled. 15834func (c *BiddersFilterSetsFilteredBidsListCall) Context(ctx context.Context) *BiddersFilterSetsFilteredBidsListCall { 15835 c.ctx_ = ctx 15836 return c 15837} 15838 15839// Header returns an http.Header that can be modified by the caller to 15840// add HTTP headers to the request. 15841func (c *BiddersFilterSetsFilteredBidsListCall) Header() http.Header { 15842 if c.header_ == nil { 15843 c.header_ = make(http.Header) 15844 } 15845 return c.header_ 15846} 15847 15848func (c *BiddersFilterSetsFilteredBidsListCall) doRequest(alt string) (*http.Response, error) { 15849 reqHeaders := make(http.Header) 15850 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 15851 for k, v := range c.header_ { 15852 reqHeaders[k] = v 15853 } 15854 reqHeaders.Set("User-Agent", c.s.userAgent()) 15855 if c.ifNoneMatch_ != "" { 15856 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15857 } 15858 var body io.Reader = nil 15859 c.urlParams_.Set("alt", alt) 15860 c.urlParams_.Set("prettyPrint", "false") 15861 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids") 15862 urls += "?" + c.urlParams_.Encode() 15863 req, err := http.NewRequest("GET", urls, body) 15864 if err != nil { 15865 return nil, err 15866 } 15867 req.Header = reqHeaders 15868 googleapi.Expand(req.URL, map[string]string{ 15869 "filterSetName": c.filterSetName, 15870 }) 15871 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15872} 15873 15874// Do executes the "adexchangebuyer2.bidders.filterSets.filteredBids.list" call. 15875// Exactly one of *ListFilteredBidsResponse or error will be non-nil. 15876// Any non-2xx status code is an error. Response headers are in either 15877// *ListFilteredBidsResponse.ServerResponse.Header or (if a response was 15878// returned at all) in error.(*googleapi.Error).Header. Use 15879// googleapi.IsNotModified to check whether the returned error was 15880// because http.StatusNotModified was returned. 15881func (c *BiddersFilterSetsFilteredBidsListCall) Do(opts ...googleapi.CallOption) (*ListFilteredBidsResponse, error) { 15882 gensupport.SetOptions(c.urlParams_, opts...) 15883 res, err := c.doRequest("json") 15884 if res != nil && res.StatusCode == http.StatusNotModified { 15885 if res.Body != nil { 15886 res.Body.Close() 15887 } 15888 return nil, &googleapi.Error{ 15889 Code: res.StatusCode, 15890 Header: res.Header, 15891 } 15892 } 15893 if err != nil { 15894 return nil, err 15895 } 15896 defer googleapi.CloseBody(res) 15897 if err := googleapi.CheckResponse(res); err != nil { 15898 return nil, err 15899 } 15900 ret := &ListFilteredBidsResponse{ 15901 ServerResponse: googleapi.ServerResponse{ 15902 Header: res.Header, 15903 HTTPStatusCode: res.StatusCode, 15904 }, 15905 } 15906 target := &ret 15907 if err := gensupport.DecodeResponse(target, res); err != nil { 15908 return nil, err 15909 } 15910 return ret, nil 15911 // { 15912 // "description": "List all reasons for which bids were filtered, with the number of bids filtered for each reason.", 15913 // "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/filteredBids", 15914 // "httpMethod": "GET", 15915 // "id": "adexchangebuyer2.bidders.filterSets.filteredBids.list", 15916 // "parameterOrder": [ 15917 // "filterSetName" 15918 // ], 15919 // "parameters": { 15920 // "filterSetName": { 15921 // "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 15922 // "location": "path", 15923 // "pattern": "^bidders/[^/]+/filterSets/[^/]+$", 15924 // "required": true, 15925 // "type": "string" 15926 // }, 15927 // "pageSize": { 15928 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 15929 // "format": "int32", 15930 // "location": "query", 15931 // "type": "integer" 15932 // }, 15933 // "pageToken": { 15934 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListFilteredBidsResponse.nextPageToken returned from the previous call to the filteredBids.list method.", 15935 // "location": "query", 15936 // "type": "string" 15937 // } 15938 // }, 15939 // "path": "v2beta1/{+filterSetName}/filteredBids", 15940 // "response": { 15941 // "$ref": "ListFilteredBidsResponse" 15942 // }, 15943 // "scopes": [ 15944 // "https://www.googleapis.com/auth/adexchange.buyer" 15945 // ] 15946 // } 15947 15948} 15949 15950// Pages invokes f for each page of results. 15951// A non-nil error returned from f will halt the iteration. 15952// The provided context supersedes any context provided to the Context method. 15953func (c *BiddersFilterSetsFilteredBidsListCall) Pages(ctx context.Context, f func(*ListFilteredBidsResponse) error) error { 15954 c.ctx_ = ctx 15955 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 15956 for { 15957 x, err := c.Do() 15958 if err != nil { 15959 return err 15960 } 15961 if err := f(x); err != nil { 15962 return err 15963 } 15964 if x.NextPageToken == "" { 15965 return nil 15966 } 15967 c.PageToken(x.NextPageToken) 15968 } 15969} 15970 15971// method id "adexchangebuyer2.bidders.filterSets.filteredBids.creatives.list": 15972 15973type BiddersFilterSetsFilteredBidsCreativesListCall struct { 15974 s *Service 15975 filterSetName string 15976 creativeStatusId int64 15977 urlParams_ gensupport.URLParams 15978 ifNoneMatch_ string 15979 ctx_ context.Context 15980 header_ http.Header 15981} 15982 15983// List: List all creatives associated with a specific reason for which 15984// bids were filtered, with the number of bids filtered for each 15985// creative. 15986// 15987// - creativeStatusId: The ID of the creative status for which to 15988// retrieve a breakdown by creative. See creative-status-codes 15989// (https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). 15990// - filterSetName: Name of the filter set that should be applied to the 15991// requested metrics. For example: - For a bidder-level filter set for 15992// bidder 123: `bidders/123/filterSets/abc` - For an account-level 15993// filter set for the buyer account representing bidder 123: 15994// `bidders/123/accounts/123/filterSets/abc` - For an account-level 15995// filter set for the child seat buyer account 456 whose bidder is 15996// 123: `bidders/123/accounts/456/filterSets/abc`. 15997func (r *BiddersFilterSetsFilteredBidsCreativesService) List(filterSetName string, creativeStatusId int64) *BiddersFilterSetsFilteredBidsCreativesListCall { 15998 c := &BiddersFilterSetsFilteredBidsCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15999 c.filterSetName = filterSetName 16000 c.creativeStatusId = creativeStatusId 16001 return c 16002} 16003 16004// PageSize sets the optional parameter "pageSize": Requested page size. 16005// The server may return fewer results than requested. If unspecified, 16006// the server will pick an appropriate default. 16007func (c *BiddersFilterSetsFilteredBidsCreativesListCall) PageSize(pageSize int64) *BiddersFilterSetsFilteredBidsCreativesListCall { 16008 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 16009 return c 16010} 16011 16012// PageToken sets the optional parameter "pageToken": A token 16013// identifying a page of results the server should return. Typically, 16014// this is the value of 16015// ListCreativeStatusBreakdownByCreativeResponse.nextPageToken returned 16016// from the previous call to the filteredBids.creatives.list method. 16017func (c *BiddersFilterSetsFilteredBidsCreativesListCall) PageToken(pageToken string) *BiddersFilterSetsFilteredBidsCreativesListCall { 16018 c.urlParams_.Set("pageToken", pageToken) 16019 return c 16020} 16021 16022// Fields allows partial responses to be retrieved. See 16023// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16024// for more information. 16025func (c *BiddersFilterSetsFilteredBidsCreativesListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsFilteredBidsCreativesListCall { 16026 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16027 return c 16028} 16029 16030// IfNoneMatch sets the optional parameter which makes the operation 16031// fail if the object's ETag matches the given value. This is useful for 16032// getting updates only after the object has changed since the last 16033// request. Use googleapi.IsNotModified to check whether the response 16034// error from Do is the result of In-None-Match. 16035func (c *BiddersFilterSetsFilteredBidsCreativesListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsFilteredBidsCreativesListCall { 16036 c.ifNoneMatch_ = entityTag 16037 return c 16038} 16039 16040// Context sets the context to be used in this call's Do method. Any 16041// pending HTTP request will be aborted if the provided context is 16042// canceled. 16043func (c *BiddersFilterSetsFilteredBidsCreativesListCall) Context(ctx context.Context) *BiddersFilterSetsFilteredBidsCreativesListCall { 16044 c.ctx_ = ctx 16045 return c 16046} 16047 16048// Header returns an http.Header that can be modified by the caller to 16049// add HTTP headers to the request. 16050func (c *BiddersFilterSetsFilteredBidsCreativesListCall) Header() http.Header { 16051 if c.header_ == nil { 16052 c.header_ = make(http.Header) 16053 } 16054 return c.header_ 16055} 16056 16057func (c *BiddersFilterSetsFilteredBidsCreativesListCall) doRequest(alt string) (*http.Response, error) { 16058 reqHeaders := make(http.Header) 16059 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 16060 for k, v := range c.header_ { 16061 reqHeaders[k] = v 16062 } 16063 reqHeaders.Set("User-Agent", c.s.userAgent()) 16064 if c.ifNoneMatch_ != "" { 16065 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16066 } 16067 var body io.Reader = nil 16068 c.urlParams_.Set("alt", alt) 16069 c.urlParams_.Set("prettyPrint", "false") 16070 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/creatives") 16071 urls += "?" + c.urlParams_.Encode() 16072 req, err := http.NewRequest("GET", urls, body) 16073 if err != nil { 16074 return nil, err 16075 } 16076 req.Header = reqHeaders 16077 googleapi.Expand(req.URL, map[string]string{ 16078 "filterSetName": c.filterSetName, 16079 "creativeStatusId": strconv.FormatInt(c.creativeStatusId, 10), 16080 }) 16081 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16082} 16083 16084// Do executes the "adexchangebuyer2.bidders.filterSets.filteredBids.creatives.list" call. 16085// Exactly one of *ListCreativeStatusBreakdownByCreativeResponse or 16086// error will be non-nil. Any non-2xx status code is an error. Response 16087// headers are in either 16088// *ListCreativeStatusBreakdownByCreativeResponse.ServerResponse.Header 16089// or (if a response was returned at all) in 16090// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16091// whether the returned error was because http.StatusNotModified was 16092// returned. 16093func (c *BiddersFilterSetsFilteredBidsCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativeStatusBreakdownByCreativeResponse, error) { 16094 gensupport.SetOptions(c.urlParams_, opts...) 16095 res, err := c.doRequest("json") 16096 if res != nil && res.StatusCode == http.StatusNotModified { 16097 if res.Body != nil { 16098 res.Body.Close() 16099 } 16100 return nil, &googleapi.Error{ 16101 Code: res.StatusCode, 16102 Header: res.Header, 16103 } 16104 } 16105 if err != nil { 16106 return nil, err 16107 } 16108 defer googleapi.CloseBody(res) 16109 if err := googleapi.CheckResponse(res); err != nil { 16110 return nil, err 16111 } 16112 ret := &ListCreativeStatusBreakdownByCreativeResponse{ 16113 ServerResponse: googleapi.ServerResponse{ 16114 Header: res.Header, 16115 HTTPStatusCode: res.StatusCode, 16116 }, 16117 } 16118 target := &ret 16119 if err := gensupport.DecodeResponse(target, res); err != nil { 16120 return nil, err 16121 } 16122 return ret, nil 16123 // { 16124 // "description": "List all creatives associated with a specific reason for which bids were filtered, with the number of bids filtered for each creative.", 16125 // "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/filteredBids/{creativeStatusId}/creatives", 16126 // "httpMethod": "GET", 16127 // "id": "adexchangebuyer2.bidders.filterSets.filteredBids.creatives.list", 16128 // "parameterOrder": [ 16129 // "filterSetName", 16130 // "creativeStatusId" 16131 // ], 16132 // "parameters": { 16133 // "creativeStatusId": { 16134 // "description": "The ID of the creative status for which to retrieve a breakdown by creative. See [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).", 16135 // "format": "int32", 16136 // "location": "path", 16137 // "required": true, 16138 // "type": "integer" 16139 // }, 16140 // "filterSetName": { 16141 // "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 16142 // "location": "path", 16143 // "pattern": "^bidders/[^/]+/filterSets/[^/]+$", 16144 // "required": true, 16145 // "type": "string" 16146 // }, 16147 // "pageSize": { 16148 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 16149 // "format": "int32", 16150 // "location": "query", 16151 // "type": "integer" 16152 // }, 16153 // "pageToken": { 16154 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListCreativeStatusBreakdownByCreativeResponse.nextPageToken returned from the previous call to the filteredBids.creatives.list method.", 16155 // "location": "query", 16156 // "type": "string" 16157 // } 16158 // }, 16159 // "path": "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/creatives", 16160 // "response": { 16161 // "$ref": "ListCreativeStatusBreakdownByCreativeResponse" 16162 // }, 16163 // "scopes": [ 16164 // "https://www.googleapis.com/auth/adexchange.buyer" 16165 // ] 16166 // } 16167 16168} 16169 16170// Pages invokes f for each page of results. 16171// A non-nil error returned from f will halt the iteration. 16172// The provided context supersedes any context provided to the Context method. 16173func (c *BiddersFilterSetsFilteredBidsCreativesListCall) Pages(ctx context.Context, f func(*ListCreativeStatusBreakdownByCreativeResponse) error) error { 16174 c.ctx_ = ctx 16175 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 16176 for { 16177 x, err := c.Do() 16178 if err != nil { 16179 return err 16180 } 16181 if err := f(x); err != nil { 16182 return err 16183 } 16184 if x.NextPageToken == "" { 16185 return nil 16186 } 16187 c.PageToken(x.NextPageToken) 16188 } 16189} 16190 16191// method id "adexchangebuyer2.bidders.filterSets.filteredBids.details.list": 16192 16193type BiddersFilterSetsFilteredBidsDetailsListCall struct { 16194 s *Service 16195 filterSetName string 16196 creativeStatusId int64 16197 urlParams_ gensupport.URLParams 16198 ifNoneMatch_ string 16199 ctx_ context.Context 16200 header_ http.Header 16201} 16202 16203// List: List all details associated with a specific reason for which 16204// bids were filtered, with the number of bids filtered for each detail. 16205// 16206// - creativeStatusId: The ID of the creative status for which to 16207// retrieve a breakdown by detail. See creative-status-codes 16208// (https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). 16209// Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, 16210// and 87. 16211// - filterSetName: Name of the filter set that should be applied to the 16212// requested metrics. For example: - For a bidder-level filter set for 16213// bidder 123: `bidders/123/filterSets/abc` - For an account-level 16214// filter set for the buyer account representing bidder 123: 16215// `bidders/123/accounts/123/filterSets/abc` - For an account-level 16216// filter set for the child seat buyer account 456 whose bidder is 16217// 123: `bidders/123/accounts/456/filterSets/abc`. 16218func (r *BiddersFilterSetsFilteredBidsDetailsService) List(filterSetName string, creativeStatusId int64) *BiddersFilterSetsFilteredBidsDetailsListCall { 16219 c := &BiddersFilterSetsFilteredBidsDetailsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16220 c.filterSetName = filterSetName 16221 c.creativeStatusId = creativeStatusId 16222 return c 16223} 16224 16225// PageSize sets the optional parameter "pageSize": Requested page size. 16226// The server may return fewer results than requested. If unspecified, 16227// the server will pick an appropriate default. 16228func (c *BiddersFilterSetsFilteredBidsDetailsListCall) PageSize(pageSize int64) *BiddersFilterSetsFilteredBidsDetailsListCall { 16229 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 16230 return c 16231} 16232 16233// PageToken sets the optional parameter "pageToken": A token 16234// identifying a page of results the server should return. Typically, 16235// this is the value of 16236// ListCreativeStatusBreakdownByDetailResponse.nextPageToken returned 16237// from the previous call to the filteredBids.details.list method. 16238func (c *BiddersFilterSetsFilteredBidsDetailsListCall) PageToken(pageToken string) *BiddersFilterSetsFilteredBidsDetailsListCall { 16239 c.urlParams_.Set("pageToken", pageToken) 16240 return c 16241} 16242 16243// Fields allows partial responses to be retrieved. See 16244// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16245// for more information. 16246func (c *BiddersFilterSetsFilteredBidsDetailsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsFilteredBidsDetailsListCall { 16247 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16248 return c 16249} 16250 16251// IfNoneMatch sets the optional parameter which makes the operation 16252// fail if the object's ETag matches the given value. This is useful for 16253// getting updates only after the object has changed since the last 16254// request. Use googleapi.IsNotModified to check whether the response 16255// error from Do is the result of In-None-Match. 16256func (c *BiddersFilterSetsFilteredBidsDetailsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsFilteredBidsDetailsListCall { 16257 c.ifNoneMatch_ = entityTag 16258 return c 16259} 16260 16261// Context sets the context to be used in this call's Do method. Any 16262// pending HTTP request will be aborted if the provided context is 16263// canceled. 16264func (c *BiddersFilterSetsFilteredBidsDetailsListCall) Context(ctx context.Context) *BiddersFilterSetsFilteredBidsDetailsListCall { 16265 c.ctx_ = ctx 16266 return c 16267} 16268 16269// Header returns an http.Header that can be modified by the caller to 16270// add HTTP headers to the request. 16271func (c *BiddersFilterSetsFilteredBidsDetailsListCall) Header() http.Header { 16272 if c.header_ == nil { 16273 c.header_ = make(http.Header) 16274 } 16275 return c.header_ 16276} 16277 16278func (c *BiddersFilterSetsFilteredBidsDetailsListCall) doRequest(alt string) (*http.Response, error) { 16279 reqHeaders := make(http.Header) 16280 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 16281 for k, v := range c.header_ { 16282 reqHeaders[k] = v 16283 } 16284 reqHeaders.Set("User-Agent", c.s.userAgent()) 16285 if c.ifNoneMatch_ != "" { 16286 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16287 } 16288 var body io.Reader = nil 16289 c.urlParams_.Set("alt", alt) 16290 c.urlParams_.Set("prettyPrint", "false") 16291 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/details") 16292 urls += "?" + c.urlParams_.Encode() 16293 req, err := http.NewRequest("GET", urls, body) 16294 if err != nil { 16295 return nil, err 16296 } 16297 req.Header = reqHeaders 16298 googleapi.Expand(req.URL, map[string]string{ 16299 "filterSetName": c.filterSetName, 16300 "creativeStatusId": strconv.FormatInt(c.creativeStatusId, 10), 16301 }) 16302 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16303} 16304 16305// Do executes the "adexchangebuyer2.bidders.filterSets.filteredBids.details.list" call. 16306// Exactly one of *ListCreativeStatusBreakdownByDetailResponse or error 16307// will be non-nil. Any non-2xx status code is an error. Response 16308// headers are in either 16309// *ListCreativeStatusBreakdownByDetailResponse.ServerResponse.Header or 16310// (if a response was returned at all) in 16311// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16312// whether the returned error was because http.StatusNotModified was 16313// returned. 16314func (c *BiddersFilterSetsFilteredBidsDetailsListCall) Do(opts ...googleapi.CallOption) (*ListCreativeStatusBreakdownByDetailResponse, error) { 16315 gensupport.SetOptions(c.urlParams_, opts...) 16316 res, err := c.doRequest("json") 16317 if res != nil && res.StatusCode == http.StatusNotModified { 16318 if res.Body != nil { 16319 res.Body.Close() 16320 } 16321 return nil, &googleapi.Error{ 16322 Code: res.StatusCode, 16323 Header: res.Header, 16324 } 16325 } 16326 if err != nil { 16327 return nil, err 16328 } 16329 defer googleapi.CloseBody(res) 16330 if err := googleapi.CheckResponse(res); err != nil { 16331 return nil, err 16332 } 16333 ret := &ListCreativeStatusBreakdownByDetailResponse{ 16334 ServerResponse: googleapi.ServerResponse{ 16335 Header: res.Header, 16336 HTTPStatusCode: res.StatusCode, 16337 }, 16338 } 16339 target := &ret 16340 if err := gensupport.DecodeResponse(target, res); err != nil { 16341 return nil, err 16342 } 16343 return ret, nil 16344 // { 16345 // "description": "List all details associated with a specific reason for which bids were filtered, with the number of bids filtered for each detail.", 16346 // "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/filteredBids/{creativeStatusId}/details", 16347 // "httpMethod": "GET", 16348 // "id": "adexchangebuyer2.bidders.filterSets.filteredBids.details.list", 16349 // "parameterOrder": [ 16350 // "filterSetName", 16351 // "creativeStatusId" 16352 // ], 16353 // "parameters": { 16354 // "creativeStatusId": { 16355 // "description": "The ID of the creative status for which to retrieve a breakdown by detail. See [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, and 87.", 16356 // "format": "int32", 16357 // "location": "path", 16358 // "required": true, 16359 // "type": "integer" 16360 // }, 16361 // "filterSetName": { 16362 // "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 16363 // "location": "path", 16364 // "pattern": "^bidders/[^/]+/filterSets/[^/]+$", 16365 // "required": true, 16366 // "type": "string" 16367 // }, 16368 // "pageSize": { 16369 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 16370 // "format": "int32", 16371 // "location": "query", 16372 // "type": "integer" 16373 // }, 16374 // "pageToken": { 16375 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListCreativeStatusBreakdownByDetailResponse.nextPageToken returned from the previous call to the filteredBids.details.list method.", 16376 // "location": "query", 16377 // "type": "string" 16378 // } 16379 // }, 16380 // "path": "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/details", 16381 // "response": { 16382 // "$ref": "ListCreativeStatusBreakdownByDetailResponse" 16383 // }, 16384 // "scopes": [ 16385 // "https://www.googleapis.com/auth/adexchange.buyer" 16386 // ] 16387 // } 16388 16389} 16390 16391// Pages invokes f for each page of results. 16392// A non-nil error returned from f will halt the iteration. 16393// The provided context supersedes any context provided to the Context method. 16394func (c *BiddersFilterSetsFilteredBidsDetailsListCall) Pages(ctx context.Context, f func(*ListCreativeStatusBreakdownByDetailResponse) error) error { 16395 c.ctx_ = ctx 16396 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 16397 for { 16398 x, err := c.Do() 16399 if err != nil { 16400 return err 16401 } 16402 if err := f(x); err != nil { 16403 return err 16404 } 16405 if x.NextPageToken == "" { 16406 return nil 16407 } 16408 c.PageToken(x.NextPageToken) 16409 } 16410} 16411 16412// method id "adexchangebuyer2.bidders.filterSets.impressionMetrics.list": 16413 16414type BiddersFilterSetsImpressionMetricsListCall struct { 16415 s *Service 16416 filterSetName string 16417 urlParams_ gensupport.URLParams 16418 ifNoneMatch_ string 16419 ctx_ context.Context 16420 header_ http.Header 16421} 16422 16423// List: Lists all metrics that are measured in terms of number of 16424// impressions. 16425// 16426// - filterSetName: Name of the filter set that should be applied to the 16427// requested metrics. For example: - For a bidder-level filter set for 16428// bidder 123: `bidders/123/filterSets/abc` - For an account-level 16429// filter set for the buyer account representing bidder 123: 16430// `bidders/123/accounts/123/filterSets/abc` - For an account-level 16431// filter set for the child seat buyer account 456 whose bidder is 16432// 123: `bidders/123/accounts/456/filterSets/abc`. 16433func (r *BiddersFilterSetsImpressionMetricsService) List(filterSetName string) *BiddersFilterSetsImpressionMetricsListCall { 16434 c := &BiddersFilterSetsImpressionMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16435 c.filterSetName = filterSetName 16436 return c 16437} 16438 16439// PageSize sets the optional parameter "pageSize": Requested page size. 16440// The server may return fewer results than requested. If unspecified, 16441// the server will pick an appropriate default. 16442func (c *BiddersFilterSetsImpressionMetricsListCall) PageSize(pageSize int64) *BiddersFilterSetsImpressionMetricsListCall { 16443 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 16444 return c 16445} 16446 16447// PageToken sets the optional parameter "pageToken": A token 16448// identifying a page of results the server should return. Typically, 16449// this is the value of ListImpressionMetricsResponse.nextPageToken 16450// returned from the previous call to the impressionMetrics.list method. 16451func (c *BiddersFilterSetsImpressionMetricsListCall) PageToken(pageToken string) *BiddersFilterSetsImpressionMetricsListCall { 16452 c.urlParams_.Set("pageToken", pageToken) 16453 return c 16454} 16455 16456// Fields allows partial responses to be retrieved. See 16457// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16458// for more information. 16459func (c *BiddersFilterSetsImpressionMetricsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsImpressionMetricsListCall { 16460 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16461 return c 16462} 16463 16464// IfNoneMatch sets the optional parameter which makes the operation 16465// fail if the object's ETag matches the given value. This is useful for 16466// getting updates only after the object has changed since the last 16467// request. Use googleapi.IsNotModified to check whether the response 16468// error from Do is the result of In-None-Match. 16469func (c *BiddersFilterSetsImpressionMetricsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsImpressionMetricsListCall { 16470 c.ifNoneMatch_ = entityTag 16471 return c 16472} 16473 16474// Context sets the context to be used in this call's Do method. Any 16475// pending HTTP request will be aborted if the provided context is 16476// canceled. 16477func (c *BiddersFilterSetsImpressionMetricsListCall) Context(ctx context.Context) *BiddersFilterSetsImpressionMetricsListCall { 16478 c.ctx_ = ctx 16479 return c 16480} 16481 16482// Header returns an http.Header that can be modified by the caller to 16483// add HTTP headers to the request. 16484func (c *BiddersFilterSetsImpressionMetricsListCall) Header() http.Header { 16485 if c.header_ == nil { 16486 c.header_ = make(http.Header) 16487 } 16488 return c.header_ 16489} 16490 16491func (c *BiddersFilterSetsImpressionMetricsListCall) doRequest(alt string) (*http.Response, error) { 16492 reqHeaders := make(http.Header) 16493 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 16494 for k, v := range c.header_ { 16495 reqHeaders[k] = v 16496 } 16497 reqHeaders.Set("User-Agent", c.s.userAgent()) 16498 if c.ifNoneMatch_ != "" { 16499 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16500 } 16501 var body io.Reader = nil 16502 c.urlParams_.Set("alt", alt) 16503 c.urlParams_.Set("prettyPrint", "false") 16504 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/impressionMetrics") 16505 urls += "?" + c.urlParams_.Encode() 16506 req, err := http.NewRequest("GET", urls, body) 16507 if err != nil { 16508 return nil, err 16509 } 16510 req.Header = reqHeaders 16511 googleapi.Expand(req.URL, map[string]string{ 16512 "filterSetName": c.filterSetName, 16513 }) 16514 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16515} 16516 16517// Do executes the "adexchangebuyer2.bidders.filterSets.impressionMetrics.list" call. 16518// Exactly one of *ListImpressionMetricsResponse or error will be 16519// non-nil. Any non-2xx status code is an error. Response headers are in 16520// either *ListImpressionMetricsResponse.ServerResponse.Header or (if a 16521// response was returned at all) in error.(*googleapi.Error).Header. Use 16522// googleapi.IsNotModified to check whether the returned error was 16523// because http.StatusNotModified was returned. 16524func (c *BiddersFilterSetsImpressionMetricsListCall) Do(opts ...googleapi.CallOption) (*ListImpressionMetricsResponse, error) { 16525 gensupport.SetOptions(c.urlParams_, opts...) 16526 res, err := c.doRequest("json") 16527 if res != nil && res.StatusCode == http.StatusNotModified { 16528 if res.Body != nil { 16529 res.Body.Close() 16530 } 16531 return nil, &googleapi.Error{ 16532 Code: res.StatusCode, 16533 Header: res.Header, 16534 } 16535 } 16536 if err != nil { 16537 return nil, err 16538 } 16539 defer googleapi.CloseBody(res) 16540 if err := googleapi.CheckResponse(res); err != nil { 16541 return nil, err 16542 } 16543 ret := &ListImpressionMetricsResponse{ 16544 ServerResponse: googleapi.ServerResponse{ 16545 Header: res.Header, 16546 HTTPStatusCode: res.StatusCode, 16547 }, 16548 } 16549 target := &ret 16550 if err := gensupport.DecodeResponse(target, res); err != nil { 16551 return nil, err 16552 } 16553 return ret, nil 16554 // { 16555 // "description": "Lists all metrics that are measured in terms of number of impressions.", 16556 // "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/impressionMetrics", 16557 // "httpMethod": "GET", 16558 // "id": "adexchangebuyer2.bidders.filterSets.impressionMetrics.list", 16559 // "parameterOrder": [ 16560 // "filterSetName" 16561 // ], 16562 // "parameters": { 16563 // "filterSetName": { 16564 // "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 16565 // "location": "path", 16566 // "pattern": "^bidders/[^/]+/filterSets/[^/]+$", 16567 // "required": true, 16568 // "type": "string" 16569 // }, 16570 // "pageSize": { 16571 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 16572 // "format": "int32", 16573 // "location": "query", 16574 // "type": "integer" 16575 // }, 16576 // "pageToken": { 16577 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListImpressionMetricsResponse.nextPageToken returned from the previous call to the impressionMetrics.list method.", 16578 // "location": "query", 16579 // "type": "string" 16580 // } 16581 // }, 16582 // "path": "v2beta1/{+filterSetName}/impressionMetrics", 16583 // "response": { 16584 // "$ref": "ListImpressionMetricsResponse" 16585 // }, 16586 // "scopes": [ 16587 // "https://www.googleapis.com/auth/adexchange.buyer" 16588 // ] 16589 // } 16590 16591} 16592 16593// Pages invokes f for each page of results. 16594// A non-nil error returned from f will halt the iteration. 16595// The provided context supersedes any context provided to the Context method. 16596func (c *BiddersFilterSetsImpressionMetricsListCall) Pages(ctx context.Context, f func(*ListImpressionMetricsResponse) error) error { 16597 c.ctx_ = ctx 16598 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 16599 for { 16600 x, err := c.Do() 16601 if err != nil { 16602 return err 16603 } 16604 if err := f(x); err != nil { 16605 return err 16606 } 16607 if x.NextPageToken == "" { 16608 return nil 16609 } 16610 c.PageToken(x.NextPageToken) 16611 } 16612} 16613 16614// method id "adexchangebuyer2.bidders.filterSets.losingBids.list": 16615 16616type BiddersFilterSetsLosingBidsListCall struct { 16617 s *Service 16618 filterSetName string 16619 urlParams_ gensupport.URLParams 16620 ifNoneMatch_ string 16621 ctx_ context.Context 16622 header_ http.Header 16623} 16624 16625// List: List all reasons for which bids lost in the auction, with the 16626// number of bids that lost for each reason. 16627// 16628// - filterSetName: Name of the filter set that should be applied to the 16629// requested metrics. For example: - For a bidder-level filter set for 16630// bidder 123: `bidders/123/filterSets/abc` - For an account-level 16631// filter set for the buyer account representing bidder 123: 16632// `bidders/123/accounts/123/filterSets/abc` - For an account-level 16633// filter set for the child seat buyer account 456 whose bidder is 16634// 123: `bidders/123/accounts/456/filterSets/abc`. 16635func (r *BiddersFilterSetsLosingBidsService) List(filterSetName string) *BiddersFilterSetsLosingBidsListCall { 16636 c := &BiddersFilterSetsLosingBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16637 c.filterSetName = filterSetName 16638 return c 16639} 16640 16641// PageSize sets the optional parameter "pageSize": Requested page size. 16642// The server may return fewer results than requested. If unspecified, 16643// the server will pick an appropriate default. 16644func (c *BiddersFilterSetsLosingBidsListCall) PageSize(pageSize int64) *BiddersFilterSetsLosingBidsListCall { 16645 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 16646 return c 16647} 16648 16649// PageToken sets the optional parameter "pageToken": A token 16650// identifying a page of results the server should return. Typically, 16651// this is the value of ListLosingBidsResponse.nextPageToken returned 16652// from the previous call to the losingBids.list method. 16653func (c *BiddersFilterSetsLosingBidsListCall) PageToken(pageToken string) *BiddersFilterSetsLosingBidsListCall { 16654 c.urlParams_.Set("pageToken", pageToken) 16655 return c 16656} 16657 16658// Fields allows partial responses to be retrieved. See 16659// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16660// for more information. 16661func (c *BiddersFilterSetsLosingBidsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsLosingBidsListCall { 16662 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16663 return c 16664} 16665 16666// IfNoneMatch sets the optional parameter which makes the operation 16667// fail if the object's ETag matches the given value. This is useful for 16668// getting updates only after the object has changed since the last 16669// request. Use googleapi.IsNotModified to check whether the response 16670// error from Do is the result of In-None-Match. 16671func (c *BiddersFilterSetsLosingBidsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsLosingBidsListCall { 16672 c.ifNoneMatch_ = entityTag 16673 return c 16674} 16675 16676// Context sets the context to be used in this call's Do method. Any 16677// pending HTTP request will be aborted if the provided context is 16678// canceled. 16679func (c *BiddersFilterSetsLosingBidsListCall) Context(ctx context.Context) *BiddersFilterSetsLosingBidsListCall { 16680 c.ctx_ = ctx 16681 return c 16682} 16683 16684// Header returns an http.Header that can be modified by the caller to 16685// add HTTP headers to the request. 16686func (c *BiddersFilterSetsLosingBidsListCall) Header() http.Header { 16687 if c.header_ == nil { 16688 c.header_ = make(http.Header) 16689 } 16690 return c.header_ 16691} 16692 16693func (c *BiddersFilterSetsLosingBidsListCall) doRequest(alt string) (*http.Response, error) { 16694 reqHeaders := make(http.Header) 16695 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 16696 for k, v := range c.header_ { 16697 reqHeaders[k] = v 16698 } 16699 reqHeaders.Set("User-Agent", c.s.userAgent()) 16700 if c.ifNoneMatch_ != "" { 16701 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16702 } 16703 var body io.Reader = nil 16704 c.urlParams_.Set("alt", alt) 16705 c.urlParams_.Set("prettyPrint", "false") 16706 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/losingBids") 16707 urls += "?" + c.urlParams_.Encode() 16708 req, err := http.NewRequest("GET", urls, body) 16709 if err != nil { 16710 return nil, err 16711 } 16712 req.Header = reqHeaders 16713 googleapi.Expand(req.URL, map[string]string{ 16714 "filterSetName": c.filterSetName, 16715 }) 16716 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16717} 16718 16719// Do executes the "adexchangebuyer2.bidders.filterSets.losingBids.list" call. 16720// Exactly one of *ListLosingBidsResponse or error will be non-nil. Any 16721// non-2xx status code is an error. Response headers are in either 16722// *ListLosingBidsResponse.ServerResponse.Header or (if a response was 16723// returned at all) in error.(*googleapi.Error).Header. Use 16724// googleapi.IsNotModified to check whether the returned error was 16725// because http.StatusNotModified was returned. 16726func (c *BiddersFilterSetsLosingBidsListCall) Do(opts ...googleapi.CallOption) (*ListLosingBidsResponse, error) { 16727 gensupport.SetOptions(c.urlParams_, opts...) 16728 res, err := c.doRequest("json") 16729 if res != nil && res.StatusCode == http.StatusNotModified { 16730 if res.Body != nil { 16731 res.Body.Close() 16732 } 16733 return nil, &googleapi.Error{ 16734 Code: res.StatusCode, 16735 Header: res.Header, 16736 } 16737 } 16738 if err != nil { 16739 return nil, err 16740 } 16741 defer googleapi.CloseBody(res) 16742 if err := googleapi.CheckResponse(res); err != nil { 16743 return nil, err 16744 } 16745 ret := &ListLosingBidsResponse{ 16746 ServerResponse: googleapi.ServerResponse{ 16747 Header: res.Header, 16748 HTTPStatusCode: res.StatusCode, 16749 }, 16750 } 16751 target := &ret 16752 if err := gensupport.DecodeResponse(target, res); err != nil { 16753 return nil, err 16754 } 16755 return ret, nil 16756 // { 16757 // "description": "List all reasons for which bids lost in the auction, with the number of bids that lost for each reason.", 16758 // "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/losingBids", 16759 // "httpMethod": "GET", 16760 // "id": "adexchangebuyer2.bidders.filterSets.losingBids.list", 16761 // "parameterOrder": [ 16762 // "filterSetName" 16763 // ], 16764 // "parameters": { 16765 // "filterSetName": { 16766 // "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 16767 // "location": "path", 16768 // "pattern": "^bidders/[^/]+/filterSets/[^/]+$", 16769 // "required": true, 16770 // "type": "string" 16771 // }, 16772 // "pageSize": { 16773 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 16774 // "format": "int32", 16775 // "location": "query", 16776 // "type": "integer" 16777 // }, 16778 // "pageToken": { 16779 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListLosingBidsResponse.nextPageToken returned from the previous call to the losingBids.list method.", 16780 // "location": "query", 16781 // "type": "string" 16782 // } 16783 // }, 16784 // "path": "v2beta1/{+filterSetName}/losingBids", 16785 // "response": { 16786 // "$ref": "ListLosingBidsResponse" 16787 // }, 16788 // "scopes": [ 16789 // "https://www.googleapis.com/auth/adexchange.buyer" 16790 // ] 16791 // } 16792 16793} 16794 16795// Pages invokes f for each page of results. 16796// A non-nil error returned from f will halt the iteration. 16797// The provided context supersedes any context provided to the Context method. 16798func (c *BiddersFilterSetsLosingBidsListCall) Pages(ctx context.Context, f func(*ListLosingBidsResponse) error) error { 16799 c.ctx_ = ctx 16800 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 16801 for { 16802 x, err := c.Do() 16803 if err != nil { 16804 return err 16805 } 16806 if err := f(x); err != nil { 16807 return err 16808 } 16809 if x.NextPageToken == "" { 16810 return nil 16811 } 16812 c.PageToken(x.NextPageToken) 16813 } 16814} 16815 16816// method id "adexchangebuyer2.bidders.filterSets.nonBillableWinningBids.list": 16817 16818type BiddersFilterSetsNonBillableWinningBidsListCall struct { 16819 s *Service 16820 filterSetName string 16821 urlParams_ gensupport.URLParams 16822 ifNoneMatch_ string 16823 ctx_ context.Context 16824 header_ http.Header 16825} 16826 16827// List: List all reasons for which winning bids were not billable, with 16828// the number of bids not billed for each reason. 16829// 16830// - filterSetName: Name of the filter set that should be applied to the 16831// requested metrics. For example: - For a bidder-level filter set for 16832// bidder 123: `bidders/123/filterSets/abc` - For an account-level 16833// filter set for the buyer account representing bidder 123: 16834// `bidders/123/accounts/123/filterSets/abc` - For an account-level 16835// filter set for the child seat buyer account 456 whose bidder is 16836// 123: `bidders/123/accounts/456/filterSets/abc`. 16837func (r *BiddersFilterSetsNonBillableWinningBidsService) List(filterSetName string) *BiddersFilterSetsNonBillableWinningBidsListCall { 16838 c := &BiddersFilterSetsNonBillableWinningBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16839 c.filterSetName = filterSetName 16840 return c 16841} 16842 16843// PageSize sets the optional parameter "pageSize": Requested page size. 16844// The server may return fewer results than requested. If unspecified, 16845// the server will pick an appropriate default. 16846func (c *BiddersFilterSetsNonBillableWinningBidsListCall) PageSize(pageSize int64) *BiddersFilterSetsNonBillableWinningBidsListCall { 16847 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 16848 return c 16849} 16850 16851// PageToken sets the optional parameter "pageToken": A token 16852// identifying a page of results the server should return. Typically, 16853// this is the value of ListNonBillableWinningBidsResponse.nextPageToken 16854// returned from the previous call to the nonBillableWinningBids.list 16855// method. 16856func (c *BiddersFilterSetsNonBillableWinningBidsListCall) PageToken(pageToken string) *BiddersFilterSetsNonBillableWinningBidsListCall { 16857 c.urlParams_.Set("pageToken", pageToken) 16858 return c 16859} 16860 16861// Fields allows partial responses to be retrieved. See 16862// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16863// for more information. 16864func (c *BiddersFilterSetsNonBillableWinningBidsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsNonBillableWinningBidsListCall { 16865 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16866 return c 16867} 16868 16869// IfNoneMatch sets the optional parameter which makes the operation 16870// fail if the object's ETag matches the given value. This is useful for 16871// getting updates only after the object has changed since the last 16872// request. Use googleapi.IsNotModified to check whether the response 16873// error from Do is the result of In-None-Match. 16874func (c *BiddersFilterSetsNonBillableWinningBidsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsNonBillableWinningBidsListCall { 16875 c.ifNoneMatch_ = entityTag 16876 return c 16877} 16878 16879// Context sets the context to be used in this call's Do method. Any 16880// pending HTTP request will be aborted if the provided context is 16881// canceled. 16882func (c *BiddersFilterSetsNonBillableWinningBidsListCall) Context(ctx context.Context) *BiddersFilterSetsNonBillableWinningBidsListCall { 16883 c.ctx_ = ctx 16884 return c 16885} 16886 16887// Header returns an http.Header that can be modified by the caller to 16888// add HTTP headers to the request. 16889func (c *BiddersFilterSetsNonBillableWinningBidsListCall) Header() http.Header { 16890 if c.header_ == nil { 16891 c.header_ = make(http.Header) 16892 } 16893 return c.header_ 16894} 16895 16896func (c *BiddersFilterSetsNonBillableWinningBidsListCall) doRequest(alt string) (*http.Response, error) { 16897 reqHeaders := make(http.Header) 16898 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 16899 for k, v := range c.header_ { 16900 reqHeaders[k] = v 16901 } 16902 reqHeaders.Set("User-Agent", c.s.userAgent()) 16903 if c.ifNoneMatch_ != "" { 16904 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16905 } 16906 var body io.Reader = nil 16907 c.urlParams_.Set("alt", alt) 16908 c.urlParams_.Set("prettyPrint", "false") 16909 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/nonBillableWinningBids") 16910 urls += "?" + c.urlParams_.Encode() 16911 req, err := http.NewRequest("GET", urls, body) 16912 if err != nil { 16913 return nil, err 16914 } 16915 req.Header = reqHeaders 16916 googleapi.Expand(req.URL, map[string]string{ 16917 "filterSetName": c.filterSetName, 16918 }) 16919 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16920} 16921 16922// Do executes the "adexchangebuyer2.bidders.filterSets.nonBillableWinningBids.list" call. 16923// Exactly one of *ListNonBillableWinningBidsResponse or error will be 16924// non-nil. Any non-2xx status code is an error. Response headers are in 16925// either *ListNonBillableWinningBidsResponse.ServerResponse.Header or 16926// (if a response was returned at all) in 16927// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16928// whether the returned error was because http.StatusNotModified was 16929// returned. 16930func (c *BiddersFilterSetsNonBillableWinningBidsListCall) Do(opts ...googleapi.CallOption) (*ListNonBillableWinningBidsResponse, error) { 16931 gensupport.SetOptions(c.urlParams_, opts...) 16932 res, err := c.doRequest("json") 16933 if res != nil && res.StatusCode == http.StatusNotModified { 16934 if res.Body != nil { 16935 res.Body.Close() 16936 } 16937 return nil, &googleapi.Error{ 16938 Code: res.StatusCode, 16939 Header: res.Header, 16940 } 16941 } 16942 if err != nil { 16943 return nil, err 16944 } 16945 defer googleapi.CloseBody(res) 16946 if err := googleapi.CheckResponse(res); err != nil { 16947 return nil, err 16948 } 16949 ret := &ListNonBillableWinningBidsResponse{ 16950 ServerResponse: googleapi.ServerResponse{ 16951 Header: res.Header, 16952 HTTPStatusCode: res.StatusCode, 16953 }, 16954 } 16955 target := &ret 16956 if err := gensupport.DecodeResponse(target, res); err != nil { 16957 return nil, err 16958 } 16959 return ret, nil 16960 // { 16961 // "description": "List all reasons for which winning bids were not billable, with the number of bids not billed for each reason.", 16962 // "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/nonBillableWinningBids", 16963 // "httpMethod": "GET", 16964 // "id": "adexchangebuyer2.bidders.filterSets.nonBillableWinningBids.list", 16965 // "parameterOrder": [ 16966 // "filterSetName" 16967 // ], 16968 // "parameters": { 16969 // "filterSetName": { 16970 // "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`", 16971 // "location": "path", 16972 // "pattern": "^bidders/[^/]+/filterSets/[^/]+$", 16973 // "required": true, 16974 // "type": "string" 16975 // }, 16976 // "pageSize": { 16977 // "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.", 16978 // "format": "int32", 16979 // "location": "query", 16980 // "type": "integer" 16981 // }, 16982 // "pageToken": { 16983 // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListNonBillableWinningBidsResponse.nextPageToken returned from the previous call to the nonBillableWinningBids.list method.", 16984 // "location": "query", 16985 // "type": "string" 16986 // } 16987 // }, 16988 // "path": "v2beta1/{+filterSetName}/nonBillableWinningBids", 16989 // "response": { 16990 // "$ref": "ListNonBillableWinningBidsResponse" 16991 // }, 16992 // "scopes": [ 16993 // "https://www.googleapis.com/auth/adexchange.buyer" 16994 // ] 16995 // } 16996 16997} 16998 16999// Pages invokes f for each page of results. 17000// A non-nil error returned from f will halt the iteration. 17001// The provided context supersedes any context provided to the Context method. 17002func (c *BiddersFilterSetsNonBillableWinningBidsListCall) Pages(ctx context.Context, f func(*ListNonBillableWinningBidsResponse) error) error { 17003 c.ctx_ = ctx 17004 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 17005 for { 17006 x, err := c.Do() 17007 if err != nil { 17008 return err 17009 } 17010 if err := f(x); err != nil { 17011 return err 17012 } 17013 if x.NextPageToken == "" { 17014 return nil 17015 } 17016 c.PageToken(x.NextPageToken) 17017 } 17018} 17019